Commit 3a44ed2e authored by Jean-Paul Smets's avatar Jean-Paul Smets

improved : now working correctly


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@282 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a47a7eee
...@@ -26,28 +26,9 @@ FROM ...@@ -26,28 +26,9 @@ FROM
, category AS cat2 , category AS cat2
</dtml-if> </dtml-if>
LEFT JOIN category
ON (category.category_uid=item.uid
AND category.base_category_uid = <dtml-var "portal_categories.aggregate.getUid()">)
LEFT JOIN stock
ON (stock.uid = category.uid
AND stock.node_uid = <dtml-var "portal_categories.site.Stock_MP.Gravelines.getUid()">
AND stock.quantity < 0)
LEFT JOIN category AS other_category
ON (other_category.category_uid=item.uid
AND other_category.base_category_uid = <dtml-var "portal_categories.aggregate.getUid()">
AND other_category.uid <> category.uid)
LEFT JOIN stock AS other_stock
ON (other_stock.uid = other_category.uid
AND NOT (other_stock.node_uid = <dtml-var "portal_categories.site.Stock_MP.Gravelines.getUid()">
AND other_stock.quantity < 0))
WHERE item.portal_type = "Piece Tissu" WHERE item.portal_type = "Piece Tissu"
AND stock.node_uid IS NULL <dtml-in PieceTissu_searchConsumedList>AND item.uid <> <dtml-sqlvar uid type="int">
AND other_stock.node_uid IS NULL </dtml-in>
<dtml-if expr="_.len(resource_id_list)>0"> <dtml-if expr="_.len(resource_id_list)>0">
AND ( resource.id LIKE "<dtml-var expr="resource_id_list[0]">" AND ( resource.id LIKE "<dtml-var expr="resource_id_list[0]">"
......
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