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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6d311cbeb3472a1af82827bb21d95e1f789fb21fe486995e1be364213761e44
4
- data.tar.gz: e52061bd2915e2ef348c33c714a1f6ae74ee5b2ab3961c5adce7ea0ceac1a804
3
+ metadata.gz: 173bbf980c0d297f49943505e9df853c2a7b44fd0bc51731498a3d1107cc29f4
4
+ data.tar.gz: b1fae313effb37e98fc48e21b6afab122f295661a62d551baf788ff35b46a279
5
5
  SHA512:
6
- metadata.gz: 7ebfa196f6d6c1710bbdb6768526321e9ca1a729d9d4ff8117914ab7d84bf1b919eea3c212cc3dfcc4574aa2f9272c415ec319cf941912ffccd2ddfef03f08bd
7
- data.tar.gz: 6cb203137f2af48c89635b4bea7860b0aafb02feaebbecf649f8aabf0c43ac56afa3a3932439fa0d516f790d96dae80c800f46a31eac556afbbdc421a6ff7215
6
+ metadata.gz: b3a8c6f02e353cb22d4dae54d7b1d0225e0b3db33bb75882528ee87b6f65be9d6c1a6c36d677d78a09664d2fede3b4c8b416028b5e8cd4add2e1b0d242c1cf2e
7
+ data.tar.gz: 8164ef6b8f052479ad00154ba3a69660c3886ea57d58b3dfd69ba851a8fcb05c965d4280a1819da4a8e238f84074168a1565e7b13dc299048561e28ed64da82d
@@ -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}"
@@ -15,5 +15,5 @@ limitations under the License.
15
15
  =end
16
16
 
17
17
  module Secretariat
18
- VERSION = "3.8.0"
18
+ VERSION = "3.8.1"
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secretariat
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Krutisch