Commit ecf94ac4 authored by Frank Bergmann's avatar Frank Bergmann

Added Cancellation Invoice

parent 0cda2c45
......@@ -165,6 +165,7 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
-select_project:required
-start_date:required
-end_date:required
{ -filter_status_id "" }
-invoice_hour_type:required
} {
Returns a formatted HTML table representing the list of subprojects
......@@ -226,6 +227,12 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
# Show a line with with the selected invoicing type
set select_row_colspan 3
if {$show_project_nr_p} { incr select_row_colspan }
set extra_where ""
if {"" ne $filter_status_id} {
set extra_where "and children.project_status_id in ([join [im_sub_categories $filter_status_id] ","])"
}
append task_table_rows "
<tr>
......@@ -287,6 +294,7 @@ ad_proc im_timesheet_invoicing_project_hierarchy {
where
children.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
and parent.project_id in ([join $select_project ","])
$extra_where
order by
parent.project_name,
children.tree_sortkey
......
......@@ -22,6 +22,7 @@ ad_page_contract {
{ cost_center_id:integer 0}
{ start_date "" }
{ end_date "" }
{ filter_status_id "" }
{ return_url ""}
}
......@@ -196,6 +197,7 @@ ad_form \
-form {
{start_date:text(text),optional {label $start_date_l10n}}
{end_date:text(text),optional {label $end_date_l10n}}
{filter_status_id:text(im_category_tree),optional {label "[_ intranet-timesheet2-tasks.Status]"} {custom {category_type "Intranet Project Status" translate_p 1}}}
}
template::element::set_value $form_id start_date $start_date
......@@ -210,6 +212,7 @@ set task_table_rows [im_timesheet_invoicing_project_hierarchy \
-select_project $select_project \
-start_date $start_date \
-end_date $end_date \
-filter_status_id $filter_status_id \
-invoice_hour_type "" \
]
......@@ -222,6 +222,7 @@ switch $target_cost_type_id {
3704 { set default_template_id $default_bill_template_id }
3706 { set default_template_id $default_po_template_id }
3724 { set default_template_id $default_delnote_template_id }
3752 { set default_template_id $default_invoice_template_id }
}
set due_date [db_string get_due_date "select to_date(to_char(sysdate,'YYYY-MM-DD'),'YYYY-MM-DD') + $default_payment_days from dual"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment