mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Save default terms/footers
This commit is contained in:
parent
700ba00c21
commit
ccac01bacd
@ -67,6 +67,22 @@ class TriggeredActions extends AbstractService
|
||||
$this->updated = false;
|
||||
}
|
||||
|
||||
if($this->request->has('save_default_footer') && $this->request->input('save_default_footer') == 'true') {
|
||||
$company = $this->invoice->company;
|
||||
$settings = $company->settings;
|
||||
$settings->invoice_footer = $this->invoice->footer;
|
||||
$company->settings = $settings;
|
||||
$company->save();
|
||||
}
|
||||
|
||||
if($this->request->has('save_default_terms') && $this->request->input('save_default_terms') == 'true') {
|
||||
$company = $this->invoice->company;
|
||||
$settings = $company->settings;
|
||||
$settings->invoice_terms = $this->invoice->terms;
|
||||
$company->settings = $settings;
|
||||
$company->save();
|
||||
}
|
||||
|
||||
if($this->updated)
|
||||
event('eloquent.updated: App\Models\Invoice', $this->invoice);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user