Updated to list bottom barcode
This commit is contained in:
@@ -104,6 +104,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Barcode Frame - positioned 10px below rectangle with 2mm side margins -->
|
||||||
|
<div id="barcode-frame" style="position: absolute; top: 395px; left: 7.56px; width: 295.44px; height: 50 px; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center;">
|
||||||
|
<!-- Code 128 Barcode representation -->
|
||||||
|
<div id="barcode-display" style="width: 100%; height: 50px; background: linear-gradient(90deg, #000 1px, transparent 1px, transparent 2px, #000 2px, transparent 3px, #000 4px, transparent 5px, #000 6px, transparent 7px, #000 8px, transparent 9px, #000 10px, transparent 11px, #000 12px, transparent 13px); background-size: 15px 100%; background-repeat: repeat-x;">
|
||||||
|
</div>
|
||||||
|
<!-- Barcode text below the bars -->
|
||||||
|
<div id="barcode-text" style="font-size: 8px; font-family: 'Courier New', monospace; margin-top: 2px; text-align: center; font-weight: bold;">
|
||||||
|
<!-- Barcode text will be populated here -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -213,6 +224,9 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
|||||||
const cantitate = data[0].cantitate || '';
|
const cantitate = data[0].cantitate || '';
|
||||||
const prodOrder = comandaProductie && cantitate ? `${comandaProductie}-${cantitate}` : 'N/A';
|
const prodOrder = comandaProductie && cantitate ? `${comandaProductie}-${cantitate}` : 'N/A';
|
||||||
document.getElementById('prod-order-value').textContent = prodOrder;
|
document.getElementById('prod-order-value').textContent = prodOrder;
|
||||||
|
|
||||||
|
// Update barcode with the same prod order data
|
||||||
|
document.getElementById('barcode-text').textContent = prodOrder;
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('customer-name-row').textContent = 'No data available';
|
document.getElementById('customer-name-row').textContent = 'No data available';
|
||||||
document.getElementById('quantity-ordered-value').textContent = '0';
|
document.getElementById('quantity-ordered-value').textContent = '0';
|
||||||
@@ -222,6 +236,7 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
|||||||
document.getElementById('description-value').textContent = 'N/A';
|
document.getElementById('description-value').textContent = 'N/A';
|
||||||
document.getElementById('article-code-value').textContent = 'N/A';
|
document.getElementById('article-code-value').textContent = 'N/A';
|
||||||
document.getElementById('prod-order-value').textContent = 'N/A';
|
document.getElementById('prod-order-value').textContent = 'N/A';
|
||||||
|
document.getElementById('barcode-text').textContent = 'N/A';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@@ -234,6 +249,7 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
|||||||
document.getElementById('description-value').textContent = 'Error';
|
document.getElementById('description-value').textContent = 'Error';
|
||||||
document.getElementById('article-code-value').textContent = 'Error';
|
document.getElementById('article-code-value').textContent = 'Error';
|
||||||
document.getElementById('prod-order-value').textContent = 'Error';
|
document.getElementById('prod-order-value').textContent = 'Error';
|
||||||
|
document.getElementById('barcode-text').textContent = 'Error';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user