Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
ca7c5b120e
@ -11,7 +11,7 @@ class BillTransactions extends Export implements WithColumnFormatting
|
||||
{
|
||||
public function collection()
|
||||
{
|
||||
$model = Model::with('account', 'category', 'contact', 'document')->bill()->isDocument()->usingSearchString(request('search'));
|
||||
$model = Model::with('account', 'category', 'contact', 'document')->expense()->isDocument()->usingSearchString(request('search'));
|
||||
|
||||
if (!empty($this->ids)) {
|
||||
$model->whereIn('document_id', (array) $this->ids);
|
||||
|
@ -13,7 +13,7 @@ class InvoiceTransactions extends Export implements WithColumnFormatting
|
||||
{
|
||||
public function collection()
|
||||
{
|
||||
$model = Model::with('account', 'category', 'contact', 'document')->invoice()->isDocument()->usingSearchString(request('search'));
|
||||
$model = Model::with('account', 'category', 'contact', 'document')->income()->isDocument()->usingSearchString(request('search'));
|
||||
|
||||
if (!empty($this->ids)) {
|
||||
$model->whereIn('document_id', (array) $this->ids);
|
||||
|
@ -131,7 +131,8 @@ class Document extends Model
|
||||
|
||||
public function transactions()
|
||||
{
|
||||
return $this->hasMany('App\Models\Banking\Transaction', 'document_id')->where('type', 'income');
|
||||
return $this->hasMany('App\Models\Banking\Transaction', 'document_id')
|
||||
->where('type', config('type.' . $this->type . '.transaction_type'));
|
||||
}
|
||||
|
||||
public function totals_sorted()
|
||||
|
Loading…
x
Reference in New Issue
Block a user