mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for edge cases when applying :MONTH in invoice pdfs
This commit is contained in:
parent
b06d761c8e
commit
d575fac950
@ -483,7 +483,7 @@ trait MakesInvoiceValues
|
||||
$output = (int)$raw - (int)$_value[1]; // 1 (:MONTH) - 4
|
||||
}
|
||||
|
||||
if ($_operation == '/') {
|
||||
if ($_operation == '/' && (int)$_value[1] != 0) {
|
||||
$output = (int)$raw / (int)$_value[1]; // 1 (:MONTH) / 4
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ class MultiPaymentDeleteTest extends TestCase
|
||||
|
||||
$this->assertEquals(0, $invoice->fresh()->balance);
|
||||
$this->assertEquals(0, $invoice->client->fresh()->balance);
|
||||
$this->assertEquals(262, $invoice->client->fresh()->paid_to_date);
|
||||
$this->assertEquals(0, $invoice->client->fresh()->paid_to_date);
|
||||
|
||||
|
||||
//Delete payment 4 which is for $162
|
||||
|
Loading…
x
Reference in New Issue
Block a user