From c668e58c77b7820b1893cbf609e8f8dbddb4f63e Mon Sep 17 00:00:00 2001 From: scoobybejesus Date: Sun, 24 Nov 2019 13:05:14 -0500 Subject: [PATCH] Improved journal entry report formatting. --- src/export_je.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/export_je.rs b/src/export_je.rs index 52e8a7e..ffaf246 100644 --- a/src/export_je.rs +++ b/src/export_je.rs @@ -47,6 +47,12 @@ Enable like-kind treatment: {}", )?; } + let note = " +Note: Home currency account activity may be better represented as equity-type accounts, +depending on the bookkeeping practices you employ."; + + writeln!(file, "{}", note)?; + let length = txns_map.len(); for txn_num in 1..=length { @@ -58,13 +64,7 @@ Enable like-kind treatment: {}", let auto_memo = txn.get_auto_memo(ars, raw_acct_map,acct_map, &settings.home_currency)?; let tx_type = txn.transaction_type(&ars, &raw_acct_map, &acct_map)?; - writeln!(file, "\n=====================================\n")?; - writeln!(file, "Txn {} on {}. {}. {}", - txn_num, - date, - user_memo, - auto_memo, - )?; + writeln!(file, "\n====================================================================================================\n")?; let mut cost_basis_ic: Option = None; let mut cost_basis_og: Option = None; @@ -282,6 +282,13 @@ Enable like-kind treatment: {}", credits, )?; + writeln!(file, "\n (Txn {} on {}. {}. {})", + txn_num, + date, + user_memo, + auto_memo, + )?; + // if (debits - credits) != d128!(0) { // println!("Rounding issue on transaction #{}", txn_num); // }