Re: [Emerald] odd links in payments table

Dale E. Reed Jr. ( (no email) )
Mon, 03 Apr 2000 13:35:54 -0700

Ben Conner wrote:
> Hi Dale,
> With Emerald vsn 2.5.329, I'm seeing a lot of odd links in the payments
> table back to the invoices table. For example, with the most recent
> invoice run there are quite a few customers who have multiple previous
> payments with the current invoiceid in the payments table. Some of these
> match to payments made all the way back to 8/99 or earlier.
> This looks real stupid on the invoice when it prints out. Thought it was a
> problem with the .rpt file until I verified the data was being pulled
> properly. What's odd is it isn't happening on all customers...only about
> half. I've looked but can't find any common thread.
> I thought about a quick fix where I place a where clause in the
> invoicep.rpt file to only report payments made in the last 30 days--but
> doing that voided the implied where clause on invoiceid and I got invoices
> with -lots- of payments on them. :) Not exactly what I had in mind.
> Any suggestions on a cosmetic fix so I can print invoices that I can send
> out? Or any idea what could be causing this?

This is covered in the changes.txt file for 327 and higher (see below).
The original query defined in the 303 section has additional information
about this as well.

v2.5.327 - 1/27/00

* The query for Payment updates for version 2.5.303 should have
set to the minimum invoice, not the maximum:

Update Payments
Set InvoiceID = (Select Min(InvoiceID)
From Invoices i
Where i.CustomerID = Payments.CustomerID
and Payments.Date <= i.Date)
Where InvoiceID is NULL


Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc.

For more information about this list (including removal) go to: