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"
}
... View more