diff --git a/src/main.rs b/src/main.rs index 698bf8c..54f975c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,9 @@ enum Commands { #[arg(long, default_value = "E")] account_type: String, + #[arg(short, long)] + exclude_negative_allocation_statistics: bool, + #[arg(short, long, value_name = "FILE")] output: Option, }, @@ -94,6 +97,7 @@ fn main() -> anyhow::Result<()> { cost_centres, use_numeric_accounts, account_type, + exclude_negative_allocation_statistics, output, } => allocate_overheads( lines, @@ -103,6 +107,7 @@ fn main() -> anyhow::Result<()> { cost_centres, use_numeric_accounts, account_type, + exclude_negative_allocation_statistics, output, ), } @@ -136,6 +141,7 @@ fn allocate_overheads( cost_centres: PathBuf, use_numeric_accounts: bool, account_type: String, + exclude_negative_allocation_statistics: bool, output: Option, ) -> anyhow::Result<()> { coster_rs::reciprocal_allocation( @@ -146,7 +152,7 @@ fn allocate_overheads( csv::Reader::from_path(cost_centres)?, &mut csv::Writer::from_path(output.unwrap_or(PathBuf::from("alloc_output.csv")))?, use_numeric_accounts, - false, + exclude_negative_allocation_statistics, true, account_type, )