summaryrefslogtreecommitdiff
path: root/tests/test_helper.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-25 08:12:03 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-25 08:12:03 +0200
commitc35aa95081b994bf0d66d762945ad93bf501ff95 (patch)
treeb802969adbb9c6a5accf094d91883a036f92e506 /tests/test_helper.cpp
parent5c22a35be47a10f85107107a9124ec401e6cd28d (diff)
tests
Diffstat (limited to 'tests/test_helper.cpp')
-rw-r--r--tests/test_helper.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_helper.cpp b/tests/test_helper.cpp
index ebc61a3..ff20ff8 100644
--- a/tests/test_helper.cpp
+++ b/tests/test_helper.cpp
@@ -151,6 +151,21 @@ static billing_item _create_bi6()
return item;
}
+static billing_item _create_bix(char* name, float amount, bool aip, float npi, float discount, bool dip, char* taxrate)
+{
+ billing_item item = administration::billing_item_create_empty();
+ item.amount = amount;
+ item.amount_is_percentage = aip;
+ strops::copy(item.description, name, MAX_LEN_LONG_DESC);
+ item.net_per_item = npi;
+ item.discount = discount;
+ item.discount_is_percentage = dip;
+ tax_rate rate;
+ administration::tax_rate_get_by_internal_code(&rate, taxrate);
+ strops::copy(item.tax_internal_code, rate.internal_code, MAX_LEN_SHORT_DESC);
+ return item;
+}
+
static billing_item _create_bi(float amount, float npi, char* taxrate)
{
billing_item item = administration::billing_item_create_empty();