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 +4 -4
- data/lib/uob/payroll/hash_calculator.rb +6 -1
- data/lib/uob/payroll/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc90f4d9acd6b33213440f8e30116d0c818a3c3
|
4
|
+
data.tar.gz: 1f365690ff167dae956288f5fdc5f3ebf29dbc8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/uob/payroll/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|