renamed income/expense

This commit is contained in:
denisdulici
2019-12-31 15:49:09 +03:00
parent e2189158b9
commit 2428feb73b
235 changed files with 815 additions and 2147 deletions

View File

@ -47,7 +47,7 @@ class Transaction extends Model
public function bill()
{
return $this->belongsTo('App\Models\Expense\Bill', 'document_id');
return $this->belongsTo('App\Models\Purchase\Bill', 'document_id');
}
public function category()
@ -67,7 +67,7 @@ class Transaction extends Model
public function invoice()
{
return $this->belongsTo('App\Models\Income\Invoice', 'document_id');
return $this->belongsTo('App\Models\Sale\Invoice', 'document_id');
}
public function recurring()

View File

@ -45,32 +45,32 @@ class Company extends Eloquent
public function bills()
{
return $this->hasMany('App\Models\Expense\Bill');
return $this->hasMany('App\Models\Purchase\Bill');
}
public function bill_histories()
{
return $this->hasMany('App\Models\Expense\BillHistory');
return $this->hasMany('App\Models\Purchase\BillHistory');
}
public function bill_items()
{
return $this->hasMany('App\Models\Expense\BillItem');
return $this->hasMany('App\Models\Purchase\BillItem');
}
public function bill_item_taxes()
{
return $this->hasMany('App\Models\Expense\BillItemTax');
return $this->hasMany('App\Models\Purchase\BillItemTax');
}
public function bill_statuses()
{
return $this->hasMany('App\Models\Expense\BillStatus');
return $this->hasMany('App\Models\Purchase\BillStatus');
}
public function bill_totals()
{
return $this->hasMany('App\Models\Expense\BillTotal');
return $this->hasMany('App\Models\Purchase\BillTotal');
}
public function categories()
@ -115,32 +115,32 @@ class Company extends Eloquent
public function invoices()
{
return $this->hasMany('App\Models\Income\Invoice');
return $this->hasMany('App\Models\Sale\Invoice');
}
public function invoice_histories()
{
return $this->hasMany('App\Models\Income\InvoiceHistory');
return $this->hasMany('App\Models\Sale\InvoiceHistory');
}
public function invoice_items()
{
return $this->hasMany('App\Models\Income\InvoiceItem');
return $this->hasMany('App\Models\Sale\InvoiceItem');
}
public function invoice_item_taxes()
{
return $this->hasMany('App\Models\Income\InvoiceItemTax');
return $this->hasMany('App\Models\Sale\InvoiceItemTax');
}
public function invoice_statuses()
{
return $this->hasMany('App\Models\Income\InvoiceStatus');
return $this->hasMany('App\Models\Sale\InvoiceStatus');
}
public function invoice_totals()
{
return $this->hasMany('App\Models\Income\InvoiceTotal');
return $this->hasMany('App\Models\Sale\InvoiceTotal');
}
public function items()

View File

@ -30,7 +30,7 @@ class Contact extends Model
public function bills()
{
return $this->hasMany('App\Models\Expense\Bill');
return $this->hasMany('App\Models\Purchase\Bill');
}
public function currency()
@ -50,7 +50,7 @@ class Contact extends Model
public function invoices()
{
return $this->hasMany('App\Models\Income\Invoice');
return $this->hasMany('App\Models\Sale\Invoice');
}
public function transactions()

View File

@ -46,12 +46,12 @@ class Item extends Model
public function bill_items()
{
return $this->hasMany('App\Models\Expense\BillItem');
return $this->hasMany('App\Models\Purchase\BillItem');
}
public function invoice_items()
{
return $this->hasMany('App\Models\Income\InvoiceItem');
return $this->hasMany('App\Models\Sale\InvoiceItem');
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;
use App\Models\Banking\Transaction;
@ -65,17 +65,17 @@ class Bill extends Model
public function histories()
{
return $this->hasMany('App\Models\Expense\BillHistory');
return $this->hasMany('App\Models\Purchase\BillHistory');
}
public function items()
{
return $this->hasMany('App\Models\Expense\BillItem');
return $this->hasMany('App\Models\Purchase\BillItem');
}
public function item_taxes()
{
return $this->hasMany('App\Models\Expense\BillItemTax');
return $this->hasMany('App\Models\Purchase\BillItemTax');
}
public function recurring()
@ -85,12 +85,12 @@ class Bill extends Model
public function status()
{
return $this->belongsTo('App\Models\Expense\BillStatus', 'bill_status_code', 'code');
return $this->belongsTo('App\Models\Purchase\BillStatus', 'bill_status_code', 'code');
}
public function totals()
{
return $this->hasMany('App\Models\Expense\BillTotal');
return $this->hasMany('App\Models\Purchase\BillTotal');
}
public function transactions()

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -21,11 +21,11 @@ class BillHistory extends Model
public function bill()
{
return $this->belongsTo('App\Models\Expense\Bill');
return $this->belongsTo('App\Models\Purchase\Bill');
}
public function status()
{
return $this->belongsTo('App\Models\Expense\BillStatus', 'status_code', 'code');
return $this->belongsTo('App\Models\Purchase\BillStatus', 'status_code', 'code');
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -29,7 +29,7 @@ class BillItem extends Model
public function bill()
{
return $this->belongsTo('App\Models\Expense\Bill');
return $this->belongsTo('App\Models\Purchase\Bill');
}
public function item()
@ -39,7 +39,7 @@ class BillItem extends Model
public function taxes()
{
return $this->hasMany('App\Models\Expense\BillItemTax', 'bill_item_id', 'id');
return $this->hasMany('App\Models\Purchase\BillItemTax', 'bill_item_id', 'id');
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -21,7 +21,7 @@ class BillItemTax extends Model
public function bill()
{
return $this->belongsTo('App\Models\Expense\Bill');
return $this->belongsTo('App\Models\Purchase\Bill');
}
public function tax()

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Expense;
namespace App\Models\Purchase;
use App\Abstracts\Model;
use App\Models\Setting\Tax;
@ -28,7 +28,7 @@ class BillTotal extends Model
public function bill()
{
return $this->belongsTo('App\Models\Expense\Bill');
return $this->belongsTo('App\Models\Purchase\Bill');
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;
use App\Models\Banking\Transaction;
@ -68,17 +68,17 @@ class Invoice extends Model
public function items()
{
return $this->hasMany('App\Models\Income\InvoiceItem');
return $this->hasMany('App\Models\Sale\InvoiceItem');
}
public function item_taxes()
{
return $this->hasMany('App\Models\Income\InvoiceItemTax');
return $this->hasMany('App\Models\Sale\InvoiceItemTax');
}
public function histories()
{
return $this->hasMany('App\Models\Income\InvoiceHistory');
return $this->hasMany('App\Models\Sale\InvoiceHistory');
}
public function payments()
@ -93,12 +93,12 @@ class Invoice extends Model
public function status()
{
return $this->belongsTo('App\Models\Income\InvoiceStatus', 'invoice_status_code', 'code');
return $this->belongsTo('App\Models\Sale\InvoiceStatus', 'invoice_status_code', 'code');
}
public function totals()
{
return $this->hasMany('App\Models\Income\InvoiceTotal');
return $this->hasMany('App\Models\Sale\InvoiceTotal');
}
public function transactions()

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -21,11 +21,11 @@ class InvoiceHistory extends Model
public function invoice()
{
return $this->belongsTo('App\Models\Income\Invoice');
return $this->belongsTo('App\Models\Sale\Invoice');
}
public function status()
{
return $this->belongsTo('App\Models\Income\InvoiceStatus', 'status_code', 'code');
return $this->belongsTo('App\Models\Sale\InvoiceStatus', 'status_code', 'code');
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -29,7 +29,7 @@ class InvoiceItem extends Model
public function invoice()
{
return $this->belongsTo('App\Models\Income\Invoice');
return $this->belongsTo('App\Models\Sale\Invoice');
}
public function item()
@ -39,7 +39,7 @@ class InvoiceItem extends Model
public function taxes()
{
return $this->hasMany('App\Models\Income\InvoiceItemTax', 'invoice_item_id', 'id');
return $this->hasMany('App\Models\Sale\InvoiceItemTax', 'invoice_item_id', 'id');
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;
use App\Traits\Currencies;
@ -21,7 +21,7 @@ class InvoiceItemTax extends Model
public function invoice()
{
return $this->belongsTo('App\Models\Income\Invoice');
return $this->belongsTo('App\Models\Sale\Invoice');
}
public function tax()

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models\Income;
namespace App\Models\Sale;
use App\Abstracts\Model;
use App\Models\Setting\Tax;
@ -28,7 +28,7 @@ class InvoiceTotal extends Model
public function invoice()
{
return $this->belongsTo('App\Models\Income\Invoice');
return $this->belongsTo('App\Models\Sale\Invoice');
}
/**

View File

@ -24,7 +24,7 @@ class Category extends Model
public function bills()
{
return $this->hasMany('App\Models\Expense\Bill');
return $this->hasMany('App\Models\Purchase\Bill');
}
public function expense_transactions()
@ -39,7 +39,7 @@ class Category extends Model
public function invoices()
{
return $this->hasMany('App\Models\Income\Invoice');
return $this->hasMany('App\Models\Sale\Invoice');
}
public function items()

View File

@ -30,7 +30,7 @@ class Currency extends Model
public function bills()
{
return $this->hasMany('App\Models\Expense\Bill', 'currency_code', 'code');
return $this->hasMany('App\Models\Purchase\Bill', 'currency_code', 'code');
}
public function contacts()
@ -55,7 +55,7 @@ class Currency extends Model
public function invoices()
{
return $this->hasMany('App\Models\Income\Invoice', 'currency_code', 'code');
return $this->hasMany('App\Models\Sale\Invoice', 'currency_code', 'code');
}
public function transactions()

View File

@ -37,12 +37,12 @@ class Tax extends Model
public function bill_items()
{
return $this->hasMany('App\Models\Expense\BillItemTax');
return $this->hasMany('App\Models\Purchase\BillItemTax');
}
public function invoice_items()
{
return $this->hasMany('App\Models\Income\InvoiceItemTax');
return $this->hasMany('App\Models\Sale\InvoiceItemTax');
}
/**