Fixed Revaluation amount is getting posted wrongly. @mugao-em and @andijani.
[fa-stable.git] / gl / includes / db / gl_db_banking.inc
index 82776de14d8799059dc846d99cdc6473408c77e4..a7ad5576093a7f8501f923cf71f59e015d5029d0 100644 (file)
@@ -50,10 +50,10 @@ function add_exchange_variation($trans_no, $date_, $acc_id, $account,
                if ($person_type_id == null)
                        $person_type_id = PT_MISC;
                add_gl_trans(ST_JOURNAL, $trans_no, $date_, $account, 0, 0, _("Exchange Variance"),
-               $diff, null, $person_type_id, $person_id);
+               -$diff, null, $person_type_id, $person_id);
 
        add_gl_trans(ST_JOURNAL, $trans_no, $date_, get_company_pref('exchange_diff_act'), 0, 0, 
-               _("Exchange Variance"), -$diff, null, $person_type_id, $person_id);
+               _("Exchange Variance"), $diff, null, $person_type_id, $person_id);
                commit_transaction();
                return true;
        }