No exchange rate working in FA now (EXCHANGE-RATES.ORG). Fixed by @boxygen.
[fa-stable.git] / gl / includes / db / gl_db_banking.inc
index c1a5e16d23a193e3d3ce3c67a4177fa7d94a08a1..14c7f14feca65cee7b6dd62295bb357df2045c27 100644 (file)
@@ -143,7 +143,7 @@ function get_account_home_balance($person_id, $person_type, $rec_account, $to_da
 // Note: in 2.4.9 sparse 'ref' argument was removed (generated transactions use
 // next references from default refline).
 //
-function add_exchange_variation_all($date=null, $memo)
+function add_exchange_variation_all($date, $memo)
 {
        begin_transaction();
        $exchanged = false;
@@ -351,7 +351,7 @@ function update_bank_transfer(
 {
        begin_transaction();
        delete_comments(ST_BANKTRANSFER, $trans_no);
-       void_transaction(ST_BANKTRANSFER, $trans_no, Today(), _("Document reentered."));
+       void_transaction(ST_BANKTRANSFER, $trans_no, $date_, _("Document reentered."));
        void_gl_trans(ST_BANKTRANSFER, $trans_no, true);
        $new_trans_no = add_bank_transfer(
                $from_account, $to_account, $date_, $amount,
@@ -518,7 +518,7 @@ function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $
        //  otherwise the operation could fail for cash accounts due to temporary negative balance
        if ($old_trans) 
        {
-               $msg = void_transaction($trans_type, $old_trans, Today(), _("Document reentered."));
+               $msg = void_transaction($trans_type, $old_trans, $date_, _("Document reentered."));
                if ($msg)
                {
                        display_error($msg);