mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
move include ::ActionView::Helpers::NumberHelper to Invoice::DataPresenter::Base
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
class Invoice
|
||||
class DataPresenter
|
||||
include ::ActionView::Helpers::NumberHelper
|
||||
attr_reader :invoice
|
||||
|
||||
delegate :data, to: :invoice
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
class Invoice
|
||||
class DataPresenter
|
||||
class Adjustment < Invoice::DataPresenter::Base
|
||||
include ::ActionView::Helpers::NumberHelper
|
||||
attributes :additional_tax_total, :adjustable_type, :amount, :currency, :included_tax_total,
|
||||
:label
|
||||
array_attribute :tax_rates, class_name: 'TaxRate'
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
class Invoice
|
||||
class DataPresenter
|
||||
class Base
|
||||
include ::ActionView::Helpers::NumberHelper
|
||||
attr_reader :data
|
||||
|
||||
def initialize(data)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
class Invoice
|
||||
class DataPresenter
|
||||
class LineItem < Invoice::DataPresenter::Base
|
||||
include ::ActionView::Helpers::NumberHelper
|
||||
attributes :added_tax, :currency, :included_tax, :price_with_adjustments, :quantity,
|
||||
:variant_id
|
||||
attributes_with_presenter :variant
|
||||
|
||||
Reference in New Issue
Block a user