Commit 9d1c0f50 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Added function_uid and project_uid to stock table.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3455 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9f6dc705
......@@ -17,6 +17,10 @@ getDestinationSectionUid
isMovement
getSourcePaymentUid
getDestinationPaymentUid
getSourceFunctionUid
getDestinationFunctionUid
getSourceProjectUid
getDestinationProjectUid
getSimulationState
getPrice
getStartDate
......@@ -35,6 +39,8 @@ VALUES
<dtml-sqlvar getDestinationUid type="int">,
<dtml-if getDestinationSectionUid><dtml-sqlvar getDestinationSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationPaymentUid><dtml-sqlvar getDestinationPaymentUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationFunctionUid><dtml-sqlvar getDestinationFunctionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationProjectUid><dtml-sqlvar getDestinationProjectUid 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>,
......@@ -52,6 +58,8 @@ VALUES
<dtml-sqlvar getSourceUid type="int">,
<dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getSourcePaymentUid><dtml-sqlvar getSourcePaymentUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getSourceFunctionUid><dtml-sqlvar getSourceFunctionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getSourceProjectUid><dtml-sqlvar getSourceProjectUid 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>,
......@@ -73,6 +81,8 @@ VALUES
<dtml-sqlvar getSourceUid type="int">,
<dtml-if getSourceSectionUid><dtml-sqlvar getSourceSectionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getSourcePaymentUid><dtml-sqlvar getSourcePaymentUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationFunctionUid><dtml-sqlvar getDestinationFunctionUid type="int"><dtml-else>NULL</dtml-if>,
<dtml-if getDestinationProjectUid><dtml-sqlvar getDestinationProjectUid 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>,
......
......@@ -17,6 +17,10 @@ getDestinationSectionUid
isMovement
getSourcePaymentUid
getDestinationPaymentUid
getSourceFunctionUid
getDestinationFunctionUid
getSourceProjectUid
getDestinationProjectUid
getSimulationState
getPrice
getStartDate
......@@ -29,10 +33,10 @@ getVariationText</params>
<dtml-if "isMovement[loop_item]">
<dtml-if "getResourceUid[loop_item]">
<dtml-if "getDestinationUid[loop_item]">
<dtml-call expr="row_list.append([uid[loop_item], getDestinationUid[loop_item], getDestinationSectionUid[loop_item], getDestinationPaymentUid[loop_item], getSourceSectionUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">
<dtml-call expr="row_list.append([uid[loop_item], getDestinationUid[loop_item], getDestinationSectionUid[loop_item], getDestinationPaymentUid[loop_item], getDestinationFunctionUid[loop_item], getDestinationProjectUid[loop_item], getSourceSectionUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">
</dtml-if>
<dtml-if "getSourceUid[loop_item]">
<dtml-call expr="row_list.append([uid[loop_item], getSourceUid[loop_item], getSourceSectionUid[loop_item], getSourcePaymentUidList[loop_item], getDestinationSectionUid[loop_item], getResourceUid[loop_item], -getInventoriatedQuantity[loop_item], getStartDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">
<dtml-call expr="row_list.append([uid[loop_item], getSourceUid[loop_item], getSourceSectionUid[loop_item], getSourcePaymentUid[loop_item], getSourceFunctionUid[loop_item], getSourceProjectUid[loop_item], getDestinationSectionUid[loop_item], getResourceUid[loop_item], -getInventoriatedQuantity[loop_item], getStartDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">
</dtml-if>
</dtml-if>
</dtml-if>
......@@ -48,15 +52,17 @@ VALUES
<dtml-sqlvar expr="row_item[1]" type="int">,
<dtml-sqlvar expr="row_item[2]" type="int" optional>,
<dtml-sqlvar expr="row_item[3]" type="int" optional>,
<dtml-sqlvar expr="row_item[4]" type="int" optional>,
<dtml-sqlvar expr="row_item[5]" type="int">,
<dtml-sqlvar expr="row_item[6]" type="float" optional>,
<dtml-sqlvar expr="row_item[7]" type="datetime" optional>
<dtml-sqlvar expr="row_item[8]" type="float" optional>
<dtml-sqlvar expr="row_item[9]" type="int" optional>
<dtml-sqlvar expr="row_item[10]" type="string" optional>
<dtml-sqlvar expr="row_item[11]" type="string" optional>
<dtml-sqlvar expr="row_item[4]" type="int" optional>,
<dtml-sqlvar expr="row_item[5]" type="int" optional>,
<dtml-sqlvar expr="row_item[6]" type="int" optional>,
<dtml-sqlvar expr="row_item[7]" type="int">,
<dtml-sqlvar expr="row_item[8]" type="float" optional>,
<dtml-sqlvar expr="row_item[9]" type="datetime" optional>
<dtml-sqlvar expr="row_item[10]" type="float" optional>
<dtml-sqlvar expr="row_item[11]" type="int" optional>
<dtml-sqlvar expr="row_item[12]" type="string" optional>
<dtml-sqlvar expr="row_item[13]" type="string" optional>
<dtml-sqlvar expr="row_item[14]" type="string" optional>
)
<dtml-if sequence-end><dtml-else>,</dtml-if>
</dtml-in>
......
......@@ -17,6 +17,8 @@ CREATE TABLE `stock` (
`node_uid` BIGINT UNSIGNED,
`section_uid` BIGINT UNSIGNED,
`payment_uid` BIGINT UNSIGNED,
`function_uid` BIGINT UNSIGNED,
`project_uid` BIGINT UNSIGNED,
`mirror_section_uid` BIGINT UNSIGNED,
`resource_uid` BIGINT UNSIGNED,
`quantity` real ,
......@@ -32,6 +34,8 @@ CREATE TABLE `stock` (
KEY `mirror_section_uid` (`mirror_section_uid`),
KEY `node_uid` (`node_uid`),
KEY `payment_uid` (`payment_uid`),
KEY `function_uid` (`function_uid`),
KEY `project_uid` (`project_uid`),
KEY `resource_uid` (`resource_uid`),
KEY `simulation_state` (`simulation_state`),
KEY `resource_node_uid` (`resource_uid`, `node_uid`),
......
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