mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Merge pull request #4627 from devfaz/add_bill_nobill
added has_no_bill and has_any_bill search parameters
This commit is contained in:
@@ -269,6 +269,19 @@ trait MetaCollection
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit results to transactions without a bill..
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withBill(): GroupCollectorInterface
|
||||
{
|
||||
$this->withBillInformation();
|
||||
$this->query->whereNotNull('transaction_journals.bill_id');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will include bill name + ID, if any.
|
||||
*
|
||||
|
@@ -520,6 +520,13 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function withTagInformation(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit results to transactions without a bill..
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withBill(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit results to a transactions without a bill.
|
||||
*
|
||||
|
@@ -476,6 +476,12 @@ class OperatorQuerySearch implements SearchInterface
|
||||
//
|
||||
// bill
|
||||
//
|
||||
case 'has_no_bill':
|
||||
$this->collector->withoutBill();
|
||||
break;
|
||||
case 'has_any_bill':
|
||||
$this->collector->withBill();
|
||||
break;
|
||||
case 'bill_is':
|
||||
$result = $this->billRepository->searchBill($value, 25);
|
||||
if ($result->count() > 0) {
|
||||
|
Reference in New Issue
Block a user