From 6a85272085ec0c90f9cc5c79ce473ae6490801b1 Mon Sep 17 00:00:00 2001
From: guillermo <guillermo@verdnatura.es>
Date: Thu, 9 Jan 2025 14:45:20 +0100
Subject: [PATCH] fix: refs #7644 Corrected size of buy-label-supplier

---
 .../reports/buy-label-supplier/assets/css/style.css    | 10 +++++-----
 .../reports/buy-label-supplier/buy-label-supplier.js   |  5 +++--
 .../templates/reports/buy-label-supplier/options.json  |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/print/templates/reports/buy-label-supplier/assets/css/style.css b/print/templates/reports/buy-label-supplier/assets/css/style.css
index 3b1f2f91e3..f64e016886 100644
--- a/print/templates/reports/buy-label-supplier/assets/css/style.css
+++ b/print/templates/reports/buy-label-supplier/assets/css/style.css
@@ -1,7 +1,7 @@
 html {
     font-family: "Roboto", "Helvetica", "Arial", sans-serif;
     margin-top: -7px;
-    font-size: 28px;
+    font-size: 20px;
 }
 table {
     border: 1px solid;
@@ -10,22 +10,22 @@ table {
 }
 td {
     border: 1px solid;
-    padding: 5px;
+    padding: 2px;
     width: 100%;
 }
 span {
-    font-size: 48px;
+    font-size: 34px;
     font-weight: bold;
 }
 .lbl {
     color: gray;
     font-weight: lighter;
-    font-size: 18px;
+    font-size: 12px;
     display: block;
 }
 .cell {
     width: 157px;
-    height: 50px;
+    height: 35px;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
diff --git a/print/templates/reports/buy-label-supplier/buy-label-supplier.js b/print/templates/reports/buy-label-supplier/buy-label-supplier.js
index 5e59472eb5..c8af17a5d0 100755
--- a/print/templates/reports/buy-label-supplier/buy-label-supplier.js
+++ b/print/templates/reports/buy-label-supplier/buy-label-supplier.js
@@ -10,7 +10,7 @@ module.exports = {
     async serverPrefetch() {
         const buy = await models.Buy.findById(this.id, null);
         this.buys = await this.rawSqlFromDef('buy', [buy.entryFk, buy.entryFk, buy.entryFk, this.id, this.id]);
-        const date = new Date();
+        const date = Date.vnNew();
         this.weekNum = moment(date).isoWeek();
         this.dayNum = moment(date).day();
     },
@@ -24,7 +24,8 @@ module.exports = {
                 format: 'code128',
                 displayValue: false,
                 width: 3.8,
-                height: 115,
+                height: 60,
+                margin: 3,
             });
             return new XMLSerializer().serializeToString(svgNode);
         },
diff --git a/print/templates/reports/buy-label-supplier/options.json b/print/templates/reports/buy-label-supplier/options.json
index 4ed0461b30..a2a781cbfb 100644
--- a/print/templates/reports/buy-label-supplier/options.json
+++ b/print/templates/reports/buy-label-supplier/options.json
@@ -1,6 +1,6 @@
 {
     "width": "10cm",
-    "height": "10cm",
+    "height": "6.5cm",
     "margin": {
         "top": "0.17cm",
         "right": "0.2cm",