1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Fixes for design id

This commit is contained in:
David Bomba 2020-06-29 11:04:09 +10:00
parent 22c8304510
commit 20e95223c1

View File

@ -303,7 +303,9 @@ class BaseRepository
}
if(!$model->design_id)
$model->design_id = $client->getSetting('invoice_design_id');
$model->design_id = $this->decodePrimaryKey($client->getSetting('invoice_design_id'));
info("model design id = {$model->design_id}");
event(new InvoiceWasUpdated($model, $model->company));
@ -313,14 +315,14 @@ class BaseRepository
$model = $model->calc()->getCredit();
if(!$model->design_id)
$model->design_id = $client->getSetting('credit_design_id');
$model->design_id = $this->decodePrimaryKey($client->getSetting('credit_design_id'));
}
if ($class->name == Quote::class) {
$model = $model->calc()->getQuote();
if(!$model->design_id)
$model->design_id = $client->getSetting('quote_design_id');
$model->design_id = $this->decodePrimaryKey($client->getSetting('quote_design_id'));
}
$model->save();