Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

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

Posted on by

Hi, All.

I haven't been able to figure out why I'm getting the following:

Error Number = 60  Stored Procedure= taSopHdrIvcInsert  Error Description = Payment total does not match line deposit + credit card payment total
Node Identifier Parameters: taSopHdrIvcInsert
SOPNUMBE = ORD201183183414168
SOPTYPE = 2
Related Error Code Parameters for Node : taSopHdrIvcInsert
PYMTRCVD = 53.00


<taSopHdrIvcInsert>
  <SOPTYPE>2</SOPTYPE>
  <DOCID>ORD</DOCID>
  <SOPNUMBE>ORD201183183414168</SOPNUMBE>
  <DOCDATE>2011-08-31</DOCDATE>
  <MISCAMNT>3.00</MISCAMNT>
  <CUSTNMBR>1234</CUSTNMBR>
  <CUSTNAME>Cust Name</CUSTNAME>
  <ADDRESS1>123 Any St</ADDRESS1>
  <CITY>Anywhere</CITY>
  <STATE>CO</STATE>
  <ZIPCODE>80001</ZIPCODE>
  <SUBTOTAL>50.00000</SUBTOTAL>
  <DOCAMNT>53.00000</DOCAMNT>
  <PYMTRCVD>53.00</PYMTRCVD>
  <BACHNUMB>BatchNum</BACHNUMB>
  <COMMNTID>AuthCode</COMMNTID>
</taSopHdrIvcInsert>

I found the topic here: https://community.dynamics.com/product/gp/f/32/p/47948/86231.aspx#86231 and tried to send in a

taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord

object, but it still didn't work. 

I don't want to store a user's credit card information in my system.  At the moment, I'm working with the sales order after the payment has been processed by our e-Payments vendors. 

Any help on figuring this out?   

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error Number = 60 Stored Procedure= taSopHdrIvcInsert Error Description = Payment total does not match line deposit + credit card payment total

    Please go through the below code you will get the answer...

    using System;

    using System.IO;

    using System.Text;

    using System.Xml;

    using System.Xml.Serialization;

    using System.Globalization;

    using Microsoft.Dynamics.GP.eConnect;

    using Microsoft.Dynamics.GP.eConnect.Serialization;

    namespace eConnectSalesOrder_CSharp_ConsoleApplication

    {

       /// <summary>

       /// Summary description for Class1.

       /// </summary>

       class test

       {

           /// <summary>

           /// The main entry point for the application.

           /// </summary>

           [STAThread]

           static void Main()

           {

               using (eConnectMethods eConCall = new eConnectMethods())

               {

                   try

                   {

                       // Create the eConnect document and store it in a file

                       SerializeSalesOrderObject("SalesOrder.xml");

                       // Load the eConnect XML document from the file into

                       // and XML document object

                       XmlDocument xmldoc = new XmlDocument();

                       xmldoc.Load("SalesOrder.xml");

                       // Create an XML string from the document object

                       string salesOrderDocument = xmldoc.OuterXml;

                       // Create a connection string

                       // Integrated Security is required. Integrated security=SSPI

                       // Update the data source and initial catalog to use the names of

                       // data server and company database

                       string sConnectionString = "data source=localhost;initial catalog=TWO;integrated security=SSPI;persist security info=False;packet size=4096";

                       // Use the CreateTransactionEntity method to create the sales document in Microsoft Dynamics GP

                       // The method returns a string that contains the doc ID number of the new sales document

                       string salesOrder = eConCall.CreateTransactionEntity(sConnectionString, salesOrderDocument);

                   }

                   // The eConnectException class will catch any business logic related errors from eConnect_EntryPoint.

                   catch (eConnectException exp)

                   {

                       Console.Write(exp.ToString());

                   }

                   // Catch any system error that might occurr. Display the error to the user

                   catch (Exception ex)

                   {

                       Console.Write(ex.ToString());

                   }

                   finally

                   {

                       // Use the Dipose method to release resources associated with the

                       // eConnectMethods objects

                       eConCall.Dispose();

                   }

               }

           }

           private static void SerializeSalesOrderObject(string filename)

           {

               // Create a datetime format object

               DateTimeFormatInfo dateFormat = new CultureInfo("en-US").DateTimeFormat;

               try

               {

                   // Create an array that can hold two taSopLineIvcInsert_ItemsTaSopLineIvcInsert objects

                   taSopLineIvcInsert_ItemsTaSopLineIvcInsert[] LineItems = new taSopLineIvcInsert_ItemsTaSopLineIvcInsert[2];

                   taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord[] inspym = new taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord[1];

                   // taCreateSopPaymentInsertRecord_Items ins = new taCreateSopPaymentInsertRecord_Items();

                   GetSopNumber mySopNumber = new GetSopNumber();

                   // Create a taSopLineIvcInsert_ItemsTaSopLineIvcInsert object and populate its fields

                   taSopLineIvcInsert_ItemsTaSopLineIvcInsert salesLine = new taSopLineIvcInsert_ItemsTaSopLineIvcInsert();

                   taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord invs = new taCreateSopPaymentInsertRecord_ItemsTaCreateSopPaymentInsertRecord();

                   salesLine.ADDRESS1 = "2345 Main St.";

                   salesLine.CUSTNMBR = "CONTOSOL0001";

                   salesLine.CITY = "Aurora";

                   salesLine.SOPTYPE = 3;

                   salesLine.DOCID = "STDINV";

                   salesLine.QUANTITY = 2;

                   salesLine.ITEMNMBR = "ACCS-CRD-12WH";

                   salesLine.ITEMDESC = "Phone Cord - 12' White";

                   salesLine.UNITPRCE = 10.95m;

                   salesLine.XTNDPRCE = 21.9m;

                   salesLine.LOCNCODE = "WAREHOUSE";

                   salesLine.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);

                   // Add the SOP line item object to the array

                   LineItems[0] = salesLine;

                   // Create a second taSopLineIvcInsert_ItemsTaSopLineIvcInsert object and populate its fields

                   taSopLineIvcInsert_ItemsTaSopLineIvcInsert salesLine2 = new taSopLineIvcInsert_ItemsTaSopLineIvcInsert();

                   salesLine2.ADDRESS1 = "2345 Main St.";

                   salesLine2.CUSTNMBR = "CONTOSOL0001";

                   salesLine2.CITY = "Aurora";

                   salesLine2.SOPTYPE = 3;

                   salesLine2.DOCID = "STDINV";

                   salesLine2.QUANTITY = 2;

                   salesLine2.ITEMNMBR = "ACCS-CRD-25BK";

                   salesLine2.ITEMDESC = "Phone Cord - 25' Black";

                   salesLine2.UNITPRCE = 15.95m;

                   salesLine2.XTNDPRCE = 31.9m;

                   salesLine2.LOCNCODE = "WAREHOUSE";

                   salesLine2.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);

                   // Add the SOP line item object to the array

                   LineItems[1] = salesLine2;

                   // Create a taSopHdrIvcInsert object and populate its fields

                   taSopHdrIvcInsert salesHdr = new taSopHdrIvcInsert();

                   string sConnectionString = "data source=localhost;initial catalog=TWO;integrated security=SSPI;persist security info=False;packet size=4096";

                   salesHdr.SOPTYPE = 3;

                   salesHdr.DOCID = "STDINV";

                   salesHdr.BACHNUMB = "eConnect";

                   salesHdr.TAXSCHID = "USASTCITY-6*";

                   salesHdr.FRTSCHID = "USASTCITY-6*";

                   salesHdr.MSCSCHID = "USASTCITY-6*";

                   salesHdr.LOCNCODE = "WAREHOUSE";

                   salesHdr.SOPNUMBE= mySopNumber.GetNextSopNumber(3, "STDINV", sConnectionString);

                   salesHdr.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);

                   salesHdr.CUSTNMBR = "CONTOSOL0001";

                   salesHdr.CUSTNAME = "Contoso, Ltd.";

                   salesHdr.ShipToName = "WAREHOUSE";

                   salesHdr.ADDRESS1 = "2345 Main St.";

                   salesHdr.CNTCPRSN = "Joe Healy";

                   salesHdr.FAXNUMBR = "13125550150";

                   salesHdr.CITY = "Aurora";

                   salesHdr.STATE = "IL";

                   salesHdr.ZIPCODE = "65700";

                   salesHdr.COUNTRY = "USA";

                   salesHdr.SUBTOTAL = 53.8m;

                   salesHdr.DOCAMNT = 53.8m;

                   salesHdr.PYMTRCVD = 53.8m;

                   salesHdr.USINGHEADERLEVELTAXES = 0;

                   salesHdr.PYMTRMID = "Net 30";

                   invs.Action = 1;

                   invs.SOPNUMBE = salesHdr.SOPNUMBE;

                   invs.SOPTYPE = 3;

                   invs.PYMTTYPE = 4;

                   //invs.o

                   invs.SOPNUMBE = salesHdr.SOPNUMBE;

                   invs.DOCAMNT = 53.8m;

                   invs.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);

                   invs.CUSTNAME = "Contoso, Ltd.";

                   invs.CUSTNMBR = "CONTOSOL0001";

                   inspym[0] = invs;

                   // Create a eConnect SOPTransactionType schema object

                   SOPTransactionType salesOrder = new SOPTransactionType();

                   // Populate the schema object with the SOP header and SOP line item objects

                   salesOrder.taSopLineIvcInsert_Items = LineItems;

                   salesOrder.taSopHdrIvcInsert = salesHdr;

                   salesOrder.taCreateSopPaymentInsertRecord_Items = inspym;

                   //salesOrder.taCreateSopPaymentInsertRecord_Items = inspym;

                   //salesOrder.taCreateSopPaymentInsertRecord_Items = inspym;

                   // Create an array that holds SOPTransactionType objects

                   // Populate the array with the SOPTransactionType schema object

                   SOPTransactionType[] MySopTransactionType = { salesOrder };

                   // Create an eConnect XML document object and populate it

                   // with the SOPTransactionType schema object

                   eConnectType eConnect = new eConnectType();

                   eConnect.SOPTransactionType = MySopTransactionType;

                   // Create a file to hold the serialized eConnect XML document

                   FileStream fs = new FileStream(filename, FileMode.Create);

                   XmlTextWriter writer = new XmlTextWriter(fs, new UTF8Encoding());

                   // Serialize the eConnect document object to the file using the XmlTextWriter.

                   XmlSerializer serializer = new XmlSerializer(eConnect.GetType());

                   serializer.Serialize(writer, eConnect);

                   writer.Close();

               }

               //If an eConnect exception occurs, notify the user

               catch (eConnectException ex)

               {

                   Console.Write(ex.ToString());

               }

           }

       }

    }

  • Suggested answer
    ByronDowney Profile Picture
    ByronDowney 10 on at
    Re: Error Number = 60 Stored Procedure= taSopHdrIvcInsert Error Description = Payment total does not match line deposit + credit card payment total

    Hi, I was getting this error along with

    2608  Stored Procedure= taSopLineIvcInsert  Error Description = Document does not exist in the Work File - SOP10100 - the Line can not be modified

    I deleted records in SOP10103 (Payment & Work History) & re-ran the invoice imports. The invoice imports went through, balanced to the origin, (I'm still working through the Payments issues). I think the message means payments are not equal to invoiced - hope that not the case, because our payments to account are not always exact amounts invoiced. ( They can make multiple payments ).

    Byron

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans