Class: YDIM::Html::State::Invoices

Inherits:
Global
  • Object
show all
Includes:
AjaxInvoiceMethods
Defined in:
lib/ydim/html/state/invoices.rb

Constant Summary collapse

VIEW =
Html::View::Invoices

Constants inherited from Global

Global::EVENT_MAP

Instance Attribute Summary

Attributes inherited from Global

#sort_reverse, #sortby

Instance Method Summary collapse

Methods included from AjaxInvoiceMethods

#ajax_invoices, #ajax_status, #currency_convert, #sort_invoices

Methods inherited from Global

#_create_invoice, #autoinvoice, #create_autoinvoice, #create_debitor, #create_invoice, #debitor, #invoice, #logout, #pdf, #send_invoice

Instance Method Details

#ajax_collect_garbageObject



58
59
60
61
# File 'lib/ydim/html/state/invoices.rb', line 58

def ajax_collect_garbage
	@session.collect_garbage
	AjaxInvoices.new(@session, [])
end

#initObject



52
53
54
55
56
57
# File 'lib/ydim/html/state/invoices.rb', line 52

def init
	super
   invs = @session.invoice_infos('is_open')
   invs.concat @session.invoice_infos('is_due')
   @model = sort_invoices(currency_convert(invs))
end