mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:44:28 -04:00
Fix isValid in checkInvoices
This commit is contained in:
parent
530973d86b
commit
7e1f01373d
@ -147,6 +147,7 @@ class CheckData extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$isValid = true;
|
||||||
$date = new Carbon();
|
$date = new Carbon();
|
||||||
$date = $date->subDays(1)->format('Y-m-d');
|
$date = $date->subDays(1)->format('Y-m-d');
|
||||||
|
|
||||||
@ -163,12 +164,12 @@ class CheckData extends Command
|
|||||||
//$this->logMessage('Result: ' . $result);
|
//$this->logMessage('Result: ' . $result);
|
||||||
|
|
||||||
if ($result && $result != $invoice->balance) {
|
if ($result && $result != $invoice->balance) {
|
||||||
$this->logMessage("Amounts do not match {$link} - PHP: {$invoice->balance}, JS: {$result}");
|
$this->logMessage("PHP/JS amounts do not match {$link} - PHP: {$invoice->balance}, JS: {$result}");
|
||||||
$this->isValid = false;
|
$this->isValid = $isValid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isValid) {
|
if ($isValid) {
|
||||||
$this->logMessage('0 invoices with mismatched PHP/JS balances');
|
$this->logMessage('0 invoices with mismatched PHP/JS balances');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user