Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PixieDust-LastMinuteSurpluss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Erick Gabriel T. Lopez
PixieDust-LastMinuteSurpluss
Commits
875b9307
Commit
875b9307
authored
Dec 02, 2022
by
Mikael Giannes M. Bernardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the autodiscount functionality on OrderItem
parent
18a63cb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
models.py
pixie_dust/orders/models.py
+0
-6
No files found.
pixie_dust/orders/models.py
View file @
875b9307
...
...
@@ -43,12 +43,6 @@ class OrderItem(models.Model):
prod
.
quantity
-=
self
.
quantity
prod
.
save
()
if
(
self
.
is_successful
):
discounts
=
product_model
.
Discount
.
objects
.
all
()
for
discount
in
discounts
:
if
(
self
.
item_id
==
discount
.
item_id
and
discount
.
start_date
<=
date
.
today
()
and
discount
.
end_date
>=
date
.
today
()):
self
.
discount
=
discount
.
discount_percent
self
.
discount_price
=
self
.
item_id
.
price
*
(
1
-
(
self
.
discount
/
100
))
self
.
sub_total
=
self
.
discount_price
*
self
.
quantity
self
.
order_no
.
amount_due
+=
Decimal
(
self
.
sub_total
)
self
.
order_no
.
save
()
...
...
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