ADD missing defaults

This commit is contained in:
Nathan Dwarshuis 2023-08-16 21:12:11 -04:00
parent d4044dede3
commit 4835ab15ca
1 changed files with 17 additions and 3 deletions

View File

@ -289,6 +289,11 @@ let TxAmount1_ =
re
}
let TxAmount1 =
{ Type = TxAmount1_ Text
, default = { a1Column = "Amount", a1Fmt = "([-+])?([0-9\\.]+)" }
}
let TxAmount2_ =
\(re : Type) ->
{ a2Positive : Text
@ -301,6 +306,15 @@ let TxAmount2_ =
re
}
let TxAmount2 =
{ Type = TxAmount2_ Text
, default =
{ a2Positive = "Deposit"
, a2Negative = "Withdraw"
, a2Fmt = "([0-9\\.]+)"
}
}
let TxAmountSpec_ =
\(re : Type) ->
< AmountSingle : TxAmount1_ re | AmountDual : TxAmount2_ re >
@ -349,9 +363,7 @@ let TxOpts =
{ Type = TxOpts_ Text
, default =
{ toDate = "Date"
, toAmount =
TxAmountSpec.AmountSingle
{ a1Column = "Amount", a1Fmt = "([-+])?([0-9\\.]+)" }
, toAmount = TxAmountSpec.AmountSingle TxAmount1::{=}
, toDesc = "Description"
, toOther = [] : List Text
, toDateFmt = "%0m/%0d/%Y"
@ -1204,4 +1216,6 @@ in { CurID
, TxAmountSpec_
, TxAmount1_
, TxAmount2_
, TxAmount1
, TxAmount2
}