1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Handle invoice_design_id set to 0

This commit is contained in:
Hillel Coren 2017-07-09 16:02:54 +03:00
parent 208354ce9f
commit e73ed6967a

View File

@ -384,12 +384,12 @@ class InvoiceRepository extends BaseRepository
}
}
$invoice->fill($data);
if (! $invoice->invoice_design_id) {
$invoice->invoice_design_id = 1;
if (isset($data['invoice_design_id']) && ! $data['invoice_design_id']) {
$data['invoice_design_id'] = 1;
}
$invoice->fill($data);
if ((isset($data['set_default_terms']) && $data['set_default_terms'])
|| (isset($data['set_default_footer']) && $data['set_default_footer'])) {
if (isset($data['set_default_terms']) && $data['set_default_terms']) {