secretariat 3.8.0 → 3.8.1
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 +4 -4
- data/lib/secretariat/invoice.rb +5 -3
- data/lib/secretariat/line_item.rb +1 -1
- data/lib/secretariat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 173bbf980c0d297f49943505e9df853c2a7b44fd0bc51731498a3d1107cc29f4
|
|
4
|
+
data.tar.gz: b1fae313effb37e98fc48e21b6afab122f295661a62d551baf788ff35b46a279
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3a8c6f02e353cb22d4dae54d7b1d0225e0b3db33bb75882528ee87b6f65be9d6c1a6c36d677d78a09664d2fede3b4c8b416028b5e8cd4add2e1b0d242c1cf2e
|
|
7
|
+
data.tar.gz: 8164ef6b8f052479ad00154ba3a69660c3886ea57d58b3dfd69ba851a8fcb05c965d4280a1819da4a8e238f84074168a1565e7b13dc299048561e28ed64da82d
|
data/lib/secretariat/invoice.rb
CHANGED
|
@@ -51,7 +51,8 @@ module Secretariat
|
|
|
51
51
|
:attachments,
|
|
52
52
|
:direct_debit_mandate_reference_id, # BT-89
|
|
53
53
|
:direct_debit_creditor_id, # BT-90
|
|
54
|
-
:direct_debit_iban, # BT-91
|
|
54
|
+
:direct_debit_iban, # BT-91,
|
|
55
|
+
:subject_code, # BT-21
|
|
55
56
|
keyword_init: true
|
|
56
57
|
) do
|
|
57
58
|
|
|
@@ -120,12 +121,12 @@ module Secretariat
|
|
|
120
121
|
@errors = []
|
|
121
122
|
tax = BigDecimal(tax_amount)
|
|
122
123
|
basis = BigDecimal(basis_amount)
|
|
123
|
-
summed_tax_amount = taxes.sum(&:tax_amount)
|
|
124
|
+
summed_tax_amount = taxes.sum(&:tax_amount).round(2)
|
|
124
125
|
if tax != summed_tax_amount
|
|
125
126
|
@errors << "Tax amount and summed tax amounts deviate: #{tax_amount} / #{summed_tax_amount}"
|
|
126
127
|
return false
|
|
127
128
|
end
|
|
128
|
-
summed_tax_base_amount = taxes.sum(&:base_amount)
|
|
129
|
+
summed_tax_base_amount = taxes.sum(&:base_amount).round(2)
|
|
129
130
|
if basis != summed_tax_base_amount
|
|
130
131
|
@errors << "Base amount and summed tax base amount deviate: #{basis} / #{summed_tax_base_amount}"
|
|
131
132
|
return false
|
|
@@ -220,6 +221,7 @@ module Secretariat
|
|
|
220
221
|
Array(self.notes).each do |note|
|
|
221
222
|
xml['ram'].IncludedNote do
|
|
222
223
|
xml['ram'].Content note
|
|
224
|
+
xml['ram'].SubjectCode subject_code if subject_code
|
|
223
225
|
end
|
|
224
226
|
end
|
|
225
227
|
end
|
|
@@ -74,7 +74,7 @@ module Secretariat
|
|
|
74
74
|
gross_price = BigDecimal(gross_amount)
|
|
75
75
|
charge_price = BigDecimal(charge_amount)
|
|
76
76
|
tax = BigDecimal(tax_amount)
|
|
77
|
-
unit_price = net_price * BigDecimal(billed_quantity.abs)
|
|
77
|
+
unit_price = (net_price * BigDecimal(billed_quantity.abs)).round(2)
|
|
78
78
|
|
|
79
79
|
if charge_price != unit_price
|
|
80
80
|
@errors << "charge price and gross price times quantity deviate: #{charge_price} / #{unit_price}"
|
data/lib/secretariat/version.rb
CHANGED