Fix item counts, PR/QT conversions, validation and department loss

This commit is contained in:
Thanakorn
2026-09-15 16:11:47 +07:00
parent 78d69d81df
commit c915379e2e
23 changed files with 100 additions and 45 deletions
+2 -2
View File
@@ -326,7 +326,7 @@
</td>
<td>
<input type="number" class="form-control form-control-sm item_tax_rate"
value="${parseFloat(item.tax_rate || 0).toFixed(2)}" min="0" max="100" step="0.01" oninput="recalc_totals()">
value="${line_tax_rate(item).toFixed(2)}" min="0" max="100" step="0.01" oninput="recalc_totals()">
<input type="hidden" class="item_tax_amount" value="${item.tax_amount || 0}">
</td>
<td class="item_total text-end">${format_number((item.quantity || 1) * (item.unit_price || 0), 2)}</td>
@@ -974,7 +974,7 @@
// ── Boot ─────────────────────────────────────────────────────────────────
$(async function() {
try {
load_departments('department_id');
await Promise.resolve(load_departments('department_id')).catch(function() {});
await load_location_config();
await retrieve_warehouses();