Chris Travers wrote:
Ok, the first thing to do is to try to get rid of these erroneous records. This means correcting the data at the database level. netamount should be 0 in this case. It looks like you may need to update the acc_trans table to set that to 0 instead of NaN. I.e. back up the data, (you may also want to select into a new table also) and: UPDATE acc_trans SET amount = 0 WHERE amount = 'NaN';
Database backed up and update done without issue.
Once this is done, set up constraint in the database: ALTER TABLE acc_trans ADD CHECK (amount <> 'NaN'); This way a bad invoice will cause an error instead of posting odd data. This also means more immediate support calls and a better chance of tracking this down.
Done. Thanks, Chris. Much appreciated! Charley