Module: Dorsale::BillingMachine::QuotationPdfCommonMethods
- Included in:
- QuotationMultipleVatPdf, QuotationSingleVatPdf
- Defined in:
- app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb
Instance Method Summary collapse
- #build ⇒ Object
- #build_attachments ⇒ Object
- #build_bank_informations ⇒ Object
- #build_expiry ⇒ Object
Instance Method Details
#build ⇒ Object
2 3 4 5 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 2 def build super end |
#build_attachments ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 7 def main_document..each do || next unless File.extname(.file.path) == ".pdf" file = .file.path nb_pages = ::CombinePDF.load(file).pages.count nb_pages.times do |i| start_new_page template: file, template_page: (i+1) end end end |
#build_bank_informations ⇒ Object
20 21 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 20 def build_bank_informations end |
#build_expiry ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 23 def build_expiry return if main_document.expires_at.nil? top = bounds.top - 11.5.cm height = 0.5.cm width = 7.5.cm bounding_box [bounds.left, top], height: height, width: width do draw_bounds_debug text "<b>#{main_document.t(:expires_at)}</b> #{I18n.l(main_document.expires_at)}", inline_format: true, size: 9 end end |