feat: Record Advance Payments as Liability

Ability to let user record advance payments as liability instead of a negative asset.

Issue #34282
This commit is contained in:
Gursheen Anand
2023-06-02 17:13:51 +05:30
parent b7407a1d81
commit 74619269f0
21 changed files with 559 additions and 172 deletions

View File

@@ -34,6 +34,28 @@ frappe.ui.form.on("Customer", {
filters: filters
}
});
frm.set_query('advances_received_account', 'accounts', function (doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
"root_type": 'Liability',
"company": d.company,
"is_group": 0
}
}
});
frm.set_query('advances_paid_account', 'accounts', function (doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
"root_type": 'Asset',
"company": d.company,
"is_group": 0
}
}
});
if (frm.doc.__islocal == 1) {
frm.set_value("represents_company", "");

View File

@@ -334,13 +334,13 @@
{
"fieldname": "default_receivable_accounts",
"fieldtype": "Section Break",
"label": "Default Receivable Accounts"
"label": "Default Accounts"
},
{
"description": "Mention if a non-standard receivable account",
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Receivable Accounts",
"label": "Accounts",
"options": "Party Account"
},
{
@@ -568,7 +568,7 @@
"link_fieldname": "party"
}
],
"modified": "2023-02-18 11:04:46.343527",
"modified": "2023-05-29 14:29:17.789578",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
@@ -607,7 +607,6 @@
"read": 1,
"report": 1,
"role": "Sales Master Manager",
"set_user_permissions": 1,
"share": 1,
"write": 1
},