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
15
# 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")
  @regards = "Viele Grüße!"
end

Instance Method Details

#cover_letter(value) ⇒ Object



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

def cover_letter(value)
  @cover_letter = value
end

#payment_period(value) ⇒ Object



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

def payment_period(value)
  @payment_period = value
end

#regards(value) ⇒ Object



30
31
32
# File 'lib/ubill/quote.rb', line 30

def regards(value)
  @regards = value
end

#valid_due(date_or_string) ⇒ Object



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

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