简体   繁体   中英

Acumatica and Avalara and Failed to Get Taxes

We are seeing an issue within Acumatica (see version below) when we try to go from Shipments to "Prepare Invoice". We see this when we have the salesdemo base acumatica installed, so we know it's not related to any of our customizations. Anyone have any direction? I did google, but I'm not really getting any clues that are resulting in progress.

Error on Screen - Failed to get Taxes from Avalara. Check Trace for details ( https://www.dropbox.com/s/b7sxdo5nsblu54w/Screenshot%202019-02-28%2017.39.03.png?dl=0 )

This is the Acumatica Build Acumatica 2017 R2 Build 17.210.0034

When we test the avalara connection - we see this. The connection to Avalara was successful. The version of the service is 19.2.0.39.

This is the trace below Error: TX Error: Failed to get Taxes from Avalara. Check Trace for details Send Raised At: 2/28/2019 10:38:50 PM Screen: SO.30.20.00
Details: 2/28/2019 10:38:50 PM Error: TX Error: Failed to get Taxes from Avalara. Check Trace for details

   at PX.Objects.AR.ARInvoiceEntry.CalculateAvalaraTax(ARInvoice invoice) 
   at PX.Objects.AR.ARInvoiceEntry.Persist() 
   at PX.Objects.SO.SOInvoiceEntry.Persist() 
   at PX.Data.PXSave`1.d__2.MoveNext() 
   at PX.Data.PXAction`1.d__31.MoveNext() 
   at PX.Data.PXAction`1.d__31.MoveNext() 
   at PX.Data.PXAction`1.PressImpl(Boolean internalCall, Boolean externalCall) 
   at PX.Data.PXAction`1.Press() 
   at PX.Objects.SO.SOInvoiceEntry.InvoiceOrder(DateTime invoiceDate, PXResult`6 order, PXResultset`2 details, Customer customer, DocumentList`2 list) 
   at PX.Objects.SO.SOInvoiceEntry.InvoiceOrder(DateTime invoiceDate, PXResult`6 order, Customer customer, DocumentList`2 list) 
   at PX.Objects.SO.SOShipmentEntry.InvoiceShipment(SOInvoiceEntry docgraph, SOShipment shiporder, DateTime invoiceDate, DocumentList`2 list) 
   at PX.Objects.SO.SOShipmentEntry.<>c__DisplayClass41_1.b__1() 
   at PX.Data.PXLongOperation.<>c__DisplayClass17_0.b__0() 
Error:  DocStatus is invalid for this operation.: Expected Saved|Posted    Send
Raised At: 2/28/2019 10:38:50 PM    Screen: SO.30.20.00     
   Details: 
2/28/2019 10:38:50 PM Error: 
DocStatus is invalid for this operation.: Expected Saved|Posted 

   at PX.Objects.AR.ARInvoiceEntry.LogMessages(BaseResult result) 
   at PX.Objects.AR.ARInvoiceEntry.CalculateAvalaraTax(ARInvoice invoice) 
   at PX.Objects.AR.ARInvoiceEntry.Persist() 
   at PX.Objects.SO.SOInvoiceEntry.Persist() 
   at PX.Data.PXSave`1.d__2.MoveNext() 
   at PX.Data.PXAction`1.d__31.MoveNext() 
   at PX.Data.PXAction`1.PressImpl(Boolean internalCall, Boolean externalCall) 
   at PX.Data.PXAction`1.Press() 
   at PX.Objects.SO.SOInvoiceEntry.InvoiceOrder(DateTime invoiceDate, PXResult`6 order, PXResultset`2 details, Customer customer, DocumentList`2 list) 
   at PX.Objects.SO.SOInvoiceEntry.InvoiceOrder(DateTime invoiceDate, PXResult`6 order, Customer customer, DocumentList`2 list) 
   at PX.Objects.SO.SOShipmentEntry.InvoiceShipment(SOInvoiceEntry docgraph, SOShipment shiporder, DateTime invoiceDate, DocumentList`2 list) 
   at PX.Objects.SO.SOShipmentEntry.<>c__DisplayClass41_1.b__1() 
   at PX.Data.PXLongOperation.<>c__DisplayClass17_0.b__0() 
   at PX.Data.PXLongOperation.d(Object A_0) 
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   at PX.Data.PXThreadPool.a() 
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   at System.Threading.ThreadHelper.ThreadStart() 

The real error is included in the traces:

DocStatus is invalid for this operation.: Expected Saved|Posted 

The error is coming from Avalara API but I'm unsure where it should be fixed. I would try giving Avalara documentation a shot first. They suggest changing something in their Admin Command Panel.

Source from Avalara: https://help.avalara.com/Frequently_Asked_Questions/Miscellaneous/How_do_I_resolve_the_Doc_Status_error_DocStatus_Is_Invalid_for_This_Operation_Expected_Saved%2F%2FPosted%3F

Text copy from the link above:

Overview
You want to know how to resolve the error: "DocStatus Is Invalid for This Operation. Expected Saved/Posted."

Environment
AvaTax

Resolution
This error message indicates that the DocCode used to calculate on or import transactions already exists within your Admin Console 
Each document requires a unique identifier for the DocCode
Confirm the duplicate DocCode: Go to the Transactions tab in the Admin Console and search for the particular DocCode 
Try adjusting the beginning date range to a date a few months or years in the past, then search for the specific DocCode
Once you find the transaction with the matching DocCode, determine if this is an exact copy of the transaction you are trying to import or calculate 
If the two transactions are duplicates, you can: 
Not add the transaction again
Change the DocCode by adding a number or letter and add the transaction in a different period
For imports: Use a ProcessCode of 2 or 4 and adjust the current transaction upon import
Change the original transaction to Uncommitted and recalculate the current transaction 
Open the transaction in the Admin Console > click Edit > choose Adjustment Reason > click Save as Uncommitted in orange 
Void will not avoid the error, it must be Uncommitted.
If the two transactions aren't duplicates, change the new transaction's DocCode/invoice number

EDIT: Joshua Van Hoesen comment is the most likely explanation:

If you are using the Sales Demo data with a Valid Avalara Tax integration it is most likely you have tried to use a document with the same [refNbr | doctype] combo, you will either have to delete those documents out of the Avalara dashboard -or- change the numbering sequence of your documents to fall above the values you have already used. This can occur if you had been testing with a demo data set and then refreshed / reinstalled the instance with the same data set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM