Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Message when crediting Invoice with credit_invoice.php
12-22-2015, 12:24 AM (This post was last modified: 12-22-2015 12:31 AM by R2-G.)
Post: #1
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
Find all posts by this user
Quote this message in a reply
12-22-2015, 02:05 AM
Post: #2
RE: Error Message when crediting Invoice with credit_invoice.php
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)