From 24ec5dc21bd8aaf5ec4d2be72a1a8b7b2a0c0c0c Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Mon, 17 Jun 2024 15:30:06 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 9 +++++---- app/Services/ProductLogger.php | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index adb771fc..b4552c25 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -404,11 +404,10 @@ function libriInPrevendita() return true; } -function setProductFromGM($article, $initlog, ProductLogger $passproductLogger) +function setProductFromGM($article, $initlog, ProductLogger &$passproductLogger) { if ($initlog) { $productLogger = new ProductLogger(null); - $productLogger->init(); } else { $productLogger = $passproductLogger; } @@ -1414,10 +1413,12 @@ function updateArticoloFromGM($idarticolo) } if ($article) { + $str = "Articolo: "; + $str .= getarraystr($article); + + $str = "setProductFromGM: "; setProductFromGM($article, false, $productLogger); - $str = "Concatena: "; - $str .= getarraystr($article); $str .= $productLogger->concatenateLogs(); diff --git a/app/Services/ProductLogger.php b/app/Services/ProductLogger.php index e0d58aca..186eca08 100644 --- a/app/Services/ProductLogger.php +++ b/app/Services/ProductLogger.php @@ -19,6 +19,7 @@ class ProductLogger public function __construct($settingOraValue) { $this->settingOra = $settingOraValue; + $this->init(); } public function init()