uob-payroll 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32983839740c020f77497bd36935fe222e0a4e08
4
- data.tar.gz: 38d9c170b7c86606d13fe18c3e8c489f4780baa6
3
+ metadata.gz: 4fc90f4d9acd6b33213440f8e30116d0c818a3c3
4
+ data.tar.gz: 1f365690ff167dae956288f5fdc5f3ebf29dbc8c
5
5
  SHA512:
6
- metadata.gz: e42067c89bc9b913c80470bf129a2e8f503d6ec6c67d077d767e2d5ee1d55359954c4a37bc455133319611e228d780a9a7148fa22c02e66acf441c42c8fa1b26
7
- data.tar.gz: 0305338ff2552081bd518550811e8c174b39cfc0af78206cc9a951b40dc8b71cac8289919f79c6075407b2421d134ffad45f88b40640da744de99202f84ee702
6
+ metadata.gz: 8cd4f124a1fc9b65074ede719ad710c4af173dd938220771acefe55c1dc64838131e79fc8cfffdc299459f1425babb4c91e28c21795fa355a8543b6c7bdbe3b3
7
+ data.tar.gz: 18c32be99c3ac46eac985da255586d3effdd76c40fb2e25424cdf2dbddfaa5e0c22f4c8ffe724219f598932ffe0dfd1d2291454f6fc0a5b700a6aed7f176b9f5
@@ -41,7 +41,7 @@ module UOB
41
41
 
42
42
  sum += calculate_string(row.receiving_bic_code) +
43
43
  hash_code * calculate_padded_string(string: row.receiving_account_number, size: 34) +
44
- hash_code * calculate_padded_string(string: row.receiving_account_name, size: 140) +
44
+ hash_code * calculate_padded_string(string: sanitize(row.receiving_account_name), size: 140) +
45
45
  calculate_payment_type(hash_code) +
46
46
  calculate_string('SGD') +
47
47
  calculate_padded_string(string: row.formatted_amount, size: 18, pad: '0', just: :right) +
@@ -53,6 +53,11 @@ module UOB
53
53
 
54
54
  private
55
55
 
56
+ # Remove "-" from names.
57
+ def sanitize(string)
58
+ string.gsub('-','')
59
+ end
60
+
56
61
  # Payment Type is always 'R', so Payment Code = 22
57
62
  def calculate_payment_type(index)
58
63
  22 * (index)
@@ -1,5 +1,5 @@
1
1
  module Uob
2
2
  module Payroll
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uob-payroll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Paca
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-26 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler