Fix importing JSON recurring invoices
This commit is contained in:
parent
7e5c32d0ed
commit
e782e2c9d7
2 changed files with 2 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||
'tax_rate1',
|
||||
'tax_name2',
|
||||
'tax_rate2',
|
||||
'last_sent_date',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -419,7 +419,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