FIN_Summary_issue:GWM
This commit is contained in:
parent
d0028430e0
commit
6f4f7c8243
@ -91,8 +91,8 @@ exports.MenuList = (req, res) => {
|
||||
exports.FinantialsSummary = async (req, res) => {
|
||||
const id = req.query.entityid
|
||||
|
||||
sequelize.query("select a.losid,a.entityid,a.Y1,a.Y2,a.Y3,a.Y1_st_type as Y1_st_type_id, b.statement_name as Y1_st_type_name,a.Y2_st_type as Y2_st_type_id, c.statement_name as Y2_st_type_name,a.Y3_st_type as Y3_st_type_id, d.statement_name as Y3_st_type_name FROM entity_fin_years a JOIN (SELECT id,statement_name FROM statement_type) b ON a.Y1_st_type = b.id JOIN (SELECT id,statement_name FROM statement_type) c ON a.Y2_st_type = c.id JOIN (SELECT id,statement_name FROM statement_type) d ON a.Y3_st_type = d.id WHERE entityid ="+id)
|
||||
.then(data => {
|
||||
sequelize.query("select a.losid,a.entityid,a.Y1,a.Y2,a.Y3,a.Y1_st_type as Y1_st_type_id, b.statement_name as Y1_st_type_name,a.Y2_st_type as Y2_st_type_id, c.statement_name as Y2_st_type_name,a.Y3_st_type as Y3_st_type_id, d.statement_name as Y3_st_type_name FROM entity_fin_years a LEFT JOIN (SELECT id,statement_name FROM statement_type) b ON a.Y1_st_type = b.id JOIN (SELECT id,statement_name FROM statement_type) c ON a.Y2_st_type = c.id LEFT JOIN (SELECT id,statement_name FROM statement_type) d ON a.Y3_st_type = d.id WHERE entityid ="+id)
|
||||
.then(data => {
|
||||
|
||||
const Year_1 = data[0][0].Y1;
|
||||
const Year_2 = data[0][0].Y2;
|
||||
@ -101,7 +101,7 @@ exports.FinantialsSummary = async (req, res) => {
|
||||
const current_year = new Date().getFullYear();
|
||||
const current_month = new Date().getMonth() + 1;
|
||||
let add_new_FY_flag;
|
||||
if(Year_1 == current_year && 3 < current_month)
|
||||
if(Year_1 >= current_year && 3 < current_month)
|
||||
{
|
||||
add_new_FY_flag = {show_add_finyear_button:0};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user