webERP Forum

Full Version: Data too long for column 'salesperson' when processing a Sales Order
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This error appears on ConfirmDispatch_Invoice.php when processing invoice:
Database Error 1406 : Sales analysis record could not be added or updated because
Data too long for column 'salesperson' at row 1

Problem = database schema:
The field salesmancode on salesman table has a type varchar(4) while on salesanalysis table, it is char(3).

Solution: fix salesanalysis table
ALTER TABLE `salesanalysis`     CHANGE `salesperson` `salesperson` VARCHAR(4) DEFAULT '' NOT NULL;