Commit 24b0f7a5 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Implemented asset price based on total price (rather than on previous unit...

Implemented asset price based on total price (rather than on previous unit price based approach). Prices are for movement table. Total prices (which represent asset in reality) are for stock table.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4915 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e87e3ec2
...@@ -22,7 +22,8 @@ getDestinationFunctionUid ...@@ -22,7 +22,8 @@ getDestinationFunctionUid
getSourceProjectUid getSourceProjectUid
getDestinationProjectUid getDestinationProjectUid
getSimulationState getSimulationState
getPrice getSourceInventoriatedTotalAssetPrice
getDestinationInventoriatedTotalAssetPrice
getStartDate getStartDate
getStopDate getStopDate
isAccountable isAccountable
...@@ -44,10 +45,10 @@ WHERE ...@@ -44,10 +45,10 @@ WHERE
<dtml-if "isMovement[loop_item]"> <dtml-if "isMovement[loop_item]">
<dtml-if "getResourceUid[loop_item]"> <dtml-if "getResourceUid[loop_item]">
<dtml-if "getDestinationUid[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], getDestinationFunctionUid[loop_item], getDestinationProjectUid[loop_item], getSourceSectionUid[loop_item], getSourceUid[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],getSubVariationText[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], getSourceUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getDestinationInventoriatedTotalAssetPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item],getSubVariationText[loop_item]])">
</dtml-if> </dtml-if>
<dtml-if "getSourceUid[loop_item]"> <dtml-if "getSourceUid[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], getDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item], getSubVariationText[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], getDestinationUid[loop_item], getResourceUid[loop_item], -(getInventoriatedQuantity[loop_item] or 0), getStartDate[loop_item], getSourceInventoriatedTotalAssetPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item], getSubVariationText[loop_item]])">
</dtml-if> </dtml-if>
</dtml-if> </dtml-if>
</dtml-if> </dtml-if>
......
...@@ -24,7 +24,7 @@ CREATE TABLE `stock` ( ...@@ -24,7 +24,7 @@ CREATE TABLE `stock` (
`resource_uid` BIGINT UNSIGNED, `resource_uid` BIGINT UNSIGNED,
`quantity` real , `quantity` real ,
`date` datetime, `date` datetime,
`price` real , `total_price` real ,
`is_accountable` bool, `is_accountable` bool,
`portal_type` VARCHAR(255), `portal_type` VARCHAR(255),
`simulation_state` varchar(255) default '', `simulation_state` varchar(255) default '',
......
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