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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
11
# File 'lib/gobl/extensions/bill/invoice_helper.rb', line 8

def self.included(klass)
  klass.alias_method :tags, '$tags'
  klass.alias_method :tags=, '$tags='
end

Instance Method Details

#regimeObject

 Returns the applicable regime based on the supplier’s tax ID



14
15
16
# File 'lib/gobl/extensions/bill/invoice_helper.rb', line 14

def regime
  regime_country && GOBL::Tax::RegimeDef.fetch(regime_country)
end