new_itemMaster:GWM
This commit is contained in:
parent
bb8a343e04
commit
7e46320941
@ -311,7 +311,7 @@ sequelize.query("select a.losid,a.entityid,a.FY,a.st_type as st_type_id, b.state
|
|||||||
}
|
}
|
||||||
}); // end of foreach
|
}); // end of foreach
|
||||||
|
|
||||||
var query = "Select a.entity_id,x.id as statement_id,x.statement as statement,y.id as section_id,y.section as section,w.subsection as subsection_id,z.subsection as subsection , z.itemtext as subsection_itemtext ,a.itemid,w.itemtext as items,w.formula,w.is_calculated,w.is_summary,w.pvtltd,w.pvtltd_is_calculated,w.pvtltd_formula,w.llp,w.others,a.st_type as Y1_st_type,a.fy as Y1,a.id as Y1_id ,a.is_editable as Y1_is_editable,a.value as Y1_value "+ select_items +",v.remarks , v.id as remarks_id FROM financials a LEFT JOIN ( SELECT id,entity_id,itemid,remarks FROM fin_remarks WHERE is_active = 1) v ON a.entity_id = v.entity_id and a.itemid = v.itemid JOIN ( SELECT id,itemtext,statement,section,subsection,formula,is_calculated,is_summary,pvtltd,llp,others,pvtltd_is_calculated,pvtltd_formula FROM itemsmaster ) w ON a.itemid = w.id JOIN ( SELECT id, statement FROM statementsmaster ) x ON w.statement = x.id JOIN ( SELECT id, section FROM sectionsmaster ) y ON w.section = y.id LEFT JOIN ( SELECT id, subsection , itemtext FROM subsectionsmaster ) z ON w.subsection = z.id "+ sub_query +"WHERE a.fy = '"+year_1+"' and a.entity_id = "+id+" and a.is_active = 1 order by w.statement asc , w.section asc , w.subsection asc";
|
var query = "Select a.entity_id,x.id as statement_id,x.statement as statement,y.id as section_id,y.section as section,w.subsection as subsection_id,z.subsection as subsection , z.itemtext as subsection_itemtext ,a.itemid,w.itemtext as items,w.formula,w.is_calculated,w.is_summary,w.pvtltd,w.llp,w.others,a.st_type as Y1_st_type,a.fy as Y1,a.id as Y1_id ,a.is_editable as Y1_is_editable,a.value as Y1_value "+ select_items +",v.remarks , v.id as remarks_id FROM financials a LEFT JOIN ( SELECT id,entity_id,itemid,remarks FROM fin_remarks WHERE is_active = 1) v ON a.entity_id = v.entity_id and a.itemid = v.itemid JOIN ( SELECT id,itemtext,statement,section,subsection,formula,is_calculated,is_summary,pvtltd,llp,others FROM new_itemsmaster ) w ON a.itemid = w.id JOIN ( SELECT id, statement FROM statementsmaster ) x ON w.statement = x.id JOIN ( SELECT id, section FROM sectionsmaster ) y ON w.section = y.id LEFT JOIN ( SELECT id, subsection , itemtext FROM subsectionsmaster ) z ON w.subsection = z.id "+ sub_query +"WHERE a.fy = '"+year_1+"' and a.entity_id = "+id+" and a.is_active = 1 order by w.statement asc , w.section asc , w.subsection asc";
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
sequelize.query(query).then(summary => {
|
sequelize.query(query).then(summary => {
|
||||||
// is_summary filter from fin_summary data
|
// is_summary filter from fin_summary data
|
||||||
|
|||||||
@ -30,8 +30,8 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
subsection: { type: DataTypes.INTEGER },
|
subsection: { type: DataTypes.INTEGER },
|
||||||
itemtext: { type: DataTypes.STRING },
|
itemtext: { type: DataTypes.STRING },
|
||||||
pvtltditemkey: { type: DataTypes.STRING },
|
pvtltditemkey: { type: DataTypes.STRING },
|
||||||
pvtltd_is_calculated: { type: DataTypes.INTEGER },
|
// pvtltd_is_calculated: { type: DataTypes.INTEGER },
|
||||||
pvtltd_formula: { type: DataTypes.INTEGER },
|
// pvtltd_formula: { type: DataTypes.INTEGER },
|
||||||
is_active: { type: DataTypes.INTEGER },
|
is_active: { type: DataTypes.INTEGER },
|
||||||
pvtltd: { type: DataTypes.INTEGER },
|
pvtltd: { type: DataTypes.INTEGER },
|
||||||
llp: { type: DataTypes.INTEGER },
|
llp: { type: DataTypes.INTEGER },
|
||||||
@ -45,7 +45,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
sequelize,
|
sequelize,
|
||||||
tableName: 'itemsmaster',
|
tableName: 'new_itemsmaster',
|
||||||
modelName: 'Itemsmaster',
|
modelName: 'Itemsmaster',
|
||||||
createdAt: 'createdon',
|
createdAt: 'createdon',
|
||||||
updatedAt: 'updatedon',
|
updatedAt: 'updatedon',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user