Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to add a branch
04-13-2017, 12:50 AM
Post: #1
Unable to add a branch
Not able to add a branch to the customer, tried with existing debtorno present in debtorsmaster table as well as with non-existing..
getting below error:

Database Error 1452 : The branch record could not be inserted or updated because
Cannot add or update a child row: a foreign key constraint fails (`weberpdemo`.`custbranch`, CONSTRAINT `custbranch_ibfk_1` FOREIGN KEY (`debtorno`) REFERENCES `debtorsmaster` (`debtorno`))

Database SQL Failure : The SQL that failed was
INSERT INTO custbranch (branchcode, debtorno, brname, braddress1, braddress2, braddress3, braddress4, braddress5, braddress6, lat, lng, specialinstructions, estdeliverydays, fwddate, salesman, phoneno, faxno, contactname, area, email, taxgroupid, defaultlocation, brpostaddr1, brpostaddr2, brpostaddr3, brpostaddr4, brpostaddr5, disabletrans, defaultshipvia, custbranchcode, deliverblind) VALUES ('AP', 'ANGRY1', 'Angus Rouledge - Florida', '1821 Sunnyside', 'Ft Lauderdale', 'Florida', 'Florida', '42554', 'United States', '0', '0', '', '0', '0', 'ERI', '', '', '1234567890', 'FL', '', '1', 'FL', '', '', '', '', '', '0', '1', '', '1')
Find all posts by this user
Quote this message in a reply
04-13-2017, 08:15 AM
Post: #2
RE: Unable to add a branch
Strange.... I take it from what you have said that ANGRY1 exists in the debtorsmaster table?

What version are you using and have you made any customisations?

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2017, 03:41 PM
Post: #3
RE: Unable to add a branch
Yes, ANGRY1 exists in debtorsmaster table as debtorno.
I am using the weberpdemo DB and this table did not exist before so had created it by taking schema from weberp DB.

The version is latest only, have downloaded it 2 days back only..
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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