feat: return barcodes to a document

This commit is contained in:
2024-10-03 16:08:17 +04:00
parent 0a34addae1
commit 4e5365b946
3 changed files with 32 additions and 5 deletions

View File

@@ -159,12 +159,25 @@ table tfoot {
.barcode-container-table {
display: flex;
white-space: nowrap;
flex-direction: column;
margin-top: 5px;
margin-bottom: -10px;
}
.barcode-container {
display: flex;
white-space: nowrap;
justify-content: right;
flex-direction: column;
margin-top: 15px;
margin-bottom: 0;
text-align: center;
}
.barcode {
font-family: "Libre Barcode 128", cursive;
font-size: 25pt;
transform: scale(1, 1.5);
margin-bottom: -10px;
}
.barcode-text-bigger-part {

View File

@@ -59,14 +59,17 @@
{% if product_data.deal_products|length > 1 %}
<div style="margin-bottom: 40px"></div>
{% else %}
<div style="text-align: right">
<div style="display: flex; justify-content: right">
<div class="barcode-container">
{% if product_data.deal_products[0].product.barcodes|length > 0 %}
{% with barcode=product_data.deal_products[0].product.barcodes[0].barcode %}
<p>
ШК: {{ barcode[:-5] }}
<div class="barcode">
{{ encode128(barcode, "A") }}
</div>
<span class="barcode-text">
{{ barcode[:-5] }}
<span class="barcode-text-bigger-part bold">{{ barcode[-5:] }}</span>
</p>
</span>
{% endwith %}
{% else %}
<div style="margin-bottom: 40px"></div>
@@ -126,6 +129,9 @@
<div class="barcode-container-table">
{% if deal_product.product.barcodes|length > 0 %}
{% with barcode=deal_product.product.barcodes[0].barcode %}
<div class="barcode">
{{ encode128(barcode, "A") }}
</div>
<div>
{{ barcode[:-5] }}
<span class="barcode-text-bigger-part bold">{{ barcode[-5:] }}</span>

File diff suppressed because one or more lines are too long