fix(invoices): Leistungsdatum editor lost or mis-formatted the service date
Playwright Tests / test (push) Canceled after 0s
Playwright Tests / test (push) Canceled after 0s
- serializeObject: an empty optional date field was run through parseDt, became null and invalidated the whole form, so leaving "bis" empty made dlgform call success with only loginaccount and wiped the stored period. Empty optional date fields are now sent as ''. - dlgform: an invalid form no longer calls success with partial data; it stops the spinner and keeps the dialog open. - eProvisionPeriod: the date inputs return yyyy-MM-dd, which was saved verbatim; it is now stored as German dd.MM.yyyy as documented (PDF, eRechnung mapping). ISO values saved by the old editor are accepted when reopening, so their fields are prefilled instead of empty. - Add a Playwright regression test (e2e_tests/invoice-provisionperiod.cjs) driving the real form builder, serializer and dialog submit handler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e2faf52cd2
commit
4145ab699c
@@ -647,7 +647,7 @@ $ocms.vbl_send = function (ev) {
|
||||
if (rcheckableType.test(type) === true) {
|
||||
val = e.checked ? (val !== '' ? val : 'true') : '';
|
||||
}
|
||||
if (dtf[0].substr(0, 4) === 'date' && dtf.length > 1) {
|
||||
if (dtf[0].substr(0, 4) === 'date' && dtf.length > 1 && (val !== '' || req)) {
|
||||
val = parseDt(val, dtf.slice(1).join(':')); /* should result in date object */
|
||||
if (typeof val === 'boolean') {
|
||||
val = null;
|
||||
|
||||
Reference in New Issue
Block a user