Add $/% toggle for transaction account amounts in manual edit
When editing a transaction manually, users can now toggle between viewing
account amounts as dollar values or percentages. The toggle appears in the
table header as a radio button group ($ / %).
Key features:
- Global toggle switches all accounts simultaneously
- $→%: amounts are converted to percentages of the transaction total
- %→$: uses percentages->dollars with spread-cents for accurate cent distribution
- Form state preserves vendor, memo, approval status when toggling
- Save handler converts % back to $ before persisting to Datomic
- Uses HTMX to re-render only the account grid body on toggle
New route: /toggle-amount-mode
New functions: ->percentage, percentages->dollars, convert-accounts-mode,
account-grid-body*, toggle-amount-mode
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -29,9 +29,10 @@
|
||||
} }
|
||||
"/edit-submit" ::edit-submit
|
||||
"/location-select" ::location-select
|
||||
"/account-total" ::account-total
|
||||
"/account-balance" ::account-balance
|
||||
"/edit-wizard-new-account" ::edit-wizard-new-account
|
||||
"/account-total" ::account-total
|
||||
"/account-balance" ::account-balance
|
||||
"/toggle-amount-mode" ::toggle-amount-mode
|
||||
"/edit-wizard-new-account" ::edit-wizard-new-account
|
||||
"/match-payment" ::link-payment
|
||||
"/match-autopay-invoices" ::link-autopay-invoices
|
||||
"/match-unpaid-invoices" ::link-unpaid-invoices
|
||||
|
||||
Reference in New Issue
Block a user