transactions::get_outgoing_exchange_and_flow_mvmts: passing user_home_currency only rather than whole 'settings' obj
This commit is contained in:
parent
6b179ec976
commit
ec961d18c1
|
@ -253,7 +253,7 @@ pub fn _5_transaction_mvmt_summaries_to_csv(
|
||||||
let mut expense_lt = d128!(0);
|
let mut expense_lt = d128!(0);
|
||||||
|
|
||||||
let flow_or_outgoing_exchange_movements = txn.get_outgoing_exchange_and_flow_mvmts(
|
let flow_or_outgoing_exchange_movements = txn.get_outgoing_exchange_and_flow_mvmts(
|
||||||
settings,
|
&settings.home_currency,
|
||||||
ars,
|
ars,
|
||||||
raw_acct_map,
|
raw_acct_map,
|
||||||
acct_map,
|
acct_map,
|
||||||
|
|
|
@ -11,7 +11,6 @@ use decimal::d128;
|
||||||
use chrono::NaiveDate;
|
use chrono::NaiveDate;
|
||||||
use serde_derive::{Serialize, Deserialize};
|
use serde_derive::{Serialize, Deserialize};
|
||||||
|
|
||||||
use crate::core_functions::ImportProcessParameters;
|
|
||||||
use crate::account::{Account, Movement, RawAccount};
|
use crate::account::{Account, Movement, RawAccount};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
@ -147,7 +146,7 @@ impl Transaction {
|
||||||
|
|
||||||
pub fn get_outgoing_exchange_and_flow_mvmts(
|
pub fn get_outgoing_exchange_and_flow_mvmts(
|
||||||
&self,
|
&self,
|
||||||
settings: &ImportProcessParameters,
|
user_home_currency: &String,
|
||||||
ars: &HashMap<u32, ActionRecord>,
|
ars: &HashMap<u32, ActionRecord>,
|
||||||
raw_acct_map: &HashMap<u16, RawAccount>,
|
raw_acct_map: &HashMap<u16, RawAccount>,
|
||||||
acct_map: &HashMap<u16, Account>,
|
acct_map: &HashMap<u16, Account>,
|
||||||
|
@ -162,7 +161,7 @@ impl Transaction {
|
||||||
let acct = acct_map.get(&ar.account_key).unwrap();
|
let acct = acct_map.get(&ar.account_key).unwrap();
|
||||||
let raw_acct = raw_acct_map.get(&acct.raw_key).unwrap();
|
let raw_acct = raw_acct_map.get(&acct.raw_key).unwrap();
|
||||||
|
|
||||||
if !raw_acct.is_home_currency(&settings.home_currency) & !raw_acct.is_margin {
|
if !raw_acct.is_home_currency(user_home_currency) & !raw_acct.is_margin {
|
||||||
|
|
||||||
let movements = ar.get_mvmts_in_ar(acct_map, txns_map);
|
let movements = ar.get_mvmts_in_ar(acct_map, txns_map);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue