我无法弄清楚如何使用qbfc删除发票或帐单(使用版本13)。 有一种方法可以删除列表项但无法找到类似的事务删除方法。
答案 0 :(得分:7)
使用TxnDel
请求。
XML示例:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="11.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<TxnDelRq>
<!-- TxnDelType may have one of the following values: ARRefundCreditCard, Bill, BillPaymentCheck, BillPaymentCreditCard, BuildAssembly, Charge, Check, CreditCardCharge, CreditCardCredit, CreditMemo, Deposit, Estimate, InventoryAdjustment, Invoice, ItemReceipt, JournalEntry, PayrollLiabilityAdjustment [PRIVATE], PayrollPriorPayment [PRIVATE], PayrollYearToDateAdjustment [PRIVATE], PurchaseOrder, ReceivePayment, SalesOrder, SalesReceipt, SalesTaxPaymentCheck, TimeTracking, TransferInventory, VehicleMileage, VendorCredit -->
<TxnDelType>Invoice</TxnDelType> <!-- required -->
<TxnID>ABCD-1234</TxnID> <!-- required -->
</TxnDelRq>
</QBXMLMsgsRq>
</QBXML>
应该看起来像:
ITxnDel TxnDelRq= requestMsgSet.AppendTxnDelRq();
//Set field value for TxnDelType
TxnDelRq.TxnDelType.SetValue(ENTxnDelType.tdtARRefundCreditCard);
//Set field value for TxnID
TxnDelRq.TxnID.SetValue("200000-1011023419");
IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);