summaryrefslogtreecommitdiff
path: root/tests/test_helper.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-10 22:03:05 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-10 22:03:05 +0200
commitd976c1227f367a4547a004597b8d360a8958eba9 (patch)
tree891b89263176375f058598b629b145177531a54a /tests/test_helper.cpp
parent1c53bd3ac83cc7a985983ac656bc2599276808a4 (diff)
working on NL tax reports
Diffstat (limited to 'tests/test_helper.cpp')
-rw-r--r--tests/test_helper.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test_helper.cpp b/tests/test_helper.cpp
index 1dbb2b2..167cb15 100644
--- a/tests/test_helper.cpp
+++ b/tests/test_helper.cpp
@@ -162,6 +162,34 @@ static billing_item _create_bi6(invoice *inv)
return item;
}
+static billing_item _create_bi(float amount, float npi, char* taxrate)
+{
+ billing_item item = administration::billing_item_create_empty();
+ item.amount = amount;
+ item.amount_is_percentage = 0;
+ strops::copy(item.description, "#", MAX_LEN_LONG_DESC);
+ item.net_per_item = npi;
+ item.discount = 0.0f;
+ item.discount_is_percentage = 0;
+ tax_rate rate;
+ administration::tax_rate_get_by_shorthandle(&rate, taxrate);
+ strops::copy(item.tax_rate_id, rate.id, MAX_LEN_ID);
+ return item;
+}
+
+static invoice _create_nl_b2b_inv_outgoing()
+{
+ invoice inv = administration::invoice_create_empty();
+ inv.supplier = administration::company_info_get();
+ inv.customer = _create_nl_business();
+ inv.is_outgoing = 1;
+ inv.status = invoice_status::INVOICE_CONCEPT;
+ inv.issued_at = time(NULL);
+ inv.delivered_at = inv.issued_at;
+ inv.expires_at = inv.issued_at + 1000;
+ return inv;
+}
+
static bool _test_peppol_file(char* id)
{
bool result = 1;