Merge pull request #32722 from deepeshgarg007/reference_due_date
fix: Reference due date field type in Journal Entry Accounts table
This commit is contained in:
commit
aee4fe9f7b
@ -312,8 +312,7 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_outstanding(doctype, docname, company, child, due_date) {
|
get_outstanding(doctype, docname, company, child) {
|
||||||
var me = this;
|
|
||||||
var args = {
|
var args = {
|
||||||
"doctype": doctype,
|
"doctype": doctype,
|
||||||
"docname": docname,
|
"docname": docname,
|
||||||
|
@ -1210,6 +1210,7 @@ def get_outstanding(args):
|
|||||||
args = json.loads(args)
|
args = json.loads(args)
|
||||||
|
|
||||||
company_currency = erpnext.get_company_currency(args.get("company"))
|
company_currency = erpnext.get_company_currency(args.get("company"))
|
||||||
|
due_date = None
|
||||||
|
|
||||||
if args.get("doctype") == "Journal Entry":
|
if args.get("doctype") == "Journal Entry":
|
||||||
condition = " and party=%(party)s" if args.get("party") else ""
|
condition = " and party=%(party)s" if args.get("party") else ""
|
||||||
@ -1234,10 +1235,12 @@ def get_outstanding(args):
|
|||||||
invoice = frappe.db.get_value(
|
invoice = frappe.db.get_value(
|
||||||
args["doctype"],
|
args["doctype"],
|
||||||
args["docname"],
|
args["docname"],
|
||||||
["outstanding_amount", "conversion_rate", scrub(party_type)],
|
["outstanding_amount", "conversion_rate", scrub(party_type), "due_date"],
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
due_date = invoice.get("due_date")
|
||||||
|
|
||||||
exchange_rate = (
|
exchange_rate = (
|
||||||
invoice.conversion_rate if (args.get("account_currency") != company_currency) else 1
|
invoice.conversion_rate if (args.get("account_currency") != company_currency) else 1
|
||||||
)
|
)
|
||||||
@ -1260,6 +1263,7 @@ def get_outstanding(args):
|
|||||||
"exchange_rate": exchange_rate,
|
"exchange_rate": exchange_rate,
|
||||||
"party_type": party_type,
|
"party_type": party_type,
|
||||||
"party": invoice.get(scrub(party_type)),
|
"party": invoice.get(scrub(party_type)),
|
||||||
|
"reference_due_date": due_date,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@
|
|||||||
{
|
{
|
||||||
"depends_on": "eval:doc.reference_type&&!in_list(doc.reference_type, ['Expense Claim', 'Asset', 'Employee Loan', 'Employee Advance'])",
|
"depends_on": "eval:doc.reference_type&&!in_list(doc.reference_type, ['Expense Claim', 'Asset', 'Employee Loan', 'Employee Advance'])",
|
||||||
"fieldname": "reference_due_date",
|
"fieldname": "reference_due_date",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Date",
|
||||||
"label": "Reference Due Date",
|
"label": "Reference Due Date",
|
||||||
"no_copy": 1
|
"no_copy": 1
|
||||||
},
|
},
|
||||||
@ -284,7 +284,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-10-13 17:07:17.999191",
|
"modified": "2022-10-26 20:03:10.906259",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Journal Entry Account",
|
"name": "Journal Entry Account",
|
||||||
|
Loading…
Reference in New Issue
Block a user