<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>uid</params>
SELECT SUM(quantity) AS total_inventory, SUM(target_quantity) AS target_total_inventory
FROM catalog, movement
WHERE 
catalog.parent_uid = <dtml-sqlvar uid type="int">
AND	
catalog.uid = movement.uid