uob-payroll 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uob/payroll/hash_calculator.rb +6 -7
- data/lib/uob/payroll/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2c99c455d669878f95877191d495dfc1cd3312f
|
4
|
+
data.tar.gz: d6924340c9a2dab9abc25ca143c4bdd4f308e619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
35
|
+
hash_code = 0
|
36
36
|
sum = 0
|
37
37
|
|
38
38
|
rows.each.map do |row|
|
39
|
-
|
39
|
+
hash_code = 1 if hash_code == 9
|
40
|
+
hash_code += 1
|
40
41
|
|
41
42
|
sum += calculate_string(row.receiving_bic_code) +
|
42
|
-
|
43
|
-
|
44
|
-
calculate_payment_type(
|
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
|
data/lib/uob/payroll/version.rb
CHANGED