updated vertical Barcode
This commit is contained in:
@@ -115,6 +115,17 @@
|
||||
<!-- Barcode text will be populated here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Vertical Barcode Frame - positioned on the right side of the label -->
|
||||
<div id="vertical-barcode-frame" style="position: absolute; top: 70px; left: 245px; width: 50px; height: 309.96px; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center;">
|
||||
<!-- Vertical Code 128 Barcode representation -->
|
||||
<div id="vertical-barcode-display" style="width: 50px; height: 280px; background: linear-gradient(0deg, #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: 100% 15px; background-repeat: repeat-y;">
|
||||
</div>
|
||||
<!-- Vertical barcode text -->
|
||||
<div id="vertical-barcode-text" style="font-size: 6px; font-family: 'Courier New', monospace; margin-top: 5px; text-align: center; font-weight: bold; writing-mode: vertical-rl; text-orientation: mixed;">
|
||||
<!-- Vertical barcode text will be populated here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -203,6 +214,10 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
const clientOrderInfo = comAchizClient && nrLinie ? `${comAchizClient}-${nrLinie}` : 'N/A';
|
||||
document.getElementById('client-order-info').textContent = clientOrderInfo;
|
||||
|
||||
// Update vertical barcode with client order info or default
|
||||
const verticalBarcodeData = clientOrderInfo !== 'N/A' ? clientOrderInfo : '000000-00';
|
||||
document.getElementById('vertical-barcode-text').textContent = verticalBarcodeData;
|
||||
|
||||
// Update delivery date (using data_livrare column)
|
||||
const deliveryDate = data[0].data_livrare ? new Date(data[0].data_livrare).toLocaleDateString() : 'N/A';
|
||||
document.getElementById('delivery-date-value').textContent = deliveryDate;
|
||||
@@ -237,6 +252,7 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
document.getElementById('article-code-value').textContent = 'N/A';
|
||||
document.getElementById('prod-order-value').textContent = 'N/A';
|
||||
document.getElementById('barcode-text').textContent = 'N/A';
|
||||
document.getElementById('vertical-barcode-text').textContent = '000000-00';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -250,6 +266,7 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
document.getElementById('article-code-value').textContent = 'Error';
|
||||
document.getElementById('prod-order-value').textContent = 'Error';
|
||||
document.getElementById('barcode-text').textContent = 'Error';
|
||||
document.getElementById('vertical-barcode-text').textContent = '000000-00';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user