Set next_send_date to null when balance == 0

This commit is contained in:
David Bomba 2020-10-29 13:55:26 +11:00
parent 73802c3647
commit e891238db0

View File

@ -113,6 +113,9 @@ class InvoiceService
{ {
$this->invoice = (new UpdateBalance($this->invoice, $balance_adjustment))->run(); $this->invoice = (new UpdateBalance($this->invoice, $balance_adjustment))->run();
if((int)$this->invoice->balance == 0)
$this->invoice->next_send_date = null;
return $this; return $this;
} }