diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index ae7d629b39ca..aed41f0826ec 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -390,7 +390,7 @@ class InvoiceRepository extends BaseRepository $invoice->custom_taxes2 = $account->custom_invoice_taxes2 ?: false; // set the default due date - if ($entityType == ENTITY_INVOICE && empty($data['partial_due_date'])) { + if (empty($data['partial_due_date'])) { $client = Client::scope()->whereId($data['client_id'])->first(); $invoice->due_date = $account->defaultDueDate($client); } diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 5c619ea9b756..fbaa3d94f705 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -190,7 +190,7 @@ {!! Former::text('invoice_date')->data_bind("datePicker: invoice_date, valueUpdate: 'afterkeydown'")->label($account->getLabel("{$entityType}_date")) ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('invoice_date') !!} {!! Former::text('due_date')->data_bind("datePicker: due_date, valueUpdate: 'afterkeydown'")->label($account->getLabel($invoice->getDueDateLabel())) - ->placeholder($invoice->id || $invoice->isQuote() ? ' ' : $account->present()->dueDatePlaceholder()) + ->placeholder($invoice->id ? ' ' : $account->present()->dueDatePlaceholder()) ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('due_date') !!}