init
This commit is contained in:
9
modules/EcmStockOperations/check_empty_prices.php
Executable file
9
modules/EcmStockOperations/check_empty_prices.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$w=$GLOBALS['db']->query("select id,product_code,date_entered,type,parent_type,product_id from ecmstockoperations where price=0 and deleted='0'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
echo $r['product_code']." ".$r['date_entered']." ".$r['type']."<br>";
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select price from ecmstockoperations where product_id='".$r['product_id']."' and price!=0 and deleted='0' order by date_entered desc"));
|
||||
echo $rr['price'].'<br>';
|
||||
$GLOBALS['db']->query("update ecmstockoperations set price='".$rr['price']."' where id='".$r['id']."'");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user