Files
crm.twinpol.com/modules/EcmProducts/getStockInfo.php

12 lines
366 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00:00
<?
$q=0;
$w=$GLOBALS['db']->query("select quantity_in,quantity_out from ecmstockins where product_id='".$_REQUEST['record']."' and stock_id='".$_REQUEST['stock_id']."'");
//print mysql_error();
while($r=$GLOBALS['db']->fetchByAssoc($w))
{
//print $r['quantity_in']." ".$r['quantity_out']."<BR>";
$qty=$r['quantity_in']-$r['quantity_out'];
$q+=$qty;
}
print $q;
?>