Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining pre-payments against a CUSTPO 1

Status
Not open for further replies.

MatthewRheinberger

IS-IT--Management
Mar 8, 2007
7
AU
Hi,

I am creating invoices and need to know if a prepayment has been made against a CUSTPO.

Reason is that I need to alter amount due on 2 payment dates by the pre-payment.

Is there a nice way to look up payments made against a CUSTPO?

my thanks,
Matthew
 
What is a CUSTPO?
I'm assuming an OE Order, you can lookup OE prepayments in OEPPRE.
 
Thanks,

CUSTPO is a field on our invoice (not sure if it is a custom field) but is accessed via invoice import/export.

Do you have a sample of how to use the OEPPRE search? so that I can figure out logic required for my use?

my thanks,
Matthew
 
Code:
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Dim OEPPRE As AccpacCOMAPI.AccpacView

'Open dblink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
'Open view
mDBLinkCmpRW.OpenView "OE0620", OEPPRE

OEPPRE.Fields("APPLYTO").PutWithoutVerification 2 '2 = order, 4 = invoice
OEPPRE.Fields("DOCNUMBER").PutWithoutVerification "ORD0000000000000000001" 'Order number
OEPPRE.Fields("PPNUMBER").PutWithoutVerification 1 '1=First prepayment, 2=second prepayment, etc
If OEPPRE.Read Then
    MsgBox "Order prepayment exists"
Else
    MsgBox "No order prepayment"
End If

'Cleanup
Set OEPPRE = Nothing
Set mDBLinkCmpRW = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top