1

(19 replies, posted in Modules/Add-on's)

rafat wrote:

Yes it did. For me it did not make sense as the error was coming from outside the Module and I think it is from the core. If you look at it the insert fields do not tally with what is in the csv file. Here is the error:

10-Nov-2023 01:31:32 Europe/Berlin] <b>DATABASE ERROR :</b> order Cannot be Added<br>error code : 1265<br>error message : Data truncated for column 'prep_amount' at row 1<br>sql that failed was : INSERT INTO 0_sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date,
        order_type, ship_via, deliver_to, delivery_address, contact_phone,
        freight_cost, from_stk_loc, delivery_date, payment_terms, total, prep_amount)
        VALUES ('9','0','1', '30','1', '009/2017','auto','','2017-12-20', '1', '1','Donald Easter LLC','N/A', '', '0', 'DEF', '2017-12-20','4','70','')<br><br><br>

And here's the contents of the csv file

customer_id,branch_No,reference,date,payment_id,sales_type_name,dimension_id,dimension2_id,item_code,item_description,quantity,unit,price,discountpercentage,freightcost,delfrom,deldate,delto,deladdress,contactphone,email,custref,shipvia,comments,ex_rate
1,1,009/2017,2017/12/20,4,Retail,,,202,Maintenance,2,Each,35,0,,DEF,2017/12/20,Mr A,1 Abe Street Glasgow G32 FHT,984578545,customer@example.in,,,,
1,1,010/2017,2017/12/21,4,Retail,,,202,Maintenance,2,Each,15,0,,DEF,2017/12/21,Mr A,1 Abe Street Glasgow G32 FHT,984578545,customer@example.in,,,,

Dunno if this is resolved yet...
That error is a DB column type issue or the column value exceeds the max length.  Check database structure?