Commit 78fca6ca authored by Julien Muchembled's avatar Julien Muchembled

Update tradeModelLineWithRounding wrt r39089

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39296 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 87b5c381
...@@ -2600,7 +2600,7 @@ return current_movement ...@@ -2600,7 +2600,7 @@ return current_movement
# create a rounding model for tax # create a rounding model for tax
rounding_model = self.portal.portal_roundings.newContent(portal_type='Rounding Model') rounding_model = self.portal.portal_roundings.newContent(portal_type='Rounding Model')
rounding_model.setDecimalRoundingOption('ROUND_DOWN') rounding_model.setDecimalRoundingOption('ROUND_DOWN')
rounding_model.setDecimalExponent('1') rounding_model.setPrecision(1)
rounding_model.setRoundedPropertyId('total_price') rounding_model.setRoundedPropertyId('total_price')
rounding_model._setMembershipCriterionCategoryList(['base_contribution/base_amount/total_tax']) rounding_model._setMembershipCriterionCategoryList(['base_contribution/base_amount/total_tax'])
rounding_model._setMembershipCriterionBaseCategoryList(['base_contribution']) rounding_model._setMembershipCriterionBaseCategoryList(['base_contribution'])
...@@ -2677,7 +2677,7 @@ return current_movement ...@@ -2677,7 +2677,7 @@ return current_movement
# change rounding model definition # change rounding model definition
rounding_model.setDecimalRoundingOption('ROUND_UP') rounding_model.setDecimalRoundingOption('ROUND_UP')
rounding_model.setDecimalExponent('1') rounding_model.setPrecision(1)
rounding_model.setRoundedPropertyIdList(['total_price', 'quantity']) rounding_model.setRoundedPropertyIdList(['total_price', 'quantity'])
# change quantity # change quantity
...@@ -2701,7 +2701,7 @@ return current_movement ...@@ -2701,7 +2701,7 @@ return current_movement
# create a rounding model to round quantity property of order line # create a rounding model to round quantity property of order line
rounding_model_for_quantity = self.portal.portal_roundings.newContent(portal_type='Rounding Model') rounding_model_for_quantity = self.portal.portal_roundings.newContent(portal_type='Rounding Model')
rounding_model_for_quantity.setDecimalRoundingOption('ROUND_DOWN') rounding_model_for_quantity.setDecimalRoundingOption('ROUND_DOWN')
rounding_model_for_quantity.setDecimalExponent('1') rounding_model_for_quantity.setPrecision(1)
rounding_model_for_quantity.setRoundedPropertyId('quantity') rounding_model_for_quantity.setRoundedPropertyId('quantity')
rounding_model_for_quantity._setMembershipCriterionCategoryList(['base_contribution/base_amount/tax']) rounding_model_for_quantity._setMembershipCriterionCategoryList(['base_contribution/base_amount/tax'])
rounding_model_for_quantity._setMembershipCriterionBaseCategoryList(['base_contribution']) rounding_model_for_quantity._setMembershipCriterionBaseCategoryList(['base_contribution'])
...@@ -2719,7 +2719,7 @@ return current_movement ...@@ -2719,7 +2719,7 @@ return current_movement
# create a rounding model to round price property of order line # create a rounding model to round price property of order line
rounding_model_for_price = self.portal.portal_roundings.newContent(portal_type='Rounding Model') rounding_model_for_price = self.portal.portal_roundings.newContent(portal_type='Rounding Model')
rounding_model_for_price.setDecimalRoundingOption('ROUND_UP') rounding_model_for_price.setDecimalRoundingOption('ROUND_UP')
rounding_model_for_price.setDecimalExponent('0.1') rounding_model_for_price.setPrecision(0.1)
rounding_model_for_price.setRoundedPropertyId('price') rounding_model_for_price.setRoundedPropertyId('price')
rounding_model_for_price._setMembershipCriterionCategoryList(['base_contribution/base_amount/tax']) rounding_model_for_price._setMembershipCriterionCategoryList(['base_contribution/base_amount/tax'])
rounding_model_for_price._setMembershipCriterionBaseCategoryList(['base_contribution']) rounding_model_for_price._setMembershipCriterionBaseCategoryList(['base_contribution'])
......
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