Module: GOBL::Extensions::Bill::InvoiceHelper
- Included in:
- Bill::Invoice
- Defined in:
- lib/gobl/extensions/bill/invoice_helper.rb
Overview
Additional methods for the generated Bill::Invoice class
Instance Method Summary collapse
-
#regime ⇒ Object
Returns the applicable regime based on the supplier’s tax ID.
-
#scenario_summary ⇒ Object
Returns the invoice’s scenario summary which aggregates the data of the matching regime’s scenarios.
Instance Method Details
#regime ⇒ Object
Returns the applicable regime based on the supplier’s tax ID
9 10 11 |
# File 'lib/gobl/extensions/bill/invoice_helper.rb', line 9 def regime regime_country && GOBL::Tax::Regime.fetch(regime_country) end |
#scenario_summary ⇒ Object
Returns the invoice’s scenario summary which aggregates the data of the matching regime’s scenarios
15 16 17 |
# File 'lib/gobl/extensions/bill/invoice_helper.rb', line 15 def scenario_summary ScenarioSummary.new(matching_scenarios) end |