If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Adding note about Manual Inventory quantity

Adding note about Manual Inventory quantity

Started by sbbemn on 8 Mar 2011, 10:56 PM · Views: 1,219

Results 1 to 2 of 2
8 Mar 2011, 10:56 PM
#1
sbbemn avatar

sbbemn

Zen Follower

Join Date:
Jan 2010
Posts:
182
Plugin Contributions:
0

Adding note about Manual Inventory quantity

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>
8 Mar 2011, 11:20 PM
#2
sbbemn avatar

sbbemn

Zen Follower

Join Date:
Jan 2010
Posts:
182
Plugin Contributions:
0

Re: Adding note about Manual Inventory quantity

It appears that the code to display the number is...

admin stock:

<td class="dataTableContent" align="center"><?php echo $products->fields['products_quantity'] + $real->fields[qty]; ?> </td>

stock purchased but not picked yet from shelf:
<td class="dataTableContent" align="center"><b><?php echo $real->fields[qty]; ?></b> </td>

stock that you see on the shelf (this is the one I want):

<td class="dataTableContent" align="center"><?php $level=$products->fields['products_quantity']; if ($level<'1'){ echo ('<font color="#FF0000"><b>'.$level.'</b></font>'); } else { echo $level; }?>  </td>