Commit 27574327 authored by Mame Coumba Sall's avatar Mame Coumba Sall

Add is_cancellation in both z_create_stock and z_catalog_stock_list


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31175 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd01b5fd
......@@ -149,6 +149,12 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>isCancellationAmount</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
......@@ -170,6 +176,7 @@
<string>getBaobabSourceSectionUid</string>
<string>getBaobabDestinationSectionUid</string>
<string>isMovement</string>
<string>isCancellationAmount</string>
<string>isInventoryMovement</string>
<string>getBaobabSourcePaymentUid</string>
<string>getBaobabDestinationPaymentUid</string>
......@@ -208,6 +215,7 @@ getBaobabDestinationUid\r\n
getBaobabSourceSectionUid\r\n
getBaobabDestinationSectionUid\r\n
isMovement\r\n
isCancellationAmount\r\n
isInventoryMovement\r\n
getBaobabSourcePaymentUid\r\n
getBaobabDestinationPaymentUid\r\n
......@@ -276,11 +284,43 @@ WHERE\n
<dtml-if "not isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "getBaobabDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([uid[loop_item], uid_dict[uid[loop_item]], getBaobabDestinationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getBaobabDestinationPaymentUid[loop_item], getExplanationUid[loop_item], getBaobabSourceSectionUid[loop_item], getBaobabSourceUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getDestinationInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getBaobabDestinationVariationText[loop_item],getSubVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([uid[loop_item],
uid_dict[uid[loop_item]],
getBaobabDestinationUid[loop_item],
getBaobabDestinationSectionUid[loop_item],
getBaobabDestinationPaymentUid[loop_item],
getExplanationUid[loop_item],
getBaobabSourceSectionUid[loop_item],
getBaobabSourceUid[loop_item],
getResourceUid[loop_item],
getInventoriatedQuantity[loop_item],
isCancellationAmount[loop_item],
getStopDate[loop_item],
getDestinationInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
getBaobabDestinationVariationText[loop_item],
getSubVariationText[loop_item]])">\n
</dtml-if>\n
<dtml-if "getBaobabSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([uid[loop_item], uid_dict[uid[loop_item]], getBaobabSourceUid[loop_item], getBaobabSourceSectionUid[loop_item], getBaobabSourcePaymentUid[loop_item], getExplanationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getBaobabDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getSourceInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getBaobabSourceVariationText[loop_item],getSubVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([uid[loop_item],
uid_dict[uid[loop_item]],
getBaobabSourceUid[loop_item],
getBaobabSourceSectionUid[loop_item],
getBaobabSourcePaymentUid[loop_item],
getExplanationUid[loop_item],
getBaobabDestinationSectionUid[loop_item],
getBaobabDestinationUid[loop_item],
getResourceUid[loop_item],
-(getInventoriatedQuantity[loop_item] or 0),
isCancellationAmount[loop_item],
getStartDate[loop_item],
getSourceInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
getBaobabSourceVariationText[loop_item],
getSubVariationText[loop_item]])">\n
</dtml-if>\n
</dtml-if>\n
</dtml-in>\n
......@@ -301,12 +341,13 @@ VALUES\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\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[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="int">, \n
<dtml-sqlvar expr="row_item[11]" type="datetime" 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[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
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
......@@ -336,7 +377,7 @@ VALUES\n
]]></string> </value>
</item>
<item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
......@@ -367,11 +408,43 @@ WHERE\n
<dtml-if "not isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "getBaobabDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([uid[loop_item], uid_dict[uid[loop_item]], getBaobabDestinationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getBaobabDestinationPaymentUid[loop_item], getExplanationUid[loop_item], getBaobabSourceSectionUid[loop_item], getBaobabSourceUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getDestinationInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getBaobabDestinationVariationText[loop_item],getSubVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([uid[loop_item],
uid_dict[uid[loop_item]],
getBaobabDestinationUid[loop_item],
getBaobabDestinationSectionUid[loop_item],
getBaobabDestinationPaymentUid[loop_item],
getExplanationUid[loop_item],
getBaobabSourceSectionUid[loop_item],
getBaobabSourceUid[loop_item],
getResourceUid[loop_item],
getInventoriatedQuantity[loop_item],
isCancellationAmount[loop_item],
getStopDate[loop_item],
getDestinationInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
getBaobabDestinationVariationText[loop_item],
getSubVariationText[loop_item]])">\n
</dtml-if>\n
<dtml-if "getBaobabSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([uid[loop_item], uid_dict[uid[loop_item]], getBaobabSourceUid[loop_item], getBaobabSourceSectionUid[loop_item], getBaobabSourcePaymentUid[loop_item], getExplanationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getBaobabDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getSourceInventoriatedTotalAssetPrice[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getBaobabSourceVariationText[loop_item],getSubVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([uid[loop_item],
uid_dict[uid[loop_item]],
getBaobabSourceUid[loop_item],
getBaobabSourceSectionUid[loop_item],
getBaobabSourcePaymentUid[loop_item],
getExplanationUid[loop_item],
getBaobabDestinationSectionUid[loop_item],
getBaobabDestinationUid[loop_item],
getResourceUid[loop_item],
-(getInventoriatedQuantity[loop_item] or 0),
isCancellationAmount[loop_item],
getStartDate[loop_item],
getSourceInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
getBaobabSourceVariationText[loop_item],
getSubVariationText[loop_item]])">\n
</dtml-if>\n
</dtml-if>\n
</dtml-in>\n
......@@ -392,12 +465,13 @@ VALUES\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\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[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="int">, \n
<dtml-sqlvar expr="row_item[11]" type="datetime" 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[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
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
......
......@@ -97,6 +97,7 @@ CREATE TABLE `stock` (\n
`mirror_node_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
`quantity` real ,\n
`is_cancellation` BOOLEAN, \n
`date` datetime,\n
`total_price` real ,\n
`portal_type` VARCHAR(255),\n
......@@ -169,6 +170,7 @@ CREATE TABLE `stock` (\n
`mirror_node_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
`quantity` real ,\n
`is_cancellation` BOOLEAN,\n
`date` datetime,\n
`total_price` real ,\n
`portal_type` VARCHAR(255),\n
......
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