summaryrefslogtreecommitdiff
path: root/src/administration_reader.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-19 19:36:36 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-19 19:36:36 +0200
commit7aea21f2a30e0aa3bc75a579bd01ff9746470c05 (patch)
treee0897a6d4c0414be48cbdfcf565c813572d2ddfd /src/administration_reader.cpp
parentb34be3482e4a322a1198873f4ba3265d8a82e58d (diff)
replace strcmp with strops function
Diffstat (limited to 'src/administration_reader.cpp')
-rw-r--r--src/administration_reader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/administration_reader.cpp b/src/administration_reader.cpp
index 4edf501..4e375c5 100644
--- a/src/administration_reader.cpp
+++ b/src/administration_reader.cpp
@@ -83,7 +83,7 @@ bool administration_reader::open_existing(char* file_path)
if (strlen(name) == 0) continue;
- if (strcmp(name, ADMIN_FILE_INFO) == 0)
+ if (strops::equals(name, ADMIN_FILE_INFO))
{
administration_reader::import_administration_info(buffer, (size_t)size);
}
@@ -193,7 +193,7 @@ bool administration_reader::read_invoice_from_xml(invoice* result, char* buffer,
char customer_endpoint_id[50];
xml_get_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;
+ if (strops::equals(customer_endpoint_id, "[CONSUMER]")) data.customer.type = contact_type::CONTACT_CONSUMER;
// Addressee
xml_get_str_x(root, data.addressee.name, MAX_LEN_LONG_DESC, "cac:Delivery", "cac:DeliveryParty", "cac:PartyName", "cbc:Name", 0);
@@ -210,7 +210,7 @@ bool administration_reader::read_invoice_from_xml(invoice* result, char* buffer,
xml_node* child = xml_node_child(root, x);
char* child_name = (char*)xml_easy_name(child);
- if (strcmp(child_name, "cac:InvoiceLine") == 0)
+ if (strops::equals(child_name, "cac:InvoiceLine"))
{
billing_item bi = {0};
@@ -224,7 +224,7 @@ bool administration_reader::read_invoice_from_xml(invoice* result, char* buffer,
char percentage_buffer[5] = {0};
xml_get_str_attribute(child, percentage_buffer, 5, "unitCode", "cbc:InvoicedQuantity", 0);
- bi.amount_is_percentage = strcmp(percentage_buffer, "%") == 0;
+ bi.amount_is_percentage = strops::equals(percentage_buffer, "%");
xml_get_str_attribute(child, bi.currency, 5, "currencyID", "cbc:LineExtensionAmount", 0);
bi.discount_is_percentage = xml_get_node_x(child, "cac:AllowanceCharge", "cbc:MultiplierFactorNumeric", 0) != 0;