Add account type option to allocat overheads
This commit is contained in:
@@ -58,6 +58,9 @@ enum Commands {
|
||||
#[arg(short, long)]
|
||||
use_numeric_accounts: bool,
|
||||
|
||||
#[arg(long, default_value = "E")]
|
||||
account_type: String,
|
||||
|
||||
#[arg(short, long, value_name = "FILE")]
|
||||
output: Option<PathBuf>,
|
||||
},
|
||||
@@ -81,6 +84,7 @@ fn main() -> anyhow::Result<()> {
|
||||
areas,
|
||||
cost_centres,
|
||||
use_numeric_accounts,
|
||||
account_type,
|
||||
output,
|
||||
} => allocate_overheads(
|
||||
lines,
|
||||
@@ -89,6 +93,7 @@ fn main() -> anyhow::Result<()> {
|
||||
areas,
|
||||
cost_centres,
|
||||
use_numeric_accounts,
|
||||
account_type,
|
||||
output,
|
||||
),
|
||||
}
|
||||
@@ -119,6 +124,7 @@ fn allocate_overheads(
|
||||
areas: PathBuf,
|
||||
cost_centres: PathBuf,
|
||||
use_numeric_accounts: bool,
|
||||
account_type: String,
|
||||
output: Option<PathBuf>,
|
||||
) -> anyhow::Result<()> {
|
||||
coster_rs::reciprocal_allocation(
|
||||
@@ -131,7 +137,7 @@ fn allocate_overheads(
|
||||
use_numeric_accounts,
|
||||
false,
|
||||
true,
|
||||
"E".to_owned(),
|
||||
account_type,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user