私は、実際の支払いデータにExcelファイルを使用して、試作品のために外部ソースから支払いを一括ロードする会社の会計サードパーティC#フォームアプリケーションを開発しています。
IRecievePaymenttoDeposit
ができたので、顧客参照を含むすべての未払いの請求書を取得し、顧客を取得できますがIInvoiceQuery
、これら 2 つのクエリの参照キーは何ですか?
顧客名、顧客 ID、請求書番号を取得します。選択した支払いに金額を追加するにはどうすればよいですか。
私は、実際の支払いデータにExcelファイルを使用して、試作品のために外部ソースから支払いを一括ロードする会社の会計サードパーティC#フォームアプリケーションを開発しています。
IRecievePaymenttoDeposit
ができたので、顧客参照を含むすべての未払いの請求書を取得し、顧客を取得できますがIInvoiceQuery
、これら 2 つのクエリの参照キーは何ですか?
顧客名、顧客 ID、請求書番号を取得します。選択した支払いに金額を追加するにはどうすればよいですか。
請求書に支払いを適用するには、請求書番号とは異なる、請求書の TxnID が必要です。ただし、請求書番号を使用して請求書を照会し、TxnID を取得できます。
IInvoiceQuery invQuery = MsgRequest.AppendInvoiceQueryRq();
invQuery.ORInvoiceQuery.InvoiceFilter.ORRefNumberFilter.RefNumberFilter.RefNumber.SetValue(invoiceNumber);
// Use either the full name of the customer or the ListID
invQuery.ORInvoiceQuery.InvoiceFilter.EntityFilter.OREntityFilter.FullNameList.Add(customerName);
invQuery.ORInvoiceQuery.InvoiceFilter.EntityFilter.OREntityFilter.ListIDList.Add(customerid);
請求書を受け取ったら、TxnID を取得できます。次に、ReceivePaymentAdd を作成するときに、支払いを適用する TxnID を指定します。
// Create the payment add request
IReceivePaymentAdd pmtAdd = MsgRequest.AppendReceivePaymentAddRq();
// Create the AppliedToTxn request for the payment.
IAppliedToTxnAdd appAdd = pmtAdd.ORApplyPayment.AppliedToTxnAddList.Append();
// Set the invoice TxnID and amount of the payment to apply
appAdd.TxnID.SetValue(invoiceTxnID);
appAdd.PaymentAmount.SetValue(amountToApply);