view api issue : GWM

This commit is contained in:
Gowtham M 2026-01-28 15:21:02 +05:30
parent 11386954b0
commit 9b5643882c

View File

@ -610,7 +610,7 @@ exports.viewSubmissionDetails = async (req, res) => {
],
});
let plainData = data.get({ plain: true });
let plainData = data.get({ plain: true });
plainData.products = plainData.products.map(p => {
const format = v => Number(v || 0).toFixed(2);
return {
@ -622,7 +622,7 @@ exports.viewSubmissionDetails = async (req, res) => {
const quarter_window = await QuarterlyWindowsConfiguration.findOne({
attributes : ['survey_name','year','quarter','start_date','end_date','grace_periods_days'],
where: { is_active: true , year, quarter }
where: { is_active: true , year : data.year , quarter : data.quarter }
});
res.status(200).json({ status: "success", data: plainData, quarter_periods , quarter_window });