deletearapinvoices
This is an old revision of the document!
If invoice numbers are in sequence then following queries will do the job:
DELETE FROM acc_trans WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');
DELETE FROM invoice WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');
DELETE FROM inventory WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');
DELETE FROM dpt_trans WHERE trans_id IN (SELECT id FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999');
DELETE FROM ar WHERE invnumber BETWEEN 'A-0001' AND 'A-0999';
deletearapinvoices.1671546562.txt.gz · Last modified: 2024/09/25 06:20 (external edit)