Add pass flushing for move money

This commit is contained in:
piv
2023-03-08 10:35:47 +10:30
parent 4c2b9f6915
commit d9f994195e
5 changed files with 128 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ use itertools::Itertools;
use nalgebra::{DMatrix, Dynamic, LU};
use serde::Deserialize;
use crate::CsvCost;
use crate::{CsvAccount, CsvCost};
#[derive(Debug, PartialEq, Eq)]
pub enum DepartmentType {
@@ -39,20 +39,6 @@ pub struct AllocationStatisticAccountRange {
end: usize,
}
#[derive(Deserialize)]
pub struct CsvAccount {
#[serde(rename = "Code")]
code: String,
#[serde(rename = "Description")]
description: Option<String>,
#[serde(rename = "Type")]
account_type: String,
#[serde(rename = "CostOutput")]
cost_output: Option<String>,
#[serde(rename = "PercentFixed")]
percent_fixed: f64,
}
type CsvCostCentre = HashMap<String, String>;
type CsvArea = HashMap<String, String>;
@@ -393,6 +379,7 @@ where
account: cost.account.clone(),
department: department.department,
value: department.value,
pass: None,
})?;
}
}