Fix a few commands.

This commit is contained in:
James Cole
2023-05-07 20:17:29 +02:00
parent 309d3e8e95
commit e5a77a86f9
33 changed files with 1575 additions and 1017 deletions

View File

@@ -146,7 +146,7 @@ class BudgetLimitHandler
{
if(0 === (int)$budgetLimit->id) {
return '0';
}
}
$limitPeriod = Period::make(
$budgetLimit->start_date,
$budgetLimit->end_date,
@@ -217,10 +217,10 @@ class BudgetLimitHandler
if ($currentPeriod->equals($limitPeriod)) {
$amount = 0 === (int)$budgetLimit->id ? '0' : $budgetLimit->amount;
}
if(0 === bccomp($amount,'0')) {
if(0 === bccomp($amount, '0')) {
Log::debug('Amount is zero, will not create AB.');
}
if(0 !== bccomp($amount,'0')) {
if(0 !== bccomp($amount, '0')) {
Log::debug(sprintf('Will create AB for period %s to %s', $current->format('Y-m-d'), $currentEnd->format('Y-m-d')));
$availableBudget = new AvailableBudget(
[