mirror of
https://github.com/frappe/books.git
synced 2026-08-24 02:24:17 -05:00
feat: Added Remove Filter checkbox in System Settings
This commit is contained in:
@@ -674,6 +674,12 @@ export class Payment extends Transactional {
|
||||
} else {
|
||||
return 'Receive';
|
||||
}
|
||||
} else if (partyDoc.role === 'Both') {
|
||||
if (refDoc?.isSales && refDoc.isReturn) {
|
||||
return 'Pay';
|
||||
} else {
|
||||
return 'Receive';
|
||||
}
|
||||
}
|
||||
|
||||
if (outstanding?.isZero() ?? true) {
|
||||
|
||||
@@ -72,6 +72,14 @@
|
||||
"description": "When linking documents, if no match is found and filtering is in effect, allow to disable filters.",
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "removeFilter",
|
||||
"label": "Remove Filter",
|
||||
"fieldtype": "Check",
|
||||
"default": false,
|
||||
"description": "When enabled, removes all default filters applied across the system, showing all available options instead of filtered ones.",
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "locale",
|
||||
"label": "Locale",
|
||||
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
this.filtersDisabled = true;
|
||||
this.results = [];
|
||||
setTimeout(() => {
|
||||
this.toggleDropdown(true);
|
||||
this.isDropdownOpen = true;
|
||||
this.updateSuggestions(keyword);
|
||||
}, 1);
|
||||
},
|
||||
@@ -192,6 +192,11 @@ export default {
|
||||
if (this.df.filters) {
|
||||
return this.df.filters;
|
||||
}
|
||||
|
||||
if (fyo.singles.SystemSettings?.removeFilter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { schemaName, fieldname } = this.df;
|
||||
const getFilters = fyo.models[schemaName]?.filters?.[fieldname];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user