mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Do loop instead of while loop [skip ci]
This commit is contained in:
@@ -556,13 +556,13 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
}
|
}
|
||||||
// find the most recent date for this bill NOT in the future. Cache this date:
|
// find the most recent date for this bill NOT in the future. Cache this date:
|
||||||
$start = clone $bill->date;
|
$start = clone $bill->date;
|
||||||
Log::debug('Start is ' . $start->format('Y-m-d'));
|
Log::debug('nextExpectedMatch: Start is ' . $start->format('Y-m-d'));
|
||||||
|
|
||||||
|
// do loop instead of while loop:
|
||||||
while ($start <= $date) {
|
do {
|
||||||
$start = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
$start = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
||||||
Log::debug('Start is now ' . $start->format('Y-m-d'));
|
Log::debug('Start is now ' . $start->format('Y-m-d'));
|
||||||
}
|
} while ($start <= $date);
|
||||||
|
|
||||||
$end = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
$end = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
||||||
Log::debug('Final start is ' . $start->format('Y-m-d'));
|
Log::debug('Final start is ' . $start->format('Y-m-d'));
|
||||||
|
Reference in New Issue
Block a user