diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index bc2c5c138edc..d287ebb5ede0 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -204,6 +204,7 @@ class InvoiceController extends BaseController */ public function store(StoreInvoiceRequest $request) { + $client = Client::find($request->input('client_id')); $invoice = $this->invoice_repo->save($request->all(), InvoiceFactory::create(auth()->user()->company()->id, auth()->user()->id)); diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 4626f76e270f..6f03d88297a8 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -349,7 +349,8 @@ class HtmlEngine $data['$item'] = ['value' => '', 'label' => ctrans('texts.item')]; $data['$description'] = ['value' => '', 'label' => ctrans('texts.description')]; - $data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => '']; + //$data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => '']; + $data['$entity_footer'] = ['value' => $this->entity->footer, 'label' => '']; $arrKeysLength = array_map('strlen', array_keys($data)); array_multisort($arrKeysLength, SORT_DESC, $data);