diff --git a/bin/backend/controls/panels/Invoice.js b/bin/backend/controls/panels/Invoice.js index 208f11459db9b88e609328efcbc73d5bb7615d06..3c2c0d3fe5964c90a999cf98a1843779fab2caff 100644 --- a/bin/backend/controls/panels/Invoice.js +++ b/bin/backend/controls/panels/Invoice.js @@ -139,6 +139,14 @@ define('package/quiqqer/invoice/bin/backend/controls/panels/Invoice', [ * event: on create */ $onCreate: function() { + require([ + 'package/quiqqer/erp/bin/backend/controls/process/ProcessWindowButton' + ], (ProcessWindowButton) => { + new ProcessWindowButton({ + hash: this.getAttribute('hash') + }).inject(this.getHeader()); + }); + // create the buttons (top bar) this.addButton({ textimage: 'fa fa-print', diff --git a/bin/backend/controls/panels/TemporaryInvoice.js b/bin/backend/controls/panels/TemporaryInvoice.js index 2883330dc634b73e75ab76c68e0a20250710d7e2..e71053a9d52ba0620141d3fc2a8622976f01cb7d 100644 --- a/bin/backend/controls/panels/TemporaryInvoice.js +++ b/bin/backend/controls/panels/TemporaryInvoice.js @@ -1345,6 +1345,14 @@ define('package/quiqqer/invoice/bin/backend/controls/panels/TemporaryInvoice', [ $onCreate: function() { const self = this; + require([ + 'package/quiqqer/erp/bin/backend/controls/process/ProcessWindowButton' + ], (ProcessWindowButton) => { + new ProcessWindowButton({ + hash: this.getAttribute('hash') + }).inject(this.getHeader()); + }); + this.$AddProduct = new QUIButtonMultiple({ textimage: 'fa fa-plus', text: QUILocale.get(lg, 'erp.panel.temporary.invoice.buttonAdd'), diff --git a/composer.json b/composer.json index b2583b221ac78b8c4e08f99f54be6f025bb12ac6..b9ffd506302c3e99ac286ce0320b33a3d4999e14 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php81_bc/strftime": "^0.7", "quiqqer/core": "^2", "quiqqer/qui": "^1.6.7", - "quiqqer/erp": "^3.2", + "quiqqer/erp": "^3.4", "quiqqer/customer": "^2", "quiqqer/payments": "^3", "quiqqer/payment-transactions": "^2", diff --git a/locale.xml b/locale.xml index 098a91cbbc1788a9f9e47d61722da62ca32c2269..8c19b9ba1d02e94c25577a6de01884ba7234c02f 100644 --- a/locale.xml +++ b/locale.xml @@ -1076,8 +1076,8 @@ <en><![CDATA[Ordered by]]></en> </locale> <locale name="erp.panel.temporary.invoice.category.data.textInvoiceText"> - <de><![CDATA[Zusätzlicher Rechnungstext]]></de> - <en><![CDATA[Additional invoice text]]></en> + <de><![CDATA[Zusätzliche Rechnungsinformationen]]></de> + <en><![CDATA[Additional invoice information]]></en> </locale> <locale name="erp.panel.temporary.invoice.category.data.textStatus"> <de><![CDATA[Status]]></de> @@ -1439,8 +1439,8 @@ </locale> <locale name="erp.panel.invoice.data.invoiceText"> - <de><![CDATA[Zusätzlicher Rechnungstext]]></de> - <en><![CDATA[Additional invoice text]]></en> + <de><![CDATA[Zusätzliche Rechnungsinformationen]]></de> + <en><![CDATA[Additional invoice information]]></en> </locale> <locale name="erp.panel.invoice.preview"> <de><![CDATA[Vorschau]]></de> @@ -1648,7 +1648,7 @@ Du besitzt nicht die nötigen Rechte das Rechnungsdatum zu setzen. Daher wird das heutige Datum verwendet. ]]></de> <en><![CDATA[ - You do not have the necessary rights to set the invoice date. Therefore today's date is used. + You do not have the necessary rights to set the invoice date. Therefore, today's date is used. ]]></en> </locale> diff --git a/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php b/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php index 274802a235e197f1578eb04b8f293c06de0bca68..9a021e38c37408341832d92af00b21078037ac63 100644 --- a/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php +++ b/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php @@ -203,7 +203,9 @@ public function __construct($id, Handler $Handler) // invoice extra data - $this->data = json_decode($data['data'], true) ?? []; + if (!empty($data['data'])) { + $this->data = json_decode($data['data'], true) ?? []; + } if (isset($data['custom_data'])) { $this->customData = json_decode($data['custom_data'], true) ?? [];