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,6 +268,10 @@ class InvoiceService
return $this;
}
//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) {