cost/price/margin

This commit is contained in:
Thanakorn S
2026-05-06 09:37:28 +07:00
parent 6501d326ca
commit d8131a01b7
10 changed files with 130 additions and 27 deletions
+8 -2
View File
@@ -39,11 +39,17 @@
</div>
<!-- SKU or Product Code -->
<div class="mb-3 col-lg-6">
<div class="mb-3 col-lg-3">
<label for="quantity" class="form-label">Quantity</label>
<input type="number" class="form-control" id="quantity" placeholder="Enter quantity" required>
</div>
<!-- Unit Price / COGS -->
<div class="mb-3 col-lg-3">
<label for="price" class="form-label">Unit Price <span class="text-muted fw-normal">(optional)</span></label>
<input type="number" class="form-control" id="price" placeholder="0.00" step="0.01" min="0">
</div>
<!-- Lot Number -->
<div class="mb-3 col-lg-6">
<label for="lot_number" class="form-label">Lot Number <span class="text-muted fw-normal">(optional)</span></label>
@@ -368,7 +374,7 @@
if (expiryPicker) { expiryPicker.clear(); }
}
$('#product_sku').attr('secondary', data.product_sku);
$('#product_sku, #quantity').prop('disabled', true);
$('#product_sku, #quantity, #price').prop('disabled', true);
$('button[type=submit]').text('Update');
$('button[type=reset]').hide();
if (data.status == 0) {
+2
View File
@@ -59,6 +59,7 @@
<th>Lot Number</th>
<th>Serial Number</th>
<th style="text-align: right;">Quantity</th>
<th style="text-align: right;">Unit Price</th>
<th>Source</th>
<th class="th_loc_zone">Zone</th>
<th class="th_loc_aisle">Aisle</th>
@@ -222,6 +223,7 @@
<span class="text-muted small" style="min-width:28px;">${item['uom'] || ''}</span>
</div>
</td>
<td class="py-3 text-end">${item['price'] > 0 ? format_number(item['price'], 2) : '<span class="text-muted">—</span>'}</td>
<td class="py-3">${source_cell(item['source'])}</td>
${location_cells(item)}
<td class="py-3">