mirror of
https://github.com/frappe/books.git
synced 2025-01-09 09:50:27 +00:00
Fixed the half-yearly filter
This commit is contained in:
parent
55832f19ad
commit
d091bf1347
@ -192,10 +192,13 @@ function getPeriodKey(date, periodicity) {
|
|||||||
}[quarter];
|
}[quarter];
|
||||||
},
|
},
|
||||||
'Half Yearly': () => {
|
'Half Yearly': () => {
|
||||||
return {
|
if (month > 3) {
|
||||||
1: `Apr ${year} - Sep ${year}`,
|
return {
|
||||||
2: `Oct ${year} - Mar ${year}`,
|
1: `Apr ${year} - Sep ${year}`,
|
||||||
}[[2, 3].includes(quarter) ? 1 : 2];
|
2: `Oct ${year} - Mar ${year + 1}`,
|
||||||
|
}[[2, 3].includes(quarter) ? 1 : 2];
|
||||||
|
}
|
||||||
|
return `Oct ${year - 1} - Mar ${year}`;
|
||||||
},
|
},
|
||||||
Yearly: () => {
|
Yearly: () => {
|
||||||
if (month > 3) {
|
if (month > 3) {
|
||||||
|
@ -52,6 +52,7 @@ export default {
|
|||||||
label: name,
|
label: name,
|
||||||
fieldname: name,
|
fieldname: name,
|
||||||
fieldtype: 'Currency',
|
fieldtype: 'Currency',
|
||||||
|
width: 1
|
||||||
}));
|
}));
|
||||||
|
|
||||||
columns.push(...columnDefs);
|
columns.push(...columnDefs);
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
readonly
|
readonly
|
||||||
@focus="!readonly ? togglePopover() : null"
|
@focus="!readonly ? togglePopover() : null"
|
||||||
@blur="togglePopover(false)"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:content="{ togglePopover }">
|
<template v-slot:content="{ togglePopover }">
|
||||||
|
Loading…
Reference in New Issue
Block a user