copy the older total amount field and corrsp. changes in report (#11322)
This commit is contained in:
parent
1c1237537b
commit
464289b726
@ -452,3 +452,4 @@ erpnext.patches.v9_0.fix_subscription_next_date #2017-10-23
|
||||
erpnext.patches.v9_0.add_healthcare_domain
|
||||
erpnext.patches.v9_0.set_variant_item_description
|
||||
erpnext.patches.v9_0.set_uoms_in_variant_field
|
||||
erpnext.patches.v9_0.copy_old_fees_field_data
|
||||
|
11
erpnext/patches/v9_0/copy_old_fees_field_data.py
Normal file
11
erpnext/patches/v9_0/copy_old_fees_field_data.py
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2017, Frappe and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
if "total_amount" not in frappe.db.get_table_columns("Fees"):
|
||||
return
|
||||
|
||||
frappe.db.sql("""update tabFees set grand_total=total_amount where grand_total = 0.0""")
|
@ -112,7 +112,7 @@ def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20, order
|
||||
user = frappe.session.user
|
||||
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
|
||||
if student:
|
||||
return frappe. db.sql('''select name, program, due_date, paid_amount, outstanding_amount, total_amount from `tabFees`
|
||||
return frappe. db.sql('''select name, program, due_date, paid_amount, outstanding_amount, grand_total from `tabFees`
|
||||
where student= %s and docstatus=1
|
||||
order by due_date asc limit {0} , {1}'''
|
||||
.format(limit_start, limit_page_length), student, as_dict = True)
|
||||
|
@ -5,14 +5,14 @@
|
||||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 2,
|
||||
"idx": 3,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2017-02-24 20:05:08.514320",
|
||||
"modified": "2017-10-25 11:59:26.003899",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Student Fee Collection",
|
||||
"owner": "Administrator",
|
||||
"query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(paid_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(total_amount) as \"Total Amount:Currency:150\"\nFROM\n `tabFees` \nGROUP BY\n student",
|
||||
"query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(paid_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(grand_total) as \"Grand Total:Currency:150\"\nFROM\n `tabFees` \nGROUP BY\n student",
|
||||
"ref_doctype": "Fees",
|
||||
"report_name": "Student Fee Collection",
|
||||
"report_type": "Query Report",
|
||||
|
Loading…
x
Reference in New Issue
Block a user