updated correct label and collumns in te database for label
This commit is contained in:
@@ -23,55 +23,82 @@
|
||||
INNOFA RROMANIA SRL
|
||||
</div>
|
||||
|
||||
<!-- Second row content: Customer Name -->
|
||||
<!-- Row 2 content: Customer Name -->
|
||||
<div id="customer-name-row" style="position: absolute; top: 32.13px; left: 0; right: 0; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #000;">
|
||||
<!-- Customer name will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Horizontal dividing lines for 9 parts (row 6 is double height) -->
|
||||
<!-- Horizontal dividing lines for 9 rows (row 6 is double height) -->
|
||||
<div style="position: absolute; top: 32.13px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 67.83px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 103.53px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 139.23px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 175.23px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<!-- Row 6 is double height, so no line at 210.63px -->
|
||||
<div style="position: absolute; top: 246.33px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 282.03px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 64.26px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 96.39px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 128.52px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<div style="position: absolute; top: 160.65px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<!-- Row 6 is double height for Description -->
|
||||
<div style="position: absolute; top: 224.91px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<!-- Row 7 for Size -->
|
||||
<div style="position: absolute; top: 257.04px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<!-- Row 8 for Article Code -->
|
||||
<div style="position: absolute; top: 289.17px; left: 0; right: 0; height: 1px; background: #999;"></div>
|
||||
<!-- Row 9 for Prod Order (final row) -->
|
||||
|
||||
|
||||
|
||||
<!-- Row 3 content: Quantity ordered -->
|
||||
<div style="position: absolute; top: 67.83px; left: 0; width: 90.96px; height: 35.7px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
<div style="position: absolute; top: 64.26px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Quantity ordered
|
||||
</div>
|
||||
<div id="quantity-ordered-value" style="position: absolute; top: 67.83px; left: 90.96px; width: 136.44px; height: 35.7px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: #000;">
|
||||
<div id="quantity-ordered-value" style="position: absolute; top: 64.26px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; color: #000;">
|
||||
<!-- Quantity value will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 4 content: Client Order Info -->
|
||||
<div id="client-order-info" style="position: absolute; top: 103.53px; left: 90.96px; width: 136.44px; height: 35.7px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #000;">
|
||||
<!-- Client order info will be populated here -->
|
||||
</div>
|
||||
<!-- Row 4 content: Customer order -->
|
||||
<div style="position: absolute; top: 103.53px; left: 0; width: 90.96px; height: 35.7px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
<div style="position: absolute; top: 96.39px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Customer order
|
||||
</div>
|
||||
<div id="client-order-info" style="position: absolute; top: 96.39px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #000;">
|
||||
<!-- Client order info will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 5 content: Delivery date -->
|
||||
<div style="position: absolute; top: 139.23px; left: 0; width: 90.96px; height: 35.7px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
<div style="position: absolute; top: 128.52px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Delivery date
|
||||
</div>
|
||||
<div id="delivery-date-value" style="position: absolute; top: 139.23px; left: 90.96px; width: 136.44px; height: 35.7px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #000;">
|
||||
<div id="delivery-date-value" style="position: absolute; top: 128.52px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #000;">
|
||||
<!-- Delivery date value will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 6 content: Description (double height row) -->
|
||||
<div style="position: absolute; top: 174.93px; left: 0; width: 90.96px; height: 71.4px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
<div style="position: absolute; top: 160.65px; left: 0; width: 90.96px; height: 64.26px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Description
|
||||
</div>
|
||||
<div id="description-value" style="position: absolute; top: 174.93px; left: 90.96px; width: 136.44px; height: 71.4px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #000; text-align: center; line-height: 1.2; padding: 2px; overflow: hidden; word-wrap: break-word;">
|
||||
<div id="description-value" style="position: absolute; top: 160.65px; left: 90.96px; width: 136.44px; height: 64.26px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: #000; text-align: center; line-height: 1.2; padding: 2px; overflow: hidden; word-wrap: break-word;">
|
||||
<!-- Description value will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 7 content: Size -->
|
||||
<div style="position: absolute; top: 224.91px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Size
|
||||
</div>
|
||||
<div id="size-value" style="position: absolute; top: 224.91px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #000;">
|
||||
<!-- Size value will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 8 content: Article Code -->
|
||||
<div style="position: absolute; top: 257.04px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Article Code
|
||||
</div>
|
||||
<div id="article-code-value" style="position: absolute; top: 257.04px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #000;">
|
||||
<!-- Article code value will be populated here -->
|
||||
</div>
|
||||
|
||||
<!-- Row 9 content: Prod Order (final row) -->
|
||||
<div style="position: absolute; top: 289.17px; left: 0; width: 90.96px; height: 32.13px; display: flex; align-items: center; padding-left: 5px; font-size: 10px; color: #000;">
|
||||
Prod Order
|
||||
</div>
|
||||
<div id="prod-order-value" style="position: absolute; top: 289.17px; left: 90.96px; width: 136.44px; height: 32.13px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #000;">
|
||||
<!-- Prod order value will be populated here -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,6 +117,8 @@
|
||||
<th>Cod Articol</th>
|
||||
<th>Descr. Com. Prod</th>
|
||||
<th>Cantitate</th>
|
||||
<th>Data<br>Livrare</th>
|
||||
<th>Dimensiune</th>
|
||||
<th>Com.Achiz.Client</th>
|
||||
<th>Nr. Linie</th>
|
||||
<th>Customer Name</th>
|
||||
@@ -123,6 +152,10 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
<td>${order.cod_articol || '-'}</td>
|
||||
<td>${order.descr_com_prod}</td>
|
||||
<td style="text-align: right; font-weight: 600;">${order.cantitate}</td>
|
||||
<td style="text-align: center;">
|
||||
${order.data_livrare ? new Date(order.data_livrare).toLocaleDateString() : '-'}
|
||||
</td>
|
||||
<td style="text-align: center;">${order.dimensiune || '-'}</td>
|
||||
<td>${order.com_achiz_client || '-'}</td>
|
||||
<td style="text-align: right;">${order.nr_linie_com_client || '-'}</td>
|
||||
<td>${order.customer_name || '-'}</td>
|
||||
@@ -156,19 +189,36 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
const clientOrderInfo = comAchizClient && nrLinie ? `${comAchizClient}-${nrLinie}` : 'N/A';
|
||||
document.getElementById('client-order-info').textContent = clientOrderInfo;
|
||||
|
||||
// Update delivery date (using created_at as placeholder since delivery_date column doesn't exist)
|
||||
const deliveryDate = data[0].created_at ? new Date(data[0].created_at).toLocaleDateString() : 'N/A';
|
||||
// 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;
|
||||
|
||||
// Update size (using dimensiune column)
|
||||
const size = data[0].dimensiune || 'N/A';
|
||||
document.getElementById('size-value').textContent = size;
|
||||
|
||||
// Update description (Descr. Com. Prod)
|
||||
const description = data[0].descr_com_prod || 'N/A';
|
||||
document.getElementById('description-value').textContent = description;
|
||||
|
||||
// Update article code (using customer_article_number column)
|
||||
const articleCode = data[0].customer_article_number || 'N/A';
|
||||
document.getElementById('article-code-value').textContent = articleCode;
|
||||
|
||||
// Update prod order (comanda_productie - cantitate)
|
||||
const comandaProductie = data[0].comanda_productie || '';
|
||||
const cantitate = data[0].cantitate || '';
|
||||
const prodOrder = comandaProductie && cantitate ? `${comandaProductie}-${cantitate}` : 'N/A';
|
||||
document.getElementById('prod-order-value').textContent = prodOrder;
|
||||
} else {
|
||||
document.getElementById('customer-name-row').textContent = 'No data available';
|
||||
document.getElementById('quantity-ordered-value').textContent = '0';
|
||||
document.getElementById('client-order-info').textContent = 'N/A';
|
||||
document.getElementById('delivery-date-value').textContent = 'N/A';
|
||||
document.getElementById('size-value').textContent = 'N/A';
|
||||
document.getElementById('description-value').textContent = 'N/A';
|
||||
document.getElementById('article-code-value').textContent = 'N/A';
|
||||
document.getElementById('prod-order-value').textContent = 'N/A';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -177,7 +227,10 @@ document.getElementById('check-db-btn').addEventListener('click', function() {
|
||||
document.getElementById('quantity-ordered-value').textContent = 'Error';
|
||||
document.getElementById('client-order-info').textContent = 'Error';
|
||||
document.getElementById('delivery-date-value').textContent = 'Error';
|
||||
document.getElementById('size-value').textContent = 'Error';
|
||||
document.getElementById('description-value').textContent = 'Error';
|
||||
document.getElementById('article-code-value').textContent = 'Error';
|
||||
document.getElementById('prod-order-value').textContent = 'Error';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user