[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/csv2ledger 80e39156a9 101/190: Fix c2l-amount-is-amount.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/csv2ledger 80e39156a9 101/190: Fix c2l-amount-is-amount. |
Date: |
Sun, 2 Jun 2024 15:59:49 -0400 (EDT) |
branch: elpa/csv2ledger
commit 80e39156a922329b82543780e303063160e261b2
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>
Fix c2l-amount-is-amount.
The default value of alist-get is only returned if the key returns nil, not
if
it returns the empty list, which is what would happen if the amount field is
empty, because parse-csv-string returns an empty string in that case.
---
csv2ledger.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/csv2ledger.el b/csv2ledger.el
index 00f154b950..68449e4843 100644
--- a/csv2ledger.el
+++ b/csv2ledger.el
@@ -264,7 +264,10 @@ TRANSACTION should be an alist containing field-value
pairs and
should contain a value for `amount', which is the return value.
If `amount' does not contain a value, this function returns
\"0.00\"."
- (alist-get 'amount transaction "0.00"))
+ (let ((amount (alist-get 'amount transaction)))
+ (if (c2l--amount-p amount)
+ amount
+ "0.00")))
(defun c2l-amount-is-credit-or-debit (transaction)
"Return the amount of an entry.
- [nongnu] elpa/csv2ledger 8d18e53ee5 142/190: Fix highlighting in README.md, (continued)
- [nongnu] elpa/csv2ledger 8d18e53ee5 142/190: Fix highlighting in README.md, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 144a966942 150/190: Add section on multiple configurations to the README, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger b57b06d3a0 163/190: Update the README., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger b0da62c00b 153/190: Small update to the README, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 058bd5c96d 148/190: Declare safety predicates for defcustoms., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 8b5aa6ee00 156/190: Fix two typos in the documentation, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger c8939a4422 188/190: Fix c2l-read-account-matchers, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 03e33d295f 107/190: Replace README with a placeholder., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 1ab230f07d 181/190: Update doc string of c2l--csv-line-to-ledger, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 579acc2d00 032/190: Do not require a match when asking for an account name., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 80e39156a9 101/190: Fix c2l-amount-is-amount.,
ELPA Syncer <=
- [nongnu] elpa/csv2ledger 463fa78c33 047/190: Rename internal functions with double dash., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger eb05c12358 183/190: Fix typo in the README, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 7cc8fa2ecf 182/190: Update version number., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 4f6bb9e1bd 184/190: Update example function jk/c2l-convert-amount in the README, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger be1366e6d4 031/190: c2l-payee-or-sender: first check if `c2l-account-holder` is even set., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger eaf2ad4fee 028/190: Do not test if file exists if file is nil., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger ac7abd896f 092/190: Guard against empty value of counterpart., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger d5f5712969 083/190: Add comment indicating interactive functions., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 6fa69d4391 089/190: Rename regexes to regexps in the source., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger e08f335190 091/190: Change fallback value of c2l-title-is-payee-to-sender., ELPA Syncer, 2024/06/03