Quantcast

Error Message when crediting Invoice with credit_invoice.php

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error Message when crediting Invoice with credit_invoice.php

R2-G
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

INSERT INTO debtortranstaxes( debtortransid, taxauthid, taxamount) VALUES('1301', '', '-26336')

How can I rectify this ?

Thanks in advance


R2-g

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error Message when crediting Invoice with credit_invoice.php

R2-G
more info...

Crediting the same invoice on the old 4.11.3 version works OK
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error Message when crediting Invoice with credit_invoice.php

R2-G
Now OK

I found the solution on below link

http://www.weberp.org/forum/showthread.p...uthorities

jhm12698
RE: Credit_Invoice.php Issue
I somewhat figured out the problem. The calculationorder in the taxgrouptaxes was set to 0. Even when I went into TaxGroups.php and updated the order as 1 it stayed at zero in the table. Once I added another Assigned Tax Group, updated the order and then deleted one did it set the calculationorder to 1. Having an order of 0 doesn't appear to affect creating an invoice but does when creating a credit.
Loading...