Commit 2e9246c8 authored by Romain Courteaud's avatar Romain Courteaud

Add mirror_date column to the stock table.

This column is used to calculated flow capacity.

Do not forget to recreate your catalog if upgrading.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12506 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9043aeee
...@@ -177,29 +177,29 @@ ...@@ -177,29 +177,29 @@
<key> <string>_keys</string> </key> <key> <string>_keys</string> </key>
<value> <value>
<list> <list>
<string>uid</string> <string>uid</string>
<string>getResourceUid</string> <string>getResourceUid</string>
<string>getInventoriatedQuantity</string> <string>getInventoriatedQuantity</string>
<string>getSourceUid</string> <string>getSourceUid</string>
<string>getDestinationUid</string> <string>getDestinationUid</string>
<string>getSourceSectionUid</string> <string>getSourceSectionUid</string>
<string>getDestinationSectionUid</string> <string>getDestinationSectionUid</string>
<string>isMovement</string> <string>isMovement</string>
<string>getSourcePaymentUid</string> <string>getSourcePaymentUid</string>
<string>getDestinationPaymentUid</string> <string>getDestinationPaymentUid</string>
<string>getSourceFunctionUid</string> <string>getSourceFunctionUid</string>
<string>getDestinationFunctionUid</string> <string>getDestinationFunctionUid</string>
<string>getSourceProjectUid</string> <string>getSourceProjectUid</string>
<string>getDestinationProjectUid</string> <string>getDestinationProjectUid</string>
<string>getSimulationState</string> <string>getSimulationState</string>
<string>getSourceInventoriatedTotalAssetPrice</string> <string>getSourceInventoriatedTotalAssetPrice</string>
<string>getDestinationInventoriatedTotalAssetPrice</string> <string>getDestinationInventoriatedTotalAssetPrice</string>
<string>getStartDate</string> <string>getStartDate</string>
<string>getStopDate</string> <string>getStopDate</string>
<string>isAccountable</string> <string>isAccountable</string>
<string>getPortalType</string> <string>getPortalType</string>
<string>getVariationText</string> <string>getVariationText</string>
<string>getSubVariationText</string> <string>getSubVariationText</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -216,28 +216,28 @@ ...@@ -216,28 +216,28 @@
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string>uid\n <value> <string>uid\r\n
getResourceUid\n getResourceUid\r\n
getInventoriatedQuantity\n getInventoriatedQuantity\r\n
getSourceUid\n getSourceUid\r\n
getDestinationUid\n getDestinationUid\r\n
getSourceSectionUid\n getSourceSectionUid\r\n
getDestinationSectionUid\n getDestinationSectionUid\r\n
isMovement\n isMovement\r\n
getSourcePaymentUid\n getSourcePaymentUid\r\n
getDestinationPaymentUid\n getDestinationPaymentUid\r\n
getSourceFunctionUid\n getSourceFunctionUid\r\n
getDestinationFunctionUid\n getDestinationFunctionUid\r\n
getSourceProjectUid\n getSourceProjectUid\r\n
getDestinationProjectUid\n getDestinationProjectUid\r\n
getSimulationState\n getSimulationState\r\n
getSourceInventoriatedTotalAssetPrice\n getSourceInventoriatedTotalAssetPrice\r\n
getDestinationInventoriatedTotalAssetPrice\n getDestinationInventoriatedTotalAssetPrice\r\n
getStartDate\n getStartDate\r\n
getStopDate\n getStopDate\r\n
isAccountable\n isAccountable\r\n
getPortalType\n getPortalType\r\n
getVariationText\n getVariationText\r\n
getSubVariationText</string> </value> getSubVariationText</string> </value>
</item> </item>
<item> <item>
...@@ -293,12 +293,46 @@ WHERE\n ...@@ -293,12 +293,46 @@ WHERE\n
<dtml-if "isMovement[loop_item]">\n <dtml-if "isMovement[loop_item]">\n
<dtml-if "isAccountable[loop_item]">\n <dtml-if "isAccountable[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n <dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<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], getSourceUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getDestinationInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item],getSubVariationText[loop_item]])">\n <dtml-call expr="row_list.append([\n
</dtml-if>\n uid[loop_item], \n
<dtml-if "getSourceUid[loop_item]">\n getDestinationUid[loop_item],\n
<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], getDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getSourceInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item], getSubVariationText[loop_item]])">\n getDestinationSectionUid[loop_item],\n
</dtml-if>\n getDestinationPaymentUid[loop_item],\n
getDestinationFunctionUid[loop_item],\n
getDestinationProjectUid[loop_item], \n
getSourceSectionUid[loop_item], \n
getSourceUid[loop_item], \n
getResourceUid[loop_item],\n
getInventoriatedQuantity[loop_item],\n
getStopDate[loop_item], \n
getStartDate[loop_item], \n
getDestinationInventoriatedTotalAssetPrice[loop_item], \n
getPortalType[loop_item], \n
getSimulationState[loop_item], \n
getVariationText[loop_item],\n
getSubVariationText[loop_item]])">\n
</dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="row_list.append([\n
uid[loop_item], \n
getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n
getSourceFunctionUid[loop_item],\n
getSourceProjectUid[loop_item], \n
getDestinationSectionUid[loop_item], \n
getDestinationUid[loop_item], \n
getResourceUid[loop_item],\n
-(getInventoriatedQuantity[loop_item] or 0), \n
getStartDate[loop_item], \n
getStopDate[loop_item],\n
getSourceInventoriatedTotalAssetPrice[loop_item], \n
getPortalType[loop_item], \n
getSimulationState[loop_item], \n
getVariationText[loop_item],\n
getSubVariationText[loop_item]])">\n
</dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
...@@ -321,11 +355,12 @@ VALUES\n ...@@ -321,11 +355,12 @@ VALUES\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int">, \n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n <dtml-sqlvar expr="row_item[12]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
...@@ -384,12 +419,46 @@ WHERE\n ...@@ -384,12 +419,46 @@ WHERE\n
<dtml-if "isMovement[loop_item]">\n <dtml-if "isMovement[loop_item]">\n
<dtml-if "isAccountable[loop_item]">\n <dtml-if "isAccountable[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n <dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<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], getSourceUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getDestinationInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item],getSubVariationText[loop_item]])">\n <dtml-call expr="row_list.append([\n
</dtml-if>\n uid[loop_item], \n
<dtml-if "getSourceUid[loop_item]">\n getDestinationUid[loop_item],\n
<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], getDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getSourceInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item], getSubVariationText[loop_item]])">\n getDestinationSectionUid[loop_item],\n
</dtml-if>\n getDestinationPaymentUid[loop_item],\n
getDestinationFunctionUid[loop_item],\n
getDestinationProjectUid[loop_item], \n
getSourceSectionUid[loop_item], \n
getSourceUid[loop_item], \n
getResourceUid[loop_item],\n
getInventoriatedQuantity[loop_item],\n
getStopDate[loop_item], \n
getStartDate[loop_item], \n
getDestinationInventoriatedTotalAssetPrice[loop_item], \n
getPortalType[loop_item], \n
getSimulationState[loop_item], \n
getVariationText[loop_item],\n
getSubVariationText[loop_item]])">\n
</dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="row_list.append([\n
uid[loop_item], \n
getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n
getSourceFunctionUid[loop_item],\n
getSourceProjectUid[loop_item], \n
getDestinationSectionUid[loop_item], \n
getDestinationUid[loop_item], \n
getResourceUid[loop_item],\n
-(getInventoriatedQuantity[loop_item] or 0), \n
getStartDate[loop_item], \n
getStopDate[loop_item],\n
getSourceInventoriatedTotalAssetPrice[loop_item], \n
getPortalType[loop_item], \n
getSimulationState[loop_item], \n
getVariationText[loop_item],\n
getSubVariationText[loop_item]])">\n
</dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
...@@ -412,11 +481,12 @@ VALUES\n ...@@ -412,11 +481,12 @@ VALUES\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int">, \n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n <dtml-sqlvar expr="row_item[12]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
......
...@@ -107,6 +107,7 @@ CREATE TABLE `stock` (\n ...@@ -107,6 +107,7 @@ CREATE TABLE `stock` (\n
`resource_uid` BIGINT UNSIGNED,\n `resource_uid` BIGINT UNSIGNED,\n
`quantity` real ,\n `quantity` real ,\n
`date` datetime,\n `date` datetime,\n
`mirror_date` datetime,\n
`total_price` real ,\n `total_price` real ,\n
`portal_type` VARCHAR(255),\n `portal_type` VARCHAR(255),\n
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
...@@ -176,6 +177,7 @@ CREATE TABLE `stock` (\n ...@@ -176,6 +177,7 @@ CREATE TABLE `stock` (\n
`resource_uid` BIGINT UNSIGNED,\n `resource_uid` BIGINT UNSIGNED,\n
`quantity` real ,\n `quantity` real ,\n
`date` datetime,\n `date` datetime,\n
`mirror_date` datetime,\n
`total_price` real ,\n `total_price` real ,\n
`portal_type` VARCHAR(255),\n `portal_type` VARCHAR(255),\n
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
......
2007-02-01 Romain
* Add mirror_date column to the stock table.
2006-12-27 vincent 2006-12-27 vincent
* Move catalog related things from erp5_core into this new BT. * Move catalog related things from erp5_core into this new BT.
\ 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