From 420c899fe023961525b8ece5eb53ca06d00b8862 Mon Sep 17 00:00:00 2001 From: Shane Huston Date: Wed, 24 Aug 2022 12:09:54 +0100 Subject: [PATCH] Parsing credit and debit amounts correctly detects when both amounts are present (bug fix) --- transactions/aibTransaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactions/aibTransaction.go b/transactions/aibTransaction.go index 61a9189..26d2506 100644 --- a/transactions/aibTransaction.go +++ b/transactions/aibTransaction.go @@ -72,7 +72,7 @@ func (t aibTransaction) Output() { func (t aibTransaction) parseAmount(debitAmount string, creditAmount string) (float64, error) { var amount float64 - if debitAmount == "" && creditAmount == "" { + if debitAmount != "" && creditAmount != "" { return amount, errors.New("Transaction with both credit and debit amounts found") }