Commit ac5ed2ff authored by Jean-Paul Smets's avatar Jean-Paul Smets

improved by JPS


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@296 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 75751936
......@@ -10,10 +10,12 @@ class_file:zsqlbrain.py
<params>uid
sort_on</params>
SELECT
container_cell.uid, container_cell.Id, container_cell.path, container_cell.Description, movement.variation_text
container_cell.uid, container_cell.Id, container_cell.path, container_cell.Description, movement.variation_text, movement.delivery_uid
FROM
catalog AS container_cell, catalog AS container_line, movement
WHERE
movement.delivery_uid = <dtml-sqlvar getDeliveryUid type="int">
AND
((
container_cell.parent_uid = container_line.uid
AND
......
......@@ -13,6 +13,8 @@ SELECT
FROM
catalog AS container_cell, catalog AS container_line, movement
WHERE
movement.delivery_uid = <dtml-sqlvar getDeliveryUid type="int">
AND
((
container_cell.parent_uid = container_line.uid
AND
......
......@@ -13,34 +13,15 @@ variation_text</params>
SELECT
SUM(movement.target_quantity) AS target_quantity
FROM
catalog AS container_cell, catalog AS container_line, catalog AS container, movement
catalog AS container_cell, movement
WHERE
((
container_cell.parent_uid = container_line.uid
AND
container_line.parent_uid = container.uid
AND
container.parent_uid = <dtml-sqlvar delivery_uid type="int">
AND
movement.uid = container_cell.uid
AND
container_cell.portal_type = "Container Cell"
)
OR
(
container_line.parent_uid = container.uid
AND
container.parent_uid = <dtml-sqlvar delivery_uid type="int">
AND
container_line.uid = container_cell.uid
AND
movement.uid = container_cell.uid
movement.delivery_uid = <dtml-sqlvar delivery_uid type="int">
AND
movement.has_cell_content = 0
AND
container_line.portal_type = "Container Line"
))
AND container_cell.portal_type <> "Container"
container_cell.uid = movement.uid
AND
(container_cell.portal_type = "Container Cell" OR container_cell.portal_type = "Container Line")
<dtml-if resource_uid>
AND movement.resource_uid = <dtml-sqlvar resource_uid type="int">
</dtml-if>
......
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