[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] How should I declare a currency or money field that h
From: |
John Darrington |
Subject: |
Re: [bug-recutils] How should I declare a currency or money field that has values like: "$150" or "($45.12)" ? |
Date: |
Sat, 10 Aug 2019 15:27:05 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Formatting and parsing monetary values is almost as much of a pain as
date/time values. I suggest that you declare it as "real" and enter
all your amounts as simple values (eg: "925.00" or "-179.99") if it's
imperative that you see them displayed with a leading dollar sign, then
write a report template to do it that way.
J'
On Sat, Aug 10, 2019 at 08:06:44AM -0500, address@hidden wrote:
I tried declaring 'Amount' as 'real' but it errs out on 'recfix -sort'.
How should I declare a currency or money field that has values like:
"$150" or "($45.12)" ?
Example header:
%rec: Uwcu_checking
%type: Posted_Date date
# %type: Amount real
%sort: Posted_Date
Example records:
AccountNumber: 123456789
AccountType: CK
Posted_Date: 12/13/2018
Amount: ($179.99)
Description: ACH:PAYPAL -INST XFER
Category: Shopping
AccountNumber: 123456789
AccountType: CK
Posted_Date: 12/5/2018
Amount: ($21.73)
Description: ACH:TARGET DEBIT CRD -ACH TRAN
Category: Groceries
AccountNumber: 123456789
AccountType: CK
Posted_Date: 12/5/2018
Amount: $925.00
Description: ACH:UW CREDIT UNION -P2P
Category: Transfer
--
thanks,
Tom
Milwaukee WI, USA
--
Avoid eavesdropping. Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
signature.asc
Description: PGP signature