diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index c20594a03e..3e1d220ae4 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -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; } diff --git a/app/Services/Invoice/UpdateReminder.php b/app/Services/Invoice/UpdateReminder.php index 642c36b532..24a4409b5e 100644 --- a/app/Services/Invoice/UpdateReminder.php +++ b/app/Services/Invoice/UpdateReminder.php @@ -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) {