diff options
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(); |
