Topic: Add Payment in 2.3.0

When I tried to add any paymen, I recive this message:

DATABASE ERROR : The debtor transaction record could not be inserted
error code : 1366
error message : Incorrect integer value: '' for column 'payment_terms' at row 1
sql that failed was : INSERT INTO 0_debtor_trans ( trans_no, type, debtor_no, branch_code, tran_date, due_date, reference, tpe, order_, ov_amount, ov_discount, ov_gst, ov_freight, ov_freight_tax, rate, ship_via, alloc, dimension_id, dimension2_id, payment_terms ) VALUES ('1', '12', '198', '46', '2011-01-01', '0000-00-00', '1', '0', '0', 125, '0', 0, '0', 0, 1, '0', 0, '0', '0', '')


My Customer have a value of 2 in 'payment_terms' , but In this module apper without any value.

This problem is in Customer Payment and Transactions Payment to.

Thanks.

Rodrigo Cuadra

Re: Add Payment in 2.3.0

I fix the proble add 2 lines after lines 73 in cust_trans_db.inc

if ($payment_terms == "")
    $payment_terms == "0";

this solution afect the rest of program?

Re: Add Payment in 2.3.0

No, it should not - payment_term value is ignored for payment transactions. Seems you have mysql running in strict mode. If you will find any similar problem please report it too. In mean time I will fix it right way in CVS.
Janusz