1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fix importing JSON recurring invoices

This commit is contained in:
Hillel Coren 2017-05-24 21:22:24 +03:00
parent 7e5c32d0ed
commit e782e2c9d7
2 changed files with 2 additions and 1 deletions

View File

@ -46,6 +46,7 @@ class Invoice extends EntityModel implements BalanceAffecting
'tax_rate1',
'tax_name2',
'tax_rate2',
'last_sent_date',
];
/**

View File

@ -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;
}