Commit c046a8ad authored by Frank Bergmann's avatar Frank Bergmann

Including sub-types of customer invoice

parent ecff9b4b
......@@ -44,7 +44,8 @@ set customer_sql "
THEN 1 ELSE 0 END as needs_update_p,
( select greatest(round(coalesce(sum(co.amount),0.0)), 0.0)
from im_costs co
where co.cost_type_id = 3700 and co.customer_id = c.company_id
where co.cost_type_id in (select * from im_sub_categories([im_cost_type_invoice])) and
co.customer_id = c.company_id
) as invoice_amount
from im_companies c,
im_offices o,
......
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