diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 43599dc820..00ce78394f 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -262,6 +262,8 @@ class BillRepository implements BillRepositoryInterface } /** + * The "paid dates" list is a list of dates of transaction journals that are linked to this bill. + * * @param Bill $bill * @param Carbon $start * @param Carbon $end diff --git a/resources/views/list/bills.twig b/resources/views/list/bills.twig index 7e6d1af0b1..b800e35b1e 100644 --- a/resources/views/list/bills.twig +++ b/resources/views/list/bills.twig @@ -40,6 +40,29 @@ + {# + Terms: + paidDates: journals linked to the bill between $start and $end. + payDates: dates in this period ($start and $end) system thinks bill should be paid. + Possible situations: + + 1: + paidDates = 0 (bill not paid in period) + payDates = 0 (bill not expected to be paid in this period) + bill is active. + + 2: + paidDates = 0 (bill not paid in period) + payDates = 0 (bill IS expected to be paid in this period) + bill is active + + 3: + paidDates >= payDates (bill is paid as many times or more than the amount of times expected). + + 4: + bill is not active + #} + {% if entry.paidDates.count() == 0 and entry.payDates.count() == 0 and entry.active %}