mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
[Fix] Payment Tool, Fetch due date when user does 'Get Outstanding Vouchers'
This commit is contained in:
@@ -146,6 +146,10 @@ frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
|
||||
c.total_amount = d.invoice_amount;
|
||||
c.outstanding_amount = d.outstanding_amount;
|
||||
|
||||
if (in_list(['Sales Invoice', 'Purchase Invoice'], d.voucher_type)){
|
||||
c.due_date = d.due_date
|
||||
}
|
||||
|
||||
if (frm.doc.set_payment_amount) {
|
||||
c.payment_amount = d.outstanding_amount;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Against Voucher Type",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
@@ -70,7 +70,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Due Date",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
@@ -194,7 +194,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-05-05 05:37:41.206708",
|
||||
"modified": "2016-05-05 06:22:24.736160",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Tool Detail",
|
||||
|
||||
@@ -473,7 +473,8 @@ def get_outstanding_invoices(party_type, party, account, condition=None):
|
||||
'posting_date': d.posting_date,
|
||||
'invoice_amount': flt(d.invoice_amount),
|
||||
'payment_amount': flt(d.payment_amount),
|
||||
'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision)
|
||||
'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision),
|
||||
'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no, "due_date")
|
||||
})
|
||||
|
||||
return outstanding_invoices
|
||||
|
||||
Reference in New Issue
Block a user