@@ -73,7 +73,7 @@ def valid?
73
73
@errors = [ ]
74
74
tax = BigDecimal ( tax_amount )
75
75
basis = BigDecimal ( basis_amount )
76
- calc_tax = basis * BigDecimal ( tax_percent ) / BigDecimal ( " 100" )
76
+ calc_tax = basis * BigDecimal ( tax_percent ) / BigDecimal ( 100 )
77
77
calc_tax = calc_tax . round ( 2 )
78
78
if tax != calc_tax
79
79
@errors << "Tax amount and calculated tax amount deviate: #{ tax } / #{ calc_tax } "
@@ -85,7 +85,7 @@ def valid?
85
85
@errors << "Grand total amount and calculated grand total amount deviate: #{ grand_total } / #{ calc_grand_total } "
86
86
return false
87
87
end
88
- line_item_sum = line_items . inject ( BigDecimal ( "0" ) ) do |m , item |
88
+ line_item_sum = line_items . inject ( BigDecimal ( 0 ) ) do |m , item |
89
89
m + BigDecimal ( item . charge_amount )
90
90
end
91
91
if line_item_sum != basis
@@ -306,12 +306,12 @@ def to_xml(version: 1, skip_validation: false, mode: :zugferd)
306
306
Helpers . currency_element ( xml , "ram" , "LineTotalAmount" , basis_amount , currency_code , add_currency : version == 1 )
307
307
# TODO: Fix this!
308
308
# Zuschuesse
309
- unless BigDecimal ( "0" ) . to_f . zero?
310
- Helpers . currency_element ( xml , "ram" , "ChargeTotalAmount" , BigDecimal ( "0" ) , currency_code , add_currency : version == 1 )
309
+ unless BigDecimal ( 0 ) . to_f . zero?
310
+ Helpers . currency_element ( xml , "ram" , "ChargeTotalAmount" , BigDecimal ( 0 ) , currency_code , add_currency : version == 1 )
311
311
end
312
312
# Rabatte
313
- unless BigDecimal ( "0" ) . to_f . zero?
314
- Helpers . currency_element ( xml , "ram" , "AllowanceTotalAmount" , BigDecimal ( "0" ) , currency_code , add_currency : version == 1 )
313
+ unless BigDecimal ( 0 ) . to_f . zero?
314
+ Helpers . currency_element ( xml , "ram" , "AllowanceTotalAmount" , BigDecimal ( 0 ) , currency_code , add_currency : version == 1 )
315
315
end
316
316
Helpers . currency_element ( xml , "ram" , "TaxBasisTotalAmount" , basis_amount , currency_code , add_currency : version == 1 )
317
317
unless tax_amount . to_f . zero?
0 commit comments