Commit cec70eff authored by Frank Bergmann's avatar Frank Bergmann
parents 40c3a1cd 7bc67765
......@@ -40,7 +40,7 @@ set main_project_id [db_list pids "
p.project_id = r.object_id_one and
main_p.tree_sortkey = tree_root_key(p.tree_sortkey);
"]
lappend main_project_id 0
# ad_return_complaint 1 $main_project_id
......@@ -63,7 +63,7 @@ set costs_sql "
im_costs c
LEFT OUTER JOIN im_invoices i ON (c.cost_id = i.invoice_id)
LEFT OUTER JOIN im_invoice_items ii ON (c.cost_id = ii.invoice_id)
where main_p.project_id = :main_project_id and
where main_p.project_id in ([join $main_project_id ","]) and
p.tree_sortkey between main_p.tree_sortkey and tree_right(main_p.tree_sortkey) and
c.project_id = p.project_id and
c.cost_type_id not in (3714, 3718, 3720, 3722, 3726, 3736, 73102)
......@@ -79,7 +79,7 @@ set costs_sql "
im_costs c
LEFT OUTER JOIN im_invoices i ON (c.cost_id = i.invoice_id)
LEFT OUTER JOIN im_invoice_items ii ON (c.cost_id = ii.invoice_id)
where main_p.project_id = :main_project_id and
where main_p.project_id in ([join $main_project_id ","]) and
p.tree_sortkey between main_p.tree_sortkey and tree_right(main_p.tree_sortkey) and
r.object_id_one = p.project_id and
r.object_id_two = c.cost_id and
......
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