bugfix: it was not possible to create documents with customers not havin a tax ID. But the customer tax id should not be required! …altered some code…

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-31 19:56:58 +01:00
parent b875bfaba1
commit dc0b381aba
2 changed files with 28 additions and 28 deletions

View File

@@ -26,23 +26,25 @@
contact.FN = fn(contact.vcard);
contact.ORG = org(contact.vcard);
const extras = contact.vcard.match(/^X-.*:.+/gm);
for (let ex of extras){
ex = extra(ex);
switch (ex.name){
case 'CUSTOMER-NUMBER':
contact.customer_number = ex.value;
break;
case 'TAX-NUMBER':
contact.tax_id = ex.value;
break;
case 'BANK-ACCOUNT':
contact.bank_account = ex.value;
break;
case 'COURT':
contact.local_court = ex.value;
break;
default:
console.log(ex);
if (extras) {
for (let ex of extras){
ex = extra(ex);
switch (ex.name){
case 'CUSTOMER-NUMBER':
contact.customer_number = ex.value;
break;
case 'TAX-NUMBER':
contact.tax_id = ex.value;
break;
case 'BANK-ACCOUNT':
contact.bank_account = ex.value;
break;
case 'COURT':
contact.local_court = ex.value;
break;
default:
console.log(ex);
}
}
}
delete contact.vcard;