to get a personalized navigation.
to get a personalized navigation.
Hi,
following json failes in the API:
{"hold":{"value":false},"tranDate":{"value":"2021-03-17T00:00:00"},"description":{"value":"Overføring fra POS"},"cashAccount":{"value":"1721"},"entryType":{"value":"13"},"cashTransactionDetails":[{"operation":"Insert","inventoryNumber":{"value":"2010402"},"quantity":{"value":4.0},"price":{"value":200.0}},{"operation":"Insert","description":{"value":"Betalingstransaksjon fra POS"},"amount":{"value":-800.0},"offsetAccount":{"value":"1931"}}]}
with error:
Result: "{\"message\":\"Error: Inserting 'Cash management transaction' record raised at least one error. Please review the errors.\\r\\nError: 'Cash account' cannot be empty.\\r\\n\"}"
no problem to register this in the UI. It seems that the API does not axcept to registrer cashaccount - transaction with Inventory number instead of offsetAccount, but thats no problem in the user-interface. Could you confirm before I start to make a lot of workarounds?
Regards,
Florian
Hello,
We'd like to clarify some operation details of how CashTransaction works in the Financials ERP before drill down into the API operation and the reported issue.
1) Offset Account and Offset Subaccount fields are mandatory in the ERP. So, CT documents can not be registered without assigning any value to those fields.
2) There are two ways of these values would automatically be fetched to the CT document in the Financials ERP.
A) Through selected "Entry Type" Defaults
B) Through selected "Inventory: Default GL Accounts"
- Inventory>salesAccount = CashTransactionLine>offsetAccount
- Inventory>salesSubAccount = CashTransactionLine>offsetSubAccount
In the UI, those values can not be automatically fetched into the Cash Transaction Line if the aforementioned both module's defaults are missing and, therefore, they should be manually filled.
When it comes to your point,
@Florian Haase wrote:no problem to register this in the UI. It seems that the API does not axcept to registrer cashaccount - transaction with Inventory number instead of offsetAccount, but thats no problem in the user-interface. Could you confirm before I start to make a lot of workarounds?
As it mentioned in the operation clarification part above, bypassing Offset & OffsetSubAccount value is not possible in the UI either. In your case most likely, these values have automatically been fetched from the Inventory Card's default as soon as you enter the InventoryID.
Consequently,
after conducting some testing, we're seeing that CashTransaction Endpoint does not automatically inherit the default Inventory GL : "Sales" & "Sales subAccount" to "Offset" & "OffsetSubAccount" values of the desired inventory to the Cash Transaction Document when only "InventoryNumber" included in the payload.
So that, it returns
"message": "Error: Inserting 'Cash management transaction details' record raised at least one error. Please review the errors.\r\nError: 'Offset account' cannot be empty."
This case has been escalated to the development team. Relevant status updates will be shared under this thread. We appreciate your reporting this issue to us.
Workaround:
OffsetAccount & OffsetSubAccount can be specified in the POST operation
"offsetAccount": { "value": "string" }, "offsetSubaccount": [ { "segmentId": 0, "segmentValue": "string" }
Just got again over this problem where our customer pinpoints that the subaccount has not been set from the inventories when importing by API. This works in the UI
We're still waiting for the fix, therefore, please follow the workaround that has been provided earlier. We'll check the status of the case and inform the team that this is important.
Don't need it today 🙂 The workaround works for us but causes a bit traffic on the API because we have to read the inventory and afterwards we have to read the subaccount for each line (not implemented yet)
Sorry, the json and the errormessage was wrong - a bit kaos here with testing different scenarios.
Right json:
{"hold":{"value":false},"tranDate":{"value":"2021-03-17T00:00:00"},"description":{"value":"Overføring fra POS"},"cashAccount":{"value":"1931"},"entryType":{"value":"13"},"cashTransactionDetails":[{"operation":"Insert","inventoryNumber":{"value":"2010402"},"quantity":{"value":4.0},"price":{"value":200.0}},{"operation":"Insert","description":{"value":"Betalingstransaksjon fra POS"},"amount":{"value":-800.0},"offsetAccount":{"value":"1721"}}]}
results in:
Error: Inserting 'Cash management transaction details' record raised at least one error. Please review the errors.\r\nError: 'Offset account' cannot be empty.
Setting standard account on entryType fixes the error-message but we have different accounts on different inventoryIds
Florian
Copyright © 2022 Visma.com. All rights reserved.