mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Expenses
This commit is contained in:
parent
4a0a9a3c99
commit
17af1e2b9c
@ -6,6 +6,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ExpenseWasArchived extends Event {
|
||||
|
||||
// Expenses
|
||||
use SerializesModels;
|
||||
|
||||
public $expense;
|
||||
|
@ -5,7 +5,7 @@ use App\Events\Event;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ExpenseWasCreated extends Event {
|
||||
|
||||
// Expenses
|
||||
use SerializesModels;
|
||||
|
||||
public $expense;
|
||||
|
@ -5,7 +5,7 @@ use App\Events\Event;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ExpenseWasDeleted extends Event {
|
||||
|
||||
// Expenses
|
||||
use SerializesModels;
|
||||
|
||||
public $expense;
|
||||
|
@ -5,7 +5,7 @@ use App\Events\Event;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ExpenseWasRestored extends Event {
|
||||
|
||||
// Expenses
|
||||
use SerializesModels;
|
||||
|
||||
public $expense;
|
||||
|
@ -17,6 +17,7 @@ use App\Http\Requests\CreateExpenseRequest;
|
||||
|
||||
class ExpenseController extends BaseController
|
||||
{
|
||||
// Expenses
|
||||
protected $expenseRepo;
|
||||
protected $expenseService;
|
||||
|
||||
|
@ -5,6 +5,7 @@ use Illuminate\Validation\Factory;
|
||||
|
||||
class CreateExpenseRequest extends Request
|
||||
{
|
||||
// Expenses
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Validation\Factory;
|
||||
use App\Models\Invoice;
|
||||
|
||||
class UpdatePaymentRequest extends Request
|
||||
|
||||
class UpdateExpenseRequest extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
|
@ -7,6 +7,7 @@ use App\Ninja\Repositories\ExpenseRepository;
|
||||
|
||||
class ExpenseListener
|
||||
{
|
||||
// Expenses
|
||||
protected $expenseRepo;
|
||||
|
||||
public function __construct(ExpenseRepository $expenseRepo)
|
||||
|
@ -6,6 +6,7 @@ use App\Events\ExpenseWasCreated;
|
||||
|
||||
class Expense extends EntityModel
|
||||
{
|
||||
// Expenses
|
||||
use SoftDeletes;
|
||||
use PresentableTrait;
|
||||
|
||||
|
@ -8,7 +8,7 @@ use Request;
|
||||
use Carbon;
|
||||
|
||||
class ExpenseActivity extends Eloquent {
|
||||
|
||||
// Expenses
|
||||
public $timestamps = true;
|
||||
|
||||
public function scopeScope($query)
|
||||
|
@ -5,6 +5,7 @@ use Laracasts\Presenter\Presenter;
|
||||
|
||||
class ExpensePresenter extends Presenter {
|
||||
|
||||
// Expenses
|
||||
public function vendor()
|
||||
{
|
||||
return $this->entity->vendor ? $this->entity->vendor->getDisplayName() : '';
|
||||
|
@ -10,6 +10,7 @@ use App\Models\Expense;
|
||||
|
||||
class ExpenseActivityRepository
|
||||
{
|
||||
// Expenses
|
||||
public function create(Expense $entity, $activityTypeId)
|
||||
{
|
||||
// init activity and copy over context
|
||||
|
@ -8,6 +8,7 @@ use App\Ninja\Repositories\BaseRepository;
|
||||
|
||||
class ExpenseRepository extends BaseRepository
|
||||
{
|
||||
// Expenses
|
||||
public function getClassName()
|
||||
{
|
||||
return 'App\Models\Expense';
|
||||
|
@ -8,6 +8,7 @@ use App\Ninja\Repositories\ExpenseRepository;
|
||||
|
||||
class ExpenseService extends BaseService
|
||||
{
|
||||
// Expenses
|
||||
protected $expenseRepo;
|
||||
protected $datatableService;
|
||||
|
||||
|
@ -5,6 +5,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateExpensesTable extends Migration
|
||||
{
|
||||
// Expenses model
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateExpenseActivitiesTable extends Migration {
|
||||
|
||||
// Expenses model
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
|
43
invoiceninja.komodoproject
Normal file
43
invoiceninja.komodoproject
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Komodo Project File - DO NOT EDIT -->
|
||||
<project id="63a1b237-cbd6-48f9-bac1-8e5d85debff7" kpf_version="5" name="invoiceninja.komodoproject">
|
||||
<preference-set idref="63a1b237-cbd6-48f9-bac1-8e5d85debff7" id="project" preftype="project">
|
||||
<preference-set id="Invocations">
|
||||
<preference-set id="Project">
|
||||
<string id="cookieparams"></string>
|
||||
<string relative="path" id="cwd"></string>
|
||||
<string id="documentRoot"></string>
|
||||
<string id="executable-params"></string>
|
||||
<string id="filename"></string>
|
||||
<string id="getparams"></string>
|
||||
<string id="language">PHP</string>
|
||||
<string id="mpostparams"></string>
|
||||
<string id="params"></string>
|
||||
<string id="postparams"></string>
|
||||
<string id="posttype">application/x-www-form-urlencoded</string>
|
||||
<string id="request-method">GET</string>
|
||||
<boolean id="show-dialog">1</boolean>
|
||||
<boolean id="sim-cgi">0</boolean>
|
||||
<boolean id="use-console">0</boolean>
|
||||
<string id="userCGIEnvironment"></string>
|
||||
<string id="userEnvironment"></string>
|
||||
</preference-set>
|
||||
</preference-set>
|
||||
<string id="currentInvocationLanguage">PHP</string>
|
||||
<string id="defaultDateFormat">%25d/%25m/%25Y %25H:%25M:%25S</string>
|
||||
<boolean id="genericLinter:PHP">1</boolean>
|
||||
<string relative="path" id="import_dirname"></string>
|
||||
<string id="jshint_linter_chooser">default</string>
|
||||
<string id="jslint_linter_chooser">default</string>
|
||||
<string id="language">PHP</string>
|
||||
<string id="lastInvocation">Project</string>
|
||||
<string id="last_local_directory">None</string>
|
||||
<string id="last_remote_directory">None</string>
|
||||
<string id="lessDefaultInterpreter">None</string>
|
||||
<string id="phpDefaultInterpreter">c:\wamp\bin\php\php5.6.15\php.exe</string>
|
||||
<string id="phpExtraPaths">C:\webdev\invoiceninja;C:\webdev\invoiceninja\lavarelcodecomplete</string>
|
||||
<long id="prefs_version">1</long>
|
||||
<string id="sassDefaultInterpreter">None</string>
|
||||
<string id="scssDefaultInterpreter">None</string>
|
||||
</preference-set>
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user