Fix importing JSON recurring invoices
This commit is contained in:
parent
349f7f2621
commit
54726d3565
2 changed files with 2 additions and 1 deletions
|
|
@ -47,6 +47,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||
'tax_name2',
|
||||
'tax_rate2',
|
||||
'private_notes',
|
||||
'last_sent_date',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ class InvoiceRepository extends BaseRepository
|
|||
}
|
||||
|
||||
if ($invoice->is_recurring) {
|
||||
if (isset($data['start_date']) && $invoice->start_date && $invoice->start_date != Utils::toSqlDate($data['start_date'])) {
|
||||
if (! $isNew && isset($data['start_date']) && $invoice->start_date && $invoice->start_date != Utils::toSqlDate($data['start_date'])) {
|
||||
$invoice->last_sent_date = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue