mirror of
https://github.com/frappe/books.git
synced 2025-01-08 17:24:05 +00:00
Fixed the fp value to match the last date of range
This commit is contained in:
parent
228e069096
commit
8c0e5d4e75
@ -60,7 +60,7 @@ const IGST = {
|
||||
};
|
||||
|
||||
|
||||
export async function generateGstr1Json(report, transferType) {
|
||||
export async function generateGstr1Json(report, { transferType, toDate }) {
|
||||
const printSettings = await frappe.getSingle('PrintSettings');
|
||||
// TODO: if self gstin is not provided throw an error message
|
||||
// telling that that report cannot be exported if company gst details are not configured
|
||||
@ -75,8 +75,7 @@ export async function generateGstr1Json(report, transferType) {
|
||||
// fp is the the MMYYYY for the last month of the report
|
||||
// for example if you are extracting report for 1st July 2020 to 31st September 2020 then
|
||||
// fb = 092020
|
||||
// TODO: fix this value to match the last date of range
|
||||
fp: DateTime.local().toFormat('MMyyyy'),
|
||||
fp: DateTime.fromISO(toDate).toFormat('MMyyyy'),
|
||||
gstin: printSettings.gstin,
|
||||
};
|
||||
|
||||
|
@ -43,8 +43,8 @@ export default {
|
||||
{
|
||||
label: 'Export as JSON',
|
||||
type: 'primary',
|
||||
action: async (report, transferType) => {
|
||||
generateGstr1Json(report, transferType);
|
||||
action: async (report, filters) => {
|
||||
generateGstr1Json(report, filters);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -4,7 +4,7 @@
|
||||
<h1 slot="title" class="text-2xl font-bold">{{ report.title }}</h1>
|
||||
<template slot="actions">
|
||||
<Button
|
||||
@click="link.action(reportData, filters.transferType)"
|
||||
@click="link.action(reportData, filters)"
|
||||
v-for="link of report.linkFields"
|
||||
:key="link.label"
|
||||
type="primary"
|
||||
|
Loading…
Reference in New Issue
Block a user