From 5faaf50a53aa7142db53bb356556430d8c7a107e Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Mon, 22 Apr 2024 12:15:41 +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=20=D1=84=D0=B0=D0=BA=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA?= =?utf8?q?=D0=B8=D0=B5=20=D0=BE=D1=81=D1=82=D0=B0=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/modul/shipment/storeProductsFact.php | 4 ++-- erp24/modul/shipment/storeProductsFactEdit.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erp24/modul/shipment/storeProductsFact.php b/erp24/modul/shipment/storeProductsFact.php index e7270973..fc5d9566 100644 --- a/erp24/modul/shipment/storeProductsFact.php +++ b/erp24/modul/shipment/storeProductsFact.php @@ -375,7 +375,7 @@ if(!in_array($row["category_id"],$category_idIn) and !empty($products_group[$row if(($store_planogram[$row["id"]] ?? 0)>0 or $_SESSION["show_planogram_0"]==1) { $difference=($store_planogram[$row["id"]] ?? 0)-($values_in[$row["id"]]["quantity"] ?? 0); if(!empty($store_planogram[$row["id"]])) $difference_percent=100-round(100*$difference/$store_planogram[$row["id"]]); -else $difference_percent=""; +else $difference_percent=0; echo"'.$difference.' '.$difference_percent.''; diff --git a/erp24/modul/shipment/storeProductsFactEdit.php b/erp24/modul/shipment/storeProductsFactEdit.php index 72da4f76..47f593a4 100644 --- a/erp24/modul/shipment/storeProductsFactEdit.php +++ b/erp24/modul/shipment/storeProductsFactEdit.php @@ -15,7 +15,7 @@ echo"Сохранили количество =$quantity" . " $product_id,$color, if($color!="NULL") $color=str_replace('"','',$color); else $color=''; -$sql = "INSERT INTO store_products_fact (store_id, product_id, date_id, color, quantity) VALUES ('$store_id','$product_id','$date_id','$color','$quantity')" +$sql = "INSERT INTO store_products_fact (store_id, product_id, date_id, color, quantity, quantity_polnogramm, difference, difference_percent) VALUES ('$store_id','$product_id','$date_id','$color','$quantity', 0, 0, 0)" . " ON CONFLICT(date_id, product_id, color, store_id) DO UPDATE SET quantity=$quantity"; //echo"

++$color++$sql"; $db::sql($sql); -- 2.39.5