A running loan can be changed and repaid: the credit read states what a booking costs at once

The read of a loan carries charge: the fees and, for a running loan of the
bank, the interest adjustment that commit_bank_credit books. With it the
page offers the fields of a running loan as well; a backend that does not
state the charge keeps them closed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-16 13:32:45 +01:00
1 parent 28f86c169e
commit 205e98973b
3 files changed
+13 -6

No files matched your search

+3
View File
@@ -9471,7 +9471,10 @@ cli::Json ModernSession::ui_read(const cli::Json& request, uint64_t revision) co
for (uint32_t v : credit.saved) saved.push_back(int64_t(v));
return modern::ui_snapshot(g_, context, request_id,
O{{"kind", "credit"}, {"lenderId", counterparty == 0 ? cli::Json("bank") : cli::Json(modern::ui_manager_id(g_, counterparty - 1))},
// "charge" is what a booking of this draft costs at once: the fees and, for a running loan of
// the bank, the interest adjustment (commit_bank_credit); a fellow manager charges nothing
{"saved", std::move(saved)}, {"fields", std::move(fields)}, {"fees", modern::ui_money(draft.fees)},
{"charge", modern::ui_money(counterparty ? 0 : int32_t(int64_t(draft.fees) + draft.interest_adjustment))},
{"refund", modern::ui_money(draft.refund)}, {"principalPaid", modern::ui_money(draft.principal_paid)},
{"note", "Werte der Felder in ganzen Euro bzw. Monaten wie im Original-Dialog"}});
}