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
4 5 6 7 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 4 def build super end |
#build_attachments ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 9 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
22 23 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 22 def build_bank_informations end |
#build_expiry ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb', line 25 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 |