[英]It has no effect when I update Invoice in QuickBooks Online with The V3 SDK for .Net
When I want to update the balance in a Invoice, the code below is running normally without any error, but the balance doesn't change, why? 当我想更新发票中的余额时,下面的代码正常运行而没有任何错误,但余额不会改变,为什么?
var queryService = new QueryService<Intuit.Ipp.Data.Invoice>(context);
IList<Intuit.Ipp.Data.Invoice> list = queryService.Where(p => true).ToList();
foreach (var invoice in list)
{
if (invoice.Id == order.Accounting.QBOID)
{
if (invoice.Balance != order.Accounting.SurveyAmount)
{
Invoice invo = new Invoice();
invo.Id = invoice.Id;
invo = commonService.FindById(invo);
invo.Balance = order.Accounting.SurveyAmount.HasValue ? order.Accounting.SurveyAmount.Value : 0;
invo.sparse = true;
commonService.Update(invo);
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.