Commit c81c7d26 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Updated to work with z_create_stock.zsql .


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2017 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ca0ead2
......@@ -8,22 +8,57 @@ class_name:
class_file:
</dtml-comment>
<params>uid
getResourceUid
getInventoriatedQuantity
getSourceUid
getDestinationUid
getSourceSectionUid
getDestinationSectionUid
isMovement</params>
isMovement
getSourceTotalAssetPrice
getDestinationTotalAssetPrice</params>
<dtml-if isMovement>
<dtml-if getSourceUid>
<dtml-if getResourceUid>
<dtml-if getDestinationUid>
INSERT INTO stock VALUES (<dtml-sqlvar uid type="int">, <dtml-sqlvar getDestinationUid type="int">, <dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>, <dtml-if getInventoriatedQuantity><dtml-sqlvar getInventoriatedQuantity type="float"><dtml-else>NULL</dtml-if>), (<dtml-sqlvar uid type="int">, <dtml-sqlvar getSourceUid type="int">, <dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>, <dtml-if getInventoriatedQuantity><dtml-sqlvar "-getInventoriatedQuantity" type="float"><dtml-else>NULL</dtml-if>);
<dtml-else>
INSERT INTO stock VALUES (<dtml-sqlvar uid type="int">, <dtml-if getSourceUid><dtml-sqlvar getSourceUid type="int"><dtml-else>NULL</dtml-if>, <dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>, <dtml-if getInventoriatedQuantity><dtml-sqlvar "-getInventoriatedQuantity" type="float"><dtml-else>NULL</dtml-if>);
INSERT INTO
stock
VALUES
(
<dtml-sqlvar uid type="int">,
<dtml-sqlvar getDestinationUid type="int">,
<dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-sqlvar getResourceUid type="int">,
<dtml-if getInventoriatedQuantity><dtml-sqlvar "-getInventoriatedQuantity" type="float"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationTotalAssetPrice><dtml-sqlvar getDestinationTotalAssetPrice type="float"><dtml-else>NULL</dtml-if>
)
<dtml-if getSourceUid>
,
(
<dtml-sqlvar uid type="int">,
<dtml-sqlvar getSourceUid type="int">,
<dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-sqlvar getResourceUid type="int">,
<dtml-if getInventoriatedQuantity><dtml-sqlvar "getInventoriatedQuantity" type="float"><dtml-else>NULL</dtml-if>,
<dtml-if getSourceTotalAssetPrice><dtml-sqlvar getSourceTotalAssetPrice type="float"><dtml-else>NULL</dtml-if>
)
</dtml-if>
<dtml-else>
<dtml-if getDestinationUid>
INSERT INTO stock VALUES (<dtml-sqlvar uid type="int">, <dtml-sqlvar getDestinationUid type="int">, <dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>, <dtml-if getInventoriatedQuantity><dtml-sqlvar getInventoriatedQuantity type="float"><dtml-else>NULL</dtml-if>);
<dtml-if getSourceUid>
INSERT INTO
stock
VALUES
(
<dtml-sqlvar uid type="int">,
<dtml-sqlvar getSourceUid type="int">,
<dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-sqlvar getResourceUid type="int">,
<dtml-if getInventoriatedQuantity><dtml-sqlvar "getInventoriatedQuantity" type="float"><dtml-else>NULL</dtml-if>,
<dtml-if getSourceTotalAssetPrice><dtml-sqlvar getSourceTotalAssetPrice type="float"><dtml-else>NULL</dtml-if>
)
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-if>
\ No newline at end of file
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