Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
ad7bc617
Commit
ad7bc617
authored
Nov 07, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix logged error : make sure total_amount is float before rounding it
parent
2c1a3415
Pipeline
#3894
canceled with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
views.py
outils/views.py
+3
-3
No files found.
outils/views.py
View file @
ad7bc617
...
...
@@ -204,7 +204,7 @@ class ExportPOS(View):
# p['name'] is a sequence generated string
# Test order is important as CHEQDEJ contains CHEQ for ex.
# p['journal'] could be used but easier to change in Odoo interface
sub_amount
=
round
(
p
[
'total_amount'
]
,
2
)
sub_amount
=
round
(
float
(
p
[
'total_amount'
])
,
2
)
if
'CSH'
in
p
[
'name'
]:
csh
=
sub_amount
elif
'CHEQDEJ'
in
p
[
'name'
]:
...
...
@@ -317,11 +317,11 @@ class ExportPOS(View):
totals
=
{}
for
r
in
res
:
if
(
r
[
'total_amount'
]
>
0
):
if
(
float
(
r
[
'total_amount'
])
>
0
):
# d = time.strptime(r['min_date'], tf)
# date = str(d.tm_mday) + '-' + str(d.tm_mon) + '-' + str(d.tm_year)
date
,
hours
=
r
[
'min_date'
]
.
split
(
' '
)
total
=
round
(
r
[
'total_amount'
]
,
2
)
total
=
round
(
float
(
r
[
'total_amount'
])
,
2
)
cb
=
csh
=
chq
=
0
caisse
=
r
[
'config_id'
][
1
]
...
...
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