<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
getInventoriatedQuantity
getSourceUid
getDestinationUid
getSourceSectionUid
getDestinationSectionUid
isMovement</params>
<dtml-if isMovement>
<dtml-if  getSourceUid>
<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>);
</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>
</dtml-if>
</dtml-if>