Hello, I hope you can help me with my concern about eConnect.
To get into context, I have this application that calls the data through an API of a system that the client has, I store this information in a database and when the user decides to send it to GP as a sales request, my system checks if it exists the customer and the article, if so, proceed to create the order through eConnect.
This is my system:
for (int i = 0; i < ListFaceSelection.Count;i )
{
decimal amount = decimal.Round(ListFaceSelection.ElementAt(i).Gross_Amount,2);
salesLine.ADDRESS1 = "2345 Main St.";
salesLine.CUSTNMBR = ListFaceSelection.ElementAt(i).taxIDNumber;
salesLine.CITY = "Aurora";
salesLine.SOPTYPE = 2;
salesLine.DOCID = "STDORD";
salesLine.QUANTITY = 1;
salesLine.ITEMNMBR = ListFaceSelection.ElementAt(i).number;
salesLine.ITEMDESC = ListFaceSelection.ElementAt(i).description;
salesLine.UNITPRCE = amount;
salesLine.XTNDPRCE = amount;
salesLine.LOCNCODE = "WAREHOUSE";
salesLine.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);
// Add the SOP line item object to the array
LineItems[i] = salesLine;
}
// Create a taSopHdrIvcInsert object and populate its fields
taSopHdrIvcInsert salesHdr = new taSopHdrIvcInsert();
salesHdr.SOPTYPE = 2;
salesHdr.DOCID = "STDORD";
salesHdr.BACHNUMB = "LOAYUDA";
salesHdr.TAXSCHID = "USASTCITY-6*";
salesHdr.FRTSCHID = "USASTCITY-6*";
salesHdr.MSCSCHID = "USASTCITY-6*";
salesHdr.LOCNCODE = "WAREHOUSE";
salesHdr.DOCDATE = System.DateTime.Today.ToString("MM/dd/yyyy", dateFormat);
salesHdr.CUSTNMBR = Campaing.taxIDNumber;
salesHdr.CUSTNAME = Campaing.Advertiser;
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 = Campaing.Amount;
salesHdr.DOCAMNT = Campaing.Amount;
salesHdr.USINGHEADERLEVELTAXES = 0;
salesHdr.PYMTRMID = "Net 30";
salesHdr.CSTPONBR = Campaing.salesContractNumber;
// 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;
With this code is that I create the header and lines of my sales order.
Everything works fine, but I need the articles to calculate the tax based on the established tax plan
Ojo: si corto y pego el mismo plan de impuestos, el sistema lo calcula solo, pero necesito que lo haga sin la intervención del usuario
I want to know if there is any way to do this, preferably with eConnect.
Thank you!