X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Finventory_db.inc;h=8b901e25de7dfca0996156bdc0dbb84140210098;hb=fe1f5b5e9c57ff544939158bab7334cc77ce2169;hp=46a16b41706de5cfecbe43c15f52f1f6af9c733a;hpb=9fc19175befbc44cfaf9f26e509c4e2562497479;p=fa-stable.git diff --git a/includes/db/inventory_db.inc b/includes/db/inventory_db.inc index 46a16b41..8b901e25 100644 --- a/includes/db/inventory_db.inc +++ b/includes/db/inventory_db.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ function get_qoh_on_date($stock_id, $location=null, $date_=null, $exclude=0) { if ($date_ == null) @@ -37,8 +46,10 @@ function get_qoh_on_date($stock_id, $location=null, $date_=null, $exclude=0) function get_item_edit_info($stock_id) { - $sql = "SELECT material_cost + labour_cost + overhead_cost AS standard_cost, units - FROM ".TB_PREF."stock_master WHERE stock_id='$stock_id'"; + $sql = "SELECT material_cost + labour_cost + overhead_cost AS standard_cost, units, decimals + FROM ".TB_PREF."stock_master,".TB_PREF."item_units + WHERE stock_id='$stock_id' + AND ".TB_PREF."stock_master.units=".TB_PREF."item_units.abbr"; $result = db_query($sql, "The standard cost cannot be retrieved"); return db_fetch($result);