我正在尝试使用nsoftware sdk 在快速手册中创建销售记录。以下代码根据需要在 Quickbooks 中创建销售项目,但它显示“未结余额”和“未结”状态。
var total = "999";
var connectionString = config.ToString();
var report = new nsoftware.InQB.Salesorder
{
QBConnectionString = config.ToString(),
CustomerName = "Internal Application Test",
};
var salesOrderItem = new SalesOrderItem();
salesOrderItem.ItemName = "Daily Cash Sales Test";
salesOrderItem.Amount = total;
//salesOrderItem.ManuallyClosed = ManuallyCloseds.mcManuallyClosed;
report.LineItems.Add(salesOrderItem);
await report.OpenQBConnectionAsync().ConfigureAwait(false);
bool isSuccess = true;
try
{
await report.AddAsync().ConfigureAwait(false);
}
catch (Exception x)
{
System.Diagnostics.Debug.WriteLine(x);
isSuccess = false;
}
finally
{
await report.CloseQBConnectionAsync().ConfigureAwait(false);
}
我试图通过调用手动关闭来关闭销售:
salesOrderItem.ManuallyClosed = ManuallyCloseds.mcManuallyClosed;
这似乎根本没有任何影响。
我的问题
有没有办法将未结余额清零并以编程方式结束销售?