28-Feb-2011 Joe Hunt
# [0000583] Unique Reference check fails when running manual Revaluation of Currency
$ /includes/references.inc
+# When voiding Inventory Adjustment transaction, the costs are not getting adjusted.
+$ /inventory/includes/db/items_adjust_db.inc
+# [0000587] Converted currencies are not rounded when using Funds transfers
+$ /gl/includes/db/gl_db_bank_trans.inc
21-Feb-2011 Janusz Dobrowolski
! Hiden warning in open_basedir/save_mode on rate retrieval.
}
else
$amount_bank = $amount;
-
+ $amount_bank = round2($amount_bank, user_price_dec());
// Also store the rate to the home
//$BankToHomeCurrencyRate = get_exchange_rate_to_home_currency($bank_account_currency, $date_);
function void_stock_adjustment($type_no)
{
hook_db_prevoid(ST_INVADJUST, $type_no);
+
+ //Average the cost while voiding
+ $adjustment_items = get_stock_adjustment_items($type_no);
+ while ($adjustment = db_fetch($adjustment_items))
+ {
+ update_average_material_cost(0, $adjustment['stock_id'],
+ $adjustment['standard_cost'], -$adjustment['qty'], sql2date($adjustment['tran_date']));
+ }
void_gl_trans(ST_INVADJUST, $type_no);
void_stock_move(ST_INVADJUST, $type_no);
}