init
This commit is contained in:
15
modules/EcmStockDocInsideOuts/rwtotal.php
Normal file
15
modules/EcmStockDocInsideOuts/rwtotal.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$db = $GLOBALS['db'];
|
||||
global $app_list_strings;
|
||||
$query2=$db->query("select ROUND(sum(op.quantity*op.price),2) as total,rw.document_no,rw.id from
|
||||
ecmstockdocinsideouts as rw
|
||||
join ecmstockoperations as op on op.parent_id=rw.id
|
||||
where rw.total='0.00'
|
||||
GROUP BY op.parent_id order by rw.date_entered desc");
|
||||
while($r = $db->fetchByAssoc($query2)){
|
||||
$db->query("update ecmstockdocinsideouts set
|
||||
total='".$r['total']."'
|
||||
where id='".$r['id']."'");
|
||||
}
|
||||
;
|
||||
?>
|
||||
Reference in New Issue
Block a user