Class: YDIM::Html::View::AutoInvoiceList

Inherits:
InvoiceList show all
Defined in:
lib/ydim/html/view/autoinvoices.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0]  =>  :unique_id,
  [1,0]  =>  :name,
  [2,0]  =>  :email,
  [3,0]  =>  :description,
  [4,0]  =>  :formatted_date,
  [5,0]  =>  :total_netto,
  [6,0]  =>  :total_brutto,
  [7,0]  =>  :currency,
  [8,0]  =>  :generate_invoice,
  [9,0]  =>  :delete,
}
CSS_ID =
'autoinvoices'

Constants inherited from InvoiceList

InvoiceList::CSS_MAP, InvoiceList::SORT_DEFAULT

Constants inherited from HtmlGrid::List

HtmlGrid::List::STRIPED_BG

Instance Method Summary collapse

Methods inherited from InvoiceList

#column_position, #compose_footer, debitor_links, #formatted_date, #pdf, #row_css, #send_invoice, toggle, #total

Methods inherited from HtmlGrid::List

ajax_inputs

Instance Method Details

#delete(model) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/ydim/html/view/autoinvoices.rb', line 24

def delete(model)
  link = HtmlGrid::Link.new(:delete, model, @session, self)
  url = @lookandfeel._event_url(:ajax_delete_autoinvoice,
                               [:unique_id, model.unique_id])
  link.href = sprintf("javascript: reload_list('%s', '%s')", 
                      css_id, url)
  link
end

#generate_invoice(model) ⇒ Object



32
33
34
35
36
37
# File 'lib/ydim/html/view/autoinvoices.rb', line 32

def generate_invoice(model)
  link = HtmlGrid::Link.new(:generate_invoice, model, @session, self)
  link.href = @lookandfeel._event_url(:generate_invoice, 
                                      {:unique_id => model.unique_id})
  link
end