Hi all,
I've managed to create and post an invoice batch and also created a new payment batch, but now that I'm trying to add payment entries to this new payment batch, I'm completely stuck!
The issue is that the macro code tells me nothing about selecting the individual line items for a vendor (when I click on the blue ">>" arrow).
When I actually add the line item to the batch, the macro code just seems to reference the sequential number of each grid item (from the above action), but gives me no detail about the entry itself and no indication of what it does behind the scenes to add it. It doesn't even detail where I applied the document to the line.
Here's a snippet of macro code generated as I described - I won't waste space with the view composition code, but please let me know if you need this.
Any ideas / pointers gratefully accepted.
Many thanks
Pete
Code Snippet:
APPAYMENT3batch.RecordClear
APPAYMENT3batchFields("PAYMTYPE").PutWithoutVerification ("PY") ' Batch Selector
APPAYMENT3headerFields("BTCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail3Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail1Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail2Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3batchFields("CNTBTCH").PutWithoutVerification ("91") ' Batch Number
APPAYMENT3batch.Read
APPAYMENT3batchFields("PROCESSCMD").PutWithoutVerification ("1") ' Process Command Code
APPAYMENT3batch.Process
APPAYMENT3batchFields("PROCESSCMD").PutWithoutVerification ("1") ' Process Command Code
APPAYMENT3batch.Process
APPAYMENT3header.RecordCreate 2
APPAYMENT3batch.Browse "((PAYMTYPE = ""PY"") AND ((BATCHSTAT = 1) OR (BATCHSTAT = 7) OR (BATCHSTAT = 8)))", 1
APPAYMENT3headerFields("IDVEND").Value = "100208" ' Vendor Number
APPAYMENT3detail1.Cancel
APPAYMENT3headerFields("TXTRMITREF").Value = "Ref #3" ' Entry Reference
APPAYMENT3header.Insert
APPAYMENT3header.Insert
APPAYMENT3batch.Read
APPAYMENT3headerFields("CNTENTR").PutWithoutVerification ("0") ' Entry Number
APPAYMENT3header.RecordCreate 2
I've managed to create and post an invoice batch and also created a new payment batch, but now that I'm trying to add payment entries to this new payment batch, I'm completely stuck!
The issue is that the macro code tells me nothing about selecting the individual line items for a vendor (when I click on the blue ">>" arrow).
When I actually add the line item to the batch, the macro code just seems to reference the sequential number of each grid item (from the above action), but gives me no detail about the entry itself and no indication of what it does behind the scenes to add it. It doesn't even detail where I applied the document to the line.
Here's a snippet of macro code generated as I described - I won't waste space with the view composition code, but please let me know if you need this.
Any ideas / pointers gratefully accepted.
Many thanks
Pete
Code Snippet:
APPAYMENT3batch.RecordClear
APPAYMENT3batchFields("PAYMTYPE").PutWithoutVerification ("PY") ' Batch Selector
APPAYMENT3headerFields("BTCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail3Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail1Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3detail2Fields("BATCHTYPE").PutWithoutVerification ("PY") ' Batch Type
APPAYMENT3batchFields("CNTBTCH").PutWithoutVerification ("91") ' Batch Number
APPAYMENT3batch.Read
APPAYMENT3batchFields("PROCESSCMD").PutWithoutVerification ("1") ' Process Command Code
APPAYMENT3batch.Process
APPAYMENT3batchFields("PROCESSCMD").PutWithoutVerification ("1") ' Process Command Code
APPAYMENT3batch.Process
APPAYMENT3header.RecordCreate 2
APPAYMENT3batch.Browse "((PAYMTYPE = ""PY"") AND ((BATCHSTAT = 1) OR (BATCHSTAT = 7) OR (BATCHSTAT = 8)))", 1
APPAYMENT3headerFields("IDVEND").Value = "100208" ' Vendor Number
APPAYMENT3detail1.Cancel
APPAYMENT3headerFields("TXTRMITREF").Value = "Ref #3" ' Entry Reference
APPAYMENT3header.Insert
APPAYMENT3header.Insert
APPAYMENT3batch.Read
APPAYMENT3headerFields("CNTENTR").PutWithoutVerification ("0") ' Entry Number
APPAYMENT3header.RecordCreate 2