mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Support clearing due date
This commit is contained in:
parent
787c7e2d95
commit
de53a2ec6f
@ -448,7 +448,9 @@ class InvoiceRepository extends BaseRepository
|
||||
$invoice->due_date = $data['due_date'];
|
||||
}
|
||||
} else {
|
||||
if (! empty($data['due_date']) || ! empty($data['due_date_sql'])) {
|
||||
if ($isNew && empty($data['due_date']) && $invoice->due_date) {
|
||||
// do nothing
|
||||
} elseif (isset($data['due_date']) || isset($data['due_date_sql'])) {
|
||||
$invoice->due_date = isset($data['due_date_sql']) ? $data['due_date_sql'] : Utils::toSqlDate($data['due_date']);
|
||||
}
|
||||
$invoice->frequency_id = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user