title: How to override the tax details when adding a sales order through web service API
body: <p>When I was trying to add our e-commerce orders into Acumatica through Acumatica Web service API, the tax details including totals were always automatically calculated in Acumatica based on product and customer information I send from our e-commerce system to Acumatica.</p>
  
  <p>Since our customers have already paid full amount of the payment including the tax for their orders on our e-commerce site, I would like to override those tax related information with whatever data, such as tax total and tax amount for each item, which I get from e-commerce to avoid potential conflict between e-commerce and Acumatica (the tax calculation should be exactly same in two system at most of the times but it may be different due to some configuration or system error occasionally), however, I tried different ways but none of them worked.</p>
  
  <p>Anybody knows how to do that? Part of my code is as follows:</p>
  
  <pre><code>SO301000Content SO301000 = context.SO301000GetSchema();
  context.SO301000Clear();
  
  List&lt;Command&gt; cmds = new List&lt;Command&gt;();
  
  cmds.Add(new Value { Value = "SO", LinkedCommand = SO301000.OrderSummary.OrderType });
  cmds.Add(new Value { Value = "&lt;NEW&gt;", LinkedCommand = SO301000.OrderSummary.OrderNbr });
  cmds.Add(new Value { Value = "ABCD", LinkedCommand = SO301000.OrderSummary.Customer });
  cmds.Add(new Value { Value = "ABCD1234", LinkedCommand = SO301000.OrderSummary.Location }); 
  
  //please note I could add extra tax item as below:
  cmds.Add(SO301000.TaxDetails.ServiceCommands.NewRow);
  cmds.Add(new Value { Value = "0.5", LinkedCommand = SO301000.TaxDetails.TaxAmount });
  cmds.Add(new Value { Value = "ON HST", LinkedCommand = SO301000.TaxDetails.TaxID });
  cmds.Add(new Value { Value = "10", LinkedCommand = SO301000.TaxDetails.TaxRate });
  cmds.Add(new Value { Value = "289", LinkedCommand = SO301000.TaxDetails.TaxableAmount });
  
  //however when I was trying to add the number for tax total, it doesn't work
  cmds.Add(new Value { Value = "1.5", LinkedCommand = SO301000.OrderSummary.TaxTotal });
  cmds.Add(new Value { Value = "GST", LinkedCommand = SO301000.TaxDetails.TaxID });
  //the two lines above do not work
  
  //add line items
  foreach (OrderItem item in orderInfo.OrderItems)
  {
      cmds.Add(SO301000.DocumentDetails.ServiceCommands.NewRow);
      cmds.Add(new Value { Value = item.InventoryCD, LinkedCommand = SO301000.DocumentDetails.InventoryID });
      cmds.Add(new Value { Value = item.Quantity.ToString(), LinkedCommand = SO301000.DocumentDetails.Quantity });
  
  }
  
  cmds.Add(SO301000.Actions.Save);
  cmds.Add(SO301000.OrderSummary.OrderNbr);
  
  SO301000Content[] SO30100content = context.SO301000Submit(cmds.ToArray());
  </code></pre>
  
  <p>Thanks.</p>