Dear Chris, I found until now 4 points need from me to re modify in the Post_invoice function ? I need your advise: 1- The first point: In delete invoice function at IR.pm I modified the code of this line to be : $query = qq|DELETE FROM ap WHERE trans_id = ?|; $query = "DELETE FROM ap WHERE id =?"; 2- The Second point: A: When you sold item to the customer and you have stock in the inventory. The regular : The invoice_id for inventory_accno_id in acc_trans table will be the invoice id for this item that belong to ar. The invoice_id for expenses_accno_id in acc_trans table will be the invoice id for this item that belong to ap. B: When You sold item to the customer and you don't have stock in the inventory. When you add AP invoice : The post_invoice function , will add the item invoice id that belong to AP to the inventory_accno_id and expenses_accno_id in the acc_trans. ine line 398 in ir.pm , I changed $sth->execute( $ref->{trans_id}, $ref->{inventory_accno_id}, $linetotal, $ref->{project_id}, $invoice_id, $ref->{transdate}, $ref->{transdate}, ) || $form->dberror($query); to be $sth->execute( $ref->{trans_id}, $ref->{inventory_accno_id}, $linetotal, $ref->{project_id}, $ref->{id}, $ref->{transdate}, $ref->{transdate}, ) || $form->dberror($query); my question: I modified the code in case B to be as case A. Is that OK. or that is not preferred. Please advise me. Best wishes, Shaekir, Date: Thu, 19 Nov 2009 15:03:19 -0800 From: ..hidden.. To: ..hidden.. Subject: Re: [Ledger-smb-devel] Please, Advise me Are you reposting a lot of invoices? Technically, this is not recommended as it poses some other problems that have no agreed-upon solutions. Probably the best course of action is to figure out why this is required and see what we can do to eliminate that requirement for you. Best Wishes Chris Travers Get Windows 7 for only $39.99-CDN College or University students only. This offer ends Jan 3-upgrade now! |