mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Add transaction filters for payments and expenses
This commit is contained in:
parent
70db8052c0
commit
ecb4ee7b8f
@ -92,6 +92,20 @@ class ExpenseFilters extends QueryFilters
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of expenses that can be matched to bank transactions
|
||||
*/
|
||||
public function match_transactions($value = '')
|
||||
{
|
||||
|
||||
if($value == 'true')
|
||||
{
|
||||
return $this->builder->where('is_deleted',0)->whereNull('transaction_id');
|
||||
}
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filters the list based on the status
|
||||
|
@ -81,6 +81,20 @@ class PaymentFilters extends QueryFilters
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of payments that can be matched to bank transactions
|
||||
*/
|
||||
public function match_transactions($value = '')
|
||||
{
|
||||
|
||||
if($value == 'true')
|
||||
{
|
||||
return $this->builder->where('is_deleted',0)->whereNull('transaction_id');
|
||||
}
|
||||
|
||||
return $this->builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user