|
|
|
|
@ -176,12 +176,13 @@ def get_invoices(request): |
|
|
|
|
response['Content-Disposition'] = 'attachment; filename="%s.csv"' % file_name |
|
|
|
|
|
|
|
|
|
writer = csv.writer(response) |
|
|
|
|
writer.writerow(['date', 'student_email', 'full_name', 'course', 'price', 'real_price', 'key']) |
|
|
|
|
writer.writerow(['date', 'time', 'student_email', 'full_name', 'course', 'price', 'real_price', 'key']) |
|
|
|
|
|
|
|
|
|
for i in invoices.order_by('-date'): |
|
|
|
|
course_api = CourseParamsApi(i.bill.course_token) |
|
|
|
|
writer.writerow([ |
|
|
|
|
i.date, |
|
|
|
|
i.date.date(), |
|
|
|
|
i.date.time(), |
|
|
|
|
i.bill.user.email, |
|
|
|
|
i.bill.user.get_full_name(), |
|
|
|
|
course_api.get_slug_and_title()['title'], |
|
|
|
|
|