Add numeric accounts as property to lib, redistribute floating point errors for each account in overhead allocation

This commit is contained in:
Piv
2023-03-09 22:28:05 +10:30
parent 5603ccfd25
commit 568a66c6cf
4 changed files with 35 additions and 5 deletions

View File

@@ -80,6 +80,7 @@ pub extern "C" fn allocate_overheads_from_text(
areas: *const c_char,
cost_centres: *const c_char,
account_type: *const c_char,
use_numeric_accounts: bool,
) -> *mut c_char {
let lines = unsafe {
assert!(!lines.is_null());
@@ -113,7 +114,7 @@ pub extern "C" fn allocate_overheads_from_text(
csv::Reader::from_reader(areas.to_bytes()),
csv::Reader::from_reader(cost_centres.to_bytes()),
&mut output_writer,
true,
use_numeric_accounts,
false,
true,
account_type.to_str().unwrap().to_owned(),