Added missed db_escape on person_id.
[fa-stable.git] / gl / includes / db / gl_db_bank_trans.inc
index 6aebe6f4a2dab753be9f0342eee334224039cd24..200277fb60b2280cb44c17a18429c7e5a6cb83db 100644 (file)
@@ -29,7 +29,7 @@ function add_bank_trans($type, $trans_no, $bank_act, $ref, $date_, $bank_trans_t
                trans_date, bank_trans_type_id, amount, person_type_id, person_id) ";
 
        $sql .= "VALUES ($type, $trans_no, '$bank_act', ".db_escape($ref).", '$sqlDate', '$bank_trans_type_id',
-               $amount_bank, $person_type_id, '$person_id')";
+               $amount_bank, $person_type_id, ". db_escape($person_id).")";
 
        if ($err_msg == "")
                $err_msg = "The bank transaction could not be inserted";