AvaTax-REST-V2-JS-SDK
AvaTax-REST-V2-JS-SDK copied to clipboard
"This document status is incorrect for this operation" with refundTransaction
We are using refundTransaction to create a ReturnInvoice representing a refund for a previously created SalesInvoice. Code snippet
await avatax.refundTransaction({
transactionCode:originalSalesInvoiceCode,
model: {
refundDate: new Date(),
refundType: RefundType.Full,
referenceCode: invoiceId,
}
It is working fine most of the time, but sometimes it throws error This document status is incorrect for this operation. When we retry, it passed. I assumed this document means the original sales invoice, so we get some info about it when the error occurs.
The original sales invoice status: 1, type: 1, lock: false.
Can you help me address or understand the issue?
Our SDK version is 23.7.0