Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
b3ed2210
Commit
b3ed2210
authored
Sep 23, 2019
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_pdm: do not round calculated average unit_price in slice case.
otherwise it loses too much precision.
parent
bfdcb738
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_getPriceCalculationOperandDict.py
...skins/erp5_pdm/Resource_getPriceCalculationOperandDict.py
+1
-4
No files found.
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_getPriceCalculationOperandDict.py
View file @
b3ed2210
...
...
@@ -34,10 +34,7 @@ if result["slice_base_price"]:
slice_min
=
1
priced_quantity
=
min
(
slice_max
-
1
,
quantity
)
-
(
slice_min
-
1
)
total_price
+=
priced_quantity
*
slice_price
if
result
.
get
(
'base_unit_price'
,
None
)
is
None
:
result
[
"base_price"
]
=
total_price
/
quantity
else
:
result
[
"base_price"
]
=
round
(
total_price
/
quantity
,
int
(
round
(
-
log
(
result
[
'base_unit_price'
],
10
),
0
)))
result
[
"base_price"
]
=
total_price
/
quantity
base_price
=
result
[
"base_price"
]
if
base_price
in
(
None
,
""
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment