XeroAPI/Xero-Java

Bank Accounts Statement Text Mix-up

fatihsevimtc opened this issue · 2 comments

SDK you're using (please complete the following information):

  • version: '4.11.0'

Describe the bug
A clear and concise description of what the bug is.

  1. SDK posting method mixes up bank statements texts. (if there are 3 and 4 accounts)
  2. Each post action changes the order (index) of bank accounts in Xero Bank Accounts Page.
  3. But API Explorer works as expected interestingly
    For Example:
    We GET the existing bank details from Xero page as expected.
    Current bank details we get from Xero:

[class BankAccount {​​​​​​​​​
statementText: Mike
accountName: Mike
BSB: 666666
accountNumber: 88888888
remainder: true
amount: null
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Johnson
accountName: Johnson
BSB: 123456
accountNumber: 12345678
remainder: false
amount: 6978.65
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Frank
accountName: Frank
BSB: 111111
accountNumber: 12345678
remainder: false
amount: 0.0
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Dussa
accountName: Dussa
BSB: 333333
accountNumber: 77777777
remainder: false
amount: 154.0
}​​​​​​​​​​​​​​​​]

We try to POST the existing bank details back to Xero page, then we get 2 issues: Bank statements go to wrong bank account randomly and second and third bank accounts’ order keep changing in Xero page randomly.

Posting new bank details to Xero:

[class BankAccount {​​​​​​​​​
statementText: Mike
accountName: Mike
BSB: 666666
accountNumber: 88888888
remainder: true
amount: null
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Johnson
accountName: Johnson
BSB: 123456
accountNumber: 12345678
remainder: false
amount: 6978.65
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Dussa
accountName: Frank

BSB: 111111
accountNumber: 12345678
remainder: false
amount: 0.0
}​​​​​​​​​​​​​​​​, class BankAccount {​​​​​​​​​​​​​​​​
statementText: Frank
accountName: Dussa

BSB: 333333
accountNumber: 77777777
remainder: false
amount: 154.0
}​​​​​​​​​​​​​​​​]

Additional context

We are sure that we are not setting wrong bank statement text to wrong accounts after long testing and observation.
Xero Bank Accounts Page

I've just tried replicating this, however the bank account details stayed as they were.

Are you creating a new employee object and populating with the details of the existing one, or are you using the same object that is returned?

If you can share the code you are using to retrieve the employee details, and then post it back into Xero, we can take a closer look.

This issue was raised to Xero Support Team in parallel, and they had responded that the issue is cosmetic (front-end issue) and your team will fix it. Basically, it is not directly related to API..but front-end..The bank accounts rows keep changing their order (index) in the front-end after each API update/Create Call. The bank statement text is a required field for the bank endpoint as you know. But our data provider does not have that field. Basically we intended to get the existing text from Xero for each bank account row and push it back as workaround, but it was mismatching after each request. Anyway you can close it since it is not related to API i guess. If you want to be convinced: Create four accounts in the front-end..then try to update them through API, you will see the order of accounts (the row index) will change...and also try to delete one-two rows from front-end, recreate them from API, you may see the same randomisation. thanks