- add_stock_move(systypes::inventory_adjustment(), $stock_id, $adj_id, $location,
- $date_, $reference, $quantity, $standard_cost, $type);
+ if (is_fixed_asset($mb_flag)) {
+ $sql = "UPDATE ".TB_PREF."stock_master SET inactive=1
+ WHERE stock_id=".db_escape($stock_id);
+ db_query($sql,"The inactive flag for the fixed asset could not be updated");
+ }
+
+ add_stock_move(ST_INVADJUST, $stock_id, $adj_id, $location,
+ $date_, $reference, $quantity, $standard_cost);
+
+ $inv_value = $standard_cost * $quantity;
+ $adj_value = $standard_cost * -($quantity);