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

Re: Incorrect credit records in ap table (v1.2.12 with some individual ar/ap updates)



On 5/29/08, Chris Travers <..hidden..> wrote:
> On Thu, May 29, 2008 at 7:42 PM, Gerald Chudyk <..hidden..> wrote:
>  > On 5/29/08, Chris Travers <..hidden..> wrote:
>  >> On Thu, May 29, 2008 at 1:27 PM, Gerald Chudyk <..hidden..> wrote:
>  >>  > Hi all,
>  >>  >
>  >>  > While researching issues in the ar/ap reports, I have discovered
>  >>  > records in the ap table which appear to be incorrect. One example:
>  >>  >
>  >>  > ap.amount = -4919.89
>  >>  > ap.netamount = 5198.36 (should be -4641.42)
>  >>  > The AP transaction report gets real excited about this and reports
>  >>  > tax= (2 * netamount) + (netamount - amount).
>  >>
>  >>
>  >> Did you run an early version of our fix for NULL netamounts from SVN?
>  >>
>  > Guilty as charged.
>  >
>  >>  If so, check with me on IRC about how to correct a bug to an earlier bugfix.
>  >>
>  > ok, thanks. But I really thought I was fixing ar/ap report problems.
>  > Oh well, back to the drawing board.
>  >
>
>
> Long-story short, there was a bug in that early version of the fix
>  (one reason why 1.2.14 hasnt been released yet) which caused this
>  problem where the amount was negative.
>
>  To correct, get the most recent version of the fix from
>  branches/1.2/sql/fixes/ar_ap_summary_fix_1.2.14.sql and then:
>
>  UPDATE ap SET netamount = NULL where amount < 0 AND netamount > 0;
>
>  \i ar_ap_summary_fix_1.2.14.sql
>
>  There is still a corner case where amount is 0, and you may need to
>  discuss those with me on IRC.
>
That corrected 105 records.

Thanks,
Gerald.