Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete/roll back test purchase?
02-12-2013, 01:22 AM
Post: #1
Delete/roll back test purchase?
Upon first installing webERP, after running through the basic setup/config and importing supplier data, I decided to do a dummy purchase order for office equipment. I ran through the whole process and marked it as received. It retrospect, I wish I hadn't done this! I was just trying to get an overview of PO flow.

I'm now in the process of getting rid of the pre-defined chart of accounts and integrating our actual chart of accounts and I'd like to wipe this fictitious order off of the face of the earth like it never happened so that I can delete the associated office equipment account and any other pre-defined GL accounts that were affected by the transaction but I don't see an easy way to do this - I can view details of it, view the GL entries, etc., but I don't see a way to just roll back the database to a fresh, purchase-free state without rebuilding the whole thing, which I'd like to avoid as I've populated it with quite a bit of relevant info.

I've googled around about this and I saw a mention of a simple utility that does this kind of thing across the board but I didn't see any links or SQL code that would accomplish this.

Any help would be greatly appreciated!
Find all posts by this user
Quote this message in a reply
02-12-2013, 06:24 AM
Post: #2
RE: Delete/roll back test purchase?
I know there are some Z_xxx.php scripts which are not accessible via the menu.

Maybe there is something that helps?

Klaus
Find all posts by this user
Quote this message in a reply
02-12-2013, 02:02 PM
Post: #3
RE: Delete/roll back test purchase?
Z_DeleteSalesTransactions.php may have been extended to delete some purchase stuff too ... if not

this affects the following tables
purchorders
purchorderdetails
stockmoves table too - and potentially serial items?? and gltrans

if you empty these tables then you will have a blank database ready to go - you will need to do it in reverse order to ensure you don't fall foul of foreign keys or use SET FOREIGN_KEY_CHECKS=0; before the TRUNCATE TABLE stockmoves; TRUNCATE TABLE purchorderdetails; TRUNCATE TABLE purchorders;

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
02-13-2013, 01:05 AM
Post: #4
RE: Delete/roll back test purchase?
Thanks Phil, there were indeed options in Z_DeleteSalesTransactions.php to clear out purchase data and it seems to have worked perfectly in getting rid of my dummy purchase.

The only thing it didn't clear out were some numbers in chartdetails, so I just did a delete from there to eliminate records involving those no longer needed accounts, then I was able to go into the chart of accounts and delete them. I think that's all that needed to happen... Thanks!
Find all posts by this user
Quote this message in a reply
02-13-2013, 05:54 AM (This post was last modified: 02-13-2013 05:55 AM by phil.)
Post: #5
RE: Delete/roll back test purchase?
Glad that is all sorted happily :-)

If the gltrans table is empty then a repost gl trans from period - set from the starting periodl will reset the chart details to zero - in a blank installation deleting the chartdetails is no problem though as they are recreated by the posting routine for all combinations of periods and chartmaster accounts.

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)