Various code for bills and rules.

This commit is contained in:
James Cole
2018-04-14 09:59:04 +02:00
parent 5862b832d9
commit d8a00f4314
22 changed files with 498 additions and 309 deletions

View File

@@ -140,6 +140,15 @@ interface BillRepositoryInterface
*/
public function getPossiblyRelatedJournals(Bill $bill): Collection;
/**
* Return all rules for one bill
*
* @param Bill $bill
*
* @return Collection
*/
public function getRulesForBill(Bill $bill): Collection;
/**
* Return all rules related to the bills in the collection, in an associative array:
* 5= billid
@@ -160,6 +169,14 @@ interface BillRepositoryInterface
*/
public function getYearAverage(Bill $bill, Carbon $date): string;
/**
* Link a set of journals to a bill.
*
* @param Bill $bill
* @param Collection $journals
*/
public function linkCollectionToBill(Bill $bill, Collection $journals): void;
/**
* Given a bill and a date, this method will tell you at which moment this bill expects its next
* transaction. Whether or not it is there already, is not relevant.