From: Armaghan S. <sa...@le...> - 2009-02-06 02:35:58
|
On 2/6/09, Craig Isdahl <cr...@da...> wrote: > We upgraded from 2.8.17 to 2.8.20 last night, everything seemed fine. Today > we processed recurring invoices and discovered shortly thereafter that all > (see below for exceptions) of the recurring invoices automatically posted a > payment to each one! The system went back in time (2005, 2006, 2007 and 2008) > and grabbed a previous client payment then posted it to this new invoice. Hi Craig, Thanks for your information. I was about to send invoices to my customers and this has saved me a lot of hassle and confusion to my clients. I was able to reproduce this bug and a quick fix in the form of a patch is below. This should correct the bug. If you (or any one else) wants a patched file, let me know off-list and I shall send it. Regards ===================== Patch starts ========================== freebsd# git diff diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index ea2ec73..f52eb56 100755 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -3448,6 +3448,15 @@ sub process_transactions { ($form->{"$form->{ARAP}_paid_$j"}) = split /--/, $form->{"$form->{ARAP}_paid_$j"}; delete $form->{"cleared_$j"}; } + } else { + delete $form->{datepaid}; + delete $form->{paid}; + delete $form->{oldtotalpaid}; + for ($j = 1; $j <= $form->{paidaccounts}; $j++) { + delete $form->{"datepaid_$j"}; + delete $form->{"paid_$j"}; + delete $form->{"$form->{ARAP}_paid_$j"}; + } } for (qw(id recurring printed emailed queued)) { delete $form->{$_} } ========================= Patch Ends ============================= -- http://www.ledger123.com/ - Free SQL-Ledger Hosting - Documentation wiki - Virtual appliances -- |