]> gitweb.erp-flowers.ru Git - yii-erp24/.git/commitdiff
правки по автозаказу фактические остатки
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Mon, 22 Apr 2024 09:15:41 +0000 (12:15 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Mon, 22 Apr 2024 09:15:41 +0000 (12:15 +0300)
erp24/modul/shipment/storeProductsFact.php
erp24/modul/shipment/storeProductsFactEdit.php

index e727097396925dbda0df4e434e1101538c6bdd3a..fc5d956692295e46a9af1fdaa2726a163fb1fd70 100644 (file)
@@ -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"<tr style=\"";
@@ -438,7 +438,7 @@ if($difference<0) $difference="+".abs($difference);
 if($difference_percent<0) $difference_percent=">".abs($difference_percent);
 
 if(!empty($store_planogram[$row["id"]]) and !empty($difference_percent)) $difference_percent .="%";
-else $difference_percent ="";
+else $difference_percent =0;
 echo'">'.$difference.'</td>
 <td class="tdcntr bg-default">'.$difference_percent.'</td>';
  
index 72da4f76810adc80bcea28dc6613100b358398ac..47f593a4c52a89eac115b43a185eddfb840631fa 100644 (file)
@@ -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"<br><br>++$color++$sql";
 $db::sql($sql);