Class: YDIM::Html::View::DebitorList

Inherits:
HtmlGrid::FormList
  • Object
show all
Defined in:
lib/ydim/html/view/debitors.rb

Constant Summary collapse

COMPONENTS =
{
	[0,0]	=>	:unique_id,
	[1,0]	=>	:name,
	[2,0]	=>	:email,
	[3,0]	=>	:phone,
	[4,0]	=>	:next_invoice_date,
	[5,0]	=>	:debitor_type,
}
EVENT =
:create_debitor
SORT_DEFAULT =
nil

Instance Method Summary collapse

Instance Method Details

#debitor_type(model) ⇒ Object



21
22
23
# File 'lib/ydim/html/view/debitors.rb', line 21

def debitor_type(model)
	@lookandfeel.lookup(model.debitor_type)
end

#next_invoice_date(model) ⇒ Object



24
25
26
27
28
# File 'lib/ydim/html/view/debitors.rb', line 24

def next_invoice_date(model)
	if(date = model.next_invoice_date)
		@lookandfeel.format_date(date)
	end
end

#phone(model) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/ydim/html/view/debitors.rb', line 29

def phone(model)
	if(phone = model.phone)
		link = HtmlGrid::Link.new(:phone, model, @session, self)
		link.href = "callto://#{phone.delete(' ')}"
		link.value = phone
		link
	end
end