diff options
author | MS <ms@taler.net> | 2022-09-23 16:35:47 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2022-09-23 16:35:47 +0200 |
commit | dcc4a11c162b34f47eddedd1c6d28b1b4376403e (patch) | |
tree | 955f639782ab089e24b850dc22f75e4ce18913b8 /sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt | |
parent | 41862b566fab33a9702edfbff873769d801c6e03 (diff) | |
download | libeufin-dcc4a11c162b34f47eddedd1c6d28b1b4376403e.tar.gz libeufin-dcc4a11c162b34f47eddedd1c6d28b1b4376403e.tar.bz2 libeufin-dcc4a11c162b34f47eddedd1c6d28b1b4376403e.zip |
close Zip file + DCE
Diffstat (limited to 'sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt')
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt index 873371d0..2175ab0d 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt @@ -55,45 +55,4 @@ fun balanceForAccount(bankAccount: BankAccountEntity): BigDecimal { } } return balance -} - -// For now, returns everything. -fun historyForAccount(bankAccount: BankAccountEntity): MutableList<RawPayment> { - val history = mutableListOf<RawPayment>() - transaction { - /** - FIXME: add the following condition too: - and (BankAccountTransactionsTable.date.between(start.millis, end.millis)) - */ - /** - FIXME: add the following condition too: - and (BankAccountTransactionsTable.date.between(start.millis, end.millis)) - */ - BankAccountTransactionEntity.find { - BankAccountTransactionsTable.account eq bankAccount.id - }.forEach { - history.add( - RawPayment( - subject = it.subject, - creditorIban = it.creditorIban, - creditorBic = it.creditorBic, - creditorName = it.creditorName, - debtorIban = it.debtorIban, - debtorBic = it.debtorBic, - debtorName = it.debtorName, - date = importDateFromMillis(it.date).toDashedDate(), - amount = it.amount, - currency = it.currency, - // The line below produces a value too long (>35 chars), - // and it makes the document invalid! - // uid = "${it.pmtInfId}-${it.msgId}" - uid = it.accountServicerReference, - direction = it.direction, - pmtInfId = it.pmtInfId - ) - ) - - } - } - return history }
\ No newline at end of file |