Bill Bongiorno
SysTec Computer Associates, Inc.
> -----Original Message-----
> From: emerald-request@iea-software.com
> [mailto:emerald-request@iea-software.com]On Behalf Of Josh Hillman
> Sent: Friday, July 31, 1998 12:56 PM
> To: emerald@iea-software.com
> Subject: Re: voiding a payment
>
>
> > From: Bill Bongiorno <bill@systec.com>
> > Occassionally we apply a payment to the wrong invoice. Dale said voiding
> the
> > invoice will effectively void the payment. But it still appears on
> reports,
> > for example the Daily Payment Register. How do others handle this
> problem?
>
> /* Delete a payment from the database */
> /* This does NOT subtract the payment from MasterAccounts.Balance */
> /* Or modify the expiration, paidthru, last-received dates */
>
> DECLARE @PaymentID int
> SELECT @PaymentID = /* Enter PaymentID to be deleted */
>
> UPDATE InvoiceItems
> SET PaymentID = NULL
> WHERE PaymentID = @PaymentID
>
> DELETE FROM Payments
> WHERE PaymentID = @PaymentID
>
>
> Josh Hillman
> hillman@talstar.com
>