O.k. so I'm sure someone out there has this as it has been addressed before and made into a module. The module is stock quantity report. This works as a quick view, but we have thousands of products to count for our corrective inventory procedure. This next route would save many hours for many people I'm sure!
I would like to place this on the collect_info.php page (product input page). I have configured a table at the top of the page that displays relevant information including "Stock on shelf:" x
The "x" needs to be the current admin stock plus that product that was just purchased sitting in status bin #1. Meaning it's bought, paid for and needs to come off the shelf, but is still on the shelf until it's picked the next day.
Here is the code associated to this, but i can't get it to work on the collect_info page, it displays 0:
<?php
$real = $db->Execute("SELECT SUM(op.products_quantity) AS qty
FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op
WHERE o.orders_status<>'1'
AND o.orders_id=op.orders_id
AND op.products_id='". $products->fields['products_id'] ."' ");?>
AND TO DISPLAY THE NUMBER...
<td class="main" align="center"><?php echo $products->fields['products_quantity'] + $real->fields[qty]; ?> </td>



Reply With Quote


Bookmarks