09-13-2019, 09:59 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
Zero/delete all orders, Purchase and payment etc.,
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
1- Zero all stocks balance, but got the error code 1701
2- Delete All Purchase Orders, got the error code 1451
3- Delete All PO Goods Received (GRNs), also got the error code 1451
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
|
|
09-13-2019, 07:27 PM,
|
|
TimSchofield
Tim Schofield
|
Posts: 1,318
Threads: 22
Joined: Mar 2015
|
|
RE: Zero/delete all orders, Purchase and payment etc.,
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
Z_DeleteSalesTransActions.php (Size: 6.79 KB / Downloads: 3)
|
|
09-13-2019, 10:52 PM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: Zero/delete all orders, Purchase and payment etc.,
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?
Alex
|
|
09-14-2019, 06:25 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: Zero/delete all orders, Purchase and payment etc.,
OK
I have already deleted many data, but still have one place, please see below image, how can I delete it?
Alex
|
|
09-14-2019, 08:25 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: Zero/delete all orders, Purchase and payment etc.,
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.
And now I didn't know which place we didn't searched?
Alex
|
|
|