Sha256: 4454710e7e2a16cb0e616cc5b72709b9a3d1682aebe284be1809cf5566a01a87
Contents?: true
Size: 687 Bytes
Versions: 43
Compression:
Stored size: 687 Bytes
Contents
module Dorsale::BillingMachine DEFAULT_VAT_RATE = 20.00 class << self def vat_modes [:single, :multiple] end def vat_mode @vat_mode ||= :single end def vat_mode=(new_mode) raise "invalid mode #{new_mode}" unless vat_modes.include?(new_mode) @vat_mode = new_mode end def invoice_pdf_model "::Dorsale::BillingMachine::Invoice#{vat_mode.to_s.capitalize}VatPdf".constantize end def quotation_pdf_model "::Dorsale::BillingMachine::Quotation#{vat_mode.to_s.capitalize}VatPdf".constantize end attr_accessor :default_currency def default_currency @default_currency ||= "€" end end end
Version data entries
43 entries across 43 versions & 1 rubygems