diff --git a/pkg/expenses.go b/pkg/expenses.go index 27e0022..0016bc6 100644 --- a/pkg/expenses.go +++ b/pkg/expenses.go @@ -55,7 +55,7 @@ func mustCollectExpenseEntries(ctx context.Context, conn *Conn, locale *Locale, select expense.slug , invoice_date , invoice_number - , to_price(expense.amount + coalesce(sum(tax.amount)::integer, 0), decimal_digits) + , to_price(expense.amount + coalesce(sum(tax.amount)::integer, 0), decimal_digits) as total , contact.name , coalesce(attachment.original_filename, '') , expense.tags @@ -78,7 +78,7 @@ func mustCollectExpenseEntries(ctx context.Context, conn *Conn, locale *Locale, , expense.tags , expense.expense_status , esi18n.name - order by invoice_date + order by invoice_date desc, contact.name, total desc `, where), args...) defer rows.Close()