File manager - Edit - /home/webivo6/news.webivox.com/qty.php.tar
Back
home/webivo6/rado.webivox.com/qty.php 0000644 00000004174 15225330771 0013602 0 ustar 00 <?php session_start(); require_once('config.php'); require_once(DIR_SYSTEM.'class/class.inc.php'); $ressys=$db->select("*","store_master","id='1'","",""); $rowsys=$db->fetch($ressys); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <style> body{ font-family:Arial, Helvetica, sans-serif; font-size:13px; } td{ border:1px solid #DDD; } </style> </head> <body> <?php $res=$db->select("*","inventory_items","","",""); while($row=$db->fetch($res)) { echo $row['id'].' - '.$row['code'].' ('.$row['cost'].') '; $avqty=0; $stock_last_update=strtotime(date('Y-m-d',strtotime($rowsys['stock_last_update']))); $open_bl_datestr=strtotime($row['opening_stock_date']); if($open_bl_datestr>=$stock_last_update){ $avqty+=$row['opening_balance']; } ?> O/BALANCE: <?php echo $avqty; ?> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="97">Date</td> <td width="59">Note</td> <td width="79">Note Id</td> <td width="49">Type</td> <td width="75">Qty</td> <td width="66">Balance</td> <td width="66">Cost</td> </tr> <?php $ress=$db->select("*","stock_transactions","item='".$row['id']."' AND (added_date BETWEEN '".$rowsys['stock_last_update']."' AND '".$date->todayDate('Y-m-d')."')","","added_date ASC"); while($rows=$db->fetch($ress)) { if($rows['trn_type']=='in'){ $avqty+=$rows['qty']; } if($rows['trn_type']=='out'){ $avqty-=$rows['qty']; } ?> <tr> <td><?php echo $rows['added_date']; ?></td> <td><?php echo $rows['note_type']; ?></td> <td><?php echo $rows['note_id']; ?></td> <td><?php echo $rows['trn_type']; ?></td> <td><?php echo $rows['qty']; ?></td> <td><?php echo $avqty; ?></td> <td><?php echo $rows['amount']; ?></td> </tr> <?php } ?> <tr> <td colspan="5">BALANCE</td> <td><?php echo $avqty; $db->update("inventory_items","closing='".$avqty."'","id='".$row['id']."'"); ?></td> </tr> <tr> <td colspan="5">ITEM ROW BALANCE</td> <td><?php echo $row['closing']; ?></td> </tr> </table> <?php } ?> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0 |
proxy
|
phpinfo
|
Settings