Commit 1356fe35 authored by Jérome Perrin's avatar Jérome Perrin

Revert "catalog/stock: avoid duplicate calls to getInventoriatedQuantity and...

Revert "catalog/stock: avoid duplicate calls to getInventoriatedQuantity and use better naming for variables"

This reverts commit 32d9df01.
parent 6eb4d565
......@@ -10,8 +10,7 @@ WHERE
<dtml-let row_list="[]" uid_dict="{}">
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "not(isInventoryMovement[loop_item]) and isMovement[loop_item] and getResourceUid[loop_item]">
<dtml-in prefix="movement" expr="asMovementList[loop_item]" no_push_item>
<dtml-let movement_item_quantity="movement_item.getInventoriatedQuantity() or 0">
<dtml-in prefix="mov" expr="asMovementList[loop_item]" no_push_item>
<dtml-if "getDestinationUid[loop_item]">
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">
<dtml-call expr="row_list.append([
......@@ -28,11 +27,11 @@ WHERE
getSourceSectionUid[loop_item],
getSourceUid[loop_item],
getResourceUid[loop_item],
movement_item_quantity,
(mov_item.getInventoriatedQuantity() or 0),
isCancellationAmount[loop_item],
isAccountable[loop_item],
movement_item.getStopDate(),
movement_item.getStartDate(),
mov_item.getStopDate(),
mov_item.getStartDate(),
getDestinationInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
......@@ -55,18 +54,17 @@ WHERE
getDestinationSectionUid[loop_item],
getDestinationUid[loop_item],
getResourceUid[loop_item],
-movement_item_quantity,
-(mov_item.getInventoriatedQuantity() or 0),
isCancellationAmount[loop_item],
isAccountable[loop_item],
movement_item.getStartDate(),
movement_item.getStopDate(),
mov_item.getStartDate(),
mov_item.getStopDate(),
getSourceInventoriatedTotalAssetPrice[loop_item],
getPortalType[loop_item],
getSimulationState[loop_item],
getVariationText[loop_item],
getSubVariationText[loop_item]])">
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-if>
</dtml-in>
......
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