{
begin_transaction();
+ $trans = get_supp_trans($type_no, $type);
+
void_bank_trans($type, $type_no, true);
void_gl_trans($type, $type_no, true);
}
else
{
- $diff = get_diff_in_home_currency($grn["supplier_id"], $old_date, $old_date_, $old[2],
+ $diff = get_diff_in_home_currency($grn["supplier_id"], $old_date, sql2date($trans['tran_date']), $old[2],
$details_row["FullUnitPrice"]);
// Only adjust the avg for the diff
$mat_cost = update_average_material_cost(null, $details_row["stock_id"],