Class: YDIM::Html::State::CreateInvoice
- Includes:
- InvoiceKeys
- Defined in:
- lib/ydim/html/state/invoice.rb
Direct Known Subclasses
Constant Summary collapse
Constants inherited from Global
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Attributes inherited from Global
Instance Method Summary collapse
Methods included from InvoiceKeys
#invoice_key, #invoice_keys, #invoice_mandatory
Methods inherited from Global
#_create_invoice, #autoinvoice, #create_autoinvoice, #create_debitor, #create_invoice, #debitor, #invoice, #logout, #pdf, #send_invoice
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
34 35 36 |
# File 'lib/ydim/html/state/invoice.rb', line 34 def model @model end |
Instance Method Details
#_update(nextclass) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ydim/html/state/invoice.rb', line 38 def _update(nextclass) input = user_input(invoice_keys, invoice_mandatory) input[:precision] = (input[:precision] || 2).to_i unless(error?) @model = @session.send("create_#{invoice_key}", @model.debitor.unique_id) @model.payment_period = 30 input.each { |key, val| @model.send("#{key}=", val) } @model.odba_store nextclass.new(@session, @model) end end |
#update ⇒ Object
35 36 37 |
# File 'lib/ydim/html/state/invoice.rb', line 35 def update _update(Invoice) end |