Move collecting journals to the collector.

This commit is contained in:
James Cole
2016-11-05 11:24:15 +01:00
parent aeca2ef3b2
commit 43afdb021a
4 changed files with 24 additions and 53 deletions

View File

@@ -206,6 +206,22 @@ class JournalCollector
return $this;
}
/**
* @param Collection $bills
*
* @return JournalCollector
*/
public function setBills(Collection $bills): JournalCollector
{
if ($bills->count() > 0) {
$billIds = $bills->pluck('id')->toArray();
$this->query->whereIn('transaction_journals.bill_id', $billIds);
}
return $this;
}
/**
* @param Category $category
*