Refine loan tab filtering and date formats

This commit is contained in:
Rafael Foster
2026-05-01 08:24:39 -03:00
parent 79f55cbfbc
commit e34ba33f9b
21 changed files with 187 additions and 72 deletions
+7 -1
View File
@@ -240,9 +240,15 @@ function cents(value) {
function loanSummaryRow(loan) {
const payments = db.get().prepare(`
SELECT p.*, u.display_name AS creator_name
SELECT p.*, u.display_name AS creator_name,
b.title AS entry_title,
b.category AS entry_category,
b.subcategory AS entry_subcategory,
b.is_recurring AS entry_is_recurring,
b.recurrence_parent_id AS entry_recurrence_parent_id
FROM budget_loan_payments p
LEFT JOIN users u ON u.id = p.created_by
LEFT JOIN budget_entries b ON b.id = p.budget_entry_id
WHERE p.loan_id = ?
ORDER BY p.installment_number ASC
`).all(loan.id);
+1 -1
View File
@@ -20,7 +20,7 @@ const VALID_CURRENCIES = ['AED', 'AUD', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'DKK'
const DEFAULT_CURRENCY = 'EUR';
const DEFAULT_APP_NAME = 'Oikos';
const VALID_DATE_FORMATS = ['mdy', 'dmy', 'ymd'];
const VALID_DATE_FORMATS = ['mdy', 'dmy', 'ymd', 'mdy_dot', 'dmy_dot', 'ymd_dot', 'ymd_slash'];
const DEFAULT_DATE_FORMAT = 'mdy';
const VALID_TIME_FORMATS = ['24h', '12h'];
const DEFAULT_TIME_FORMAT = '24h';