Error Message when crediting Invoice with credit_invoice.php
Am using WebERP 4.12.3 which I have just upgraded from 4.11.3 just days ago
when trying to credit an invoice that was created before the upgrade was done I get
the following error massage
Database Error 1452 : CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: The debtor transaction taxes records could not be inserted because
Cannot add or update a child row: a foreign key constraint fails (`simpliu8_snke`.`debtortranstaxes`, CONSTRAINT `debtortranstaxes_ibfk_1` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`))
Database SQL Failure : The following SQL to insert the debtor transaction taxes record was used
INSERT INTO debtortranstaxes( debtortransid, taxauthid, taxamount) VALUES('1301', '', '-26336')
Database Rollback Due to Error Above : Rolling Back Transaction OK
in the insert statement, the value for taxauthid is empty which seem to be the cause of the problem.
Crediting the same invoice on the 4.11.3 version works OK
INSERT INTO debtortranstaxes( debtortransid, taxauthid, taxamount) VALUES('1301', '', '-26336')
How can I rectify this ?
Thanks in advance
R2-g
|