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