1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Clean up for preload

This commit is contained in:
David Bomba 2022-10-12 12:55:11 +11:00
parent 8e5c825750
commit 271a81da3e
2 changed files with 6 additions and 1 deletions

View File

@ -268,7 +268,11 @@ class InvoiceService
return $this;
}
$this->invoice->due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
//12-10-2022
if($this->invoice->partial > 0 && !$this->invoice->partial_due_date)
$this->invoice->partial_due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
else
$this->invoice->due_date = Carbon::parse($this->invoice->date)->addDays($this->invoice->client->getSetting('payment_terms'));
return $this;
}

View File

@ -28,6 +28,7 @@ class UpdateReminder extends AbstractService
$this->settings = $settings;
}
/* We only support setting reminders based on the due date, not the partial due date */
public function run()
{
if (! $this->settings) {