paid amount fix in fees
This commit is contained in:
parent
9fba32a917
commit
a9525de0da
@ -112,7 +112,10 @@ 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, grand_total from `tabFees`
|
||||
return frappe. db.sql('''
|
||||
select name, program, due_date, grand_total - outstanding_amount as paid_amount,
|
||||
outstanding_amount, grand_total, currency
|
||||
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,13 +5,13 @@
|
||||
{{ doc.program }}
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
{{ doc.get_formatted("total_amount") }}
|
||||
{{ frappe.utils.fmt_money(doc.grand_total, currency=doc.currency) }}
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
{{ doc.get_formatted("paid_amount") }}
|
||||
{{ frappe.utils.fmt_money(doc.paid_amount, currency=doc.currency) }}
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
{{ doc.get_formatted("outstanding_amount") }}
|
||||
{{ frappe.utils.fmt_money(doc.outstanding_amount, currency=doc.currency) }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user