Files
crm.e5.pl/modules/EcmProducts/getStockInfo.php

12 lines
366 B
PHP
Raw Permalink Normal View History

2024-04-27 09:23:34 +02: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;
?>