mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
Added filter to hide gst reports for countries other then India
This commit is contained in:
parent
d652ee800d
commit
65c4faf135
@ -114,6 +114,7 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.companyName = await sidebarConfig.getTitle();
|
||||
const { country } = await frappe.getSingle('AccountingSettings');
|
||||
this.groups = sidebarConfig.groups.filter((group) => {
|
||||
if (
|
||||
group.route === '/get-started' &&
|
||||
@ -124,6 +125,16 @@ export default {
|
||||
return true;
|
||||
});
|
||||
|
||||
if (country !== 'India') {
|
||||
this.groups.forEach((group) => {
|
||||
if (group.title === 'Reports') {
|
||||
group.items = group.items.filter(
|
||||
(item) => !item.label.toLowerCase().includes('gst')
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.setActiveGroup();
|
||||
router.afterEach(() => {
|
||||
this.setActiveGroup();
|
||||
|
Loading…
Reference in New Issue
Block a user