Re: Reports

Richard Sensale ( (no email) )
Tue, 23 Dec 1997 14:29:36 -0500

Thanks, that helps quite a bit.
-----Original Message-----
From: Dale E. Reed Jr. <>
To: <>
Date: Tuesday, December 23, 1997 2:25 PM
Subject: Re: Reports

>Richard Sensale wrote:
>> Do you now what table and field stores the flag for if an invoice has
>> paid or not?
>There isn't such a field. In 2.2 and lower, whether an invoice is paid or
>not is determined by whether it has any invoice items that haven't been
>paid. This is determined by looking at the InvoiceItems table, PaymentID
>field and seeing if its null.
>Off the top of my head its like:
>Select InvoiceID
>From Invoices
>Where Exists
> ( Select ItemID
> From InvoiceItems
> Where InvoiceItems.InvoiceID = Invoices.InvoiceID
> And InvoiceItems.PaymentID IS NULL
> )
>This gives a list of unpaid invoices. You can check a single one by
>just adding "AND InvoiceID = xxxx" where xxxx in the invoice ID you
>want to check.
>Dale E. Reed Jr. (
> IEA Software, Inc. | RadiusNT, Emerald, and NT FAQs
> Internet Solutions for Today |
> ----------------------------------------------------------
> Emerald Mailing List