Fix QA review findings: server-side validation, notes encoding, dashboard totals
Validate document lines on the server and recompute their totals, store notes with quotes/markup/emoji (utf8mb4, idempotent escaping, decode in form fields), exclude transfers from company-wide stock in/out, count revenue from confirmed orders only, one low-stock rule everywhere, list unapproved lots, natural bin sort, stable order/PO sort, status tiles that add up.
This commit is contained in:
@@ -430,8 +430,8 @@
|
||||
<small class="text-muted">${item.product_sku}</small>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<span class="fw-bold text-danger">-${Number(item.total_out).toLocaleString()}</span><br>
|
||||
<small class="text-success">+${Number(item.total_in).toLocaleString()}</small>
|
||||
<span class="fw-bold text-danger">Out ${format_quantity(item.total_out)}</span><br>
|
||||
<small class="text-success">In ${format_quantity(item.total_in)}</small>
|
||||
</div>
|
||||
</li>`;
|
||||
});
|
||||
@@ -483,7 +483,7 @@
|
||||
<small class="text-muted">${item.warehouse_name}</small>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<span class="fw-bold text-${color}">${sign}${Number(item.qty).toLocaleString()}</span><br>
|
||||
<span class="fw-bold text-${color}">${sign}${format_quantity(item.qty)}</span><br>
|
||||
<small class="text-muted">${time_ago(item.date)}</small>
|
||||
</div>
|
||||
</li>`;
|
||||
@@ -569,7 +569,7 @@
|
||||
moved_html += `<li class="list-group-item d-flex align-items-center gap-3 py-3">
|
||||
<div class="icon-shape icon-sm bg-danger bg-opacity-10 text-danger rounded-2 flex-shrink-0"><i class="ti ti-trending-down"></i></div>
|
||||
<div class="flex-grow-1"><p class="mb-0 fw-semibold">${item.product_name || item.product_sku}</p><small class="text-muted">${item.product_sku}</small></div>
|
||||
<div class="text-end"><span class="fw-bold text-danger">-${Number(item.total_out).toLocaleString()}</span><br><small class="text-success">+${Number(item.total_in).toLocaleString()}</small></div>
|
||||
<div class="text-end"><span class="fw-bold text-danger">Out ${format_quantity(item.total_out)}</span><br><small class="text-success">In ${format_quantity(item.total_in)}</small></div>
|
||||
</li>`;
|
||||
});
|
||||
}
|
||||
@@ -608,7 +608,7 @@
|
||||
act_html += `<li class="list-group-item d-flex align-items-center gap-3 py-3">
|
||||
<div class="icon-shape icon-sm bg-${color} bg-opacity-10 text-${color} rounded-2 flex-shrink-0"><i class="ti ${icon}"></i></div>
|
||||
<div class="flex-grow-1"><p class="mb-0 fw-semibold">${item.product_name}</p><small class="text-muted">${item.warehouse_name}</small></div>
|
||||
<div class="text-end"><span class="fw-bold text-${color}">${sign}${Number(item.qty).toLocaleString()}</span><br><small class="text-muted">${time_ago(item.date)}</small></div>
|
||||
<div class="text-end"><span class="fw-bold text-${color}">${sign}${format_quantity(item.qty)}</span><br><small class="text-muted">${time_ago(item.date)}</small></div>
|
||||
</li>`;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user