Add new filter options and metrics to product filters and pages; enhance SQL schema for financial calculations

This commit is contained in:
2025-03-27 16:27:13 -04:00
parent 8b8845b423
commit 957c7b5eb1
17 changed files with 2216 additions and 482 deletions

View File

@@ -590,7 +590,7 @@ async function importPurchaseOrders(prodConnection, localConnection, incremental
ordered, po_cost_price, supplier_id, date_created, date_ordered
)
SELECT
'R' || r.receiving_id as po_id,
r.receiving_id::text as po_id,
r.pid,
COALESCE(p.sku, 'NO-SKU') as sku,
COALESCE(p.name, 'Unknown Product') as name,
@@ -626,7 +626,7 @@ async function importPurchaseOrders(prodConnection, localConnection, incremental
po_id, pid, receiving_id, allocated_qty, cost_each, received_date, received_by
)
SELECT
'R' || r.receiving_id as po_id,
r.receiving_id::text as po_id,
r.pid,
r.receiving_id,
r.qty_each as allocated_qty,