Journal Entry: cleanup in reconcillation status update during edition.
[fa-stable.git] / gl / includes / db / gl_db_bank_trans.inc
index 1bea79a3ef3918629de5b2172caa6645579d2f67..747041b614a542fa4a67dcbe970d1530dd55cc0a 100644 (file)
@@ -223,3 +223,10 @@ function check_void_bank_trans($type, $type_no)
        return true;
 }
 
+function update_reconcile_date($type, $trans_no, $date=NULL)
+{
+       $sql = "UPDATE ".TB_PREF."bank_trans SET reconciled=".($date ? "'".date2sql($date)."'" : 'NULL')
+               ." WHERE type=" . db_escape($type). " AND trans_no=".db_escape($trans_no);
+
+       db_query($sql, "Can't change reconciliation status");
+}