Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when reversing supplier payments
04-06-2013, 04:47 AM (This post was last modified: 04-06-2013 06:51 AM by MacPhotoBiker.)
Post: #1
Error when reversing supplier payments
Hi,

I´m working since a couple of weeks on webERP, and everything works perfectly fine. I started to post customer and supplier payments, but I got it a bit messy (my fault, nothing to do with webERP).

I was trying to revert the payments, and for some of them worked. However, one payment I can not revert, but I get this error message:

INFORMATION Message : The number of payments that will be deleted is :2
INFORMATION Message : Deleting payment number 4 to supplier code supp for an amount of -55.52
Database Error :
Cannot delete or update a parent row: a foreign key constraint fails (`justcore_weberp`.`suppallocs`, CONSTRAINT `suppallocs_ibfk_1` FOREIGN KEY (`transid_allocfrom`) REFERENCES `supptrans` (`id`))
Database SQL Failure : The SQL that failed was
DELETE FROM supptrans WHERE type=22 AND transno='4' AND trandate='2013-03-22'

Attached is also a screenshot:
   

Could somebody help me out? I could go to the database and delete any records directly there, but since I don´t know the entire mechanics of webERP when posting and deleting, I´d prefer not to that way (unless somebody could confidently tell me which records to delete in which tables).

Thanks a lot for any help!

MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Find all posts by this user
Quote this message in a reply
04-11-2013, 02:16 AM
Post: #2
RE: Error when reversing supplier payments
Would somebody have some advice for me?

MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Find all posts by this user
Quote this message in a reply
04-11-2013, 06:50 AM
Post: #3
RE: Error when reversing supplier payments
This is hairy stuff ... as the allocation needs to be reversed/deleted before you can remove the transaction. The allocation can also create GL trans for exchange differences too ... so just deleting the allocation is not enough (unless the invoice/payment are the same currency in which case there is no exchange difference) I am not that comfortable with reversing supplier payments and it is not advisable although that script exists as a utility (I made it up when I was testing the payment run stuff).

For your situation you need to find the records in suppallocs that refer to the suptrans record and remove that first (if it is the payment and invoice is in the same currency - if not you also need to delete any gltrans created by this allocation too - and do a repost)

Contact me off list if you need further support on this

HTH

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
Post Reply 


Forum Jump:


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