Banks, Branches, and Accounts
If you’re a developer who has built, or is currently managing your company’s HR or payroll system on the back-end, you might be familiar with banks, branches, and accounts. In this article, we show you how to do automated parsing of bank account numbers for your company’s payroll system.
The three fit together on the premise of the Bank Account model, which allows you to monitor the bank accounts and grant access to either users, departments, or businesses.
Changes in Singapore’s Interbank GIRO Infrastructure
For those of you who haven’t already read our post on Singapore’s Interbank GIRO Infrastructure Upgrade March 2015, note that banks are no longer using branch codes to process GIRO transactions. This means that you simply need to key in your account number.
However, for all HSBC, OCBC and State Bank of India (SBI) corporate customers, you will still need to key in the branch code into the account number field after the upgrade.
We’ve made things easier for you
The Talenox suite of applications are built with Ruby on Rails and AngularJS.
Our talented developer, Sherwyn, has created a gem which allows you to provide a bank name and account number, automatically generating the branch code, bank code, and branch name.
Note that this applies to Singapore banks only. Currently serviced banks are: [‘OCBC’, ‘DBS’, ‘UOB’, ‘FEB’, ‘POSB’, ‘HSBC’, ‘Standard Chartered’, ‘CITIBANK’, ‘Malayan Banking Berhad’].
The purpose of the gem is for automated parsing of bank account numbers into the respective branch codes, bank codes, and resolving the final account number, which varies from bank to bank. Banks like UOB have acquired other bank(s), and the resulting bank code and branch names/codes differ greatly.
Add this line to your application’s Gemfile:
And then execute:
Or install it yourself as:
$ gem install SingaporeBankCodes
resolver = BankCodeResolver.new(name: ‘POSB’, number: ‘123456789’)
#returns a hash with keys bank_code, branch_code, branch_name and resolved account number, which can be different from supplied account number
BankCodeResolver.bank_options #for possible bank names
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
See more at Sherwyn’s github: https://github.com/sherwyngoh/SingaporeBankCodes