Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can´t add Prices, Database Error 1452
09-24-2013, 10:58 PM
Post: #1
Can´t add Prices, Database Error 1452
Hi there,

I just installed the WebERP on my Server and finished all of my parameters. So I wanted to try that system. I added a Vendor and an Item. After creating the Item I clicked on Maintain Pricing, added my Price and click on enter.

Than an error Message appears:

Database Error 1452 : The new price could not be added
Cannot add or update a child row: a foreign key constraint fails (`weberp`.`prices`, CONSTRAINT `prices_ibfk_3` FOREIGN KEY (`typeabbrev`) REFERENCES `salestypes` (`typeabbrev`))

Database SQL Failure : The SQL that failed was
INSERT INTO prices (stockid, typeabbrev, currabrev, startdate, enddate, price) VALUES ('EK00001', '', 'EUR', '2013-09-24', '0000-00-00', '14.50')

Can somebody help me? Whats wrong?
Find all posts by this user
Quote this message in a reply
09-25-2013, 07:53 AM
Post: #2
RE: Can´t add Prices, Database Error 1452
Have you created any price lists (called sales types) in webERP yet?
Go to

Menu -> Setup ->Receivables/Payables SetupReceivables/Payables Setup -> Sales Types

or http://yourdomain/webERP/SalesTypes.php

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
09-25-2013, 02:08 PM
Post: #3
RE: Can´t add Prices, Database Error 1452
Great...
Just a simple Solution. Thank You.
Find all posts by this user
Quote this message in a reply
01-28-2014, 07:44 PM
Post: #4
RE: Can´t add Prices, Database Error 1452
Why I am getting four ERROR 1452 (23000): MySQL Cannot add or update a child row: a foreign key constraint fails (look above for exact errors)

Does anyone know how to fix this? Or what I did wrong at least?
Find all posts by this user
Quote this message in a reply
01-28-2014, 08:02 PM
Post: #5
RE: Can´t add Prices, Database Error 1452
Have you setup a Sales Type as per Phils comment above?

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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