Module: BrInvoicesPdf::Nfce::Renderer::BaseRenderer
- Extended by:
- Util::BaseRenderer
- Included in:
- CompanyIdentification, CustomerIdentification, FiscalMessage, Header, PaymentForms, ProconInfo, ProductTable, QrCode, TaxesInfo, Totals
- Defined in:
- lib/br_invoices_pdf/nfce/renderer/base_renderer.rb
Constant Summary collapse
- ADDRESS_FORMAT =
'%s, %s, %s, %s/%s'
Constants included from Util::BaseRenderer
Util::BaseRenderer::CNPJ_FORMAT, Util::BaseRenderer::CPF_FORMAT, Util::BaseRenderer::PAYMENTS_TABLE_BASE_DATA
Class Method Summary collapse
Methods included from Util::BaseRenderer
box, format_cnpj, format_cpf, format_currency, format_number, page_content_width, page_paper_width, pdf_setup
Class Method Details
.format_address(address) ⇒ Object
14 15 16 |
# File 'lib/br_invoices_pdf/nfce/renderer/base_renderer.rb', line 14 def format_address(address) ADDRESS_FORMAT % %i(streetname number district city state).map(&address.method(:[])) end |
.format_date(date) ⇒ Object
18 19 20 |
# File 'lib/br_invoices_pdf/nfce/renderer/base_renderer.rb', line 18 def format_date(date) Timezone[ENV['INVOICE_TIMEZONE'] || 'America/Sao_Paulo'].utc_to_local(date).strftime('%H:%M:%S %d/%m/%Y') end |