class YDIM::Html::State::CreateInvoice

Constants

VIEW

Attributes

model[R]

Public Instance Methods

_update(nextclass) click to toggle source
# File lib/ydim/html/state/invoice.rb, line 39
  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() click to toggle source
# File lib/ydim/html/state/invoice.rb, line 36
def update
  _update(Invoice)
end