add *.inc files to project

This commit is contained in:
2025-07-08 18:32:56 +00:00
parent 0a5cc834f8
commit 81af71462e
164 changed files with 1781 additions and 246 deletions

View File

@@ -1,35 +1,27 @@
<?php
require_once("modules/EcmStockStates/EcmStockState.php");
$ss=new EcmStockState();
$ss = new EcmStockState();
set_time_limit(1000000);
$codes=explode("|",$_GET['code']);
$codes = explode("|", $_GET['code']);
var_dump($codes);
$db = $GLOBALS['db'];
foreach($codes as $code){
if($code=="")continue;
$z2=$db->query("update ecmstockoperations set used=0 where product_id in (
foreach ($codes as $code) {
if ($code == "") continue;
$z2 = $db->query("select id from ecmproducts where code='$code' and deleted=0");
'554','322','360','586')");
$z2=$db->query("select id from ecmproducts where id in (
while ($p = $db->fetchByAssoc($z2)) {
'554','322','360','586'
) and deleted=0");
while($p=$db->fetchByAssoc($z2)){
$w=$db->query("select id from ecmstocks where deleted='0'");
while($r=$db->fetchByAssoc($w)){
$ss->UpdateStockState($r['id'],$p['id']);
echo "updated";
}
$w=$db->query("select quantity,stock_name,price,product_code from ecmstockstates where product_id='".$p['id']."' and deleted='0'");
while($s=$db->fetchByAssoc($w)){
echo $s['product_code']." ".$s['stock_name']." ".$s['quantity']." ".$s['price']."<br>";
}
}
$w = $db->query("select id from ecmstocks where deleted='0'");
while ($r = $db->fetchByAssoc($w)) {
$ss->UpdateStockState($r['id'], $p['id']);
}
$w = $db->query("select quantity,stock_name,price,product_code from ecmstockstates where product_id='" . $p['id'] . "' and deleted='0'");
while ($s = $db->fetchByAssoc($w)) {
echo $s['product_code'] . " " . $s['stock_name'] . " " . $s['quantity'] . " " . $s['price'] . "<br>";
}
}
}
?>