mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 09:45:11 +02:00
Change Invoice::Item price scale to 3 places
This commit is contained in:
parent
3decec8b02
commit
d62e55e6a1
5 changed files with 18 additions and 16 deletions
|
@ -5,7 +5,7 @@ class InvoiceItem < ApplicationRecord
|
|||
delegate :vat_rate, to: :invoice
|
||||
|
||||
def item_sum_without_vat
|
||||
(price * quantity).round(2)
|
||||
(price * quantity).round(3)
|
||||
end
|
||||
alias_method :subtotal, :item_sum_without_vat
|
||||
|
||||
|
@ -14,6 +14,6 @@ class InvoiceItem < ApplicationRecord
|
|||
end
|
||||
|
||||
def total
|
||||
subtotal + vat_amount
|
||||
(subtotal + vat_amount)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue