----Update Field
Update Vreport_rpt_DefaultList set RefReport='XXXXXXXXXX' Where DefaultModule='TRS5' and DefaultNo=30

Update Vreport_rpt_DefaultList set LayoutCode=1 where DefaultModule='TRS5' and DefaultNo=28
Update Vreport_rpt_DefaultList set Label2Caption='Group By [Class Type]' where DefaultModule='TRS5' and DefaultNo=28
Update Vreport_rpt_DefaultList set Label3Caption='Group By [Class]' where DefaultModule='TRS5' and DefaultNo=28
Update Vreport_rpt_DefaultList set TotalTable=5 where DefaultModule='TRS5' and DefaultNo=28

---Insert record
Delete from Vreport_mt_LoadCombo where ComboSelect=62 and ComboIndex=1

Insert into Vreport_mt_LoadCombo( ComboSelect, ComboIndex, List2Index, BillType, LoopTableName, LoopFieldCode, LoopFieldName, LComboListIndex, DisplayNo, LinkCombo, 
LinkComboIndex, LinkList2Index, DefaultCombo, ShowLabel, ShowCombo, ShowLabelIndex, ShowComboIndex, ShowSqlFormula, SqlFormulaTable,SqlFormulaField, SymbolFormula, ExecuteFormula, DataType, RptFormulas, RptFormulasName, ShowTitleHeader, RunTemp, TempType)
values(62.000000,1.000000,0,'','Vstk_mt_ClassType','ClassTypeCode','ClassTypeName',0,6.000000,'True',2,'','','True','True','','','True','Vstk_mt_ClassType','ClassTypeCode','=','','Numeric',7,'RGroupBy4','True','False','')

Delete from Vreport_mt_ComboClick where ComboSelect=62

Insert into Vreport_mt_ComboClick(ComboSelect, LComboIndex, LList2Index, LLComboListIndex, LLoopTableName, LLoopFieldCode, LLoopFieldName, ComboListIndex, 
LDefaultCombo, DataType1, ShowSqlFormula1, SqlFormulaTable1, SqlFormulaField1, SymbolFormula1, ExecuteFormula1, BillType1)	
values(62.000000,2.000000,1,'','Vstk_mt_Class','ClassCode','ClassName',0,'All','Text','True','','','','','')					

---UPDATE PHYSICAL COUNT
Update Vreport_rpt_DefaultList set ExecuteTrsDate='True' where DefaultModule='TRS5' AND DefaultNo=25
Update Vreport_rpt_DefaultList set TempRptFormula2=6 where DefaultModule='TRS5' AND DefaultNo=25
Update Vreport_rpt_DefaultList set TempTrsDate2='RGroupBy3' where DefaultModule='TRS5' AND DefaultNo=25

---Insert physical count field
Delete from Vreport_rpt_DefaultField where DefaultModule='TRS5' and DefaultNo=25

Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS5',25.000000,1.000000,'Item Code','ItemCode','Text','Vstk_trs_PhysicalCount','Vstk_mt_Item','ItemCode','ItemName','',8.000000,'VPOS','','','','OOXXXXXXXX')

Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS5',25.000000,2.000000,'Creditor Code','DefCreditorCode','Text','Vstk_mt_Item','Vacc_mt_Creditor','CreditorCode','CreditorName','',8.000000,'VPOS','','','','OOXXXXXXXX')

Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS5',25.000000,3.000000,'UOM Code','BasedMeasure','Text','Vstk_mt_Item','Vstk_mt_UOM','UOMCode','UOMName','',8.000000,'VPOS','','','','OOXXXXXXXX')


----Insert account analysis
Delete from Vreport_rpt_DefaultField where DefaultModule='TRS1' and DefaultNo=6

Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS1',6.000000,1.000000,'Trs Date','TrsDate','Date','Vstk_trs_bills','','','','',8.000000,'VSTK','','','','OOXXXXXXXX')


Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS1',6.000000,2.000000,'Agent Code','AgentCode','Text','Vstk_trs_bills','Vpay_mt_Staff','StaffCode','StaffName','',8.000000,'VSTK','','','','OOXXXXXXXX')

Insert into Vreport_rpt_DefaultField(DefaultModule, DefaultNo, DisplayNo, DisplayName, DefaultName, DataType, RptTableName, SearchTableName, SearchDefaultCode, 
SearchDefaultName, SearchBillCode, FlexiCol, ReportType, DefaultSeaView, BillType1, BillType1Name, RefReport1)
values('TRS1',6.000000,3.000000,'Location Code','LocationCode','Text','Vstk_trs_bills','Vstk_mt_location','LocationCode','LocationName','',8.000000,'VSTK','','','','OOXXXXXXXX')

