[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AP Invoice deletion/update clean up



Hi all,

I don't know about others but the various bugs in ledger-smb have caused
the system to go out of balance. Often the total per a chart account does
not agree to the detail underlying the account. i.e if one looks at the
balance on  the TB and then drills down to the detail the account amounts
are different.

In my case this was caused by the often reported problem with AP Vendor
Invoice deletions or editing and reposting of AP invoices. It seems this
is still not fixed. Here is what I do to get things back in balance. (I
hope I am not making things worse!)

Please backup your database and test this first. Let me know if I am
missing something.

1) First you need to find the transactions in acc_trans which are supposed
to be AP transaction but have no corresponding entries in the ap table. I
don't have a copy of the query I ran now but it should be something like

Select tran_id from acc_trans
left join ap on acc_trans.trans_id = ap.trans_id
where chart_id = (id for purchase account from chart table) where
invoiceid is not null and ap.id is null

This should give you all AP entries in acc_trans not in ap.

Then do a

delete from invoice where trans_id in (list of tran_id from above);

delete from acc_trans where trans_id in (list of tran_id from above);

I would not recommend ledgersmb for production just yet.

Regards

Mark



===========================================
Cyber Connect - More than just broadband
http://www.CyberConnect.co.za - Vodacom 3G R99/month

Cyber Designs - Put your business on the net
http://www.CyberDesigns.co.za

Jumping Bean - Your Java and Linux Experts
http://www.JumpingBean.co.za

Tel: 011-781 80 14
Fax: 011-781 80 15
===========================================
Disclaimer

Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Cyber Designs are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising.