Bigtop
view release on metacpan or search on metacpan
t/tentmaker/billing.bigtop view on Meta::CPAN
is datetime;
}
foreign_display `%number`;
field company {
is int4;
label Company;
refers_to company;
html_form_type select;
}
field customer {
is int4;
label Customer;
refers_to customer;
html_form_type select;
}
field status {
is int4;
label Status;
html_form_type select;
html_form_options
`Working on it` => 1,
Billed => 2,
Paid => 3;
}
field sent {
is date;
label Sent;
html_form_type text;
html_form_optional 1;
date_select_text `Select Date`;
}
field paid {
is date;
label Paid;
html_form_type text;
html_form_optional 1;
date_select_text `Select Date`;
}
field notes {
is varchar;
label Notes;
html_form_type text;
html_form_optional 1;
}
}
controller Invoice is AutoCRUD {
controls_table invoice;
rel_location invoice;
text_description invoice;
page_link_label Invoice;
method do_main is main_listing {
cols number, description;
header_options Add;
row_options Edit, Delete, Tasks => `"/task/main/$id"`;
title Invoice;
}
method form is AutoCRUD_form {
all_fields_but id, created, modified;
extra_keys
legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
javascript => `$self->calendar_month_js( 'invoice' )`;
form_name invoice;
}
uses Gantry::Plugins::Calendar;
}
table task {
field id {
is int4, primary_key, auto;
}
field name {
is varchar;
label Name;
html_form_type text;
}
field description {
is varchar;
label Description;
html_form_type text;
}
field created {
is datetime;
}
field modified {
is datetime;
}
foreign_display `%name`;
field invoice {
is int4;
label Invoice;
refers_to invoice;
html_form_type select;
}
field due_date {
is date;
label `Due Date`;
html_form_type text;
date_select_text `Select Date`;
}
field hours {
is int4;
label Hours;
html_form_type text;
}
field charge_per_hour {
is int4;
label `Charge Per Hour`;
html_form_type text;
}
field notes {
is varchar;
label Notes;
html_form_type text;
html_form_optional 1;
}
}
controller Task is AutoCRUD {
controls_table task;
rel_location task;
text_description task;
page_link_label Task;
method do_main is main_listing {
cols name, description;
header_options Add;
row_options Edit, Delete;
title Task;
limit_by invoice;
}
method form is AutoCRUD_form {
all_fields_but id, created, modified;
extra_keys
legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`,
javascript => `$self->calendar_month_js( 'task' )`;
form_name task;
}
uses Gantry::Plugins::Calendar;
}
}
( run in 1.542 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )