mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +00:00
incr: add separate item for gst
This commit is contained in:
parent
5a633b9d07
commit
986d4da23e
23
src/components/Icons/18/gst.vue
Normal file
23
src/components/Icons/18/gst.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<svg
|
||||
width="18"
|
||||
height="18"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M2 1C0.895431 1 0 1.89543 0 3V15C0 16.1046 0.89543 17 2 17H16C17.1046 17 18 16.1046 18 15V3C18 1.89543 17.1046 1 16 1H2ZM8.58582 13.4571V11.64H6.95725V13.5429C6.95725 14.0229 7.10582 14.4114 7.40297 14.7086C7.70011 14.9943 8.08868 15.1371 8.56868 15.1371H9.46011C9.94011 15.1371 10.3287 14.9943 10.6258 14.7086C10.923 14.4114 11.0715 14.0229 11.0715 13.5429V10.1314C11.0715 9.83429 10.9973 9.6 10.8487 9.42857C10.7115 9.25714 10.5515 9.13143 10.3687 9.05143C10.1858 8.97143 10.043 8.90857 9.94011 8.86286L8.58582 8.26286V4.68C8.58582 4.62286 8.61439 4.59429 8.67154 4.59429H9.35725C9.41439 4.59429 9.44297 4.62286 9.44297 4.68V6.99429L11.0715 7.13143V4.59429C11.0715 4.11429 10.923 3.73143 10.6258 3.44571C10.3287 3.14857 9.94011 3 9.46011 3H8.56868C8.08868 3 7.70011 3.14857 7.40297 3.44571C7.10582 3.73143 6.95725 4.11429 6.95725 4.59429V8.50286C6.95725 8.8 7.02582 9.03429 7.16297 9.20571C7.31154 9.37714 7.47725 9.50857 7.66011 9.6C7.84297 9.68 7.98582 9.73714 8.08868 9.77143L9.44297 10.3714V13.4571C9.44297 13.5143 9.41439 13.5429 9.35725 13.5429H8.67154C8.61439 13.5429 8.58582 13.5143 8.58582 13.4571ZM12.0715 4.59429V3H16.7858V4.59429H15.2429V15H13.6144V4.59429H12.0715ZM5.51153 14.5714C5.80867 14.2743 5.95724 13.8857 5.95724 13.4057V8.17714H3.79724L3.6601 9.77143H4.32867V13.32C4.32867 13.3771 4.3001 13.4057 4.24295 13.4057H3.21438C3.15724 13.4057 3.12867 13.3771 3.12867 13.32V4.68C3.12867 4.62286 3.15724 4.59429 3.21438 4.59429H4.24295C4.3001 4.59429 4.32867 4.62286 4.32867 4.68V7.33714H5.95724V4.59429C5.95724 4.11429 5.80867 3.73143 5.51153 3.44571C5.21438 3.14857 4.82581 3 4.34581 3H3.11153C2.63153 3 2.24295 3.14857 1.94581 3.44571C1.64867 3.73143 1.5001 4.11429 1.5001 4.59429V13.4057C1.5001 13.8857 1.64867 14.2743 1.94581 14.5714C2.24295 14.8571 2.63153 15 3.11153 15H4.34581C4.82581 15 5.21438 14.8571 5.51153 14.5714Z"
|
||||
:fill="darkColor"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
<script>
|
||||
import Base from '../base';
|
||||
export default {
|
||||
name: 'IconReports',
|
||||
extends: Base,
|
||||
};
|
||||
</script>
|
@ -1,6 +1,6 @@
|
||||
import { t } from 'fyo';
|
||||
import { fyo } from '../initFyo';
|
||||
import { SidebarConfig } from './types';
|
||||
import { SidebarConfig, SidebarRoot } from './types';
|
||||
|
||||
export function getSidebarConfig(): SidebarConfig {
|
||||
const sideBar = getCompleteSidebar();
|
||||
@ -25,6 +25,34 @@ export function getFilteredSidebar(sideBar: SidebarConfig): SidebarConfig {
|
||||
});
|
||||
}
|
||||
|
||||
function getRegionalSidebar(): SidebarRoot[] {
|
||||
const hasGstin = !!fyo.singles?.AccountingSettings?.gstin;
|
||||
if (!hasGstin) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
label: 'GST',
|
||||
name: 'gst',
|
||||
icon: 'gst',
|
||||
route: '/report/GSTR1',
|
||||
items: [
|
||||
{
|
||||
label: t`GSTR1`,
|
||||
name: 'gstr1',
|
||||
route: '/report/GSTR1',
|
||||
},
|
||||
{
|
||||
label: t`GSTR2`,
|
||||
name: 'gstr2',
|
||||
route: '/report/GSTR2',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function getCompleteSidebar(): SidebarConfig {
|
||||
return [
|
||||
{
|
||||
@ -158,20 +186,9 @@ function getCompleteSidebar(): SidebarConfig {
|
||||
name: 'trial-balance',
|
||||
route: '/report/TrialBalance',
|
||||
},
|
||||
{
|
||||
label: t`GSTR1`,
|
||||
name: 'gstr1',
|
||||
route: '/report/GSTR1',
|
||||
hidden: () => fyo.singles.AccountingSettings!.country !== 'India',
|
||||
},
|
||||
{
|
||||
label: t`GSTR2`,
|
||||
name: 'gstr2',
|
||||
route: '/report/GSTR2',
|
||||
hidden: () => fyo.singles.AccountingSettings!.country !== 'India',
|
||||
},
|
||||
],
|
||||
},
|
||||
...getRegionalSidebar(),
|
||||
{
|
||||
label: t`Setup`,
|
||||
name: t`setup`,
|
||||
|
Loading…
Reference in New Issue
Block a user