uob-payroll 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26ecd32fd61d7f53f77bf7261411aea6cf01b231
4
- data.tar.gz: 6bb40fd043452f949ad7e4b536c52a6921d4ea92
3
+ metadata.gz: b2c99c455d669878f95877191d495dfc1cd3312f
4
+ data.tar.gz: d6924340c9a2dab9abc25ca143c4bdd4f308e619
5
5
  SHA512:
6
- metadata.gz: 3cc27e12c24c32ecc9ee9a39722b0ff3123445b974655d8b7445970e36d229348ad29713b8047da84b22e7544d5d7bace035df0df49ec9aa9d9300d3299c4d9f
7
- data.tar.gz: eda4045e762e5d3a030df8423f9def14a832fc4261533e823cc9a310e7989ac504224af74013823ffda818432e12b0f3d9ac7ab95b0ae15b36f49d5fb6e28380
6
+ metadata.gz: f7c24a4fb5fe88d7d571d3ff1a7515d01d12558a41a104789bc9f6cfe2d06505cf0b17a217fb71b05a0b657b6b59ed30e4f5ddc373c2ba629e4f4d7cedcc2a53
7
+ data.tar.gz: 96be366013b2c6fbf2ce853a2ad97601b602c150ec4c35a3c2e2b2ca700b401bde4986dc8e018e2e991ea80510123e4a3fbcead49a1ab92c73e9f92b001b876d
@@ -32,21 +32,20 @@ module UOB
32
32
  end
33
33
 
34
34
  def sum_rows
35
- index = 1
35
+ hash_code = 0
36
36
  sum = 0
37
37
 
38
38
  rows.each.map do |row|
39
- index = 1 if index == 9
39
+ hash_code = 1 if hash_code == 9
40
+ hash_code += 1
40
41
 
41
42
  sum += calculate_string(row.receiving_bic_code) +
42
- index * calculate_padded_string(string: row.receiving_account_number, size: 34) +
43
- index * calculate_padded_string(string: row.receiving_account_name, size: 140) +
44
- calculate_payment_type(index) +
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) +
45
+ calculate_payment_type(hash_code) +
45
46
  calculate_string('SGD') +
46
47
  calculate_padded_string(string: row.formatted_amount, size: 18, pad: '0', just: :right) +
47
48
  calculate_string('SALA')
48
-
49
- index += 1
50
49
  end
51
50
 
52
51
  sum
@@ -1,5 +1,5 @@
1
1
  module Uob
2
2
  module Payroll
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uob-payroll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Paca