wage_slave 2.0.1 → 2.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34ae122a80053aa92ad22f757b1b4581f8962db7
|
4
|
+
data.tar.gz: 6086ce5c597340c5fbb2d0ca3ff364c4e2d79fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff908e3e32c474bce326ec0ed6a8979cad9c432588a771c88663359c2f74e812ac7febff0a1a7a94afb55b8403da347951fe91e464873603367e5a163ced8375
|
7
|
+
data.tar.gz: e25977227808b17b39d42594857fa9a00f4119487ac665dbdf845b78248941af3685c75cd439b4d14d815a5676fd62eb57b4b7ce59b7a9620e48873e37963a0b
|
@@ -33,7 +33,7 @@ module WageSlave
|
|
33
33
|
]
|
34
34
|
|
35
35
|
attr_reader :bsb, :account_number, :indicator, :transaction_code, :amount, :name,
|
36
|
-
:lodgement_reference, :trace_bsb, :trace_account, :remitter, :
|
36
|
+
:lodgement_reference, :trace_bsb, :trace_account, :remitter, :withholding_amount
|
37
37
|
|
38
38
|
def initialize(attrs={})
|
39
39
|
@type = "1"
|
@@ -41,13 +41,13 @@ module WageSlave
|
|
41
41
|
@account_number = attrs[:account_number]
|
42
42
|
self.indicator = attrs[:indicator] || "N"
|
43
43
|
self.transaction_code = attrs[:transaction_code] || "53"
|
44
|
-
@amount = attrs[:amount] || 0
|
44
|
+
@amount = attrs[:amount].to_i || 0
|
45
45
|
@name = attrs[:name]
|
46
46
|
@lodgement_reference = attrs[:lodgement_reference] || WageSlave.configuration.user_name
|
47
47
|
@trace_bsb = attrs[:trace_bsb] || WageSlave.configuration.bank_code
|
48
48
|
@trace_account = attrs[:trace_account] || WageSlave.configuration.account_number
|
49
49
|
@remitter = attrs[:remitter] || WageSlave.configuration.user_name
|
50
|
-
@
|
50
|
+
@withholding_amount = attrs[:withholding_amount].to_i || 0
|
51
51
|
end
|
52
52
|
|
53
53
|
def transaction_code=(code)
|
@@ -137,7 +137,7 @@ module WageSlave
|
|
137
137
|
# Size: 8
|
138
138
|
# Char position: 113-120
|
139
139
|
# Numeric only, shown in cents. Right justified, zero filled.
|
140
|
-
output += @
|
140
|
+
output += @withholding_amount.abs.to_s.rjust(8, "0")
|
141
141
|
end
|
142
142
|
|
143
143
|
end
|
@@ -48,8 +48,8 @@ module WageSlave
|
|
48
48
|
with: proc { |p| p.remitter.to_s.length > 0 && p.remitter.to_s.length <= 16 },
|
49
49
|
msg: "is required and must not be longer than 16 characters"
|
50
50
|
|
51
|
-
validates :
|
52
|
-
with: proc { |p| p.
|
51
|
+
validates :withholding_amount,
|
52
|
+
with: proc { |p| p.withholding_amount <= 99_999_999 },
|
53
53
|
msg: "must be less than 100,000,000"
|
54
54
|
|
55
55
|
end
|
data/lib/wage_slave/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wage_slave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Gemmell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|