Fixed error on edit of a customer payment (certain MySql releases).
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 11 Mar 2013 14:06:43 +0000 (15:06 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 11 Mar 2013 14:06:43 +0000 (15:06 +0100)
sales/includes/db/cust_trans_db.inc

index 52f05b0f30b2ce014b6589778257f27dcec7fdb4..4f92807a468ea3a831f2e8cad3f7921ff8c17be2 100644 (file)
@@ -103,7 +103,7 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo,
                ov_freight=".db_escape($Freight).", ov_freight_tax=$FreightTax, rate=$rate,
                ship_via=".db_escape($ship_via).", alloc=$AllocAmt,
                dimension_id=".db_escape($dimension_id).", dimension2_id=".db_escape($dimension2_id).",
-               payment_terms=".db_escape($payment_terms)."
+               payment_terms=".db_escape($payment_terms, true)."
                WHERE trans_no=".db_escape($trans_no)." AND type=".db_escape($trans_type);
        }
        db_query($sql, "The debtor transaction record could not be inserted");