From 432dd34bdb5829c46f2028f2390d5d9430d42b1d Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Thu, 18 Apr 2024 23:14:15 +0300 Subject: [PATCH] =?utf8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?utf8?q?=D0=BE=20=D0=B0=D0=B2=D1=82=D0=BE=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7?= =?utf8?q?=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/modul/shipment/functionsShipment.php | 18 +++++++++--------- erp24/modul/shipment/storeOrderScore.php | 7 +++++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/erp24/modul/shipment/functionsShipment.php b/erp24/modul/shipment/functionsShipment.php index cf5063bd..d413076f 100644 --- a/erp24/modul/shipment/functionsShipment.php +++ b/erp24/modul/shipment/functionsShipment.php @@ -747,15 +747,15 @@ foreach($massivSQL as $productId =>$array) { // echo"
++ productId = $productId order_id=$orderId field_name=$field_name storeId=$storeId value=$value"; $Insert=true; // if(in_array($field_name,$divisionFieldsArray) and ($value==0 and empty($oldvalue))) $Insert=false; - - - - if($Insert) $db::sql("INSERT IGNORE INTO store_orders_fields_data (product_id, order_id, store_id, field_name, field_id, value, value_text, color,hand,date_update, title) - VALUES (?,?,?,?,?,?,?,?,'-1',NOW(),?) ON DUPLICATE KEY UPDATE value=?, hand=0, value_text=?, date_update=NOW(), title=?", - [$productId, $orderId, $storeId, $field_name, $field_id, $value, $value_text, $color, $title, $value, $value_text , $title]); - - - } + + + + if($Insert) $db::sql("INSERT INTO store_orders_fields_data (product_id, order_id, store_id, field_name, field_id, value, value_text, color,hand,date_update, title) + VALUES (?,?,?,?,?,?,?,?,'-1',NOW(),?) ON CONFLICT (order_id, product_id, store_id, field_id, field_name, color) DO UPDATE SET value=?, hand=0, value_text=?, date_update=NOW(), title=?", + [$productId, $orderId, $storeId, $field_name, $field_id, $value, $value_text, $color, $title, $value, $value_text , $title]); + + + } if(($type!="string" and !empty($value) and $value!='0.000') or ($type=="string" and $value_text!="") ) { if(($oldvalue==$value or $oldvalue=="$value.000") and $value_text=="") { diff --git a/erp24/modul/shipment/storeOrderScore.php b/erp24/modul/shipment/storeOrderScore.php index 6b373988..b3e78018 100644 --- a/erp24/modul/shipment/storeOrderScore.php +++ b/erp24/modul/shipment/storeOrderScore.php @@ -4,7 +4,7 @@ include_once(dirname(__DIR__, 2) . "/inc/db.php"); include_once(dirname(__DIR__, 2) . "/inc/base_new.php"); $modul="shipment"; -global $act, $orderId; +global $act, $orderId, $store_id, $productsColorsArray, $products, $fieldsRows; $act="store-order-score"; $group_id=(int)$_SESSION["group_id"]; // ID группы сотрудника if(!empty($_REQUEST["store_id"])) $store_id=htmlentities($_REQUEST["store_id"]); @@ -67,7 +67,10 @@ $FiledsData=getDataFiledsData($orderId); // проголусуйте от лица магазина if(!empty($store_id)) { echo'
-
'; +'; + echo ''; + echo '
'; + echo''; foreach($products as $productId => $productName){ -- 2.39.5
ваша оценканаименованиеполучено при делении шт.общая средняя оценка