summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-26 16:04:45 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-26 16:04:45 +0200
commit9c790be33ee2ba8a543a7c59dfa65586a60dd3f0 (patch)
treec5358be9380d6263266c1a4697e7916d2d535db2
parent051666a90b2c4779efdc8cfb49ab7316c94b58b0 (diff)
fix b2c peppol bug
-rw-r--r--src/administration_reader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/administration_reader.cpp b/src/administration_reader.cpp
index 3ea6316..35ad2ed 100644
--- a/src/administration_reader.cpp
+++ b/src/administration_reader.cpp
@@ -370,6 +370,10 @@ bool administration_reader_import_invoice(char* buffer, size_t buffer_size)
_get_xml_str_x(root, data.customer.businessid, MAX_LEN_BUSINESSID, "cac:AccountingCustomerParty", "cac:Party", "cac:PartyIdentification", "cbc:ID", 0);
_get_xml_str_x(root, data.customer.phone_number, MAX_LEN_PHONE, "cac:AccountingCustomerParty", "cac:Party", "cac:Contact", "cbc:Telephone", 0);
_get_xml_str_x(root, data.customer.email, MAX_LEN_EMAIL, "cac:AccountingCustomerParty", "cac:Party", "cac:Contact", "cbc:ElectronicMail", 0);
+
+ char customer_endpoint_id[50];
+ _get_xml_str_x(root, customer_endpoint_id, 50, "cac:AccountingCustomerParty", "cac:Party", "cbc:EndpointID", 0);
+ if (strcmp(customer_endpoint_id, "[CONSUMER]") == 0) data.customer.type = contact_type::CONTACT_CONSUMER;
// Addressee
_get_xml_str_x(root, data.addressee.name, MAX_LEN_LONG_DESC, "cac:Delivery", "cac:DeliveryParty", "cac:PartyName", "cbc:Name", 0);