Actualiser assets/js/app.js
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
This commit is contained in:
+10
-1
@@ -7650,6 +7650,14 @@ window._editingProduct = {
|
||||
${itemSubcatOptions}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>${t('product.barcode_label')}</label>
|
||||
<div class="expiry-input-row">
|
||||
<input type="text" id="edit-inv-barcode" class="form-input" value="${escapeHtml(item.barcode || '')}" placeholder="${escapeHtml(t('product.barcode_placeholder') || '')}" inputmode="numeric">
|
||||
<button type="button" class="btn btn-accent btn-scan-expiry" onclick="scanBarcodeForForm('edit-inv-barcode', 'edit-inv-barcode-hint')" title="${t('scanner.title_barcode')}">📷</button>
|
||||
</div>
|
||||
<p class="form-hint" id="edit-inv-barcode-hint" style="display:none">${t('product.barcode_hint')}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>📦 ${t('inventory.label_quantity').replace('📦 ', '')}</label>
|
||||
<div class="qty-control-with-unit">
|
||||
@@ -7790,9 +7798,10 @@ async function submitEditInventory(e, id, productId) {
|
||||
}
|
||||
|
||||
const editedItem = currentInventory.find(i => i.id === id) || {};
|
||||
const barcode = (document.getElementById('edit-inv-barcode')?.value || '').trim();
|
||||
await api('product_save', {}, 'POST', {
|
||||
id: productId,
|
||||
barcode: editedItem.barcode || null,
|
||||
barcode: barcode || null,
|
||||
name: editedItem.name,
|
||||
brand: editedItem.brand || '',
|
||||
category: category,
|
||||
|
||||
Reference in New Issue
Block a user