Improved journal entry report formatting.

This commit is contained in:
scoobybejesus 2019-11-24 13:05:14 -05:00
parent c09ce2b11c
commit c668e58c77
1 changed files with 14 additions and 7 deletions

View File

@ -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<d128> = None;
let mut cost_basis_og: Option<d128> = 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);
// }