2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

Create a default party account (#66)

This commit is contained in:
sahil28297 2018-09-11 17:02:28 +05:30 committed by Faris Ansari
parent ce2254824a
commit 91f6c693e0
2 changed files with 14 additions and 0 deletions

View File

@ -38,6 +38,7 @@ module.exports = {
label: 'Account',
fieldtype: 'Link',
target: 'Account',
formula : (doc) => doc.getFrom('Party', doc.customer , 'default_account'),
getFilters: (query, control) => {
return {
keywords: ['like', query],

View File

@ -13,6 +13,19 @@ module.exports = {
"fieldtype": "Data",
"required": 1
},
{
fieldname: 'default_account',
label: 'Default Account',
fieldtype: 'Link',
target: 'Account',
getFilters: (query, control) => {
return {
keywords: ['like', query],
isGroup: 0,
accountType: 'Receivable'
};
}
},
{
"fieldname": "customer",
"label": "Customer",