From ba97f253184b7e36f6731ea3724d058a5027a7ad Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Tue, 9 May 2023 12:16:26 +0530 Subject: [PATCH] fix: account report end date increment by 1 - TemplateBuilder prevent reset if doc is not saved --- reports/AccountReport.ts | 2 +- src/pages/TemplateBuilder/TemplateBuilder.vue | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/reports/AccountReport.ts b/reports/AccountReport.ts index 530a750f..0ead699d 100644 --- a/reports/AccountReport.ts +++ b/reports/AccountReport.ts @@ -286,7 +286,7 @@ export abstract class AccountReport extends LedgerReport { this.fromYear!, this.fyo ); - toDate = fy.toDate; + toDate = DateTime.fromISO(fy.toDate).plus({ days: 1 }).toISODate(); fromDate = fy.fromDate; } diff --git a/src/pages/TemplateBuilder/TemplateBuilder.vue b/src/pages/TemplateBuilder/TemplateBuilder.vue index 1bf66a77..faa0ac48 100644 --- a/src/pages/TemplateBuilder/TemplateBuilder.vue +++ b/src/pages/TemplateBuilder/TemplateBuilder.vue @@ -324,6 +324,10 @@ export default defineComponent({ if (this.editMode) { this.disableEditMode(); } + + if (this.doc?.dirty) { + return; + } this.reset(); }, methods: {