Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
219d67a9
Commit
219d67a9
authored
Aug 27, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: prevent rounding issues
parent
8650a476
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Entity_createPaymentTransactionAction.py
...lapos_accounting/Entity_createPaymentTransactionAction.py
+2
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Entity_createPaymentTransactionAction.py
View file @
219d67a9
...
@@ -11,7 +11,8 @@ expected_price = context.Entity_getOutstandingAmountList(
...
@@ -11,7 +11,8 @@ expected_price = context.Entity_getOutstandingAmountList(
group_by_node
=
True
group_by_node
=
True
)[
0
].
total_price
)[
0
].
total_price
if
total_price
!=
expected_price
:
precision
=
outstanding_amount
.
getPriceCurrencyValue
().
getQuantityPrecision
()
if
round
(
total_price
,
precision
)
!=
round
(
expected_price
,
precision
):
return
context
.
Base_renderForm
(
dialog_id
,
Base_translateString
(
'Total Amount does not match'
),
level
=
'error'
)
return
context
.
Base_renderForm
(
dialog_id
,
Base_translateString
(
'Total Amount does not match'
),
level
=
'error'
)
...
...
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