fiscalizer 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fiscalizer/invoice.rb +28 -28
- data/lib/fiscalizer/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: b3d926aeb8f7660653b31e50f8f6d9cb0d6ce358
|
4
|
+
data.tar.gz: 07932327e37b033a5f728fbc070ed1ba8b66bfc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 609ed055f9da766bf912707ea1c825c627a301ac6d5a23626f2678a836b455852d1aafac90172c673d00bc83d6eb155791d3b92bb364ad227cbcf11e2f4f26a2
|
7
|
+
data.tar.gz: 2ba0fa751aa803e5a37ddc58462a1ee3306e509c4473d49100e9b2cfcbdbae821a08cc6507586a203b375556a7fdfb6c637488493ac3a180b5821d0bcbf012e6
|
data/lib/fiscalizer/invoice.rb
CHANGED
@@ -4,22 +4,22 @@ require 'fiscalizer/fee'
|
|
4
4
|
class Fiscalizer
|
5
5
|
class Invoice
|
6
6
|
|
7
|
-
attr_accessor :uuid, :time_sent, :pin,
|
8
|
-
:in_vat_system, :time_issued, :consistance_mark,
|
9
|
-
:issued_number, :issued_office, :issued_machine,
|
7
|
+
attr_accessor :uuid, :time_sent, :pin,
|
8
|
+
:in_vat_system, :time_issued, :consistance_mark,
|
9
|
+
:issued_number, :issued_office, :issued_machine,
|
10
10
|
:tax_vat, :tax_spending, :tax_other,
|
11
11
|
:value_tax_liberation, :value_tax_margin, :value_non_taxable,
|
12
|
-
:fees, :summed_total, :payment_method,
|
12
|
+
:fees, :summed_total, :payment_method,
|
13
13
|
:operator_pin, :security_code, :subsequent_delivery,
|
14
14
|
:paragon_label, :specific_purpose, :unique_identifier,
|
15
15
|
:automatic, :generated_xml
|
16
16
|
|
17
|
-
def initialize( uuid: nil, time_sent: nil, pin: nil,
|
18
|
-
in_vat_system: nil, time_issued: nil, consistance_mark: nil,
|
19
|
-
issued_number: nil, issued_office: nil, issued_machine: nil,
|
17
|
+
def initialize( uuid: nil, time_sent: nil, pin: nil,
|
18
|
+
in_vat_system: nil, time_issued: nil, consistance_mark: nil,
|
19
|
+
issued_number: nil, issued_office: nil, issued_machine: nil,
|
20
20
|
tax_vat: [], tax_spending: [], tax_other: [],
|
21
21
|
value_tax_liberation: nil, value_tax_margin: nil, value_non_taxable: nil,
|
22
|
-
fees: [], summed_total: nil, payment_method: nil,
|
22
|
+
fees: [], summed_total: nil, payment_method: nil,
|
23
23
|
operator_pin: nil, security_code: nil, subsequent_delivery: nil,
|
24
24
|
paragon_label: nil, specific_purpose: nil, unique_identifier: nil,
|
25
25
|
automatic: true)
|
@@ -80,38 +80,38 @@ class Fiscalizer
|
|
80
80
|
# Check if all necessary values are present
|
81
81
|
def is_valid
|
82
82
|
# Check values
|
83
|
-
return false if @uuid == nil
|
84
|
-
return false if @time_sent == nil
|
85
|
-
return false if @pin == nil
|
83
|
+
return false if @uuid == nil
|
84
|
+
return false if @time_sent == nil
|
85
|
+
return false if @pin == nil
|
86
86
|
return false if @in_vat_system == nil
|
87
|
-
return false if @time_issued == nil
|
88
|
-
return false if @consistance_mark == nil
|
89
|
-
return false if @issued_number == nil
|
90
|
-
return false if @issued_office == nil
|
91
|
-
return false if @issued_machine == nil
|
92
|
-
return false if summed_total == nil
|
93
|
-
return false if @payment_method == nil
|
94
|
-
return false if @operator_pin == nil
|
95
|
-
return false if @security_code == nil
|
96
|
-
return false if @subsequent_delivery == nil
|
87
|
+
return false if @time_issued == nil
|
88
|
+
return false if @consistance_mark == nil
|
89
|
+
return false if @issued_number == nil
|
90
|
+
return false if @issued_office == nil
|
91
|
+
return false if @issued_machine == nil
|
92
|
+
return false if summed_total == nil
|
93
|
+
return false if @payment_method == nil
|
94
|
+
return false if @operator_pin == nil
|
95
|
+
return false if @security_code == nil
|
96
|
+
return false if @subsequent_delivery == nil
|
97
97
|
|
98
98
|
# Check taxes
|
99
99
|
tax_vat.each do |tax|
|
100
100
|
return false if tax.name == nil || tax.name.class != String
|
101
|
-
return false if tax.base == nil
|
102
|
-
return false if tax.rate == nil
|
101
|
+
return false if tax.base == nil
|
102
|
+
return false if tax.rate == nil
|
103
103
|
end # tax_vat.each
|
104
104
|
|
105
105
|
tax_spending.each do |tax|
|
106
106
|
return false if tax.name == nil || tax.name.class != String
|
107
|
-
return false if tax.base == nil
|
108
|
-
return false if tax.rate == nil
|
107
|
+
return false if tax.base == nil
|
108
|
+
return false if tax.rate == nil
|
109
109
|
end # tax_spending.each
|
110
110
|
|
111
111
|
tax_other.each do |tax|
|
112
112
|
return false if tax.name == nil || tax.name.class != String
|
113
|
-
return false if tax.base == nil
|
114
|
-
return false if tax.rate == nil
|
113
|
+
return false if tax.base == nil
|
114
|
+
return false if tax.rate == nil
|
115
115
|
end # tax_other.each
|
116
116
|
|
117
117
|
# Check fees
|
@@ -187,4 +187,4 @@ class Fiscalizer
|
|
187
187
|
end # autocomplete_data_set
|
188
188
|
|
189
189
|
end # Invoice
|
190
|
-
end # Fiscalizer
|
190
|
+
end # Fiscalizer
|
data/lib/fiscalizer/version.rb
CHANGED