This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?php
$w=$GLOBALS[db]->query("SELECT *
FROM `ecmstockdoccorrects`
WHERE `date_modified` > '2010-03-10'
AND `modified_user_id` LIKE '708f958e-7e5a-e1f1-095b-4a02afc3a628'");
while($r=$GLOBALS[db]->fetchByAssoc($w)){
//echo $r['document_no']."<br>";
$ww=$GLOBALS[db]->query("select * from ecmstockdoccorrectitems where ecmstockdoccorrect_id='".$r['id']."'");
while($rr=$GLOBALS[db]->fetchByAssoc($ww)){
//echo $rr['quantity']." ".$rr['code']." <br>";
if($rr['quantity']<0)$type=0;
else $type=1;
echo "update ecmstockdoccorrectitems set quantity='".(-1*$rr['quantity'])."' where id='".$rr['id']."' and ecmproduct_id='".$rr['ecmproduct_id']."' and ecmstockdoccorrect_id='".$rr['ecmstockdoccorrect_id']."';<br>";
echo "update ecmstockoperations set type='".$type."' where parent_id='".$r['id']."' and product_id='".$rr['ecmproduct_id']."';<br>";
}
}
?>