diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-25 08:12:03 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-25 08:12:03 +0200 |
| commit | c35aa95081b994bf0d66d762945ad93bf501ff95 (patch) | |
| tree | b802969adbb9c6a5accf094d91883a036f92e506 /tests/test_helper.cpp | |
| parent | 5c22a35be47a10f85107107a9124ec401e6cd28d (diff) | |
tests
Diffstat (limited to 'tests/test_helper.cpp')
| -rw-r--r-- | tests/test_helper.cpp | 15 |
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(); |
