Class: Ubill::Quote

Inherits:
Invoice show all
Defined in:
lib/ubill/quote.rb

Constant Summary

Constants inherited from Invoice

Invoice::COLOR_SECONDARY, Invoice::EXTERNAL_FONTS_DIR

Instance Method Summary collapse

Methods inherited from Invoice

#addendum, #config, #document, #due, #height, #margin_bottom, #margin_left, #margin_right, #margin_top, #position, #recipient, #render, #save_as, #subject, #total, #width

Methods included from Concerns::Configurable

#configure

Constructor Details

#initialize(*args, **opts) ⇒ Quote

Returns a new instance of Quote.



9
10
11
12
13
14
# File 'lib/ubill/quote.rb', line 9

def initialize(*args, **opts)
  super(*args, **opts)
  @payment_period = 14
  @cover_letter = "herzlichen Dank für Ihre Anfrage. Wir freuen uns Ihnen dazu unser Angebot wie folgt unterbreiten zu dürfen:"
  @valid_due = (Date.today + 30).strftime("%d.%m.%Y")
end

Instance Method Details

#cover_letter(value) ⇒ Object



20
21
22
# File 'lib/ubill/quote.rb', line 20

def cover_letter(value)
  @cover_letter = value
end

#payment_period(value) ⇒ Object



16
17
18
# File 'lib/ubill/quote.rb', line 16

def payment_period(value)
  @payment_period = value
end

#valid_due(date_or_string) ⇒ Object



24
25
26
27
# File 'lib/ubill/quote.rb', line 24

def valid_due(date_or_string)
  date_or_string = date_or_string.strftime("%d.%m.%Y") if date_or_string.is_a?(Date)
  @valid_due = date_or_string
end