web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

What is wrong with this SOP Payment?

(0) ShareShare
ReportReport
Posted on by 545

Good morning,

 

I have SOP Sales Invoice of which already exists in the system totaling $30.00 with no payment applied having SOPNUMBE = INV00000000000037.

I would like to apply an SOP Payment of $30.00 to this existing invoice.  I have tried taCreateSopPaymentInsertRecord_Items with an <Action> = 1 (New Transaction) of which results in error 56 "taSopHdrIvcInsert , Input variable contains a duplicate document" and I have tried <Action> = 2 (Modify Existing) of which results in in error 3767 "taCreateSopPaymentInsertRecord, Payment does not exist".  Do I need to create a new SOP Document Number for the  taSopHdrIvcInsert requirement of the SOP Payment transaction?

Here is the XML for the two calls mentioned above:

[Action = 1]

<?xml version="1.0" encoding="utf-16"?>
<eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SOPTransactionType>
    <eConnectProcessInfo xsi:nil="true" />
    <taRequesterTrxDisabler_Items xsi:nil="true" />
    <taUpdateCreateItemRcd xsi:nil="true" />
    <taUpdateCreateCustomerRcd xsi:nil="true" />
    <taCreateCustomerAddress_Items xsi:nil="true" />
    <taSopSerial_Items xsi:nil="true" />
    <taSopLotAuto_Items xsi:nil="true" />
    <taSopLineIvcInsert_Items xsi:nil="true" />
    <taSopLineIvcInsertComponent_Items xsi:nil="true" />
    <taSopTrackingNum_Items xsi:nil="true" />
    <taSopCommissions_Items xsi:nil="true" />
    <taSopLineIvcTaxInsert_Items xsi:nil="true" />
    <taCreateSopPaymentInsertRecord_Items>
      <taCreateSopPaymentInsertRecord>
        <SOPTYPE>3</SOPTYPE>
        <SOPNUMBE>INV00000000000037</SOPNUMBE>
        <CUSTNMBR>VER002</CUSTNMBR>
        <CUSTNAME>Ted Bundy</CUSTNAME>
        <DOCDATE>04-03-2013</DOCDATE>
        <DOCAMNT>30.00</DOCAMNT>
        <AUTHCODE>ABC123</AUTHCODE>
        <PYMTTYPE>4</PYMTTYPE>
        <Action>1</Action>
        <USRDEFND1>This is a test</USRDEFND1>
      </taCreateSopPaymentInsertRecord>
    </taCreateSopPaymentInsertRecord_Items>
    <taSopUserDefined xsi:nil="true" />
    <taSopDistribution_Items xsi:nil="true" />
    <taAnalyticsDistribution_Items xsi:nil="true" />
    <taSopMultiBin_Items xsi:nil="true" />
    <taSopHdrIvcInsert>
      <SOPTYPE>3</SOPTYPE>
      <DOCID>STDINV</DOCID>
      <SOPNUMBE>INV00000000000037</SOPNUMBE>
      <DOCDATE>04-03-2013</DOCDATE>
      <CUSTNMBR>VER002</CUSTNMBR>
      <CUSTNAME>Ted Bundy</CUSTNAME>
      <SUBTOTAL>30.00</SUBTOTAL>
      <PYMTRCVD>30.00</PYMTRCVD>
      <BACHNUMB>DONTEST</BACHNUMB>
    </taSopHdrIvcInsert>
    <taSopToPopLink xsi:nil="true" />
    <taSopUpdateCreateProcessHold xsi:nil="true" />
    <taCreateSOPTrackingInfo xsi:nil="true" />
    <taMdaUpdate_Items xsi:nil="true" />
  </SOPTransactionType>
</eConnect>

[Action = 2]

<?xml version="1.0" encoding="utf-16"?>
<eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SOPTransactionType>
    <eConnectProcessInfo xsi:nil="true" />
    <taRequesterTrxDisabler_Items xsi:nil="true" />
    <taUpdateCreateItemRcd xsi:nil="true" />
    <taUpdateCreateCustomerRcd xsi:nil="true" />
    <taCreateCustomerAddress_Items xsi:nil="true" />
    <taSopSerial_Items xsi:nil="true" />
    <taSopLotAuto_Items xsi:nil="true" />
    <taSopLineIvcInsert_Items xsi:nil="true" />
    <taSopLineIvcInsertComponent_Items xsi:nil="true" />
    <taSopTrackingNum_Items xsi:nil="true" />
    <taSopCommissions_Items xsi:nil="true" />
    <taSopLineIvcTaxInsert_Items xsi:nil="true" />
    <taCreateSopPaymentInsertRecord_Items>
      <taCreateSopPaymentInsertRecord>
        <SOPTYPE>3</SOPTYPE>
        <SOPNUMBE>INV00000000000037</SOPNUMBE>
        <CUSTNMBR>VER002</CUSTNMBR>
        <CUSTNAME>Ted Bundy</CUSTNAME>
        <DOCDATE>04-03-2013</DOCDATE>
        <DOCAMNT>30.00</DOCAMNT>
        <AUTHCODE>ABC123</AUTHCODE>
        <PYMTTYPE>4</PYMTTYPE>
        <Action>2</Action>
        <USRDEFND1>This is a test</USRDEFND1>
      </taCreateSopPaymentInsertRecord>
    </taCreateSopPaymentInsertRecord_Items>
    <taSopUserDefined xsi:nil="true" />
    <taSopDistribution_Items xsi:nil="true" />
    <taAnalyticsDistribution_Items xsi:nil="true" />
    <taSopMultiBin_Items xsi:nil="true" />
    <taSopHdrIvcInsert>
      <SOPTYPE>3</SOPTYPE>
      <DOCID>STDINV</DOCID>
      <SOPNUMBE>INV00000000000037</SOPNUMBE>
      <DOCDATE>04-03-2013</DOCDATE>
      <CUSTNMBR>VER002</CUSTNMBR>
      <CUSTNAME>Ted Bundy</CUSTNAME>
      <SUBTOTAL>30.00</SUBTOTAL>
      <PYMTRCVD>30.00</PYMTRCVD>
      <BACHNUMB>DONTEST</BACHNUMB>
    </taSopHdrIvcInsert>
    <taSopToPopLink xsi:nil="true" />
    <taSopUpdateCreateProcessHold xsi:nil="true" />
    <taCreateSOPTrackingInfo xsi:nil="true" />
    <taMdaUpdate_Items xsi:nil="true" />
  </SOPTransactionType>
</eConnect>

Any help in understanding this would be greatly appreciated.  If you can provide a working XML sample that properly demonstrates appling an SOP Payment to an existing SOP Sales Invoice...you will be rained with praise.

 

Thanks,

Don 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    sandipdjadhav Profile Picture
    18,306 on at
    RE: What is wrong with this SOP Payment?

    Don,

    You need to use Seqnumbr :

    Sequence number; required if Action=1, SOPTYPE=2, and multiple PYMTTYPE=6 exist

    Required if Action=2, SOPTYPE=2, and PYMTTYPE=6

    Required if Action=3 and DOCNUMBR and PYMTTYPE elements exist multiple times on document

    and then

    SEQNUMBRSpecified=True.

    Question: I don't understand you want to apply payment then why you are using taCreateSopPaymentInsertRecord ? You should have use taRMApply?

    msdn.microsoft.com/.../bb648362.aspx

    Thanks

    Sandip

  • sandipdjadhav Profile Picture
    18,306 on at
    RE: What is wrong with this SOP Payment?

    Sorry you are using SOPType=3 then you don't need SeqNumbr.

  • Donald Ashworth Profile Picture
    545 on at
    RE: What is wrong with this SOP Payment?

    Thank you for your quick reply.

    I am not using taRMApply because that applies to Receivable Management documents, not SOP documents.

    BTW:  I think I may have just determined what was causing the problem.  I needed a "new NextSOPNumber for the taSopHdrIvcInsert requirement of the SOP Payment Transaction.  I was using the OPNUMBE from the existing invoice I was attemopting to update.  The SOPNUMBE of the taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord object needs to be identical to the SOPNUMBE of the existing Sales Invoice I am attempting to update.

    After doing this, I was able to verify two transactions against my existing Sales Invoice.  The first was its creation, and the second was the SOP Payment being applied.

    This is very confusing and not very well documented...but, I think I have it figured out now.

    It is a shame there are not more examples of this kind of SOP transactioning.  Better examples would eliminate a lot of wasted time/typing.

    Thanks again,

    Don

  • sandipdjadhav Profile Picture
    18,306 on at
    RE: What is wrong with this SOP Payment?

    Don,

    Great to know that you found solution and I learn from your post too.

    Thanks

    Sandip

  • Chandu_Blr Profile Picture
    40 on at
    RE: What is wrong with this SOP Payment?

    Hi Sandip,

     Reference to above conversation,I tried to create an payment details in the GP for the sales document(before posting) but when i check in GP, the Amount is 0.

    Here I'm placing the code.

    /*********************

    SOPTransactionType[] transactionTypes = new SOPTransactionType[1];

                   taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord[] sopPaymentRecords = new taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord[1];

                   //  Create the payment line item(s)

                   taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord sopPaymentRecord = new taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord();

                   sopPaymentRecord.Action = (Int16)sopPayment.ACTION;

                   sopPaymentRecord.ActionSpecified = (sopPayment.ACTION != null);

                   sopPaymentRecord.AUTHCODE = sopPayment.AUTHCODE;

                   sopPaymentRecord.CUSTNMBR = sopPayment.CUSTNMBR;

                   sopPaymentRecord.CUSTNAME = sopPayment.CUSTNAME;

                   sopPaymentRecord.CARDNAME = sopPayment.CARDNAME;

                   sopPaymentRecord.CHEKBKID = sopPayment.CHEKBKID;

                   sopPaymentRecord.CHEKNMBR = sopPayment.CHEKNMBR;

                   sopPaymentRecord.DOCAMNT = (decimal)((sopPayment.DOCAMNT == null) ? 0.00m : (decimal?)sopPayment.DOCAMNT);

                   sopPaymentRecord.DOCDATE = ((sopPayment.DOCDATE == null) ? sopPaymentRecord.DOCDATE : ((DateTime)sopPayment.DOCDATE).ToString("yyyy-MM-dd"));

                   sopPaymentRecord.DOCNUMBR = sopPayment.DOCNUMBR;

                   sopPaymentRecord.EXPNDATE = sopPayment.EXPNDATE;

                   sopPaymentRecord.MDFUSRID = sopPayment.MDFUSRID;

                   sopPaymentRecord.PYMTTYPE = (Int16)sopPayment.PYMTTYPE; //  Allow to throw exception on null conversion when not supplied.

                   sopPaymentRecord.RCTNCCRD = sopPayment.RCTNCCRD;

                   sopPaymentRecord.SEQNUMBR = (Int16)((sopPayment.SEQNUMBR == null) ? 0 : (Int16?)sopPayment.SEQNUMBR);

                   sopPaymentRecord.SEQNUMBRSpecified = (sopPayment.SEQNUMBR != null);

                   sopPaymentRecord.SOPNUMBE = sopPayment.SOPNUMBE;

                   sopPaymentRecord.SOPTYPE = (Int16)sopPayment.SOPTYPE;  //  Allow to throw exception on null conversion when not supplied.

                   sopPaymentRecord.USRDEFND1 = sopPayment.USRDEFND1;

                   sopPaymentRecord.USRDEFND2 = sopPayment.USRDEFND2;

                   sopPaymentRecord.USRDEFND3 = sopPayment.USRDEFND3;

                   sopPaymentRecord.USRDEFND4 = sopPayment.USRDEFND4;

                   sopPaymentRecord.USRDEFND5 = sopPayment.USRDEFND5;

                   sopPaymentRecord.VOIDDATE = sopPayment.VOIDDATE;

                   //  Create the header

                   GetNextDocNumbers numbers = new GetNextDocNumbers();

                   nextSOPNumber = numbers.GetNextSOPNumber(IncrementDecrement.Increment, string.Empty, SopType.SOPInvoice, connectionString);

                   taSopHdrIvcInsert invoiceHeader = new taSopHdrIvcInsert();

                   invoiceHeader.SOPNUMBE = nextSOPNumber;              

                   invoiceHeader.BACHNUMB = sopPayment.BACHNUMB;

                   invoiceHeader.DOCID = sopPayment.DOCID;

                   invoiceHeader.SOPTYPE = sopPaymentRecord.SOPTYPE;

                   invoiceHeader.DOCDATE = sopPaymentRecord.DOCDATE;

                   invoiceHeader.CUSTNMBR = sopPaymentRecord.CUSTNMBR;

                   invoiceHeader.CUSTNAME = sopPaymentRecord.CUSTNAME;

                   invoiceHeader.SUBTOTAL = sopPaymentRecord.DOCAMNT;

                   invoiceHeader.DOCAMNT = 0.00m;

                   sopPaymentRecords[0] = sopPaymentRecord;

                   transactionTypes[0] = new SOPTransactionType();

                   transactionTypes[0].taSopHdrIvcInsert = invoiceHeader;

                   transactionTypes[0].taCreateSopPaymentInsertRecord_Items = sopPaymentRecords;                

                   eConnectType eConnect = new eConnectType();

                   eConnect.SOPTransactionType = transactionTypes;

                   string documentXML = null;

                   using (StringWriter writer = new StringWriter())

                   {

                       XmlSerializer serializer = new XmlSerializer(typeof(eConnectType));

                       serializer.Serialize(writer, eConnect);

                       documentXML = writer.ToString();

                   }

                   string result = null;

                   using (eConnectMethods eConnectCall = new eConnectMethods())

                   {

                       result = eConnectCall.CreateTransactionEntity(connectionString, documentXML);

                   }

               }

    ***************************/

    Good if you provide with some examples.

    Thanks in advance

    Chandu

  • Suggested answer
    sandipdjadhav Profile Picture
    18,306 on at
    RE: What is wrong with this SOP Payment?

    Chandu,

    Can you check your XML file what it passed for Amount?

    Thanks

    Sandip

  • Chandu_Blr Profile Picture
    40 on at
    RE: What is wrong with this SOP Payment?

    Plz find the xml content 

    <?xml version="1.0" encoding="utf-16"?>

    <eConnect xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">

     <SOPTransactionType>

       <eConnectProcessInfo xsi:nil="true" />

       <taRequesterTrxDisabler_Items xsi:nil="true" />

       <taUpdateCreateItemRcd xsi:nil="true" />

       <taUpdateCreateCustomerRcd xsi:nil="true" />

       <taCreateCustomerAddress_Items xsi:nil="true" />

       <taSopSerial_Items xsi:nil="true" />

       <taSopLotAuto_Items xsi:nil="true" />

       <taSopLineIvcInsert_Items>

         <taSopLineIvcInsert>

           <SOPTYPE>3</SOPTYPE>

           <CUSTNMBR>ADAMPARK0001</CUSTNMBR>

           <DOCDATE>2014-01-31</DOCDATE>

           <ITEMNMBR>3-C2924A</ITEMNMBR>

           <UNITPRCE>180.00</UNITPRCE>

           <XTNDPRCE>180.00</XTNDPRCE>

           <QUANTITY>1</QUANTITY>

           <ITEMDESC>Keyboard</ITEMDESC>

         </taSopLineIvcInsert>

       </taSopLineIvcInsert_Items>

       <taSopLineIvcInsertComponent_Items xsi:nil="true" />

       <taSopTrackingNum_Items xsi:nil="true" />

       <taSopCommissions_Items xsi:nil="true" />

       <taSopLineIvcTaxInsert_Items xsi:nil="true" />

       <taCreateSopPaymentInsertRecord_Items xsi:nil="true" />

       <taSopUserDefined xsi:nil="true" />

       <taSopDistribution_Items xsi:nil="true" />

       <taAnalyticsDistribution_Items xsi:nil="true" />

       <taSopMultiBin_Items xsi:nil="true" />

       <taSopHdrIvcInsert>

         <SOPTYPE>3</SOPTYPE>

         <DOCID>STDINV</DOCID>

         <SOPNUMBE>INV1098          </SOPNUMBE>

         <DOCDATE>2014-01-31</DOCDATE>

         <CUSTNMBR>ADAMPARK0001</CUSTNMBR>

         <CUSTNAME>Adam Park Resort</CUSTNAME>

         <SUBTOTAL>180.00</SUBTOTAL>

         <DOCAMNT>180.00</DOCAMNT>

         <BACHNUMB>20140131ADAMPA</BACHNUMB>

         <NOTETEXT>This is a test invoice Comment</NOTETEXT>

       </taSopHdrIvcInsert>

       <taSopToPopLink xsi:nil="true" />

       <taSopUpdateCreateProcessHold xsi:nil="true" />

       <taCreateSOPTrackingInfo xsi:nil="true" />

       <taMdaUpdate_Items xsi:nil="true" />

     </SOPTransactionType>

    </eConnect>

  • Chandu_Blr Profile Picture
    40 on at
    RE: What is wrong with this SOP Payment?

    For creating payment the xml is

    <?xml version="1.0" encoding="utf-16"?>

    <eConnect xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">

     <SOPTransactionType>

       <eConnectProcessInfo xsi:nil="true" />

       <taRequesterTrxDisabler_Items xsi:nil="true" />

       <taUpdateCreateItemRcd xsi:nil="true" />

       <taUpdateCreateCustomerRcd xsi:nil="true" />

       <taCreateCustomerAddress_Items xsi:nil="true" />

       <taSopSerial_Items xsi:nil="true" />

       <taSopLotAuto_Items xsi:nil="true" />

       <taSopLineIvcInsert_Items xsi:nil="true" />

       <taSopLineIvcInsertComponent_Items xsi:nil="true" />

       <taSopTrackingNum_Items xsi:nil="true" />

       <taSopCommissions_Items xsi:nil="true" />

       <taSopLineIvcTaxInsert_Items xsi:nil="true" />

       <taCreateSopPaymentInsertRecord_Items>

         <taCreateSopPaymentInsertRecord>

           <SOPTYPE>3</SOPTYPE>

           <SOPNUMBE>INV1098              </SOPNUMBE>

           <CUSTNMBR>ADAMPARK0001</CUSTNMBR>

           <CUSTNAME>Adam Park Resort</CUSTNAME>

           <DOCDATE>2014-01-31</DOCDATE>

           <DOCAMNT>180.00</DOCAMNT>

           <CARDNAME>AmericaCharge</CARDNAME>

           <AUTHCODE>AMEX123</AUTHCODE>

           <PYMTTYPE>6</PYMTTYPE>

           <Action>1</Action>

           <USRDEFND1>Testing Payment for unposted invoices</USRDEFND1>

         </taCreateSopPaymentInsertRecord>

       </taCreateSopPaymentInsertRecord_Items>

       <taSopUserDefined xsi:nil="true" />

       <taSopDistribution_Items xsi:nil="true" />

       <taAnalyticsDistribution_Items xsi:nil="true" />

       <taSopMultiBin_Items xsi:nil="true" />

       <taSopHdrIvcInsert>

         <SOPTYPE>3</SOPTYPE>

         <DOCID>STDINV</DOCID>

         <SOPNUMBE>INV1099          </SOPNUMBE>

         <DOCDATE>2014-01-31</DOCDATE>

         <CUSTNMBR>ADAMPARK0001</CUSTNMBR>

         <CUSTNAME>Adam Park Resort</CUSTNAME>

         <PYMTRCVD>180.00</PYMTRCVD>

         <BACHNUMB>C140131TT3</BACHNUMB>

       </taSopHdrIvcInsert>

       <taSopToPopLink xsi:nil="true" />

       <taSopUpdateCreateProcessHold xsi:nil="true" />

       <taCreateSOPTrackingInfo xsi:nil="true" />

       <taMdaUpdate_Items xsi:nil="true" />

     </SOPTransactionType>

    </eConnect>

  • Chandu_Blr Profile Picture
    40 on at
    RE: What is wrong with this SOP Payment?

    The error which i got for payment is

    Error Number = 60  Stored Procedure= taSopHdrIvcInsert  Error Description = Payment total does not match line deposit + credit card payment total

    Node Identifier Parameters: taSopHdrIvcInsert

    SOPNUMBE = INV1099

    please let me where am I wrong

    Thanks in advance

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans