Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
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
edx
edx-platform
Commits
e72eaf81
Commit
e72eaf81
authored
Jun 19, 2015
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8582 from edx/cdodge/fix-none-totals
fix price per seat
parents
a77923dc
61aa3505
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
lms/djangoapps/instructor_task/tasks_helper.py
+4
-1
lms/templates/instructor/instructor_dashboard_2/executive_summary.html
+5
-1
No files found.
lms/djangoapps/instructor_task/tasks_helper.py
View file @
e72eaf81
...
...
@@ -1108,11 +1108,13 @@ def get_executive_report(course_id):
single_purchase_total
=
PaidCourseRegistration
.
get_total_amount_of_purchased_item
(
course_id
)
bulk_purchase_total
=
CourseRegCodeItem
.
get_total_amount_of_purchased_item
(
course_id
)
paid_invoices_total
=
InvoiceTransaction
.
get_total_amount_of_paid_course_invoices
(
course_id
)
gross_revenue
=
single_purchase_total
+
bulk_purchase_total
+
paid_invoices_total
gross_
paid_
revenue
=
single_purchase_total
+
bulk_purchase_total
+
paid_invoices_total
all_invoices_total
=
Invoice
.
get_invoice_total_amount_for_course
(
course_id
)
gross_pending_revenue
=
all_invoices_total
-
float
(
paid_invoices_total
)
gross_revenue
=
float
(
gross_paid_revenue
)
+
float
(
gross_pending_revenue
)
refunded_self_purchased_seats
=
PaidCourseRegistration
.
get_self_purchased_seat_count
(
course_id
,
status
=
'refunded'
)
...
...
@@ -1165,6 +1167,7 @@ def get_executive_report(course_id):
'total_seats'
:
total_seats
,
'currency'
:
currency
,
'gross_revenue'
:
float
(
gross_revenue
),
'gross_paid_revenue'
:
float
(
gross_paid_revenue
),
'gross_pending_revenue'
:
gross_pending_revenue
,
'total_seats_refunded'
:
total_seats_refunded
,
'total_amount_refunded'
:
float
(
total_amount_refunded
),
...
...
lms/templates/instructor/instructor_dashboard_2/executive_summary.html
View file @
e72eaf81
...
...
@@ -52,10 +52,14 @@ h2 {
<td
align=
"right"
>
${total_enrollments}
</td>
</tr>
<tr>
<td>
${_("Gross Revenue
Collected
")}
</td>
<td>
${_("Gross Revenue")}
</td>
<td
align=
"right"
>
${currency}${"{0:0.2f}".format(gross_revenue)}
</td>
</tr>
<tr>
<td>
${_("Gross Revenue Collected")}
</td>
<td
align=
"right"
>
${currency}${"{0:0.2f}".format(gross_paid_revenue)}
</td>
</tr>
<tr>
<td>
${_("Gross Revenue Pending")}
</td>
<td
align=
"right"
>
${currency}${"{0:0.2f}".format(gross_pending_revenue)}
</td>
</tr>
...
...
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