Skip to content
Code-Schnipsel Gruppen Projekte
Commit 66d46ca7 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat: #112

Übergeordneter 17476424
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -781,6 +781,48 @@ define('package/quiqqer/invoice/bin/backend/controls/panels/TemporaryInvoice', [
});
});
});
}).then(function () {
// check invoice date
var Now = new Date();
Now.setHours(0, 0, 0, 0);
var InvoiceDate = new Date(self.getAttribute('date'));
if (InvoiceDate < Now) {
new QUIConfirm({
title : QUILocale.get(lg, 'window.invoice.date.past.title'),
text : QUILocale.get(lg, 'window.invoice.date.past.title'),
information : QUILocale.get(lg, 'window.invoice.date.past.content'),
icon : 'fa fa-clock-o',
texticon : 'fa fa-clock-o',
maxHeight : 400,
maxWidth : 600,
autoclose : false,
cancel_button: {
text : QUILocale.get(lg, 'window.invoice.date.past.cancel.text'),
textimage: 'fa fa-close'
},
ok_button : {
text : QUILocale.get(lg, 'window.invoice.date.past.ok.text'),
textimage: 'fa fa-check'
},
events : {
onSubmit: function (Win) {
Win.Loader.show();
var Today = new Date()
var today = Today.toISOString().split('T')[0];
self.setAttribute('date', today + ' 00:00:00');
self.save().then(function () {
self.openVerification();
Win.close();
});
}
}
}).open();
}
}).then(function () {
return Invoices.getMissingAttributes(self.getAttribute('invoiceId'));
}).then(function (missing) {
......
......@@ -1560,6 +1560,29 @@
<de><![CDATA[Bitte wählen Sie einen Kunden aus.]]></de>
<en><![CDATA[Please select a customer.]]></en>
</locale>
<locale name="window.invoice.date.past.title">
<de><![CDATA[Rechnungsdatum liegt in der Vergangenheit]]></de>
<en><![CDATA[Invoice date is in the past]]></en>
</locale>
<locale name="window.invoice.date.past.content" html="true">
<de><![CDATA[
Achtung das Rechnungsdatum liegt in der Vergangenheit.<br />
Soll das heutige Datum verwendet werden?
]]></de>
<en><![CDATA[
Attention the invoice date is in the past.<br />
Should today's date be used?
]]></en>
</locale>
<locale name="window.invoice.date.past.cancel.text">
<de><![CDATA[Datum belassen]]></de>
<en><![CDATA[Leave date]]></en>
</locale>
<locale name="window.invoice.date.past.ok.text">
<de><![CDATA[Heutiges Datum verwenden]]></de>
<en><![CDATA[Use today's date]]></en>
</locale>
</groups>
<groups name="quiqqer/invoice" datatype="php">
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren