on 2024 Feb 29 2:30 AM
Hi,
In a fresh copy of SBODemoSG,
Under 'Company Details-Accounting Data' enable the 'Allow External Calculation Of Tax on A/R Documents'
Create an SO with External Tax and Rounding on header.
SO is created successfully, but Updating any field in SO using DI API returns the above error.
Updating the SO from application does not get the error.
private static void TestSO(SAPbobsCOM.Company oc)
{
//Create a SO
var so = oc.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders) as SAPbobsCOM.Documents;
so.CardCode = "C42000";
so.DocDate = DateTime.Now;
so.DocDueDate = DateTime.Now;
so.Rounding = SAPbobsCOM.BoYesNoEnum.tYES;
so.RoundingDiffAmount = -0.04;
so.Lines.ItemCode = "A00003";
so.Lines.Quantity = 1;
so.Lines.UnitPrice = 21;
so.Lines.PriceAfterVAT = 22.89;
so.Lines.ExternalCalcTaxAmount = 1.89;
so.Lines.ExternalCalcTaxRate = 9;
if (so.Add() == 0)
{
int soKey = int.Parse(oc.GetNewObjectKey());
so = oc.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders) as SAPbobsCOM.Documents;
so.GetByKey(soKey);
so.Comments = "TestUpdate";
if (so.Update() == 0)
{
System.Diagnostics.Debug.WriteLine("Updated successfully");
}
else
System.Diagnostics.Debug.WriteLine(oc.GetLastErrorDescription()); //<--- Error here There is a difference between the document total and its components. [ORDR.DocTotal][line: 1]
}
else
System.Diagnostics.Debug.WriteLine(oc.GetLastErrorDescription());
}
Error on so.Update() at line 24
Regards
Edy
Request clarification before answering.
Dear edy_simon,
This issue has been documented in SAP Note 3439522 which will be released soon.
The issue is supposed to be fixed in Feature Package 2405 of SAP Business One Version 10.0.
Be advised that the time-frame is subject to change without any further notice.
If you do not have any further question, kindly help to close this thread.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
127 | |
9 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.