webERP Forum

Full Version: Zero/delete all orders, Purchase and payment etc.,
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi every,

Here I met other problems again.

I found our purchase, sales and payment had many mistake by ourselves, so I want to zero or delete all these deal, but still keep the Customers, suppliers and goods name information.

So I found this function: Delete Sales Transactions
But seems have some problem there
[attachment=977]
1- Zero all stocks balance, but got the error code 1701
[attachment=978]
2- Delete All Purchase Orders, got the error code 1451
[attachment=979]
3- Delete All PO Goods Received (GRNs), also got the error code 1451
[attachment=980]

And if all above operation done, seems the payment and invoice parts also can't delete, so how can I do?

Please help me again.

Alex
A general word of warning to everybody. Any script starting with Z_ should be treated with caution. They are often scripts that bypass fundamental accounting principles, such as maintaining a strict audit trail of transactions, and are often poorly maintained, or not maintained at all. Always test first, and take a backup of your data first.

That said, Alex can you try the attached script and see if it helps your problem.

Tim


[attachment=981]
Hi Tim,

This script is good, I have already deleted the data, thank you.

but seems some accounting data still there, how to clean these parts?

[attachment=982]

Alex
OK

I have already deleted many data, but still have one place, please see below image, how can I delete it?
[attachment=983]

Alex
Alex, how were these transactions created?

Tim
Hi Tim,

A few days ago I tried to buy goods from a supplier and set up a new shipment, then the company voucher paid the goods cost, shipping costs, and taxes, but the bank did not actually pay. But today I executed your modified Z_DeleteSalesTransActions.php. All the information such as inventory, sales and purchasing has been deleted, but I have searched about the invoice and payment information from the supplier, It still exists. I later searched by myself from the database and deleted directly, but eventually there is still this information in this place.
[attachment=984]
[attachment=985]


And now I didn't know which place we didn't searched?

Alex
Hi Alex, after removing GL transactions you need to run the script Z_RePostGLFromPeriod.php to recalculate the GL balances.

The Z_DeleteSalesTransActions.php won't remove those purchasing transactions which is why you had to remove them manually.

Tim
Hi I'm,

Perfect, now it is running well.

Thanks

Alex
Paul, I have issued a pull request for the revised Z_DeleteSalesTransactions.php

Tim
Pulled!
Reference URL's