Stable merged into unstable again (due to failure on binary file during previous...
[fa-stable.git] / gl / includes / db / gl_db_banking.inc
index 4a88583a24a73138d080699f128edbbfa5f934ae..0650a0c654ceafd40c6bb60a5ca984a016ebdb97 100644 (file)
@@ -116,7 +116,6 @@ function get_account_home_balance($person_id, $person_type, $rec_account, $to_da
 }
 //------------- New helper functions for revaluation of customer/supplier currencies 2011-05-08 Joe Hunt.
 
-
 function add_exchange_variation_all($date=null, $ref="", $memo)
 {
        global $Refs;
@@ -178,7 +177,7 @@ function add_exchange_variation_all($date=null, $ref="", $memo)
                }
        }
        //------------- END
-               
+
        commit_transaction();
        return array(($exchanged ? $trans_no : 0), $je);
 }
@@ -252,7 +251,6 @@ function add_bank_transfer($from_account, $to_account, $date_,
        if ($SysPrefs->auto_currency_revaluation())
        {
                $currency = get_bank_account_currency($to_account);
-       
                if (add_exchange_variation($trans_no1, $date_, $to_account, $to_gl_account,     
                        $currency, PT_MISC, $person_id))
                        $exchanged = true;
@@ -306,6 +304,7 @@ function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $
                'person_type_id', 'person_id', 'person_detail_id', 'ref', 'memo_', 'use_transaction'),
                $args);
        hook_db_prewrite($args, $trans_type);
+
        $aid = 0;
        if ($trans_no) {
                $old_trans = $trans_no;
@@ -434,5 +433,3 @@ function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $
 
        return array($trans_type, $trans_no);
 }
-
-?>
\ No newline at end of file