Merge pull request #20009 from nextchamp-saqib/pi-payable-filter

fix: bad credit to filter in purchase invoice
This commit is contained in:
Deepesh Garg 2019-12-23 14:50:56 +05:30 committed by GitHub
commit 06e7cf3caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 31 deletions

View File

@ -382,7 +382,6 @@ cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(do
cur_frm.fields_dict['credit_to'].get_query = function(doc) {
// filter on Account
if (doc.supplier) {
return {
filters: {
'account_type': 'Payable',
@ -390,15 +389,6 @@ cur_frm.fields_dict['credit_to'].get_query = function(doc) {
'company': doc.company
}
}
} else {
return {
filters: {
'report_type': 'Balance Sheet',
'is_group': 0,
'company': doc.company
}
}
}
}
// Get Print Heading

View File

@ -556,8 +556,6 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn) {
}
cur_frm.set_query("debit_to", function(doc) {
// filter on Account
if (doc.customer) {
return {
filters: {
'account_type': 'Receivable',
@ -565,15 +563,6 @@ cur_frm.set_query("debit_to", function(doc) {
'company': doc.company
}
}
} else {
return {
filters: {
'report_type': 'Balance Sheet',
'is_group': 0,
'company': doc.company
}
}
}
});
cur_frm.set_query("asset", "items", function(doc, cdt, cdn) {