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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user