Float management: bagged coins, history nav fix, change order sheet, upload 500 fix
- Fix history nav: type underscore → hyphen for route match - Change tin: Bags + Loose inputs per denomination with UK bag values - Change tin target: per-denomination bag count in Settings - Change order sheet: inline table showing bags to order vs counted - db: bag_quantity column on float_denominations - api.ts: put text fields before file in FormData so busboy doesn't drain file stream early - db.js: additive migration for uploaded_by column on cash_count_attachments Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d03371dca1
commit
5623f64732
6 changed files with 182 additions and 39 deletions
|
|
@ -126,7 +126,9 @@ export async function initDb() {
|
|||
);
|
||||
ALTER TABLE cash_count_attachments ADD COLUMN IF NOT EXISTS attachment_type TEXT NOT NULL DEFAULT 'other';
|
||||
ALTER TABLE cash_count_attachments ADD COLUMN IF NOT EXISTS label TEXT;
|
||||
ALTER TABLE cash_count_attachments ADD COLUMN IF NOT EXISTS uploaded_by TEXT NOT NULL DEFAULT '';
|
||||
ALTER TABLE cash_ups ADD COLUMN IF NOT EXISTS checked_transactions JSONB NOT NULL DEFAULT '[]'::jsonb;
|
||||
ALTER TABLE float_denominations ADD COLUMN IF NOT EXISTS bag_quantity INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ export async function floatRoutes(app) {
|
|||
|
||||
for (const d of denominations) {
|
||||
await pool.query(
|
||||
`INSERT INTO float_denominations (float_count_id, denomination_value, quantity, total_amount)
|
||||
VALUES ($1,$2,$3,$4)`,
|
||||
[countId, parseFloat(d.denomination), parseInt(d.quantity), parseFloat(d.total)]
|
||||
`INSERT INTO float_denominations (float_count_id, denomination_value, quantity, bag_quantity, total_amount)
|
||||
VALUES ($1,$2,$3,$4,$5)`,
|
||||
[countId, parseFloat(d.denomination), parseInt(d.quantity), parseInt(d.bag_quantity ?? 0), parseFloat(d.total)]
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue