Matt Bradley Posted March 29, 2022 Share Posted March 29, 2022 I am trying to lodge some cheque bank_deposits as per the documentation at https://developer.sage.com/accounting/reference/banking/#operation/postBankDeposits as follows: { "bank_deposit":{ "reference":"797", "from_bank_account_id":"82c245dbfef049229734f5aeb289cd3e", "to_bank_account_id":"237dbe9738914ebc85a2d4e6d280f342", "date":"2022-03-23T00:00:00+00:00", "cash_amount":0, "cheque_amount":5000, "total_amount":5000 } } I am getting the following error: ( [$severity] => error [$dataCode] => RecordInvalid [$message] => must be greater than 0 [$source] => total_amount [friendlyErrorMessage] => must be greater than 0 (total_amount) ) I've run a few tests now, and the "cheque_amount" / "total_amount" values both seem to be ignored in all circumstances. Link to comment Share on other sites More sharing options...
Matt Bradley Posted March 29, 2022 Author Share Posted March 29, 2022 (edited) Sending the following: [reference] => 798 [from_bank_account_id] => 82c245dbfef049229734f5aeb289cd3e [to_bank_account_id] => 237dbe9738914ebc85a2d4e6d280f342 [date] => 2022-03-23T00:00:00+00:00 [cash_amount] => 1000 [cheque_amount] => 2000 [total_amount] => 3000 The API merrily ignores the cheque amount, and the total_amount, and lodges a bank_deposit for £1000 in cash! Edited March 29, 2022 by Matt Bradley Link to comment Share on other sites More sharing options...
Steel, Mark Posted March 30, 2022 Share Posted March 30, 2022 Hi Matt, thank you for your question. A bank deposit could be looked at as a transfer, the only difference being the from bank_account must be of type CASH_IN_HAND for a bank_deposit. If you're taking an amount from one account and depositing it into another the values for cash_amount, cheque_amount and total_amount should all be equal. { "bank_deposit":{ "reference":"797", "from_bank_account_id":"7bd5baa04bea40d6b2cc75cea2942657", "to_bank_account_id":"5942e91ca0ac4d13b96ed6bd9cd1f156", "date":"2022-03-23", "cash_amount":5000, "cheque_amount":5000, "total_amount":5000 } } From your experience, we'll look to make this clearer in the docs and improve the error messaging around this. What is the requirement for you to use bank_deposits? Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted March 30, 2022 Author Share Posted March 30, 2022 (edited) Thanks Mark. What's the meaning of cheque_amount if it cannot be different to cash_amount per the above, please? I had assumed that the two different fields would mean that I could transfer an amount of cash and an amount of cheques (which would imply they could be different values). Our use case is: - Our client takes cash and cheques at the counter to settle invoices - We would then record these via the API as a customer_payment to the CASH_IN_HAND account - The client then carries out a separate "lodgement" operation, whereby they deposit the cash and cheques with the bank. - We would record this lodgement as a bank_deposit to from CASH_IN_HAND to the CHECKING account. So: for example: front desk takes takes in 10 cheques totalling £10,000, and 5 payments totalling £5,000 in cash. These are recorded as 15 payments to CASH_IN_HAND. We then want to carry out a bank_deposit from CASH_IN_HAND to CHECKING totally £10,000 in cheques and £5,000 in cash. Is this possible? The above response suggests not? Note: My original plan had been to record the cheques customer_payments straight into the CHECKING account, but our client apparently doesn't want them on the bank balance until they are actually deposited, so has asked for the above approach. Edited March 30, 2022 by Matt Bradley Link to comment Share on other sites More sharing options...
Matt Bradley Posted March 30, 2022 Author Share Posted March 30, 2022 (edited) Note that the SBC UI does appear to allow me to set different amounts for the cash_total and cheque_total, so the UI does appear to be different to the API in this respect? See screengrabs: Edited March 30, 2022 by Matt Bradley Link to comment Share on other sites More sharing options...
Steel, Mark Posted March 30, 2022 Share Posted March 30, 2022 Thanks for the information @Matt Bradley. You are right in how this should be working but there seems to be a parameter or two short of this being feasible. As you have pointed out, if a cheque has been deposited in a CASH_IN_HAND bank type account the cheque's will appear in a selectable list. It seems that in addition to the cheque value we would need to pass in an ID for the cheque. Leave it with me and i'll find out what we are missing. Thanks Mark Link to comment Share on other sites More sharing options...
Matt Bradley Posted March 30, 2022 Author Share Posted March 30, 2022 Thanks Mark! I suspected this was the case. I as expecting to see a node for cheque entity ids in the API spec, and was surprised when there didn't appear to be one. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now