Class: C2eCore::Drops::FinancialReportVatDrop
- Includes:
- Helpers::FinancialReportConversions
- Defined in:
- /build/app/mailers/c2e_core/drops/financial_report_vat_drop.rb
Instance Method Summary collapse
-
#formatted_value ⇒ String
-
Total amount for this VAT record converted to financial report’s currency and formatted.
-
-
#initialize(financial_report, vat, value) ⇒ FinancialReportVatDrop
constructor
A new instance of FinancialReportVatDrop.
-
#percentage ⇒ Decimal
-
Percentage of current VAT record.
-
-
#value ⇒ Float
-
Total amount for this VAT record converted to financial report’s currency.
-
Methods included from Helpers::FinancialReportConversions
#converted_price, #format_price
Constructor Details
#initialize(financial_report, vat, value) ⇒ FinancialReportVatDrop
Returns a new instance of FinancialReportVatDrop.
8 9 10 11 12 13 |
# File '/build/app/mailers/c2e_core/drops/financial_report_vat_drop.rb', line 8 def initialize(financial_report, vat, value) super() @financial_report = financial_report @vat = vat @value = value end |
Instance Method Details
#formatted_value ⇒ String
Returns - Total amount for this VAT record converted to financial report’s currency and formatted. E.g.: "123,45 Kč"
.
27 28 29 |
# File '/build/app/mailers/c2e_core/drops/financial_report_vat_drop.rb', line 27 def formatted_value format_price @value end |
#percentage ⇒ Decimal
Returns - Percentage of current VAT record. E.g.: 12.0.
16 17 18 |
# File '/build/app/mailers/c2e_core/drops/financial_report_vat_drop.rb', line 16 def percentage @vat.value end |
#value ⇒ Float
Returns - Total amount for this VAT record converted to financial report’s currency. E.g.: 78.
21 22 23 |
# File '/build/app/mailers/c2e_core/drops/financial_report_vat_drop.rb', line 21 def value @value end |