diff --git a/README.md b/README.md index b0edba4..e17275b 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ The columns of the resulting accounting.csv file are defined as follows: - `10920/20051`: Net Card income + tips (card) Mittagstisch [`Net Card MiTi` + `MiTi_Tips_Card`] - `10920/10910`: Tips LoLa paid via Card [`Tips_Card` - `MiTi_Tips_Card`] - `68450/10920`: Commission for Café, Vermietung, summer party, Deposit, Rental, Cultural Payments, and `PaidOut`, i.e. w/o Mittagstisch [`Commission LoLa`] -- `20051/10900`: Amount LoLa owes to Mittagstisch (`Debt to MiTi`) +- `20051/10930`: Amount LoLa owes to Mittagstisch (`Debt to MiTi`) - `20051/30500`: Income LoLa from MiTi selling LoLa [`Gross MiTi (LoLa)` - `Contribution MiTi` = `Income LoLa MiTi`] @@ -295,4 +295,4 @@ They serve for consolidation purposes: Where the absolute net sum for the transitory accounts must not be > 0.05, i.e.: - for `10920`: abs(`10920/30200` + `10920/30700` + `10920/30800` + `10920/23050` + `10920/46000` + `10920/31000` + `10920/32000` +`10920/20051` + `10920/10000` + `10920/10910` - `Payment SumUp` - `68450/10920`) < 0.05 -- for `20051`: abs(`10920/20051` - `20051/10900` - `20051/30200`) < 0.05 +- for `20051`: abs(`10920/20051` - `20051/10930` - `20051/30200`) < 0.05 diff --git a/src/export/export_accounting.rs b/src/export/export_accounting.rs index d0c35d6..7b097ce 100644 --- a/src/export/export_accounting.rs +++ b/src/export/export_accounting.rs @@ -57,7 +57,7 @@ pub fn gather_df_accounting(df: &DataFrame) -> PolarsResult { col("Net Card Total MiTi").alias("10920/20051"), col("Tips Card LoLa").alias("10920/10910"), col("LoLa_Commission").alias("68450/10920"), - col("Debt to MiTi").alias("20051/10900"), + col("Debt to MiTi").alias("20051/10930"), col("Income LoLa MiTi").alias("20051/30500"), ]) .collect() @@ -87,7 +87,7 @@ fn validate_acc_constraint_10920(df_acc: &DataFrame) -> Result<(), Box Result<(), Box> { - let net_expr = col("10920/20051") - col("20051/10900") - col("20051/30500"); + let net_expr = col("10920/20051") - col("20051/10930") - col("20051/30500"); validate_constraint(df_acc, net_expr, "20051")? } @@ -563,7 +563,7 @@ mod tests { "10920/20051" => &[net_card_income_plus_tips_miti_card], "10920/10910" => &[tips_lola_paid_via_card], "68450/10920" => &[Some(commission_lola)], - "20051/10900" => &[debt_to_miti], + "20051/10930" => &[debt_to_miti], "20051/30500" => &[income_lola_miti], )?; match validate_acc_constraint(&df) { diff --git a/src/test_fixtures.rs b/src/test_fixtures.rs index 1669982..9b69bd7 100644 --- a/src/test_fixtures.rs +++ b/src/test_fixtures.rs @@ -316,7 +316,7 @@ pub fn accounting_df_03(sample_date: NaiveDate) -> DataFrame { "10920/20051" => &[189.25], "10920/10910" => &[0.0], "68450/10920" => &[17.99], - "20051/10900" => &[145.76], + "20051/10930" => &[145.76], "20051/30500" => &[42.49], ) .expect("Valid accounting df 03")