Trying to access array offset on value of type bool. Fixed.
[fa-stable.git] / gl / bank_account_reconcile.php
index 81ebc7a0ee06f3b34c552749815ae92d3f7a7098..6875e068e4b6e2d2949d7ff51e71da2f9b78b891 100644 (file)
@@ -52,8 +52,8 @@ function rec_checkbox($row)
        $value = $row['reconciled'] != '';
 
 // save also in hidden field for testing during 'Reconcile'
-       return checkbox(null, $name, $value, true, _('Reconcile this transaction'))
-               . hidden($hidden, $value, false);
+       return is_closed_trans($row['type'], $row['trans_no']) ? "--" : checkbox(null, $name, $value, true, _('Reconcile this transaction'))
+               . hidden($hidden, $value, false);
 }
 
 function systype_name($dummy, $type)
@@ -175,7 +175,7 @@ if ($id != -1)
        change_tpl_flag($id);
 
 
-if (isset($_POST['Reconcile'])) {
+if (isset($_POST['last']) && isset($_POST['Reconcile'])) {
        set_focus('bank_date');
        foreach($_POST['last'] as $id => $value)
                if ($value != check_value('rec_'.$id))
@@ -184,7 +184,7 @@ if (isset($_POST['Reconcile'])) {
     $Ajax->activate('_page_body');
 }
 
-if (isset($_POST['ReconcileAll'])) {
+if (isset($_POST['last']) && isset($_POST['ReconcileAll'])) {
        set_focus('bank_date');
        foreach($_POST['last'] as $id => $value)
                set_tpl_flag($id);