cmorgan 10/3/2007 10:36:21 AM

Create a single payment document (cash receipt) and applying it to multiple invoices

I am attempting to create a single cash receipt (ex: PYMNT1234) and apply it to multiple invoices. I have the following problem:

 1. I loop through a datareader of invoices to apply payments too. When I try to create a single XML document with one <RMCashReceiptsType> and multiple <RMApplyType> by adding to the collection like below, all of the <TARMApply>'s are the same. When I add the next one to the collection it replaces the properties of them all.

                  With paymentApply
                        .APTODCNM = sDocNum
                        .APFRDCNM = sPaymentDoc
                        .APPTOAMT = dApplyAmt
                        .APFRDCTY = 9
                        .APTODCTY = 1
                        .APPLYDATE = frmMain.dtpApplyDate.Text
                        .GLPOSTDT = Date.Today.ToString
                    End With

                    payment.taRMApply = paymentApply

                    ReDim Preserve eConnect.RMApplyType(0)
                    eConnect.RMApplyType(0) = payment

Version: Unknown or N/A
Section: eConnect


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3