Class: ODDB::View::Drugs::RegisterInvoicedDownloadComposite

Inherits:
HtmlGrid::Composite show all
Includes:
ODDB::View::DataDeclaration, PayPal::InvoiceMethods
Defined in:
src/view/drugs/register_download.rb

Constant Summary

COMPONENTS =
{
  [0,0]   => SelectSearchForm,
  [0,1,0] =>  "export_csv",
  [0,1,1] =>  'dash_separator',
  [0,1,2] =>  :data_declaration,
  [0,2]   => :invoice_descr,
  [0,3]   => :invoice_items,
  [0,4]   => RegisterInvoicedDownloadForm,
}
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'right',
  [0,1] =>  'th',
  [0,2,1,3] =>  'list',
}
COLSPAN_MAP =
{
  [0,0] => 2,
  [0,1] => 2,
  [0,2] => 2,
}
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods included from ODDB::View::DataDeclaration

#data_declaration

Methods included from PayPal::InvoiceMethods

#invoice_items

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) invoice_descr(model)



128
129
130
131
132
133
134
135
136
137
# File 'src/view/drugs/register_download.rb', line 128

def invoice_descr(model)
  date = if(@@today.day < 15) 
    Date.new(@@today.year, @@today.month, 15)
  else
    Date.new(@@today.year, @@today.month) >> 1
  end
  @lookandfeel.lookup(:invoice_descr, 
    date.strftime(@lookandfeel.lookup(:date_format)),
    @session.user.unique_email)
end