X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Finventory_db.inc;h=e0ea2ef7646f00d33338e2ab29246d0561b5dcf0;hb=7840540918bfd37c886877a5d52e3ba0b3373289;hp=80f552e919b535fa624e06c88cb5664311bede90;hpb=e9782c04faf09dd040dbc0c908cdb6e6d4f0dcfc;p=fa-stable.git diff --git a/includes/db/inventory_db.inc b/includes/db/inventory_db.inc index 80f552e9..e0ea2ef7 100644 --- a/includes/db/inventory_db.inc +++ b/includes/db/inventory_db.inc @@ -173,7 +173,7 @@ function get_deliveries_from_trans($stock_id, $from) trans_id>='$from' GROUP BY stock_id"; $result = db_query($sql, "The deliveries could not be updated"); $row = db_fetch_row($result); - + $sql = "SELECT IF(type=".ST_SUPPRECEIVE." OR type=".ST_SUPPCREDIT.", price, standard_cost) FROM ".TB_PREF."stock_moves WHERE stock_id=".db_escape($stock_id) @@ -187,7 +187,7 @@ function get_deliveries_from_trans($stock_id, $from) trans_id<'$from' GROUP BY stock_id"; $result = db_query($sql, "The deliveries could not be updated"); $qoh = db_fetch_row($result); - + $qty = $row[0] - $qoh[0]; //QOH prior to -ve stock is subtracted $final_cost = $row[1] - $qoh[0]*$cost[0]; @@ -428,8 +428,3 @@ function get_location_name($loc_code) display_db_error("could not retreive the location name for $loc_code", $sql, true); } - -//-------------------------------------------------------------------------------------------------- - - -?> \ No newline at end of file