commit 7ac89d0902fc74bed9536e177c12b1e0a253d0ad parent 60d7237861ed769a000819bf5c89bdc7f1075726 Author: ms <ms@taler.net> Date: Thu, 29 Jul 2021 11:44:27 +0200 temporarily workaround negative balances (sandbox) see #6962 Diffstat:
| M | sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt @@ -30,6 +30,12 @@ fun balanceForAccount(iban: String): java.math.BigDecimal { balance -= amount } } + /** + * FIXME: for negative accounts, temporarily return 0, so as to make + * the current CAMT generator happy. Negative amounts need to have their + * onw sub-tree in the report, see bug: #6962 + */ + if (balance < java.math.BigDecimal.ZERO) return java.math.BigDecimal.ZERO return balance }