Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

eConnect error on taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

Posted on by 295

Inorder to import a Credit Card transaction into GP using eConnect , I create the following objects:

taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

taSopLineIvcInsert_ItemsTaSopLineIvcInsert,

taSopHdrIvcInsert

I think I am not setting the amounts properly in the Payment object, so I am getting the following error:

 

 

 

 

Sql procedure error codes returned: Error Number = 60 Stored Procedure taSopHdrIvcInsert Error Description = Payment total does not match line deposit + credit card payment total Node Identifier Parameters: taSopHdrIvcInsert SOPNUMBE = INVS147211111555 SOPTYPE = 3 Related Error Code Parameters for Node : taSopHdrIvcInsert PYMTRCVD = Note: This parameter was not passed in, no value for the parameter will be returned. <taSopHdrIvcInsert><SOPTYPE>3</SOPTYPE><DOCID>SPECIAL</DOCID><SOPNUMBE>INVS147211111555</SOPNUMBE><LOCNCODE>555</LOCNCODE><DOCDATE>1/14/2011</DOCDATE><CUSTNMBR>USD08</CUSTNMBR><CSTPONBR>20505000118013153465</CSTPONBR><SUBTOTAL>6.31000</SUBTOTAL><DOCAMNT>6.31000</DOCAMNT><BACHNUMB>POS555</BACHNUMB><USRDEFND1>555</USRDEFND1><USRDEFND3>10</USRDEFND3></taSopHdrIvcInsert

The code for creating the payment object is as follows:

Dim

 

Payments(intNumLineItems) As taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

 

If intPT = 2 Or intPT = 3 Then

 

'create payment object for each line item

 

For countLineItems = 0 To intNumLineItems - 1

 

Try

 

Dim objtaSOPmt As New taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

 

' define information for the transaction header

 

'create as an invoice so soptype = 3

objtaSOPmt.SOPTYPE = 3

 

'create the SOPNumber as INVS & storetransactionid & storeId

objtaSOPmt.SOPNUMBE =

"INVS" & intStoreTranID.ToString() & strStoreID 'objSopNO.GetNextSopNumber(3, "SPECIAL", strConnectionString)

 

'this is the transacton date

objtaSOPmt.DOCDATE = dtTime.Date

 

'set to a POS speciific customer in GP

strCust = ConfigurationSettings.AppSettings(

"GPCustomer" & strStoreID.Trim)

objtaSOPmt.CUSTNMBR = strCust

objtaSOPmt.USRDEFND1 = strStoreID

objtaSOPmt.USRDEFND3 =

"10"

 

'total of the transaction

objtaSOPmt.DOCAMNT = dtTranDetail.Rows(countLineItems)(

"ITEMPrice")

objtaSOPmt.CARDNAME = ConfigurationSettings.AppSettings(

"CardName")

objtaSOPmt.PYMTTYPE = 6

'for credit card payment

Payments(countLineItems) = objtaSOPmt

 

Catch ex As Exception

objMessageLog.InsertMessageLog(intTranID, strStoreID, intRegID,

"CreateSalesOrder", "Error creating TransactionDeatils for line item " & (countLineItems + 1).ToString() & ")" & dtTranDetail.Rows(countLineItems)("ItemNMBR") & ex.Message)

 

End Try

 

Next

 

End If

 

'CC Code

 

Dim spSOP As New SOPTransactionType

 

Try

 

' for serialization, add items to a sop transaction type

 

ReDim Preserve spSOP.taSopLineIvcInsert_Items(1)

spSOP.taSopLineIvcInsert_Items = LineItems

spSOP.taSopHdrIvcInsert = objtaSopHdrIvcInsert

 

If intPT = 2 Or intPT = 3 Then

spSOP.taCreateSopPaymentInsertRecord_Items = Payments

 

End If

 

Catch ex As Exception

objMessageLog.InsertMessageLog(intTranID, strStoreID, intRegID,

"CreateSalesOrder", "Error creating SOPTransactionType " & ex.Message)

 

End Try

*This post is locked for comments

  • Re: eConnect error on taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

    As JMcCoy mentioned, be sure that you are passing a value for PYMTRCVD in the taSopHdrIvcInsert node and that the value passed to this field is equal to the sum of all of the payments you have on this document.

    Thanks,

    Kevin

  • JMcCoy Profile Picture
    JMcCoy 185 on at
    Re: eConnect error on taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

    it says you're not passing in any PYMTRCVD.  Pass that in.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans