Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
44988772
Commit
44988772
authored
Jul 16, 2016
by
Skia
🤘
Browse files
Small fix on counters
parent
f600e174
Pipeline
#54
failed with stage
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
counter/views.py
View file @
44988772
...
...
@@ -154,7 +154,8 @@ class CounterClick(DetailView):
def
add_product
(
self
,
request
,
q
=
1
,
p
=
None
):
""" Add a product to the basket """
pid
=
p
or
str
(
request
.
POST
[
'product_id'
])
pid
=
p
or
request
.
POST
[
'product_id'
]
pid
=
str
(
pid
)
price
=
self
.
get_price
(
pid
)
total
=
self
.
sum_basket
(
request
)
if
self
.
customer
.
amount
<
(
total
+
q
*
float
(
price
)):
...
...
Write
Preview
Supports
Markdown
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