Record effective dates for card transactions in DKB importer

korrat
Dec 17, 2023, 10:28 AM
A46ZUUSWW52CBDSQUDEE2XS5YIMLPVKWL7RSVI6OXHV632EWLEUQC

Dependencies

  • [2] DWUVE75B Handle foreign currency purchases in DKB importer
  • [*] 7URE4HPL Add an importer for DKB account statements

Change contents

  • edit in importers/dkb/src/lib.rs at line 13
    [4.388]
    [4.388]
    use beancount_types::common_keys;
  • edit in importers/dkb/src/lib.rs at line 38
    [4.1035]
    [4.1035]
    use time::format_description::well_known::Iso8601;
  • edit in importers/dkb/src/lib.rs at line 357
    [2.234]
    [4.8435]
    if let Some(payment_date) = record.payment_date {
    posting.add_meta(common_keys::EFFECTIVE_DATE, payment_date);
    }
  • edit in importers/dkb/src/lib.rs at line 444
    [4.10165]
    [2.429]
    payment_date: Option<Date>,
  • edit in importers/dkb/src/lib.rs at line 616
    [4.13594]
    [4.13594]
    let payment_date: Option<Date> = matches!(transaction_kind, TransactionKind::CardPayment)
    .then(|| {
    let (date, _rest) = description.split_once(' ').unwrap();
    Date::parse(date, &Iso8601::PARSING)
    })
    .transpose()
    .map_err(Self::Error::custom)?;
  • edit in importers/dkb/src/lib.rs at line 635
    [4.13739]
    [2.1801]
    payment_date,