
--
-- Final view structure for view `staff_termination_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `staff_termination_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `staff_termination_dtl_vw` AS select `emp_termination_dtl`.`TERMINATION_ID` AS `TERMINATION_ID`,`emp_termination_dtl`.`EMP_ID` AS `EMP_ID`,`emp_termination_dtl`.`EMP_ID` AS `EMPID`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPID`)) AS `EMP_NM`,`emp_termination_dtl`.`EMP_TERMINATION_ID` AS `EMP_TERMINATION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_termination_dtl`.`EMP_TERMINATION_ID`)) AS `EMP_TERMINATION`,`emp_termination_dtl`.`TERMINATION_DATE` AS `TERMINATION_DATE`,`emp_termination_dtl`.`RESIGNED_ON` AS `RESIGNED_ON`,`emp_termination_dtl`.`RESIGNATION_ACCEPTED_ON` AS `RESIGNATION_ACCEPTED_ON`,`emp_termination_dtl`.`RETENTION_DATE` AS `RETENTION_DATE`,`emp_termination_dtl`.`IS_DELETED` AS `IS_DELETED`,`emp_termination_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_termination_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_termination_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_termination_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_termination_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`emp_termination_dtl`.`CREATED_ON` AS `CREATED_ON`,`emp_termination_dtl`.`UPDATED_ON` AS `UPDATED_ON` from `emp_termination_dtl` */;

--
-- Final view structure for view `staff_work_experience_vw`
--

/*!50001 DROP VIEW IF EXISTS `staff_work_experience_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `staff_work_experience_vw` AS select `emp_work_experience`.`EMP_WORK_EXPERIENCE_ID` AS `EMP_WORK_EXPERIENCE_ID`,`emp_work_experience`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_work_experience`.`EEXP_SEQNO` AS `EEXP_SEQNO`,`emp_work_experience`.`EEXP_EMPLOYER` AS `EEXP_EMPLOYER`,`emp_work_experience`.`JOB_TITLE_ID` AS `JOB_TITLE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_experience`.`JOB_TITLE_ID`)) AS `JOB_TITLE`,`emp_work_experience`.`JOBTITLE` AS `JOBTITLE`,cast(`emp_work_experience`.`EEXP_FROM_DATE` as date) AS `EEXP_FROM_DATE`,cast(`emp_work_experience`.`EEXP_TO_DATE` as date) AS `EEXP_TO_DATE`,`emp_work_experience`.`EEXP_COMMENTS` AS `EEXP_COMMENTS`,if((`emp_work_experience`.`EEXP_INTERNAL` = 1),'Yes','No') AS `EEXP_INTERNAL`,`emp_work_experience`.`EMP_ID` AS `EMP_ID`,`emp_work_experience`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_work_experience`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_work_experience`.`CREATED_ON` AS `CREATED_ON`,`emp_work_experience`.`UPDATED_ON` AS `UPDATED_ON`,`emp_work_experience`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_work_experience`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_work_experience`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_work_experience`.`IS_DELETED` AS `IS_DELETED` from `emp_work_experience` */;

--
-- Final view structure for view `staff_work_shift_vw`
--

/*!50001 DROP VIEW IF EXISTS `staff_work_shift_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `staff_work_shift_vw` AS select `emp_work_shift`.`EMP_WORK_SHIFT_ID` AS `EMP_WORK_SHIFT_ID`,`emp_work_shift`.`WORK_SHIFT_ID` AS `WORK_SHIFT_ID`,(select `shift_mst`.`NAME` from `shift_mst` where (`shift_mst`.`SHIFT_ID` = `emp_work_shift`.`WORK_SHIFT_ID`)) AS `WORK_SHIFT`,`emp_work_shift`.`EMP_NUMBER` AS `EMP_NUMBER`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `emp_work_shift`.`EMP_NUMBER`)) AS `EMP_NAME`,`emp_work_shift`.`PREV_WORK_SHIFT_ID` AS `PREV_WORK_SHIFT_ID`,`emp_work_shift`.`NEXT_WORK_SHIFT_ID` AS `NEXT_WORK_SHIFT_ID`,`emp_work_shift`.`EFFECTIVE_ON` AS `EFFECTIVE_ON`,`emp_work_shift`.`EFFECTIVE_TO` AS `EFFECTIVE_TO`,`emp_work_shift`.`CURR_PUNCH_IN_TIME` AS `CURR_PUNCH_IN_TIME`,`emp_work_shift`.`SHIFT_TYPE_ID` AS `SHIFT_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_shift`.`SHIFT_TYPE_ID`)) AS `SHIFT_TYPE`,`emp_work_shift`.`NO_OF_DAYS` AS `NO_OF_DAYS`,`emp_work_shift`.`START_DATE` AS `START_DATE`,`emp_work_shift`.`END_DATE` AS `END_DATE`,`emp_work_shift`.`SHIFT_CALENDAR_ID` AS `SHIFT_CALENDAR_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_shift`.`SHIFT_CALENDAR_ID`)) AS `SHIFT_CALENDAR`,`emp_work_shift`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_work_shift`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_work_shift`.`CREATED_ON` AS `CREATED_ON`,`emp_work_shift`.`UPDATED_ON` AS `UPDATED_ON`,`emp_work_shift`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_work_shift`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_work_shift`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_work_shift`.`IS_DELETED` AS `IS_DELETED` from `emp_work_shift` */;

--
-- Final view structure for view `standard_management_vw`
--

/*!50001 DROP VIEW IF EXISTS `standard_management_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `standard_management_vw` AS select `standard_management`.`STD_ID` AS `STD_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `standard_management`.`DEPARTMENT`)) AS `DEPARTMENT`,`standard_management`.`DEPARTMENT` AS `DEPARTMENT_ID`,(select `syllabus_management`.`SYLLABUS` from `syllabus_management` where (`syllabus_management`.`SYLLABUS_ID` = `standard_management`.`SYLLABUS`)) AS `SYLLABUS`,`standard_management`.`SYLLABUS` AS `SYLLABUS_ID`,`standard_management`.`STANDARD` AS `STANDARD`,`standard_management`.`STD_SORT_NUMBER` AS `STD_SORT_NUMBER`,if((`standard_management`.`ENABLED` = 0),'NO','YES') AS `ENABLED`,`standard_management`.`OA_ID` AS `OA_ID`,`standard_management`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`standard_management`.`USER_ID` AS `USER_ID`,`standard_management`.`DELETED` AS `DELETED`,`standard_management`.`CREATED_ON` AS `CREATED_ON`,`standard_management`.`UPDATED_ON` AS `UPDATED_ON`,`standard_management`.`CREATED_BY` AS `CREATED_BY`,`standard_management`.`UPDATED_BY` AS `UPDATED_BY` from `standard_management` */;

--
-- Final view structure for view `startup_capital_vw`
--

/*!50001 DROP VIEW IF EXISTS `startup_capital_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `startup_capital_vw` AS select `startup_capital`.`ID` AS `ID`,`startup_capital`.`CAPITAL_AMOUNT` AS `CAPITAL_AMOUNT`,`startup_capital`.`OA_ID` AS `OA_ID`,`startup_capital`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`startup_capital`.`USER_ID` AS `USER_ID`,`startup_capital`.`IS_DELETED` AS `IS_DELETED`,`startup_capital`.`CREATED_BY` AS `CREATED_BY`,`startup_capital`.`CREATED_ON` AS `CREATED_ON`,`startup_capital`.`UPDATED_BY` AS `UPDATED_BY`,`startup_capital`.`UPDATED_ON` AS `UPDATED_ON` from `startup_capital` */;

--
-- Final view structure for view `state_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `state_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `state_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 62) */;

--
-- Final view structure for view `status_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `status_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `status_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 221) */;

--
-- Final view structure for view `street_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `street_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `street_mst_vw` AS select `street_mst`.`STREET_ID` AS `STREET_ID`,`street_mst`.`STREET_NAME` AS `STREET_NAME`,`street_mst`.`LOCALITY` AS `LOCALITY`,`street_mst`.`AREA` AS `AREA`,`street_mst`.`TOWN_ID` AS `TOWN_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`TOWN_ID` = `location_mst`.`LOC_ID`)) AS `TOWN`,`street_mst`.`CENSUS_BLOCK_ID` AS `CENSUS_BLOCK_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`CENSUS_BLOCK_ID` = `location_mst`.`LOC_ID`)) AS `CENSUS_BLOCK`,`street_mst`.`CITY_ID` AS `CITY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`CITY_ID` = `location_mst`.`LOC_ID`)) AS `CITY`,`street_mst`.`TERRITORY_ID` AS `TERRITORY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`TERRITORY_ID` = `location_mst`.`LOC_ID`)) AS `TERRITORY`,`street_mst`.`DISTRICT_ID` AS `DISTRICT_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`DISTRICT_ID` = `location_mst`.`LOC_ID`)) AS `DISTRICT`,`street_mst`.`POSTCODE_ID` AS `POSTCODE_ID`,`street_mst`.`COURIER_ROUTE_DESC` AS `COURIER_ROUTE_DESC`,`street_mst`.`COUNTRY_ID` AS `COUNTRY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`street_mst`.`COUNTRY_ID` = `location_mst`.`LOC_ID`)) AS `COUNTRY`,`street_mst`.`IS_DELETED` AS `IS_DELETED`,`street_mst`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`street_mst`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`street_mst`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`street_mst`.`CREATEDBY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`street_mst`.`UPDATEDBY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`street_mst`.`CREATEDON` AS `CreatedOn`,`street_mst`.`UPDATEDON` AS `UpdatedOn` from `street_mst` */;

--
-- Final view structure for view `student_bank_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_bank_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_bank_dtl_vw` AS select `bank_dtl`.`BANK_ID` AS `BANK_ID`,`bank_dtl`.`EMP_ID` AS `EMPID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPID`)) AS `EMP_NAME`,`bank_dtl`.`BANK_NM` AS `BANK_NM`,`bank_dtl`.`BRANCH_NM` AS `BRANCH_NM`,`bank_dtl`.`BRANCH_ADDRESS` AS `BRANCH_ADDRESS`,`bank_dtl`.`IFSC_CD` AS `IFSC_CD`,`bank_dtl`.`SORT_CD` AS `SORT_CD`,`bank_dtl`.`ACCOUNT_NO` AS `ACCOUNT_NO`,`bank_dtl`.`ACCOUNT_HOLDER_NM` AS `ACCOUNT_HOLDER_NM`,`bank_dtl`.`EMP_ID` AS `EMP_ID`,`bank_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`bank_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_NM`,`bank_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`bank_dtl`.`IS_DELETED` AS `IS_DELETED`,`bank_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`bank_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`bank_dtl`.`CREATEDON` AS `CREATED_ON`,`bank_dtl`.`UPDATEDON` AS `UPDATED_ON` from `bank_dtl` */;

--
-- Final view structure for view `student_class_sec_map_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_class_sec_map_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_class_sec_map_vw` AS select `student_class_sec_map`.`SCSM_ID` AS `SCSM_ID`,`student_class_sec_map`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_class_sec_map`.`CLASS_ID`)) AS `CLASS`,(select group_concat(`student_class_sec_map_details`.`SECTION_ID` separator ',') from `student_class_sec_map_details` where (`student_class_sec_map`.`SCSM_ID` = `student_class_sec_map_details`.`SCSM_ID`)) AS `SECTION_IDS`,(select group_concat(`im`.`MSTR_NM` separator ',') from `independent_mst` `im` where find_in_set(`im`.`MSTR_ID`,`SECTION_IDS`)) AS `SECTIONS`,`student_class_sec_map`.`IS_DELETED` AS `IS_DELETED`,`student_class_sec_map`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `student_class_sec_map`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `student_class_sec_map`.`OA_ID`)) AS `OA_NM`,`student_class_sec_map`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `student_class_sec_map`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `student_class_sec_map`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`student_class_sec_map`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_class_sec_map`.`USER_ID`)) AS `USER_NM`,`student_class_sec_map`.`CREATED_BY` AS `CREATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_class_sec_map`.`CREATED_BY`)) AS `CREATED_BY_USER_NAME`,`student_class_sec_map`.`CREATED_ON` AS `CREATED_ON`,`student_class_sec_map`.`UPDATED_BY` AS `UPDATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_class_sec_map`.`UPDATED_BY`)) AS `UPDATED_BY_USER_NAME`,`student_class_sec_map`.`UPDATED_ON` AS `UPDATED_ON` from `student_class_sec_map` where (`student_class_sec_map`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `student_contact_address_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_contact_address_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_contact_address_vw` AS select `contact_address`.`CNTCT_ADD_ID` AS `CNTCT_ADD_ID`,`contact_address`.`CNTCT_ID` AS `CNTCT_NM_ID`,(select `contact_mst_vw`.`EMP_NAME` from `contact_mst_vw` where (`contact_mst_vw`.`CNTCT_ID` = `CNTCT_NM_ID`)) AS `CNTCT_FULL_NM`,`contact_address`.`CNTCT_ADD_TYPE_ID` AS `CNTCT_ADD_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `contact_address`.`CNTCT_ADD_TYPE_ID`)) AS `CNTCT_ADD_TYPE_NM`,`contact_address`.`ADD_ID` AS `CONTACT_ADD_ID`,(select `address_mst`.`HOUSE_NAME` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `HOUSE_NAME`,(select `address_mst`.`HOUSE_NO` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `HOUSE_NO`,(select `address_mst`.`ADDRESS_LINE_1` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_LINE_1`,(select `street_mst`.`STREET_NAME` from `street_mst` where (`street_mst`.`STREET_ID` = `ADD_LINE_1`)) AS `STREET_NM`,(select `address_mst`.`ADDRESS_LINE_2` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_LINE_2`,(select `street_mst`.`LOCALITY` from `street_mst` where (`street_mst`.`STREET_ID` = `ADD_LINE_2`)) AS `AREAR`,(select `address_mst`.`ADDRESS_LINE_3` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_LINE_3`,(select `street_mst`.`AREA` from `street_mst` where (`street_mst`.`STREET_ID` = `ADD_LINE_3`)) AS `TOWN`,(select `address_mst`.`ADDRESS_LINE_4` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_LINE_4`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `ADD_LINE_4`)) AS `ADDD_LINE_4`,(select `address_mst`.`ADDRESS_LINE_5` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_LINE_5`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `ADD_LINE_5`)) AS `ADDD_LINE_5`,(select `address_mst`.`CITY` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `CITY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `CITY_ID`)) AS `CITY_NM`,(select `address_mst`.`DISTRICT_ID` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_DISTRICT_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `ADD_DISTRICT_ID`)) AS `DISTRICT`,(select `address_mst`.`COUNTY_ID` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `ADD_COUNTY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `ADD_COUNTY_ID`)) AS `COUNTY`,(select `address_mst`.`COUNTRY` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `COUNTRY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `COUNTRY_ID`)) AS `COUNTRY_NM`,(select `address_mst`.`POSTCODE` from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `POSTCODEID`,(select `postcode_mst`.`POSTCODE` from `postcode_mst` where (`postcode_mst`.`POSTCODE_ID` = `POSTCODEID`)) AS `ADD_POSTCODE`,(select concat(if((isnull(`address_mst`.`HOUSE_NAME`) or (`address_mst`.`HOUSE_NAME` = '')),'',concat(`address_mst`.`HOUSE_NAME`,', ')),if((isnull(`address_mst`.`HOUSE_NO`) or (`address_mst`.`HOUSE_NO` = '')),'',concat(`address_mst`.`HOUSE_NO`,', ')),if((isnull(`STREET_NM`) or (`STREET_NM` = '')),'',concat(`STREET_NM`,', ')),if((isnull(`AREAR`) or (`AREAR` = '')),'',concat(`AREAR`,', ')),if((isnull(`TOWN`) or (`TOWN` = '')),'',concat(`TOWN`,', ')),if((isnull(`ADDD_LINE_4`) or (`ADDD_LINE_4` = '')),'',concat(`ADDD_LINE_4`,', ')),if((isnull(`ADDD_LINE_5`) or (`ADDD_LINE_5` = '')),'',concat(`ADDD_LINE_5`,', ')),if((isnull(`CITY_NM`) or (`CITY_NM` = '')),'',concat(`CITY_NM`,', ')),if((isnull(`DISTRICT`) or (`DISTRICT` = '')),'',concat(`DISTRICT`,', ')),if((isnull(`COUNTY`) or (`COUNTY` = '')),'',concat(`COUNTY`,', ')),if((isnull(`COUNTRY_NM`) or (`COUNTRY_NM` = '')),'',concat(`COUNTRY_NM`,', ')),if((isnull(`ADD_POSTCODE`) or (`ADD_POSTCODE` = '')),'',`ADD_POSTCODE`)) from `address_mst` where (`address_mst`.`ADDRESS_ID` = `CONTACT_ADD_ID`)) AS `FULL_ADDRESS`,if((`contact_address`.`IS_CURRENT_ADD` = 1),'Yes','No') AS `Is_Current_Add`,if((`contact_address`.`IS_PRIMARY_ADD` = 1),'Yes','No') AS `Is_Primary_Add`,`contact_address`.`CNTCT_ID` AS `CNTCT_ID`,`contact_address`.`OA_ID_ORIGINATED` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`contact_address`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`contact_address`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`contact_address`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`CREATED_BY_USER_ID` = `user_mst`.`USER_ID`)) AS `CREATED_BY_USER_NAME`,`contact_address`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`UPDATED_BY_USER_ID` = `user_mst`.`USER_ID`)) AS `UPDATED_BY_USER_NAME`,`contact_address`.`CREATED_ON` AS `Created_On`,`contact_address`.`UPDATED_ON` AS `Updated_On`,`contact_address`.`IS_DELETED` AS `IS_DELETED` from `contact_address` */;

--
-- Final view structure for view `student_contact_emails_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_contact_emails_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_contact_emails_vw` AS select `oa_contact_emails`.`OA_CNTCT_EML_ID` AS `OA_CNTCT_EML_ID`,`oa_contact_emails`.`CNTCT_EML_ID` AS `CNTCT_EML_ID`,`oa_contact_emails`.`CNTCT_EML_ID` AS `OA_ACC_CNTCT_EML_ID`,(select `contact_emails`.`EMAIL_ADD_ID` from `contact_emails` where (`contact_emails`.`CNTCT_EML_ID` = `OA_ACC_CNTCT_EML_ID`)) AS `EMAIL_ID`,(select `email_address_mst`.`EMAIL_ADD` from `email_address_mst` where (`EMAIL_ID` = `email_address_mst`.`EMAIL_ADD_ID`)) AS `CNTCT_EMAIL`,if((`oa_contact_emails`.`IS_PRIMARY` = 1),'Yes','No') AS `Is_Primary`,`oa_contact_emails`.`OA_CNTCT_ID` AS `OA_CNTCT_ID`,(select `oa_contacts`.`CNTCT_ID` from `oa_contacts` where (`oa_contacts`.`OA_CNTCTS_ID` = `oa_contact_emails`.`OA_CNTCT_ID`)) AS `OACNTCT_ID`,(select `contact_mst`.`CNTCT_FRST_NM` from `contact_mst` where (`contact_mst`.`CNTCT_ID` = `OACNTCT_ID`)) AS `CNTCT_NM`,`oa_contact_emails`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`oa_contact_emails`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`oa_contact_emails`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`oa_contact_emails`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`oa_contact_emails`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,if((`oa_contact_emails`.`IS_EMP` = 1),'Yes','No') AS `IS_EMP`,`oa_contact_emails`.`CREATED_ON` AS `CREATED_ON`,`oa_contact_emails`.`UPDATED_ON` AS `UPDATED_ON`,`oa_contact_emails`.`IS_DELETED` AS `IS_DELETED`,`oa_contact_emails`.`EMAIL_TYPE_ID` AS `EMAIL_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `oa_contact_emails`.`EMAIL_TYPE_ID`)) AS `EMAIL_TYP_NM`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD` from `oa_contact_emails` where (`oa_contact_emails`.`IS_EMP` = 1) */;

--
-- Final view structure for view `student_contact_nationality_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_contact_nationality_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_contact_nationality_vw` AS select `oa_contact_nationality`.`OA_CNTCT_NATIONALITY_ID` AS `OA_CNTCT_NATIONALITY_ID`,`oa_contact_nationality`.`CNTCT_NATIONALITY_ID` AS `CONTACT_NATIONALITY_ID`,`oa_contact_nationality`.`CNTCT_NATIONALITY_ID` AS `CNTCT_NATIONALITY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `oa_contact_nationality`.`CNTCT_NATIONALITY_ID`)) AS `CNTCT_NATIONALITY_NM`,`oa_contact_nationality`.`IS_DELETED` AS `IS_DELETED`,`oa_contact_nationality`.`OA_CNTCT_ID` AS `OA_CNTCT_ID`,(select `oa_contacts`.`CNTCT_ID` from `oa_contacts` where (`oa_contacts`.`OA_CNTCTS_ID` = `oa_contact_nationality`.`OA_CNTCT_ID`)) AS `OACNTCT_ID`,(select `contact_mst`.`CNTCT_FRST_NM` from `contact_mst` where (`contact_mst`.`CNTCT_ID` = `OACNTCT_ID`)) AS `CNTCT_NM`,`oa_contact_nationality`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`oa_contact_nationality`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`oa_contact_nationality`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`oa_contact_nationality`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`oa_contact_nationality`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`oa_contact_nationality`.`CREATED_ON` AS `Created_On`,`oa_contact_nationality`.`UPDATED_ON` AS `Updated_On` from `oa_contact_nationality` */;

--
-- Final view structure for view `student_dependent_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_dependent_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_dependent_dtl_vw` AS select `dependent_dtl`.`DEPENDENT_DTL_ID` AS `DEPENDENT_DTL_ID`,`dependent_dtl`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`dependent_dtl`.`OA_DEP_CNTCTS_ID` AS `OA_DEP_CNTCTS_ID`,(select `oa_contacts`.`CNTCT_ID` from `oa_contacts` where (`oa_contacts`.`OA_CNTCTS_ID` = `dependent_dtl`.`OA_DEP_CNTCTS_ID`)) AS `OA_CNTCTS_ID`,(select concat(ifnull(`contact_mst`.`CNTCT_FRST_NM`,''),' ',ifnull(`contact_mst`.`CNTCT_LST_NM`,'')) from `contact_mst` where (`contact_mst`.`CNTCT_ID` = `OA_CNTCTS_ID`)) AS `CNTCT_FULL_NM`,`dependent_dtl`.`RELATION_TYPE_ID` AS `RELATION_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `dependent_dtl`.`RELATION_TYPE_ID`)) AS `REALTION_TYPE_NAME`,cast(`dependent_dtl`.`DATE_OF_BIRTH` as date) AS `DATE_OF_BIRTH`,`dependent_dtl`.`AGE` AS `AGE`,`dependent_dtl`.`EMP_ID` AS `EMP_ID`,`dependent_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`dependent_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`dependent_dtl`.`CREATED_ON` AS `CREATED_ON`,`dependent_dtl`.`UPDATED_ON` AS `UPDATED_ON`,`dependent_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`dependent_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`dependent_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`dependent_dtl`.`IS_DELETED` AS `IS_DELETED` from `dependent_dtl` */;

--
-- Final view structure for view `student_detail_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_detail_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_detail_vw` AS select `student_detail`.`ID` AS `ID`,`student_detail`.`FIRSTNAME` AS `FIRSTNAME`,`student_detail`.`LASTNAME` AS `LASTNAME`,`student_detail`.`EMAIL` AS `EMAIL`,`student_detail`.`ADDRESS` AS `ADDRESS`,`student_detail`.`GENDER` AS `GENDER_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_detail`.`GENDER`)) AS `GENDER`,`student_detail`.`DOB` AS `DOB`,`student_detail`.`CONTACT` AS `CONTACT`,`student_detail`.`LASTSCHOOL` AS `LASTSCHOOL`,`student_detail`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_detail`.`CLASS_ID`)) AS `CLASS`,`student_detail`.`PROFILE` AS `PROFILE`,`student_detail`.`SECTION_ID` AS `SECTION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_detail`.`SECTION_ID`)) AS `SECTION`,`student_detail`.`SEND_LOGIN_STUDENT` AS `SEND_LOGIN_STUDENT`,`student_detail`.`SEND_LOGIN_PARENT` AS `SEND_LOGIN_PARENT`,`student_detail`.`PARENT_USER_ID` AS `PARENT_USER_ID`,`student_detail`.`STUDENT_USER_ID` AS `STUDENT_USER_ID`,`student_detail`.`STUDENT_STATUS_ID` AS `STUDENT_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_detail`.`STUDENT_STATUS_ID`)) AS `STUDENT_STATUS`,`student_detail`.`FEES_PAID` AS `FEES_PAID`,if((`student_detail`.`FEES_PAID` = 0),'NO','YES') AS `IS_FEES_PAID`,`student_detail`.`RECEIPT_REF_NO` AS `RECEIPT_REF_NO`,`student_detail`.`IS_DELETED` AS `IS_DELETED`,`student_detail`.`OA_ID` AS `OA_ID`,`student_detail`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`student_detail`.`USER_ID` AS `USER_ID`,`student_detail`.`CREATED_BY` AS `CREATED_BY`,`student_detail`.`CREATED_ON` AS `CREATED_ON`,`student_detail`.`UPDATED_BY` AS `UPDATED_BY`,`student_detail`.`UPDATED_ON` AS `UPDATED_ON` from `student_detail` */;

--
-- Final view structure for view `student_education_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_education_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_education_vw` AS select `emp_education`.`ID` AS `id`,`emp_education`.`EMP_ID` AS `employee_id`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `employee_id`)) AS `EMP_NM`,`emp_education`.`EDU_QUAL_ID` AS `edu_qual_id`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_education`.`EDU_QUAL_ID`)) AS `EMP_GRADE`,`emp_education`.`INSTITUTE` AS `institute`,`emp_education`.`EDUCATION_QUALIFICATION` AS `EDUCATION_QUALIFICATION`,`emp_education`.`EDUCATION_COURSE_TYPE` AS `EDUCATION_COURSE_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_education`.`EDUCATION_COURSE_TYPE`)) AS `EDUCATION_COURSE_TYPE_NM`,`emp_education`.`MAJOR` AS `major`,`emp_education`.`YEAR` AS `year`,`emp_education`.`SCORE` AS `score`,`emp_education`.`START_DATE` AS `start_date`,`emp_education`.`END_DATE` AS `end_date`,`emp_education`.`EMP_ID` AS `EMP_ID`,`emp_education`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_education`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_education`.`CREATED_ON` AS `CREATED_ON`,`emp_education`.`UPDATED_ON` AS `UPDATED_ON`,`emp_education`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_education`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_education`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_education`.`IS_DELETED` AS `IS_DELETED` from `emp_education` */;

--
-- Final view structure for view `student_emergency_contact_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_emergency_contact_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_emergency_contact_dtl_vw` AS select `emergency_contact_dtl`.`EMERGENCY_CONTACT_DTL_ID` AS `EMERGENCY_CONTACT_DTL_ID`,`emergency_contact_dtl`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emergency_contact_dtl`.`EMERG_CONTACT_ID` AS `EMERG_CONTACT_ID`,(select `oa_contacts_vw`.`CNTCT_FULL_NM` from `oa_contacts_vw` where (`oa_contacts_vw`.`OA_CNTCTS_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_ID`)) AS `EMRG_CNTCT_NM`,(select `oa_contacts`.`OA_CNTCTS_ID` from `oa_contacts` where (`oa_contacts`.`OA_CNTCTS_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_ID`)) AS `OA_CNTCTS_ID`,(select `contact_mst`.`CNTCT_FRST_NM` from `contact_mst` where (`contact_mst`.`CNTCT_ID` = `OA_CNTCTS_ID`)) AS `CNTCT_EMERG_NO`,`emergency_contact_dtl`.`EMERG_CONTACT_RELATION_TYPE_ID` AS `EMERG_CONTACT_RELATION_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_RELATION_TYPE_ID`)) AS `EMERG_CONTACT_RELATION_TYPE_NM`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`TEL_COUNTRY_CODE`)),'              ',`emergency_contact_dtl`.`EMERG_CONTACT_TEL_ID`)) AS `EMERG_CONTACT_TEL_ID`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`MOBILE_COUNTRY_CODE`)),' ',`emergency_contact_dtl`.`EMERG_CONTACT_MOBILE_ID`)) AS `EMERG_CONTACT_MOBILE_ID`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`OFFICE_COUNTRY_CODE`)),' ',`emergency_contact_dtl`.`EMERG_CONTACT_OFFNO_ID`)) AS `EMERG_CONTACT_OFFNO_ID`,(select `phone_nbr_mst`.`PHONE_NBR` from `phone_nbr_mst` where (`phone_nbr_mst`.`PHONE_NBR_ID` = (select `contact_phones`.`PHONE_NBR_ID` from `contact_phones` where (`contact_phones`.`CNTCT_PHONE_ID` = (select `oa_contact_phones`.`CNTCT_PHONE_ID` from `oa_contact_phones` where (`oa_contact_phones`.`OA_CNTCT_PHONE_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_MOBILE_ID`)))))) AS `PHONE_NBR`,(select `phone_nbr_mst`.`PHONE_NBR` from `phone_nbr_mst` where (`phone_nbr_mst`.`PHONE_NBR_ID` = (select `contact_phones`.`PHONE_NBR_ID` from `contact_phones` where (`contact_phones`.`CNTCT_PHONE_ID` = (select `oa_contact_phones`.`CNTCT_PHONE_ID` from `oa_contact_phones` where (`oa_contact_phones`.`OA_CNTCT_PHONE_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_TEL_ID`)))))) AS `TEL_NBR`,(select `phone_nbr_mst`.`PHONE_NBR` from `phone_nbr_mst` where (`phone_nbr_mst`.`PHONE_NBR_ID` = (select `contact_phones`.`PHONE_NBR_ID` from `contact_phones` where (`contact_phones`.`CNTCT_PHONE_ID` = (select `oa_contact_phones`.`CNTCT_PHONE_ID` from `oa_contact_phones` where (`oa_contact_phones`.`OA_CNTCT_PHONE_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_OFFNO_ID`)))))) AS `OFFICE_NBR`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`MOBILE_COUNTRY_CODE`)),' ',`PHONE_NBR`)) AS `FULL_PHONE_NBR`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`OFFICE_COUNTRY_CODE`)),' ',`OFFICE_NBR`)) AS `FULL_OFFICE_NBR`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emergency_contact_dtl`.`TEL_COUNTRY_CODE`)),' ',`TEL_NBR`)) AS `FULL_TEL_NBR`,`emergency_contact_dtl`.`EMERG_CONTACT_EMAIL_ID` AS `EMERG_CONTACT_EMAIL_ID`,`emergency_contact_dtl`.`EMP_ID` AS `EMP_ID`,(select `oa_contact_emails`.`CNTCT_EML_ID` from `oa_contact_emails` where (`oa_contact_emails`.`OA_CNTCT_EML_ID` = `emergency_contact_dtl`.`EMERG_CONTACT_EMAIL_ID`)) AS `CNTCT_EMAILS`,(select `contact_emails`.`EMAIL_ADD_ID` from `contact_emails` where (`contact_emails`.`CNTCT_EML_ID` = `CNTCT_EMAILS`)) AS `CNTCT_EML`,(select `email_address_mst`.`EMAIL_ADD` from `email_address_mst` where (`email_address_mst`.`EMAIL_ADD_ID` = `CNTCT_EML`)) AS `EMAIL_ID`,`emergency_contact_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emergency_contact_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emergency_contact_dtl`.`CREATED_ON` AS `CREATED_ON`,`emergency_contact_dtl`.`UPDATED_ON` AS `UPDATED_ON`,`emergency_contact_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emergency_contact_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emergency_contact_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emergency_contact_dtl`.`IS_DELETED` AS `IS_DELETED` from `emergency_contact_dtl` */;

--
-- Final view structure for view `student_family_detail_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_family_detail_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_family_detail_vw` AS select `student_family_detail`.`ID` AS `ID`,`student_family_detail`.`STUDENT_ID` AS `STUDENT_ID`,`student_family_detail`.`FATHER_FIRST_NAME` AS `FATHER_FIRST_NAME`,`student_family_detail`.`MOTHER_FIRST_NAME` AS `MOTHER_FIRST_NAME`,`student_family_detail`.`FATHER_MIDDLE_NAME` AS `FATHER_MIDDLE_NAME`,`student_family_detail`.`MOTHER_MIDDLE_NAME` AS `MOTHER_MIDDLE_NAME`,`student_family_detail`.`FATHER_LAST_NAME` AS `FATHER_LAST_NAME`,`student_family_detail`.`MOTHER_LAST_NAME` AS `MOTHER_LAST_NAME`,`student_family_detail`.`PARENTS_CONTACT` AS `PARENTS_CONTACT`,`student_family_detail`.`PARENTS_EMAIL` AS `PARENTS_EMAIL`,`student_family_detail`.`FATHER_OCCUPATION` AS `FATHER_OCCUPATION`,`student_family_detail`.`MOTHER_OCCUPATION` AS `MOTHER_OCCUPATION`,`student_family_detail`.`OA_ID` AS `OA_ID`,`student_family_detail`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`student_family_detail`.`USER_ID` AS `USER_ID`,`student_family_detail`.`CREATED_BY` AS `CREATED_BY`,`student_family_detail`.`CREATED_ON` AS `CREATED_ON`,`student_family_detail`.`UPDATED_BY` AS `UPDATED_BY`,`student_family_detail`.`UPDATED_ON` AS `UPDATED_ON`,`student_family_detail`.`IS_DELETED` AS `IS_DELETED` from `student_family_detail` */;

--
-- Final view structure for view `student_fees_structure_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_fees_structure_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_fees_structure_vw` AS select `student_fees_structure`.`ID` AS `ID`,`student_fees_structure`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_fees_structure`.`CLASS_ID`)) AS `CLASS`,`student_fees_structure`.`SECTION_ID` AS `SECTION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_fees_structure`.`SECTION_ID`)) AS `SECTION`,`student_fees_structure`.`STUDENT_ID` AS `STUDENT_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMP_MIDDLE_NM`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`REF_EMP_ID` = `student_fees_structure`.`STUDENT_ID`)) AS `STUDENT`,`student_fees_structure`.`FROM_MONTH` AS `FROM_MONTH`,`student_fees_structure`.`ADMISSION_NO` AS `ADMISSION_NO`,`student_fees_structure`.`IS_DELETED` AS `IS_DELETED`,`student_fees_structure`.`OA_ID` AS `OA_ID`,`student_fees_structure`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`student_fees_structure`.`USER_ID` AS `USER_ID`,`student_fees_structure`.`CREATED_BY` AS `CREATED_BY`,`student_fees_structure`.`UPDATED_BY` AS `UPDATED_BY`,`student_fees_structure`.`CREATED_ON` AS `CREATED_ON`,`student_fees_structure`.`UPDATED_ON` AS `UPDATED_ON` from `student_fees_structure` */;

--
-- Final view structure for view `student_grade_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_grade_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_grade_vw` AS select `student_grade`.`GRADE_ID` AS `GRADE_ID`,`student_grade`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_grade`.`CLASS_ID`)) AS `CLASS_NAME`,`student_grade`.`PROGRAM_ID` AS `PROGRAM_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `student_grade`.`PROGRAM_ID`)) AS `PROGRAM_NAME`,`student_grade`.`SORT_ORDER` AS `SORT_ORDER`,`student_grade`.`IS_DELETED` AS `IS_DELETED`,`student_grade`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `student_grade`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `student_grade`.`OA_ID`)) AS `OA_NM`,`student_grade`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `student_grade`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `student_grade`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`student_grade`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_grade`.`USER_ID`)) AS `USER_NM`,`student_grade`.`CREATED_BY` AS `CREATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_grade`.`CREATED_BY`)) AS `CREATED_BY_USER_NAME`,`student_grade`.`CREATED_ON` AS `CREATED_ON`,`student_grade`.`UPDATED_BY` AS `UPDATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `student_grade`.`UPDATED_BY`)) AS `UPDATED_BY_USER_NAME`,`student_grade`.`UPDATED_ON` AS `UPDATED_ON` from `student_grade` where (`student_grade`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `student_hub_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_hub_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_hub_vw` AS select `em`.`EMP_ID` AS `EMP_ID`,`em`.`EMP_NBR` AS `EMP_NBR`,`em`.`EMP_NAME` AS `EMP_NAME`,`em`.`EMP_MIDDLE_NM` AS `EMP_MIDDLE_NM`,`em`.`EMPLST_NM` AS `EMPLST_NM`,(select concat(ifnull(`em`.`EMP_NAME`,''),' ',ifnull(`em`.`EMP_MIDDLE_NM`,''),' ',ifnull(`em`.`EMPLST_NM`,''))) AS `EMP_FULL_NAME`,`em`.`EMP_INITIALS` AS `EMP_INITIALS`,if((`em`.`IS_MANAGER` = 1),'Yes','No') AS `IS_MANAGER`,`em`.`MANAGER_ID` AS `MANAGER_ID`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `em`.`MANAGER_ID`)) AS `MANAGER`,`em`.`HR_EXECUTIVE_ID` AS `HR_EXECUTIVE_ID`,`em`.`DOB` AS `DOB`,`em`.`GENDER_ID` AS `GENDER_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`GENDER_ID`)) AS `GENDER`,`em`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`CLASS_ID`)) AS `CLASS`,`em`.`ROLL_NO` AS `ROLL_NO`,`em`.`SECTION_ID` AS `SECTION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`SECTION_ID`)) AS `SECTION`,`em`.`MARITAL_STATUS_ID` AS `MARITAL_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`MARITAL_STATUS_ID`)) AS `MARITAL_STATUS`,`em`.`CAST_ID` AS `CAST_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`CAST_ID`)) AS `CAST`,`em`.`RAISE_ID` AS `RAISE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`RAISE_ID`)) AS `RAISE`,`em`.`ETHINICITY_ID` AS `ETHINICITY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`ETHINICITY_ID`)) AS `ETHINICITY`,`em`.`BLOOD_GRP` AS `BLOOD_GRP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`BLOOD_GRP`)) AS `BLOOD_GRP_NM`,if((`em`.`IS_SMOKER` = 1),'Yes','No') AS `IS_SMOKER`,`em`.`OA_CNTCT_EML_ID` AS `OA_CNTCT_EML_ID`,(select `email_address_mst`.`EMAIL_ADD` from `email_address_mst` where (`email_address_mst`.`EMAIL_ADD_ID` = (select `contact_emails`.`EMAIL_ADD_ID` from `contact_emails` where (`contact_emails`.`CNTCT_EML_ID` = (select `oa_contact_emails`.`CNTCT_EML_ID` from `oa_contact_emails` where (`oa_contact_emails`.`OA_CNTCT_EML_ID` = `em`.`OA_CNTCT_EML_ID`)))))) AS `EMAIL_ADD`,`em`.`OA_CNTCT_PHONE_ID` AS `OA_CNTCT_PHONE_ID`,(select `phone_nbr_mst`.`PHONE_NBR` from `phone_nbr_mst` where (`phone_nbr_mst`.`PHONE_NBR_ID` = (select `contact_phones`.`PHONE_NBR_ID` from `contact_phones` where (`contact_phones`.`CNTCT_PHONE_ID` = (select `oa_contact_phones`.`CNTCT_PHONE_ID` from `oa_contact_phones` where (`oa_contact_phones`.`OA_CNTCT_PHONE_ID` = `em`.`OA_CNTCT_PHONE_ID`)))))) AS `PHONE_NBR`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`COUNTRY_CODE`)),' ',`PHONE_NBR`)) AS `FULL_PHONE_NBR`,`em`.`EMP_SSN_NBR` AS `EMP_SSN_NBR`,`em`.`EMP_SIN_NBR` AS `EMP_SIN_NBR`,`em`.`EMP_PAN_NBR` AS `EMP_PAN_NBR`,`em`.`EMP_DRI_LICE_NBR` AS `EMP_DRI_LICE_NBR`,`em`.`EMP_DRI_LICE_EXP_DATE` AS `EMP_DRI_LICE_EXP_DATE`,if((`em`.`EMP_MILITARY_SERVICE` = 1),'Yes','No') AS `EMP_MILITARY_SERVICE`,`em`.`EMP_STATUS_ID` AS `EMP_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `em`.`EMP_STATUS_ID`)) AS `EMP_STATUS`,`em`.`SKYPE_ID` AS `SKYPE_ID`,`em`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`em`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`em`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`em`.`IS_DELETED` AS `IS_DELETED` from (`emp_mst` `em` join `user_mst` `um` on((`em`.`REF_EMP_ID` = `um`.`USER_ID`))) where ((`em`.`IS_DELETED` = 0) and (`um`.`USER_TYP_ID` = (select `independent_mst`.`MSTR_ID` from `independent_mst` where (`independent_mst`.`MSTR_CD` = 'UCTE')))) */;

--
-- Final view structure for view `student_immigration_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_immigration_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_immigration_dtl_vw` AS select `immigration_dtl`.`IMMIGRATION_ID` AS `IMMIGRATION_ID`,`immigration_dtl`.`EMP_ID` AS `EMPID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPID`)) AS `EMP_NAME`,`immigration_dtl`.`IMMIGRATION_TYP_ID` AS `IMMIGRATION_TYP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `immigration_dtl`.`IMMIGRATION_TYP_ID`)) AS `IMMIGRATION_TYPE`,`immigration_dtl`.`IMMIGRATION_NO` AS `IMMIGRATION_NO`,`immigration_dtl`.`DATE_OF_ISSUE` AS `DATE_OF_ISSUE`,`immigration_dtl`.`DATE_OF_EXPIRY` AS `DATE_OF_EXPIRY`,`immigration_dtl`.`PROCESSING_COUNTRY_ID` AS `PROCESSING_COUNTRY_ID`,`immigration_dtl`.`EMP_ID` AS `EMP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `immigration_dtl`.`PROCESSING_COUNTRY_ID`)) AS `PROCESSINGCOUNTRY_NM`,`immigration_dtl`.`IS_DELETED` AS `IS_DELETED`,`immigration_dtl`.`ISSUED_FOR` AS `ISSUED_FOR`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `immigration_dtl`.`ISSUED_FOR`)) AS `ISSUED_FOR_COUNTRY`,`immigration_dtl`.`DOCUMENT_TITLE` AS `DOCUMENT_TITLE`,`immigration_dtl`.`ISSUING_AUTHORITY` AS `ISSUING_AUTHORITY`,`immigration_dtl`.`ATTACHMENT_NAME` AS `ATTACHMENT_NAME`,`immigration_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`immigration_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_NM`,`immigration_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`immigration_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`immigration_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`immigration_dtl`.`CREATEDON` AS `CREATED_ON`,`immigration_dtl`.`UPDATEDON` AS `UPDATED_ON` from `immigration_dtl` */;

--
-- Final view structure for view `student_job_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_job_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_job_mst_vw` AS select `jm`.`JOB_ID` AS `JOB_ID`,`jm`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `jm`.`EMP_ID`)) AS `EMP_NM`,`jm`.`EMP_STATUS_ID` AS `EMPSTATUSID`,`jm`.`EMP_GROSS_SALARY` AS `EMP_GROSS_SALARY`,`jm`.`EMP_STATUS_ID` AS `EMP_STATUS_ID`,`jm`.`EMP_TYPE_ID` AS `EMP_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `EMPSTATUSID`)) AS `STATUS_NAME`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`EMP_TYPE_ID`)) AS `TYPE_NAME`,`jm`.`EMP_CAT_ID` AS `EMP_CAT_ID`,`jm`.`DEPARTMENT_ID` AS `DEPARTMENT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`DEPARTMENT_ID`)) AS `DEPARTMENT_NAME`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`DESIGNATION_ID`)) AS `DESIGNATION_NAME`,`jm`.`COST_CENTER` AS `COST_CENTER`,`jm`.`HOLIDAY_GRP_ID` AS `HOLIDAY_GRP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`HOLIDAY_GRP_ID`)) AS `HOLIDAY_GRP`,`jm`.`DESIGNATION_ID` AS `DESIGNATION_ID`,`jm`.`EMP_ID` AS `EMP_ID`,`jm`.`JOB_TITLE_ID` AS `JOB_TITLE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`JOB_TITLE_ID`)) AS `JOB_TITLE`,`jm`.`JOB_CAT_ID` AS `JOB_CAT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`JOB_CAT_ID`)) AS `JOB_CATEGORY`,`jm`.`WORK_STATION` AS `WORK_STATION`,`jm`.`EMP_BAND_ID` AS `EMP_BAND_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`EMP_BAND_ID`)) AS `EMP_BAND`,`jm`.`EMP_GRADE_ID` AS `EMP_GRADE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`EMP_GRADE_ID`)) AS `EMP_GRADE`,`jm`.`POSITION_ID` AS `position_id`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`POSITION_ID`)) AS `POSTION_NM`,`jm`.`CURRENCY_ID` AS `currency_id`,(select `currency_mst`.`CURR_NAME` from `currency_mst` where (`currency_mst`.`CURR_ID` = `jm`.`CURRENCY_ID`)) AS `CURRENCY_NM`,`jm`.`DATE_OF_JOINING` AS `DATE_OF_JOINING`,`jm`.`CREATED_BY` AS `Created_By_User_id`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `Created_By_User_id`)) AS `CREATED_BY_USER_NAME`,`jm`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`jm`.`CREATED_ON` AS `CREATED_ON`,`jm`.`UPDATED_ON` AS `UPDATED_ON`,`jm`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`jm`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`jm`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`jm`.`IS_DELETED` AS `IS_DELETED`,`jm`.`CONFIRMATION_DATE` AS `CONFIRMATION_DATE`,`jm`.`LAST_APPRAISAL_DATE` AS `LAST_APPRAISAL_DATE`,`jm`.`APPRAISAL_TYPE` AS `APPRAISAL_TYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`APPRAISAL_TYPE`)) AS `APPRAISAL_TYPE_NM`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `jm`.`WORK_LOCATION`)) AS `WORK_LOCATION`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD` from `job_mst` `jm` */;

--
-- Final view structure for view `student_language_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_language_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_language_vw` AS select `emp_language`.`EMP_LANGUAGE_ID` AS `EMP_LANGUAGE_ID`,`emp_language`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NM`,`emp_language`.`LANGUAGE_ID` AS `LANGUAGE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_language`.`LANGUAGE_ID`)) AS `LANGUAGE`,`emp_language`.`LANGUAGE_FLUENCY_ID` AS `LANGUAGE_FLUENCY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_language`.`LANGUAGE_FLUENCY_ID`)) AS `LANGUAGE_FLUENCY`,`emp_language`.`LANGUAGE_COMPETENCY_ID` AS `LANGUAGE_COMPETENCY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_language`.`LANGUAGE_COMPETENCY_ID`)) AS `LANGUAGE_COMPETENCY`,`emp_language`.`COMMENTS` AS `COMMENTS`,`emp_language`.`EMP_ID` AS `EMP_ID`,`emp_language`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_language`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_language`.`CREATED_ON` AS `CREATED_ON`,`emp_language`.`UPDATED_ON` AS `UPDATED_ON`,`emp_language`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_language`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_language`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_language`.`IS_DELETED` AS `IS_DELETED` from `emp_language` */;

--
-- Final view structure for view `student_licence_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_licence_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_licence_vw` AS select `emp_licence`.`LICENSE_ID` AS `LICENSE_ID`,`emp_licence`.`EMP_ID` AS `EMPLOYEE_ID`,`emp_licence`.`LIENCE_TYPE_ID` AS `LIENCE_TYPE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_licence`.`LICENSE_NM_ID` AS `LICENSE_NM_ID`,`emp_licence`.`LIENCE_TYPE_ID` AS `LICENSE_TYP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_licence`.`LIENCE_TYPE_ID`)) AS `LICENSE_TYP_NM`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_licence`.`LICENSE_NM_ID`)) AS `LICENSE__NAME`,`emp_licence`.`LICENSE_NO` AS `LICENSE_NO`,`emp_licence`.`LICENSE_ISSUED_DATE` AS `LICENSE_ISSUED_DATE`,`emp_licence`.`LICENSE_EXPIRY_DATE` AS `LICENSE_EXPIRY_DATE`,`emp_licence`.`EMP_ID` AS `EMP_ID`,`emp_licence`.`CREATED_BY` AS `Created_By_User_id`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `Created_By_User_id`)) AS `CREATED_BY_USER_NAME`,`emp_licence`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_licence`.`CREATED_ON` AS `CREATED_ON`,`emp_licence`.`UPDATED_ON` AS `UPDATED_ON`,`emp_licence`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_licence`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_licence`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_licence`.`IS_DELETED` AS `IS_DELETED` from `emp_licence` */;

--
-- Final view structure for view `student_member_attachment_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_member_attachment_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_member_attachment_vw` AS select `member_attachment`.`ID` AS `ID`,`member_attachment`.`FILENAME` AS `FILENAME`,`member_attachment`.`IMAGENAME` AS `IMAGENAME`,`member_attachment`.`TYPE` AS `TYPE`,`member_attachment`.`LINKED_MASTER_DOC_TYPE_ID` AS `LINKED_MASTER_DOC_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`LINKED_MASTER_DOC_TYPE_ID`)) AS `LINKED_MASTER_DOC_TYPE`,`member_attachment`.`LINKED_SYSTEM_ENTITY_TYPE_ID` AS `LINKED_SYSTEM_ENTITY_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`LINKED_SYSTEM_ENTITY_TYPE_ID`)) AS `LINKED_SYSTEM_ENTITY_TYPE`,`member_attachment`.`IS_PUBLIC` AS `IS_PUBLIC`,`member_attachment`.`USER_GROUP_ID` AS `USER_GROUP_ID`,`member_attachment`.`USER_GROUP_ID` AS `USERGROUPID`,(select `user_group`.`USER_GRP_NM` from `user_group` where (`user_group`.`USER_GRP_ID` = `USERGROUPID`)) AS `USER_GROUP`,`member_attachment`.`DOC_CATEGORY_ID` AS `DOC_CATEGORY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`DOC_CATEGORY_ID`)) AS `DOC_CATEGORY`,`member_attachment`.`DOC_SUB_CATEGORY_ID` AS `DOC_SUB_CATEGORY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`DOC_SUB_CATEGORY_ID`)) AS `DOC_SUB_CATEGORY`,`member_attachment`.`DOC_TYPE_ID` AS `DOC_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`DOC_TYPE_ID`)) AS `DOC_TYPE`,`member_attachment`.`DOC_STATUS_ID` AS `DOC_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `member_attachment`.`DOC_STATUS_ID`)) AS `DOC_STATUS`,`member_attachment`.`IS_DELETED` AS `IS_DELETED`,`member_attachment`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`member_attachment`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`member_attachment`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`member_attachment`.`CREATED_BY` AS `CREATED_BY`,`member_attachment`.`CREATED_ON` AS `CREATED_ON`,`member_attachment`.`UPDATED_BY` AS `UPDATED_BY`,`member_attachment`.`UPDATED_ON` AS `UPDATED_ON` from `member_attachment` */;

--
-- Final view structure for view `student_membership_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_membership_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_membership_vw` AS select `membership`.`MEMBERSHIP_ID` AS `MEMBERSHIP_ID`,`membership`.`EMP_ID` AS `EMP_ID`,(select `emp_mst_vw`.`EMP_FULL_NAME` from `emp_mst_vw` where (`emp_mst_vw`.`EMP_ID` = `membership`.`EMP_ID`)) AS `EMP_FULL_NAME`,`membership`.`MEMBERSHIP` AS `MEMBERSHIP`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `membership`.`MEMBERSHIP`)) AS `MEMBERSHIP_NM`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `membership`.`MEMBERSHIP_FR`)) AS `MEMBERSHIP_FR`,`membership`.`SUBSCRIPTION_PAID_BY` AS `SUBSCRIPTION_PAID_BY`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `membership`.`SUBSCRIPTION_PAID_BY`)) AS `SUBSCRIPTION_PAID_BY_NM`,`membership`.`SUBSCRIPTION_AMOUNT` AS `SUBSCRIPTION_AMOUNT`,`membership`.`CURRENCY_ID` AS `CURRENCY_ID`,(select `currency_mst`.`CURR_NAME` from `currency_mst` where (`currency_mst`.`CURR_ID` = `membership`.`CURRENCY_ID`)) AS `CURRENCY`,`membership`.`SUBSCRIPTION_COMMENCE_DATE` AS `SUBSCRIPTION_COMMENCE_DATE`,`membership`.`SUBSCRIPTION_REVEWAL_DATE` AS `SUBSCRIPTION_REVEWAL_DATE`,`membership`.`PROFILE_SUMMARY` AS `PROFILE_SUMMARY`,`membership`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`membership`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`membership`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`membership`.`IS_DELETED` AS `IS_DELETED`,`membership`.`CREATED_ON` AS `CREATED_ON`,`membership`.`UPDATED_ON` AS `UPDATED_ON`,`membership`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`membership`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME` from `membership` */;

--
-- Final view structure for view `student_oa_contact_phones_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_oa_contact_phones_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_oa_contact_phones_vw` AS select `oa_contact_phones`.`OA_CNTCT_PHONE_ID` AS `OA_CNTCT_PHONE_ID`,(select `emp_mst_vw`.`EMP_FULL_NAME` from `emp_mst_vw` where (`emp_mst_vw`.`EMP_ID` = `oa_contact_phones`.`EMP_ID`)) AS `EMP_FULL_NAME`,(select `contact_phones`.`PHONE_NBR_ID` from `contact_phones` where (`contact_phones`.`CNTCT_PHONE_ID` = `oa_contact_phones`.`CNTCT_PHONE_ID`)) AS `CNTCTID`,`oa_contact_phones`.`CNTCT_PHONE_ID` AS `CNTCT_PHONE_ID`,`oa_contact_phones`.`COUNTRY_CODE` AS `COUNTRY_CODE`,(select `phone_nbr_mst`.`PHONE_NBR` from `phone_nbr_mst` where (`phone_nbr_mst`.`PHONE_NBR_ID` = `CNTCTID`)) AS `CNTCT_OFFICE_NBR`,(select concat((select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `oa_contact_phones`.`COUNTRY_CODE`)),' ',`CNTCT_OFFICE_NBR`)) AS `OA_ACCT_CNTCT_PHONE_ID`,if((`oa_contact_phones`.`IS_PRIMARY` = 1),'Yes','No') AS `Is_Primary`,`oa_contact_phones`.`EMP_ID` AS `EMP_ID`,`oa_contact_phones`.`IS_DELETED` AS `IS_DELETED`,`oa_contact_phones`.`IS_EMP` AS `IS_EMP`,`oa_contact_phones`.`OA_CNTCT_ID` AS `OA_CNTCT_ID`,(select `oa_contacts`.`CNTCT_ID` from `oa_contacts` where (`oa_contacts`.`OA_CNTCTS_ID` = `oa_contact_phones`.`OA_CNTCT_ID`)) AS `OACNTCT_ID`,(select `contact_mst`.`CNTCT_FRST_NM` from `contact_mst` where (`contact_mst`.`CNTCT_ID` = `OACNTCT_ID`)) AS `CNTCT_NM`,`oa_contact_phones`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`oa_contact_phones`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`oa_contact_phones`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`oa_contact_phones`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`oa_contact_phones`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`oa_contact_phones`.`CREATED_ON` AS `Created_On`,`oa_contact_phones`.`UPDATED_ON` AS `Updated_On` from `oa_contact_phones` where (`oa_contact_phones`.`IS_EMP` = 1) */;

--
-- Final view structure for view `student_picture_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_picture_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_picture_vw` AS select `emp_picture`.`EMP_PICYURE_ID` AS `EMP_PICYURE_ID`,`emp_picture`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_picture`.`EPIC_PICTURE` AS `EPIC_PICTURE`,`emp_picture`.`EPIC_FILENAME` AS `EPIC_FILENAME`,`emp_picture`.`EPIC_TYPE` AS `EPIC_TYPE`,`emp_picture`.`EPIC_FILE_SIZE` AS `EPIC_FILE_SIZE`,`emp_picture`.`EPIC_FILE_WIDTH` AS `EPIC_FILE_WIDTH`,`emp_picture`.`EPIC_FILE_HEIGHT` AS `EPIC_FILE_HEIGHT`,`emp_picture`.`EMP_ID` AS `EMP_ID`,`emp_picture`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_picture`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_picture`.`CREATED_ON` AS `CREATED_ON`,`emp_picture`.`UPDATED_ON` AS `UPDATED_ON`,`emp_picture`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_picture`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_picture`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_picture`.`IS_DELETED` AS `IS_DELETED` from `emp_picture` */;

--
-- Final view structure for view `student_prog_conf_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_prog_conf_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_prog_conf_vw` AS select `spc`.`CONF_ID` AS `CONF_ID`,`spc`.`PROGRAM_ID` AS `PROGRAM_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `spc`.`PROGRAM_ID`)) AS `PROGRAM_NAME`,`spc`.`MIN_CLASS_ID` AS `MIN_CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `spc`.`MIN_CLASS_ID`)) AS `MIN_CLASS`,`spc`.`MAX_CLASS_ID` AS `MAX_CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `spc`.`MAX_CLASS_ID`)) AS `MAX_CLASS`,`spc`.`SORT_ORDER` AS `SORT_ORDER`,(select group_concat(`spcd`.`DEPARTMENT_ID` separator ',') from `student_prog_conf_dept` `spcd` where (`spc`.`CONF_ID` = `spcd`.`CONF_ID`)) AS `DEPARTMENT_IDS`,(select group_concat(`im`.`MSTR_NM` separator ',') from `independent_mst` `im` where find_in_set(`im`.`MSTR_ID`,`DEPARTMENT_IDS`)) AS `DEPARTMENTS`,`spc`.`IS_DELETED` AS `IS_DELETED`,`spc`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `spc`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `spc`.`OA_ID`)) AS `OA_NM`,`spc`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `spc`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `spc`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`spc`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `spc`.`USER_ID`)) AS `USER_NM`,`spc`.`CREATED_BY` AS `CREATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `spc`.`CREATED_BY`)) AS `CREATED_BY_USER_NAME`,`spc`.`CREATED_ON` AS `CREATED_ON`,`spc`.`UPDATED_BY` AS `UPDATED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `spc`.`UPDATED_BY`)) AS `UPDATED_BY_USER_NAME`,`spc`.`UPDATED_ON` AS `UPDATED_ON` from `student_prog_conf` `spc` where (`spc`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `student_reporting_locations_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_reporting_locations_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_reporting_locations_vw` AS select `emp_reporting_locations`.`EMP_REPORTING_LOCATIONS_ID` AS `EMP_REPORTING_LOCATIONS_ID`,`emp_reporting_locations`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',ifnull(`emp_mst`.`EMPLST_NM`,'')) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_reporting_locations`.`LOCATION_ID` AS `LOCATION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_reporting_locations`.`LOCATION_ID`)) AS `LOCATION`,`emp_reporting_locations`.`EMP_ID` AS `EMP_ID`,if((`emp_reporting_locations`.`IS_PRIMARY` = 1),'Yes','No') AS `IS_PRIMARY`,`emp_reporting_locations`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_reporting_locations`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_reporting_locations`.`CREATED_ON` AS `CREATED_ON`,`emp_reporting_locations`.`UPDATED_ON` AS `UPDATED_ON`,`emp_reporting_locations`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_reporting_locations`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_reporting_locations`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_reporting_locations`.`IS_DELETED` AS `IS_DELETED` from `emp_reporting_locations` */;

--
-- Final view structure for view `student_reporting_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_reporting_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_reporting_vw` AS select `emp_reporting`.`EMP_REPORTING_ID` AS `EMP_REPORTING_ID`,`emp_reporting`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_reporting`.`MANAGER_ID` AS `MANAGER_ID`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `emp_reporting`.`MANAGER_ID`)) AS `MANAGER_NAME`,`emp_reporting`.`MANAGER_TYPE_ID` AS `MANAGER_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_reporting`.`MANAGER_TYPE_ID`)) AS `MANAGER_TYPE`,`emp_reporting`.`REPORTING_MODE_ID` AS `REPORTING_MODE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_reporting`.`REPORTING_MODE_ID`)) AS `REPORTING_MODE`,`emp_reporting`.`EMP_ID` AS `EMP_ID`,`emp_reporting`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_reporting`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_reporting`.`CREATED_ON` AS `CREATED_ON`,`emp_reporting`.`UPDATED_ON` AS `UPDATED_ON`,`emp_reporting`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_reporting`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_reporting`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_reporting`.`IS_DELETED` AS `IS_DELETED` from `emp_reporting` */;

--
-- Final view structure for view `student_termination_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_termination_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_termination_dtl_vw` AS select `emp_termination_dtl`.`TERMINATION_ID` AS `TERMINATION_ID`,`emp_termination_dtl`.`EMP_ID` AS `EMP_ID`,`emp_termination_dtl`.`EMP_ID` AS `EMPID`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPID`)) AS `EMP_NM`,`emp_termination_dtl`.`EMP_TERMINATION_ID` AS `EMP_TERMINATION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_termination_dtl`.`EMP_TERMINATION_ID`)) AS `EMP_TERMINATION`,`emp_termination_dtl`.`TERMINATION_DATE` AS `TERMINATION_DATE`,`emp_termination_dtl`.`RESIGNED_ON` AS `RESIGNED_ON`,`emp_termination_dtl`.`RESIGNATION_ACCEPTED_ON` AS `RESIGNATION_ACCEPTED_ON`,`emp_termination_dtl`.`RETENTION_DATE` AS `RETENTION_DATE`,`emp_termination_dtl`.`IS_DELETED` AS `IS_DELETED`,`emp_termination_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_termination_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_termination_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_termination_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_termination_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`emp_termination_dtl`.`CREATED_ON` AS `CREATED_ON`,`emp_termination_dtl`.`UPDATED_ON` AS `UPDATED_ON` from `emp_termination_dtl` */;

--
-- Final view structure for view `student_work_experience_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_work_experience_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_work_experience_vw` AS select `emp_work_experience`.`EMP_WORK_EXPERIENCE_ID` AS `EMP_WORK_EXPERIENCE_ID`,`emp_work_experience`.`EMP_ID` AS `EMPLOYEE_ID`,(select concat(`emp_mst`.`EMP_NAME`,' ',`emp_mst`.`EMPLST_NM`) from `emp_mst` where (`emp_mst`.`EMP_ID` = `EMPLOYEE_ID`)) AS `EMP_NAME`,`emp_work_experience`.`EEXP_SEQNO` AS `EEXP_SEQNO`,`emp_work_experience`.`EEXP_EMPLOYER` AS `EEXP_EMPLOYER`,`emp_work_experience`.`JOB_TITLE_ID` AS `JOB_TITLE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_experience`.`JOB_TITLE_ID`)) AS `JOB_TITLE`,`emp_work_experience`.`JOBTITLE` AS `JOBTITLE`,cast(`emp_work_experience`.`EEXP_FROM_DATE` as date) AS `EEXP_FROM_DATE`,cast(`emp_work_experience`.`EEXP_TO_DATE` as date) AS `EEXP_TO_DATE`,`emp_work_experience`.`EEXP_COMMENTS` AS `EEXP_COMMENTS`,if((`emp_work_experience`.`EEXP_INTERNAL` = 1),'Yes','No') AS `EEXP_INTERNAL`,`emp_work_experience`.`EMP_ID` AS `EMP_ID`,`emp_work_experience`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_work_experience`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_work_experience`.`CREATED_ON` AS `CREATED_ON`,`emp_work_experience`.`UPDATED_ON` AS `UPDATED_ON`,`emp_work_experience`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_work_experience`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_work_experience`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_work_experience`.`IS_DELETED` AS `IS_DELETED` from `emp_work_experience` */;

--
-- Final view structure for view `student_work_shift_vw`
--

/*!50001 DROP VIEW IF EXISTS `student_work_shift_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `student_work_shift_vw` AS select `emp_work_shift`.`EMP_WORK_SHIFT_ID` AS `EMP_WORK_SHIFT_ID`,`emp_work_shift`.`WORK_SHIFT_ID` AS `WORK_SHIFT_ID`,(select `shift_mst`.`NAME` from `shift_mst` where (`shift_mst`.`SHIFT_ID` = `emp_work_shift`.`WORK_SHIFT_ID`)) AS `WORK_SHIFT`,`emp_work_shift`.`EMP_NUMBER` AS `EMP_NUMBER`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `emp_work_shift`.`EMP_NUMBER`)) AS `EMP_NAME`,`emp_work_shift`.`PREV_WORK_SHIFT_ID` AS `PREV_WORK_SHIFT_ID`,`emp_work_shift`.`NEXT_WORK_SHIFT_ID` AS `NEXT_WORK_SHIFT_ID`,`emp_work_shift`.`EFFECTIVE_ON` AS `EFFECTIVE_ON`,`emp_work_shift`.`EFFECTIVE_TO` AS `EFFECTIVE_TO`,`emp_work_shift`.`CURR_PUNCH_IN_TIME` AS `CURR_PUNCH_IN_TIME`,`emp_work_shift`.`SHIFT_TYPE_ID` AS `SHIFT_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_shift`.`SHIFT_TYPE_ID`)) AS `SHIFT_TYPE`,`emp_work_shift`.`NO_OF_DAYS` AS `NO_OF_DAYS`,`emp_work_shift`.`START_DATE` AS `START_DATE`,`emp_work_shift`.`END_DATE` AS `END_DATE`,`emp_work_shift`.`SHIFT_CALENDAR_ID` AS `SHIFT_CALENDAR_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `emp_work_shift`.`SHIFT_CALENDAR_ID`)) AS `SHIFT_CALENDAR`,`emp_work_shift`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`emp_work_shift`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`emp_work_shift`.`CREATED_ON` AS `CREATED_ON`,`emp_work_shift`.`UPDATED_ON` AS `UPDATED_ON`,`emp_work_shift`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`emp_work_shift`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`emp_work_shift`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`emp_work_shift`.`IS_DELETED` AS `IS_DELETED` from `emp_work_shift` */;

--
-- Final view structure for view `sub_accgroup_master_list_vw`
--

/*!50001 DROP VIEW IF EXISTS `sub_accgroup_master_list_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sub_accgroup_master_list_vw` AS select `sub_accgroup_vw`.`ACCGROUP_ID` AS `ACCGROUP_ID`,`sub_accgroup_vw`.`ACCGROUP` AS `ACCGROUP`,`sub_accgroup_vw`.`ACCGROUPDESC` AS `ACCGROUPDESC`,`sub_accgroup_vw`.`ACCTYPE` AS `ACCTYPE`,`sub_accgroup_vw`.`ACCTYPE_NM` AS `ACCTYPE_NM`,`sub_accgroup_vw`.`CTRACCGROUP` AS `CTRACCGROUP`,`sub_accgroup_vw`.`PLSCHEDULE` AS `PLSCHEDULE`,`sub_accgroup_vw`.`PL_SCHEDULE_NM` AS `PL_SCHEDULE_NM`,`sub_accgroup_vw`.`BSSCHEDULE` AS `BSSCHEDULE`,`sub_accgroup_vw`.`BS_SCHEDULE_NM` AS `BS_SCHEDULE_NM`,`sub_accgroup_vw`.`PARENT_ID` AS `PARENT_ID`,`sub_accgroup_vw`.`IS_CONTRA_ACCOUNT` AS `IS_CONTRA_ACCOUNT`,`sub_accgroup_vw`.`CONTRA_ACCOUNT_REF` AS `CONTRA_ACCOUNT_REF`,`sub_accgroup_vw`.`SHOW_ASSET_LIFE` AS `SHOW_ASSET_LIFE`,`sub_accgroup_vw`.`OA_ID` AS `OA_ID`,`sub_accgroup_vw`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`sub_accgroup_vw`.`CREATEDBY` AS `CREATEDBY`,`sub_accgroup_vw`.`UPDATEDBY` AS `UPDATEDBY`,`sub_accgroup_vw`.`CREATEDON` AS `CREATEDON`,`sub_accgroup_vw`.`UPDATEDON` AS `UPDATEDON`,`sub_accgroup_vw`.`USER_ID` AS `USER_ID`,`sub_accgroup_vw`.`IS_DELETED` AS `IS_DELETED` from `sub_accgroup_vw` where ((`sub_accgroup_vw`.`PARENT_ID` <> 0) and (`sub_accgroup_vw`.`OA_ID` = 0)) */;

--
-- Final view structure for view `sub_accgroup_vw`
--

/*!50001 DROP VIEW IF EXISTS `sub_accgroup_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sub_accgroup_vw` AS select `accgroup`.`ACCGROUP_ID` AS `ACCGROUP_ID`,`accgroup`.`ACCGROUP` AS `ACCGROUP`,`accgroup`.`ACCGROUPDESC` AS `ACCGROUPDESC`,`accgroup`.`ACCTYPE` AS `ACCTYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_CD` = convert(`accgroup`.`ACCTYPE` using utf8)) limit 1) AS `ACCTYPE_NM`,`accgroup`.`CTRACCGROUP` AS `CTRACCGROUP`,`accgroup`.`PLSCHEDULE` AS `PLSCHEDULE`,(select `schedule_mst`.`SCHEDULE` from `schedule_mst` where (`schedule_mst`.`SCHEDULE_ID` = `accgroup`.`PLSCHEDULE`)) AS `PL_SCHEDULE_NM`,`accgroup`.`BSSCHEDULE` AS `BSSCHEDULE`,(select `schedule_mst`.`SCHEDULE` from `schedule_mst` where (`schedule_mst`.`SCHEDULE_ID` = `accgroup`.`BSSCHEDULE`)) AS `BS_SCHEDULE_NM`,`accgroup`.`PARENT_ID` AS `PARENT_ID`,`accgroup`.`IS_CONTRA_ACCOUNT` AS `IS_CONTRA_ACCOUNT`,`accgroup`.`CONTRA_ACCOUNT_REF` AS `CONTRA_ACCOUNT_REF`,`accgroup`.`SHOW_ASSET_LIFE` AS `SHOW_ASSET_LIFE`,`accgroup`.`OA_ID` AS `OA_ID`,`accgroup`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`accgroup`.`CREATEDBY` AS `CREATEDBY`,`accgroup`.`UPDATEDBY` AS `UPDATEDBY`,`accgroup`.`CREATEDON` AS `CREATEDON`,`accgroup`.`UPDATEDON` AS `UPDATEDON`,`accgroup`.`USER_ID` AS `USER_ID`,`accgroup`.`IS_DELETED` AS `IS_DELETED` from `accgroup` order by `accgroup`.`ACCGROUP_ID` */;

--
-- Final view structure for view `sub_accounting_group_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `sub_accounting_group_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sub_accounting_group_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 484) */;

--
-- Final view structure for view `sub_department_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `sub_department_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sub_department_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 271) */;

--
-- Final view structure for view `sub_set_up_exam_term_vw`
--

/*!50001 DROP VIEW IF EXISTS `sub_set_up_exam_term_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sub_set_up_exam_term_vw` AS select `sub_set_up_exam_term`.`SUB_SET_UP_EXAM_TERM_ID` AS `SUB_SET_UP_EXAM_TERM_ID`,`sub_set_up_exam_term`.`SET_UP_EXAM_TERMS_ID` AS `SET_UP_EXAM_TERMS_ID`,(select `set_up_exam_terms`.`EXAM_TERM` from `set_up_exam_terms` where (`set_up_exam_terms`.`SET_UP_EXAM_TERMS_ID` = `sub_set_up_exam_term`.`SET_UP_EXAM_TERMS_ID`)) AS `EXAM_TERM`,`sub_set_up_exam_term`.`EXAM_TYPE` AS `EXAM_TYPE`,(select `exam_type`.`EXAM_TYPE` from `exam_type` where (`exam_type`.`EXAM_TYPE_ID` = `sub_set_up_exam_term`.`EXAM_TYPE`)) AS `EXAM_NM`,`sub_set_up_exam_term`.`PERCENTAGE` AS `PERCENTAGE`,`sub_set_up_exam_term`.`OA_ID` AS `OA_ID`,`sub_set_up_exam_term`.`IS_DELETED` AS `IS_DELETED`,`sub_set_up_exam_term`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`sub_set_up_exam_term`.`USER_ID` AS `USER_ID`,`sub_set_up_exam_term`.`CREATED_BY` AS `CREATED_BY`,`sub_set_up_exam_term`.`CREATED_ON` AS `CREATED_ON`,`sub_set_up_exam_term`.`UPDATED_BY` AS `UPDATED_BY`,`sub_set_up_exam_term`.`UPDATED_ON` AS `UPDATED_ON` from `sub_set_up_exam_term` */;

--
-- Final view structure for view `subdept_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `subdept_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `subdept_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 58) */;

--
-- Final view structure for view `subject_class_mapping_vw`
--

/*!50001 DROP VIEW IF EXISTS `subject_class_mapping_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `subject_class_mapping_vw` AS select `subject_class_mapping`.`ID` AS `ID`,`subject_class_mapping`.`SUBJECT` AS `SUBJECT`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `subject_class_mapping`.`SUBJECT`)) AS `SUBJECT_NM`,`subject_class_mapping`.`CLASS` AS `CLASS`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `subject_class_mapping`.`CLASS`)) AS `CLASS_NM`,`subject_class_mapping`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `subject_class_mapping`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `subject_class_mapping`.`OA_ID`)) AS `OA_NM`,`subject_class_mapping`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `subject_class_mapping`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `subject_class_mapping`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`subject_class_mapping`.`CREATED_ON` AS `CREATED_ON`,`subject_class_mapping`.`CREATED_BY` AS `CREATED_BY`,`subject_class_mapping`.`UPDATED_ON` AS `UPDATED_ON`,`subject_class_mapping`.`UPDATED_BY` AS `UPDATED_BY`,`subject_class_mapping`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `subject_class_mapping`.`USER_ID`)) AS `USER_NM`,`subject_class_mapping`.`IS_DELETED` AS `IS_DELETED` from `subject_class_mapping` */;

--
-- Final view structure for view `subject_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `subject_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `subject_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 668) */;

--
-- Final view structure for view `subject_units_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `subject_units_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `subject_units_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 669) */;

--
-- Final view structure for view `subscription_deposit_type_vw`
--

/*!50001 DROP VIEW IF EXISTS `subscription_deposit_type_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `subscription_deposit_type_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 550) */;

--
-- Final view structure for view `suburb_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `suburb_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `suburb_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 121) */;

--
-- Final view structure for view `suburbname_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `suburbname_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `suburbname_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 121) */;

--
-- Final view structure for view `support_email_vw`
--

/*!50001 DROP VIEW IF EXISTS `support_email_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `support_email_vw` AS select `support_email`.`SID` AS `SID`,`support_email`.`EMAIL` AS `EMAIL`,`support_email`.`EMAIL_INSTRUCTION` AS `EMAIL_INSTRUCTION`,`support_email`.`IS_DELETED` AS `IS_DELETED`,`support_email`.`OA_ID` AS `OA_ID`,`support_email`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`support_email`.`USER_ID` AS `USER_ID`,`support_email`.`CREATED_BY` AS `CREATED_BY`,`support_email`.`CREATED_ON` AS `CREATED_ON`,`support_email`.`UPDATED_BY` AS `UPDATED_BY`,`support_email`.`UPDATED_ON` AS `UPDATED_ON` from `support_email` */;

--
-- Final view structure for view `survey_answer_options_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_answer_options_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_answer_options_vw` AS select `survey_answer_options`.`SURVEY_ANSWERS_OPTIONS_ID` AS `SURVEY_ANSWERS_OPTIONS_ID`,`survey_answer_options`.`QUESTION_ID` AS `QUESTION_ID`,`survey_answer_options`.`ANSWER_GROUP_ID` AS `ANSWER_GROUP_ID`,`survey_answer_options`.`INPUT_OPTION_TYPE_ID` AS `INPUT_OPTION_TYPE_ID`,`survey_answer_options`.`INPUT_OPTION_DESC` AS `INPUT_OPTION_DESC`,`survey_answer_options`.`IS_DELETED` AS `IS_DELETED`,`survey_answer_options`.`GENERATED_IN_SURVEY_ID` AS `GENERATED_IN_SURVEY_ID`,`survey_answer_options`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_answer_options`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_answer_options`.`OA_ID`)) AS `OA_NM`,`survey_answer_options`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_answer_options`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_answer_options`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`survey_answer_options`.`CREATED_BY` AS `CREATED_BY`,`survey_answer_options`.`CREATED_ON` AS `CREATED_ON`,`survey_answer_options`.`UPDATED_BY` AS `UPDATED_BY`,`survey_answer_options`.`UPDATED_ON` AS `UPDATED_ON` from `survey_answer_options` */;

--
-- Final view structure for view `survey_feedback_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_feedback_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_feedback_mst_vw` AS select `sfm`.`SURVEY_FEEDBACK_ID` AS `SURVEY_FEEDBACK_ID`,`sfm`.`SURVEY_REQUEST_ID` AS `SURVEY_REQUEST_ID`,`sm`.`SURVEY_ID` AS `SURVEY_ID`,`sm`.`SURVEY_NAME` AS `SURVEY_NAME`,`sqbm`.`SURVEY_QUESTION_BANK_ID` AS `SURVEY_QUESTION_BANK_ID`,`sqbm`.`SURVEY_QUESTIONAIR_TITLE` AS `SURVEY_QUESTIONAIR_TITLE`,`srm`.`DATE_SENT_ON` AS `DATE_SENT_ON`,`sfm`.`DATE_FEEDBACK_RECIEVED_ON` AS `DATE_FEEDBACK_RECIEVED_ON`,`srm`.`RECIEPIENT_NAME` AS `RECIEPIENT_NAME`,`srm`.`RECIEPIENT_EMAIL` AS `RECIEPIENT_EMAIL`,`sfm`.`OA_ID` AS `OA_ID`,`sfm`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`sfm`.`CREATED_BY` AS `CREATED_BY`,`sfm`.`CREATED_ON` AS `CREATED_ON`,`sfm`.`UPDATED_BY` AS `UPDATED_BY`,`sfm`.`UPDATED_ON` AS `UPDATED_ON` from (((`survey_feedback_mst` `sfm` join `survey_request_mst` `srm` on((`srm`.`SURVEY_REQUEST_ID` = `sfm`.`SURVEY_REQUEST_ID`))) join `survey_mst` `sm` on((`sm`.`SURVEY_ID` = `srm`.`SURVEY_ID`))) join `survey_question_bank_mst` `sqbm` on((`sqbm`.`SURVEY_ID` = `sm`.`SURVEY_ID`))) */;

--
-- Final view structure for view `survey_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_mst_vw` AS select `survey_mst`.`SURVEY_ID` AS `SURVEY_ID`,`survey_mst`.`SURVEY_NAME` AS `SURVEY_NAME`,(select `survey_request_mst`.`DATE_SENT_ON` from `survey_request_mst` where (`survey_mst`.`SURVEY_ID` = `survey_request_mst`.`SURVEY_ID`) limit 1) AS `DATE_SENT_ON`,(select count(`survey_request_mst`.`SURVEY_REQUEST_ID`) from `survey_request_mst` where (`survey_mst`.`SURVEY_ID` = `survey_request_mst`.`SURVEY_ID`)) AS `RECIPIENT_COUNT`,(select `independent_mst`.`MSTR_ID` from `independent_mst` where ('SRSFR' = `independent_mst`.`MSTR_CD`) limit 1) AS `RECEIVEDSTATUSID`,(select count(`survey_request_mst`.`SURVEY_REQUEST_ID`) from `survey_request_mst` where ((`survey_mst`.`SURVEY_ID` = `survey_request_mst`.`SURVEY_ID`) and (`survey_request_mst`.`SURVEY_REQUEST_STATUS_ID` = `RECEIVEDSTATUSID`))) AS `RECEIVED`,`survey_mst`.`IS_DELETED` AS `IS_DELETED`,`survey_mst`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_mst`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_mst`.`OA_ID`)) AS `OA_NM`,`survey_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`survey_mst`.`CREATED_BY` AS `CREATED_BY`,`survey_mst`.`CREATED_ON` AS `CREATED_ON`,`survey_mst`.`UPDATED_BY` AS `UPDATED_BY`,`survey_mst`.`UPDATED_ON` AS `UPDATED_ON` from `survey_mst` */;

--
-- Final view structure for view `survey_question_bank_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_question_bank_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_question_bank_mst_vw` AS select `survey_question_bank_mst`.`SURVEY_QUESTION_BANK_ID` AS `SURVEY_QUESTION_BANK_ID`,`survey_question_bank_mst`.`SURVEY_QUESTIONAIR_TITLE` AS `SURVEY_QUESTIONAIR_TITLE`,`survey_question_bank_mst`.`SURVEY_SUBJECT_LINE_TEXT` AS `SURVEY_SUBJECT_LINE_TEXT`,`survey_question_bank_mst`.`SURVEY_CONTENT_HEADER_TEXT` AS `SURVEY_CONTENT_HEADER_TEXT`,`survey_question_bank_mst`.`SURVEY_CONTENT_BODY_TEXT` AS `SURVEY_CONTENT_BODY_TEXT`,`survey_question_bank_mst`.`SURVEY_CONTENT_SUMMARY_TEXT` AS `SURVEY_CONTENT_SUMMARY_TEXT`,`survey_question_bank_mst`.`SURVEY_ID` AS `SURVEY_ID`,(select `survey_mst`.`SURVEY_NAME` from `survey_mst` where (`survey_mst`.`SURVEY_ID` = `survey_question_bank_mst`.`SURVEY_ID`)) AS `SURVEY_NAME`,`survey_question_bank_mst`.`NO_OF_RECIEPIENT` AS `NO_OF_RECIEPIENT`,`survey_question_bank_mst`.`SURVEY_SENT_FLAG` AS `SURVEY_SENT_FLAG`,`survey_question_bank_mst`.`DATE_SURVEY_SENT_ON` AS `DATE_SURVEY_SENT_ON`,`survey_question_bank_mst`.`IS_DELETED` AS `IS_DELETED`,`survey_question_bank_mst`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_question_bank_mst`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_question_bank_mst`.`OA_ID`)) AS `OA_NM`,`survey_question_bank_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_question_bank_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_question_bank_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`survey_question_bank_mst`.`CREATED_BY` AS `CREATED_BY`,`survey_question_bank_mst`.`CREATED_ON` AS `CREATED_ON`,`survey_question_bank_mst`.`UPDATED_BY` AS `UPDATED_BY`,`survey_question_bank_mst`.`UPDATED_ON` AS `UPDATED_ON` from `survey_question_bank_mst` */;

--
-- Final view structure for view `survey_question_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_question_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_question_mst_vw` AS select `survey_question_mst`.`QUESTION_ID` AS `QUESTION_ID`,`survey_question_mst`.`SURVEY_QUESTION_BANK_ID` AS `SURVEY_QUESTION_BANK_ID`,`survey_question_mst`.`QUESTION_DESC` AS `QUESTION_DESC`,`survey_question_mst`.`QUESTION_INPUT_VALUE_TYPE_ID` AS `QUESTION_INPUT_VALUE_TYPE_ID`,`survey_question_mst`.`ANSWER_GROUP_ID` AS `ANSWER_GROUP_ID`,`survey_question_mst`.`INPUT_OPTION_TYPE_ID` AS `INPUT_OPTION_TYPE_ID`,`survey_question_mst`.`NO_OF_OPTIONS` AS `NO_OF_OPTIONS`,`survey_question_mst`.`IS_DELETED` AS `IS_DELETED`,`survey_question_mst`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_question_mst`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_question_mst`.`OA_ID`)) AS `OA_NM`,`survey_question_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_question_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_question_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`survey_question_mst`.`CREATED_BY` AS `CREATED_BY`,`survey_question_mst`.`CREATED_ON` AS `CREATED_ON`,`survey_question_mst`.`UPDATED_BY` AS `UPDATED_BY`,`survey_question_mst`.`UPDATED_ON` AS `UPDATED_ON` from `survey_question_mst` */;

--
-- Final view structure for view `survey_request_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_request_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_request_mst_vw` AS select `survey_request_mst`.`SURVEY_REQUEST_ID` AS `SURVEY_REQUEST_ID`,`survey_request_mst`.`SURVEY_ID` AS `SURVEY_ID`,(select `survey_mst`.`SURVEY_NAME` from `survey_mst` where (`survey_mst`.`SURVEY_ID` = `survey_request_mst`.`SURVEY_ID`)) AS `SURVEY`,`survey_request_mst`.`CNTCT_ID` AS `CNTCT_ID`,`survey_request_mst`.`DATE_SENT_ON` AS `DATE_SENT_ON`,`survey_request_mst`.`RECIEPIENT_NAME` AS `RECIEPIENT_NAME`,`survey_request_mst`.`RECIEPIENT_EMAIL` AS `RECIEPIENT_EMAIL`,`survey_request_mst`.`SURVEY_REQUEST_STATUS_ID` AS `SURVEY_REQUEST_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `survey_request_mst`.`SURVEY_REQUEST_STATUS_ID`)) AS `SURVEY_REQUEST_STATUS`,`survey_request_mst`.`GUID` AS `GUID`,`survey_request_mst`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_request_mst`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `survey_request_mst`.`OA_ID`)) AS `OA_NM`,`survey_request_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_request_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `survey_request_mst`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`survey_request_mst`.`CREATED_BY` AS `CREATED_BY`,`survey_request_mst`.`CREATED_ON` AS `CREATED_ON`,`survey_request_mst`.`UPDATED_BY` AS `UPDATED_BY`,`survey_request_mst`.`UPDATED_ON` AS `UPDATED_ON` from `survey_request_mst` */;

--
-- Final view structure for view `survey_response_vw`
--

/*!50001 DROP VIEW IF EXISTS `survey_response_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey_response_vw` AS select `sr`.`SURVEY_RESPONSE_ID` AS `SURVEY_RESPONSE_ID`,`sr`.`DEVICE_ID` AS `DEVICE`,`sq`.`QUESTION_DESC` AS `QUESTION`,`sq`.`QUESTION_ID` AS `QUESTION_ID`,`sa`.`INPUT_OPTION_DESC` AS `ANSWER`,`sr`.`IS_DELETED` AS `IS_DELETED`,`sr`.`CREATED_ON` AS `CREATED_ON` from ((`survey_response` `sr` join `survey_question_mst` `sq` on((`sq`.`QUESTION_ID` = `sr`.`QUESTION_ID`))) join `survey_answer_options` `sa` on((`sa`.`SURVEY_ANSWERS_OPTIONS_ID` = `sr`.`ANSWER_ID`))) where (`sr`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `sw_app_hier_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `sw_app_hier_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sw_app_hier_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 74) */;

--
-- Final view structure for view `syllabus_management_vw`
--

/*!50001 DROP VIEW IF EXISTS `syllabus_management_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `syllabus_management_vw` AS select `syllabus_management`.`SYLLABUS_ID` AS `SYLLABUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `syllabus_management`.`DEPARTMENT`)) AS `DEPARTMENT`,`syllabus_management`.`DEPARTMENT` AS `DEPARTMENT_ID`,`syllabus_management`.`SUBJECT_ID` AS `SUBJECT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `syllabus_management`.`SUBJECT_ID`)) AS `SUBJECT`,`syllabus_management`.`SYLLABUS` AS `SYLLABUS`,`syllabus_management`.`SORT_NUMBER` AS `SORT_NUMBER`,if((`syllabus_management`.`ENABLED` = 0),'NO','YES') AS `ENABLED`,`syllabus_management`.`OA_ID` AS `OA_ID`,`syllabus_management`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`syllabus_management`.`USER_ID` AS `USER_ID`,`syllabus_management`.`IS_DELETED` AS `IS_DELETED`,`syllabus_management`.`CREATED_ON` AS `CREATED_ON`,`syllabus_management`.`UPDATED_ON` AS `UPDATED_ON`,`syllabus_management`.`CREATED_BY` AS `CREATED_BY`,`syllabus_management`.`UPDATED_BY` AS `UPDATED_BY` from `syllabus_management` */;

--
-- Final view structure for view `syllabus_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `syllabus_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `syllabus_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 667) */;

--
-- Final view structure for view `system_entities_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_entities_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_entities_vw` AS select `ct`.`TYP_ID` AS `TYP_ID`,`ct`.`TYP_CD` AS `TYP_CD`,`ct`.`TYP_NM` AS `TYP_NM`,`ct`.`VIEW_NM` AS `VIEW_NM`,`ct`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,(select `pct`.`TYP_NM` from `common_type` `pct` where (`pct`.`TYP_ID` = `ct`.`PARENT_TYP_ID`)) AS `PARENT_TYP_NM`,`ct`.`IS_EDITABLE` AS `IS_EDITABLE`,`ct`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`ct`.`TABLE_TYPE` AS `TABLE_TYPE`,`ct`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`ct`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`ct`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,(select count(1) from `independent_mst` `im` where (`ct`.`TYP_ID` = `im`.`TYP_ID`)) AS `TOTAL_IM_RECORDS`,`ct`.`IS_DELETED` AS `IS_DELETED`,`ct`.`OA_ID` AS `ORG_ACC_ID`,(select `oa`.`OA_CD` from `org_accounts` `oa` where (`oa`.`OA_ID` = `ct`.`OA_ID`)) AS `OA_CD`,(select `oa`.`OA_NM` from `org_accounts` `oa` where (`oa`.`OA_ID` = `ct`.`OA_ID`)) AS `OA_NM`,`ct`.`OA_BRAND_ID` AS `BRAND_ID`,(select `ob`.`OA_BRAND_CD` from `oa_brands` `ob` where (`ob`.`OA_BRAND_ID` = `ct`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `ob`.`OA_BRAND_NM` from `oa_brands` `ob` where (`ob`.`OA_BRAND_ID` = `ct`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`ct`.`USER_ID` AS `USERID`,(select `um`.`USER_NAME` from `user_mst` `um` where (`um`.`USER_ID` = `ct`.`USER_ID`)) AS `USER_NM`,`ct`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `um`.`USER_NAME` from `user_mst` `um` where (`um`.`USER_ID` = `ct`.`CREATED_BY`)) AS `CREATED_BY_USER_NAME`,`ct`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `um`.`USER_NAME` from `user_mst` `um` where (`um`.`USER_ID` = `ct`.`UPDATED_BY`)) AS `UPDATED_BY_USER_NAME`,`ct`.`CREATED_ON` AS `CREATED_ON`,`ct`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` `ct` where (`ct`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `system_level_setting_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_level_setting_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_level_setting_vw` AS select `SGM`.`SETTING_GROUP_ID` AS `SETTING_GROUP_ID`,`SGM`.`SETTING_GROUP_NAME_ID` AS `SETTING_GROUP_NAME_ID`,`SGM`.`SETTING_GROUP_NAME_CD` AS `SETTING_GROUP_NAME_CD`,(select `IM`.`MSTR_NM` from `independent_mst` `IM` where (`IM`.`MSTR_ID` = `SGM`.`SETTING_GROUP_NAME_ID`)) AS `SETTING_GROUP`,`SGM`.`SETTING_GROUP_NAME` AS `SETTING_GROUP_NAME`,`SGM`.`SETTING_TYPE_ID` AS `SETTING_TYPE_ID`,`SGM`.`SETTING_TYPE_CD` AS `SETTING_TYPE_CD`,`SGM`.`ENABLED` AS `ENABLED`,(select `IM`.`MSTR_NM` from `independent_mst` `IM` where (`IM`.`MSTR_ID` = `SGM`.`SETTING_TYPE_ID`)) AS `SETTING_TYPE`,`SGM`.`IS_DELETED` AS `IS_DELETED`,`SGM`.`OA_ID` AS `OA_ID`,(select `OA`.`OA_CD` from `org_accounts` `OA` where (`OA`.`OA_ID` = `SGM`.`OA_ID`)) AS `OA_CD`,(select `OA`.`OA_NM` from `org_accounts` `OA` where (`OA`.`OA_ID` = `SGM`.`OA_ID`)) AS `OA_NM`,`SGM`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `OAB`.`OA_BRAND_CD` from `oa_brands` `OAB` where (`OAB`.`OA_BRAND_ID` = `SGM`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `OAB`.`OA_BRAND_NM` from `oa_brands` `OAB` where (`OAB`.`OA_BRAND_ID` = `SGM`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`SGM`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `um`.`USER_NAME` from `user_mst` `um` where (`um`.`USER_ID` = `SGM`.`CREATED_BY`)) AS `CREATED_BY_USER_NAME`,`SGM`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `um`.`USER_NAME` from `user_mst` `um` where (`um`.`USER_ID` = `SGM`.`UPDATED_BY`)) AS `UPDATED_BY_USER_NAME`,`SGM`.`CREATED_ON` AS `CREATED_ON`,`SGM`.`UPDATED_ON` AS `UPDATED_ON` from `setting_group_mst` `SGM` where (`SGM`.`SETTING_TYPE_CD` = 'STSAS') */;

--
-- Final view structure for view `system_setting_attribute_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_setting_attribute_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_setting_attribute_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 3) */;

--
-- Final view structure for view `system_setting_attribute_value_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_setting_attribute_value_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_setting_attribute_value_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 5) */;

--
-- Final view structure for view `system_setting_ref_type_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_setting_ref_type_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_setting_ref_type_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 4) */;

--
-- Final view structure for view `system_setting_vw`
--

/*!50001 DROP VIEW IF EXISTS `system_setting_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `system_setting_vw` AS select `systm_setting`.`SYSTM_SETTING_ID` AS `SYSTM_SETTING_ID`,`systm_setting`.`SYSTM_ATTRBUTE_ID` AS `SYSTM_ATTRBUTE_ID`,`systm_setting`.`REF_TYPE_ID` AS `REF_TYPE_ID`,(select `systm_setting`.`SYSTM_ATTRBUTE_ID` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `systm_setting`.`SYSTM_ATTRBUTE_ID`)) AS `SYSTM_ATTRBUTE_CD`,(select `systm_setting`.`SYSTM_ATTRBUTE_ID` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `systm_setting`.`SYSTM_ATTRBUTE_ID`)) AS `SYSTM_ATTRBUTE_NM`,`systm_setting`.`REF_ID` AS `SYSTM_ATTRBUTE_VALUE_ID`,`systm_setting`.`REF_ID` AS `REF_ID`,`systm_setting`.`REF_CD` AS `REF_CD`,`systm_setting`.`ATTRIBUTE_VALUE_ID` AS `ATTRIBUTE_VALUE_ID`,`systm_setting`.`IS_CURRENT` AS `IS_CURRENT`,(select `independent_mst`.`MSTR_CD` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `SYSTM_ATTRBUTE_VALUE_ID`)) AS `SYSTM_ATTRBUTE_VALUE_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `SYSTM_ATTRBUTE_VALUE_ID`)) AS `SYSTM_ATTRBUTE_VALUE_NM`,`systm_setting`.`SYSTM_SETTING_VALUE` AS `SYSTM_SETTING_VALUE`,`systm_setting`.`DESCRIPTION` AS `DESCRIPTION`,`systm_setting`.`IS_ENABLED` AS `IS_ENABLED`,`systm_setting`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`systm_setting`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`systm_setting`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`systm_setting`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`systm_setting`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`systm_setting`.`CREATED_ON` AS `CREATED_ON`,`systm_setting`.`UPDATED_ON` AS `UPDATED_ON`,`systm_setting`.`IS_DELETED` AS `IS_DELETED` from `systm_setting` */;

--
-- Final view structure for view `systempermisiontype_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `systempermisiontype_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `systempermisiontype_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 1) */;

--
-- Final view structure for view `systm_glssry_vw`
--

/*!50001 DROP VIEW IF EXISTS `systm_glssry_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `systm_glssry_vw` AS select `systm_glssry`.`GLSSRY_ID` AS `GLSSRY_ID`,`systm_glssry`.`GLSSRY_CD` AS `GLSSRY_CD`,`systm_glssry`.`GLSSRY_MNNG` AS `GLSSRY_MNNG`,`systm_glssry`.`GLSSRY_DSCRPTN` AS `GLSSRY_DSCRPTN`,`systm_glssry`.`IS_DELETED` AS `IS_DELETED` from `systm_glssry` */;

--
-- Final view structure for view `systm_lst_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `systm_lst_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `systm_lst_dtl_vw` AS select `systm_lst_dtl`.`TBL_ID` AS `TBL_ID`,`systm_lst_dtl`.`TBL_NM` AS `TBL_NM`,`systm_lst_dtl`.`LST_NMBR` AS `LST_NMBR`,`systm_lst_dtl`.`IS_DELETED` AS `IS_DELETED`,`systm_lst_dtl`.`USER_ID` AS `USER_ID`,`systm_lst_dtl`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`systm_lst_dtl`.`OA_ID` AS `OA_ID`,`systm_lst_dtl`.`CREATED_ON` AS `CREATED_ON`,`systm_lst_dtl`.`UPDATED_ON` AS `UPDATED_ON`,`systm_lst_dtl`.`CREATED_BY` AS `CREATED_BY` from `systm_lst_dtl` */;

--
-- Final view structure for view `task_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `task_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `task_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 81) */;

--
-- Final view structure for view `tasklist_status_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `tasklist_status_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tasklist_status_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 258) */;

--
-- Final view structure for view `tasklist_vw`
--

/*!50001 DROP VIEW IF EXISTS `tasklist_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tasklist_vw` AS select `tasklist`.`TASKLIST_ID` AS `TASKLIST_ID`,`tasklist`.`PROJECT_ID` AS `PROJECT_ID`,`tasklist`.`NAME` AS `NAME`,`tasklist`.`DESC` AS `DESC`,`tasklist`.`START` AS `START`,`tasklist`.`STATUS` AS `STATUS`,`tasklist`.`ACCESS` AS `ACCESS`,`tasklist`.`MILESTONE` AS `MILESTONE`,`tasklist`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`tasklist`.`OA_ID` AS `OA_ID`,`tasklist`.`USER_ID` AS `USER_ID`,`tasklist`.`CREATED_ID` AS `CREATED_ID`,`tasklist`.`UPDATED_BY` AS `UPDATED_BY`,`tasklist`.`CREATED_ON` AS `CREATED_ON`,`tasklist`.`UPDATED_ON` AS `UPDATED_ON` from `tasklist` */;

--
-- Final view structure for view `tasks_vw`
--

/*!50001 DROP VIEW IF EXISTS `tasks_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tasks_vw` AS select `tasks`.`TASK_ID` AS `TASK_ID`,`tasks`.`START` AS `START`,`tasks`.`END` AS `END`,`tasks`.`TITLE` AS `TITLE`,`tasks`.`TEXT` AS `TEXT`,`tasks`.`LIST` AS `LIST`,`tasks`.`STATUS` AS `STATUS`,`tasks`.`PROJECT_ID` AS `PROJECT_ID`,`tasks`.`PRIORITY` AS `PRIORITY`,`tasks`.`SEQUENCE` AS `SEQUENCE`,`tasks`.`ESTIMITED_TIME` AS `ESTIMITED_TIME`,`tasks`.`DUE_DATE` AS `DUE_DATE`,`tasks`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`tasks`.`USER_ID` AS `USER_ID`,`tasks`.`OA_ID` AS `OA_ID`,`tasks`.`UPDATED_BY` AS `UPDATED_BY`,`tasks`.`CREATED_BY` AS `CREATED_BY`,`tasks`.`CREATED_ON` AS `CREATED_ON`,`tasks`.`UPDATED_ON` AS `UPDATED_ON` from `tasks` */;

--
-- Final view structure for view `tax_head_names_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `tax_head_names_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tax_head_names_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 151) */;

--
-- Final view structure for view `tax_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `tax_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tax_mst_vw` AS select `tax_mst`.`TAX_ID` AS `TAX_ID`,`tax_mst`.`TAX_CODE` AS `TAX_CODE`,`tax_mst`.`TAX_NAME` AS `TAX_NAME`,`tax_mst`.`TAX_PERCENT` AS `TAX_PERCENT`,`tax_mst`.`ACTIVE_STAT` AS `ACTIVE_STAT`,`tax_mst`.`TAX_CALC_SEQ` AS `TAX_CALC_SEQ`,`tax_mst`.`TAX_COUNTRY_ID` AS `TAX_COUNTRY_ID`,`tax_mst`.`ACC_GROUP` AS `ACC_GROUP`,`tax_mst`.`SUBACC_GROUP` AS `SUBACC_GROUP`,`tax_mst`.`OPENING_BAL` AS `OPENING_BAL`,`tax_mst`.`OA_ID` AS `OA_ID`,`tax_mst`.`USER_ID` AS `USER_ID`,`tax_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`tax_mst`.`CREATED_BY` AS `CREATED_BY`,`tax_mst`.`CREATED_ON` AS `CREATED_ON`,`tax_mst`.`UPDATED_BY` AS `UPDATED_BY`,`tax_mst`.`UPDATED_ON` AS `UPDATED_ON`,`tax_mst`.`IS_DELETED` AS `IS_DELETED` from `tax_mst` */;

--
-- Final view structure for view `tax_payment_method_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `tax_payment_method_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tax_payment_method_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 152) */;

--
-- Final view structure for view `template_type_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `template_type_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `template_type_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 206) */;

--
-- Final view structure for view `territory_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `territory_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `territory_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 124) */;

--
-- Final view structure for view `test_applicant_vw`
--

/*!50001 DROP VIEW IF EXISTS `test_applicant_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `test_applicant_vw` AS select `test_applicant`.`ID` AS `ID`,`test_applicant`.`NAME` AS `NAME`,`test_applicant`.`ADDRESS` AS `ADDRESS`,`test_applicant`.`CONTACT` AS `CONTACT`,`test_applicant`.`OA_ID` AS `OA_ID`,`test_applicant`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`test_applicant`.`USER_ID` AS `USER_ID`,`test_applicant`.`IS_DELETE` AS `IS_DELETE`,`test_applicant`.`CREATED_ON` AS `CREATED_ON`,`test_applicant`.`CREATED_BY` AS `CREATED_BY`,`test_applicant`.`UPADET_ON` AS `UPADET_ON`,`test_applicant`.`UPATED_BY` AS `UPATED_BY` from `test_applicant` */;

--
-- Final view structure for view `test_permission_class_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `test_permission_class_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `test_permission_class_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`permission_dtl`.`PERMISSIONS_DTL_ID` AS `PERMISSIONS_DTL_ID`,`permission_dtl`.`PERMISSIONS_CLASS_ID` AS `PERMISSIONS_CLASS_ID`,`permission_dtl`.`PERMISSIONS_REF_TYPE_ID` AS `PERMISSIONS_REF_TYPE_ID`,`permission_dtl`.`PERMISSIONS_REF_ID` AS `PERMISSIONS_REF_ID`,`permission_dtl`.`PERMISSIONS_ID` AS `PERMISSIONS_ID`,`permission_dtl`.`PERMISSION_ENABLED` AS `PERMISSION_ENABLED`,`permission_dtl`.`PERMISSION_READ_ONLY` AS `PERMISSION_READ_ONLY`,`permission_dtl`.`PERMISSION_MODIFY` AS `PERMISSION_MODIFY`,`permission_dtl`.`PERMISSION_DELETE` AS `PERMISSION_DELETE`,`permission_dtl`.`PERMISSION_PRINT` AS `PERMISSION_PRINT`,`permission_dtl`.`PERMISSION_EXECUTE` AS `PERMISSION_EXECUTE`,`permission_dtl`.`PERMISSION_INSERT` AS `PERMISSION_INSERT`,`permission_dtl`.`IS_DELETED` AS `IS_DELETED`,`permission_dtl`.`OA_ID` AS `OA_ID`,`permission_dtl`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`permission_dtl`.`USER_ID` AS `USER_ID`,`permission_dtl`.`CREATED_BY` AS `CREATED_BY`,`permission_dtl`.`UPDATED_BY` AS `UPDATED_BY`,`permission_dtl`.`CREATED_ON` AS `CREATED_ON`,`permission_dtl`.`UPDATED_ON` AS `UPDATED_ON` from (`independent_mst` join `permission_dtl` on((`independent_mst`.`MSTR_ID` = `permission_dtl`.`PERMISSIONS_CLASS_ID`))) where ((`independent_mst`.`TYP_ID` = 49) and (`permission_dtl`.`PERMISSIONS_REF_TYPE_ID` = 65)) */;

--
-- Final view structure for view `testing_case_vw`
--

/*!50001 DROP VIEW IF EXISTS `testing_case_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `testing_case_vw` AS select `testing_case`.`ID` AS `ID`,`testing_case`.`DATA_DATE` AS `DATA_DATE`,`testing_case`.`USER_ID` AS `USER_ID`,`testing_case`.`ORG_EMAIL` AS `ORG_EMAIL`,`testing_case`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`testing_case`.`CATEGORY` AS `CATEGORY` from `testing_case` */;

--
-- Final view structure for view `theme_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `theme_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `theme_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 79) */;

--
-- Final view structure for view `ticket_options_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_options_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_options_vw` AS select `ticket_options`.`TO_ID` AS `TO_ID`,`ticket_options`.`TICKET_NO_FORMAT` AS `TICKET_NO_FORMAT`,`ticket_options`.`TICKET_NO_SEQ` AS `TICKET_NO_SEQ`,`ticket_options`.`STATUS` AS `STATUS`,`ticket_options`.`PRIORITY` AS `PRIORITY`,`ticket_options`.`SLA` AS `SLA`,`ticket_options`.`HELP_TOPIC` AS `HELP_TOPIC`,`ticket_options`.`MAX_OPEN_TICKETS` AS `MAX_OPEN_TICKETS`,`ticket_options`.`AGENT_COLLISION` AS `AGENT_COLLISION`,`ticket_options`.`HUMAN_VERIFICATION` AS `HUMAN_VERIFICATION`,`ticket_options`.`CLAIM_ON_RESPONSE` AS `CLAIM_ON_RESPONSE`,`ticket_options`.`ASSIGNED_TICKETS` AS `ASSIGNED_TICKETS`,`ticket_options`.`ANSWERED_TICKETS` AS `ANSWERED_TICKETS`,`ticket_options`.`AGENT_IDENTITY_MASKING` AS `AGENT_IDENTITY_MASKING`,`ticket_options`.`ENABLE_HTML` AS `ENABLE_HTML`,`ticket_options`.`ALLOW_CLIENT_UPDATES` AS `ALLOW_CLIENT_UPDATES`,`ticket_options`.`ENDUSER_ATTACH_SETTINGS` AS `ENDUSER_ATTACH_SETTINGS`,`ticket_options`.`AGENT_MAX_FILE_SIZE` AS `AGENT_MAX_FILE_SIZE`,`ticket_options`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`ticket_options`.`OA_BRAND_ID` AS `OABRANDID`,`ticket_options`.`USER_ID` AS `USERID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`ticket_options`.`CREATED_BY` AS `CREATEDBY`,`ticket_options`.`CREATED_ON` AS `CREATED_ON`,`ticket_options`.`UPDATED_BY` AS `UPDATEDBY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATEDBY`)) AS `CREATED_BY_USER_NAME`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATEDBY`)) AS `UPDATED_BY_USER_NAME`,`ticket_options`.`UPDATED_ON` AS `UPDATED_ON`,`ticket_options`.`IS_DELETED` AS `IS_DELETED` from `ticket_options` */;

--
-- Final view structure for view `ticket_priority_config_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_priority_config_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_priority_config_vw` AS select `ticket_priority_config`.`PRIORITY_ID` AS `PRIORITY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_priority_config`.`PRIORITY`) limit 1) AS `PRIORITY_NAME`,`ticket_priority_config`.`PRIORITY` AS `PRIORITY`,`ticket_priority_config`.`PRIORITY_DESC` AS `PRIORITY_DESC`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_priority_config`.`PRIORITY_COLOR`)) AS `PRIORITY_COLOR`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_priority_config`.`PRIORITY_URGENCY`)) AS `PRIORITY_URGENCY`,`ticket_priority_config`.`IS_PUBLIC` AS `IS_PUBLIC`,`ticket_priority_config`.`IS_DELETED` AS `IS_DELETED`,`ticket_priority_config`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`) limit 1) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`) limit 1) AS `OA_NM`,`ticket_priority_config`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `oa_brands`.`OA_BRAND_ID`) limit 1) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `oa_brands`.`OA_BRAND_ID`) limit 1) AS `OA_BRAND_NM`,`ticket_priority_config`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`) limit 1) AS `CREATED_BY_USER_NAME`,`ticket_priority_config`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`) limit 1) AS `UPDATED_BY_USER_NAME`,`ticket_priority_config`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`) limit 1) AS `USER_NAME`,`ticket_priority_config`.`CREATEDON` AS `CREATEDON`,`ticket_priority_config`.`UPDATEDON` AS `UPDATEDON` from `ticket_priority_config` */;

--
-- Final view structure for view `ticket_settings_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_settings_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_settings_vw` AS select `ticket_settings`.`TCTS_ID` AS `TCTS_ID`,`ticket_settings`.`STATUS` AS `STATUS`,`ticket_settings`.`URL` AS `URL`,`ticket_settings`.`TITLE` AS `TITLE`,`ticket_settings`.`DEPARTMENT` AS `DEPARTMENT`,`ticket_settings`.`PAGE_SIZE` AS `PAGE_SIZE`,`ticket_settings`.`LOG_LEVEL` AS `LOG_LEVEL`,`ticket_settings`.`PURGE_LOGS` AS `PURGE_LOGS`,`ticket_settings`.`NAME_FORMATTING` AS `NAME_FORMATTING`,`ticket_settings`.`TIME_FORMAT` AS `TIME_FORMAT`,`ticket_settings`.`DATE_FORMAT` AS `DATE_FORMAT`,`ticket_settings`.`DATE_TIME_FORMAT` AS `DATE_TIME_FORMAT`,`ticket_settings`.`DAY_DATE_TIME_FORMAT` AS `DAY_DATE_TIME_FORMAT`,`ticket_settings`.`TIME_ZONE` AS `TIME_ZONE`,`ticket_settings`.`DAYLIGHT_SAVING` AS `DAYLIGHT_SAVING`,`ticket_settings`.`OA_ID` AS `OA_ID`,`ticket_settings`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`ticket_settings`.`USER_ID` AS `USER_ID`,`ticket_settings`.`CREATED_BY` AS `CREATED_BY`,`ticket_settings`.`CREATED_ON` AS `CREATED_ON`,`ticket_settings`.`UPDATED_BY` AS `UPDATED_BY`,`ticket_settings`.`UPDATED_ON` AS `UPDATED_ON`,`ticket_settings`.`IS_DELETED` AS `IS_DELETED` from `ticket_settings` */;

--
-- Final view structure for view `ticket_status_config_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_status_config_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_status_config_vw` AS select `ticket_status_config`.`TICKET_STATUS_ID` AS `TICKET_STATUS_ID`,`ticket_status_config`.`STATUS_ID` AS `STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_status_config`.`STATUS_ID`)) AS `STATUS_NAME`,`ticket_status_config`.`MODE` AS `MODE`,`ticket_status_config`.`FLAGS` AS `FLAGS`,`ticket_status_config`.`SORTING` AS `SORTING`,`ticket_status_config`.`PROPERTIES` AS `PROPERTIES`,`ticket_status_config`.`IS_DELETED` AS `IS_DELETED`,`ticket_status_config`.`OA_ID` AS `OAID`,`ticket_status_config`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`ticket_status_config`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `oa_brands`.`OA_BRAND_ID`) limit 1) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`ticket_status_config`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`ticket_status_config`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`ticket_status_config`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`ticket_status_config`.`CREATEDON` AS `CREATEDON`,`ticket_status_config`.`UPDATEDON` AS `UPDATEDON` from `ticket_status_config` */;

--
-- Final view structure for view `ticket_thread_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_thread_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_thread_vw` AS select `ticket_thread`.`ID` AS `ID`,`ticket_thread`.`PID` AS `PID`,`ticket_thread`.`TICKET_ID` AS `TICKET_ID`,`ticket_thread`.`TICKET_ID` AS `TICKETID`,(select `ticket`.`SUBJECT` from `ticket` where (`ticket`.`TICKET_ID` = `TICKETID`)) AS `TICKET_SUBJECT`,`ticket_thread`.`STAFF_ID` AS `STAFF_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_thread`.`STAFF_ID`)) AS `STAFF`,`ticket_thread`.`RAISED_BY` AS `RAISED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `ticket_thread`.`RAISED_BY`)) AS `RAISED_BY_NM`,`ticket_thread`.`THREAD_TYPE` AS `THREAD_TYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `ticket_thread`.`THREAD_TYPE`)) AS `THREAD_TYPE_NM`,`ticket_thread`.`POSTER` AS `POSTER`,`ticket_thread`.`SOURCE` AS `SOURCE`,`ticket_thread`.`TITLE` AS `TITLE`,`ticket_thread`.`BODY` AS `BODY`,`ticket_thread`.`FORMAT` AS `FORMAT`,`ticket_thread`.`IP_ADDRESS` AS `IP_ADDRESS`,`ticket_thread`.`ATTACHMENT` AS `ATTACHMENT`,`ticket_thread`.`IS_DELETED` AS `IS_DELETED`,`ticket_thread`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`ticket_thread`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`ticket_thread`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`ticket_thread`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`ticket_thread`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`ticket_thread`.`CREATEDON` AS `CREATEDON`,`ticket_thread`.`UPDATEDON` AS `UPDATEDON` from `ticket_thread` */;

--
-- Final view structure for view `ticket_vw`
--

/*!50001 DROP VIEW IF EXISTS `ticket_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ticket_vw` AS select `ticket`.`TICKET_ID` AS `TICKET_ID`,`ticket`.`SUBJECT` AS `SUBJECT`,`ticket`.`PRIORITY` AS `PRIORITY`,`ticket`.`RAISED_BY` AS `RAISED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `ticket`.`RAISED_BY`)) AS `RAISED_BY_NM`,`ticket`.`STATUS_ID` AS `STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`ticket`.`STATUS_ID` = `independent_mst`.`MSTR_ID`)) AS `STATUS`,`ticket`.`DEPT_ID` AS `DEPT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`ticket`.`DEPT_ID` = `independent_mst`.`MSTR_ID`)) AS `DEPPARTMENT`,`ticket`.`TOPIC_ID` AS `TOPIC_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`ticket`.`TOPIC_ID` = `independent_mst`.`MSTR_ID`)) AS `TOPIC`,`ticket`.`TEAM_ID` AS `TEAM_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`ticket`.`TEAM_ID` = `independent_mst`.`MSTR_ID`)) AS `TEAM`,`ticket`.`STAFF_ID` AS `STAFF_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`ticket`.`STAFF_ID` = `independent_mst`.`MSTR_ID`)) AS `STAFF`,`ticket`.`SLA_IS` AS `SLA_IS`,`ticket`.`FLAGS` AS `FLAGS`,`ticket`.`IP_ADDRESS` AS `IP_ADDRESS`,`ticket`.`SOURCE` AS `SOURCE`,`ticket`.`IS_OVERDUE` AS `IS_OVERDUE`,`ticket`.`IS_ANSWERED` AS `IS_ANSWERED`,`ticket`.`DUE_DATE` AS `DUE_DATE`,`ticket`.`REOPENED` AS `REOPENED`,`ticket`.`CLOSED` AS `CLOSED`,`ticket`.`LAST_MESSAGE` AS `LAST_MESSAGE`,`ticket`.`LAST_REOPEN` AS `LAST_REOPEN`,`ticket`.`IS_DELETED` AS `IS_DELETED`,`ticket`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`ticket`.`OA_BRAND_ID` AS `OABRANDID`,`ticket`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`ticket`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`ticket`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`ticket`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`ticket`.`CREATEDON` AS `CREATEDON`,`ticket`.`UPDATEDON` AS `UPDATEDON`,`ticket`.`ATTACHMENT` AS `ATTACHMENT` from `ticket` */;

--
-- Final view structure for view `timesheet_action_log_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_action_log_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_action_log_vw` AS select `timesheet_action_log`.`TS_ACTION_LOG_ID` AS `TS_ACTION_LOG_ID`,`timesheet_action_log`.`TS_ID` AS `TS_ID`,`timesheet_action_log`.`COMMENT` AS `COMMENT`,`timesheet_action_log`.`TS_ACTION_ID` AS `TS_ACTION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet_action_log`.`TS_ACTION_ID` = `independent_mst`.`MSTR_ID`)) AS `TS_ACTION_NM`,`timesheet_action_log`.`ACTION` AS `ACTION`,`timesheet_action_log`.`DATE_TIME` AS `DATE_TIME`,`timesheet_action_log`.`PERFROMED_BY` AS `PERFROMED_BY`,(select `user_mst`.`USER_NAME` from `user_mst` where (`timesheet_action_log`.`PERFROMED_BY` = `user_mst`.`USER_ID`)) AS `PEFORMED_BY_NM`,`timesheet_action_log`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`timesheet_action_log`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`timesheet_action_log`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_NM`,`timesheet_action_log`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`timesheet_action_log`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`timesheet_action_log`.`CREATEDON` AS `CREATED_ON`,`timesheet_action_log`.`UPDATEDON` AS `UPDATED_ON`,`timesheet_action_log`.`IS_DELETED` AS `IS_DELETED` from `timesheet_action_log` */;

--
-- Final view structure for view `timesheet_action_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_action_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_action_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 179) */;

--
-- Final view structure for view `timesheet_activity_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_activity_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_activity_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 178) */;

--
-- Final view structure for view `timesheet_employee_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_employee_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_employee_vw` AS select `te`.`TS_EMP_ID` AS `TS_EMP_ID`,`te`.`EMP_NM` AS `EMP_NM`,`te`.`REF_EMP_ID` AS `REF_EMP_ID`,`te`.`REF_EMP_CD` AS `REF_EMP_CD`,if((`te`.`IS_MANAGER` = 1),'Yes','No') AS `IS_MANAGER`,`te`.`MANAGER_ID` AS `MANAGER_ID`,(select `tem`.`EMP_NM` from `timesheet_employee` `tem` where (`tem`.`TS_EMP_ID` = `te`.`MANAGER_ID`)) AS `APPROVER_NM`,`te`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,(select `emp_mst`.`EMP_STATUS_ID` from `emp_mst` where (`emp_mst`.`REF_EMP_ID` = `te`.`REF_EMP_ID`) limit 1) AS `EMP_STATUS_ID`,`te`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`te`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`te`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`te`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`te`.`CREATEDON` AS `CREATED_ON`,`te`.`UPDATEDON` AS `UPDATED_ON`,`te`.`IS_DELETED` AS `IS_DELETED` from `timesheet_employee` `te` */;

--
-- Final view structure for view `timesheet_item_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_item_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_item_vw` AS select `timesheet_item`.`TS_ITEM_ID` AS `TS_ITEM_ID`,`timesheet_item`.`TS_ID` AS `TS_ID`,cast(`timesheet_item`.`TS_DATE` as date) AS `TS_DATE`,`timesheet_item`.`START_TIME` AS `START_TIME`,`timesheet_item`.`END_TIME` AS `END_TIME`,`timesheet_item`.`DURATION` AS `DURATION`,`timesheet_item`.`DURATION_UNIT_ID` AS `DURATION_UNIT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timesheet_item`.`DURATION_UNIT_ID`) limit 1) AS `DURATION_UNIT`,`timesheet_item`.`COMMENT` AS `COMMENT`,`timesheet_item`.`TS_PRJ_ID` AS `TS_PRJ_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet_item`.`TS_PRJ_ID` = `independent_mst`.`MSTR_ID`) limit 1) AS `PRJ_NM`,`timesheet_item`.`TS_ACTIVITY_ID` AS `TS_ACTIVITY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet_item`.`TS_ACTIVITY_ID` = `independent_mst`.`MSTR_ID`) limit 1) AS `TS_ACTIVITY_NM`,`timesheet_item`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`) limit 1) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`) limit 1) AS `OA_NM`,`timesheet_item`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`) limit 1) AS `USER_NM`,`timesheet_item`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) limit 1) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_CD` = `OABRANDID`) limit 1) AS `OA_BRAND_NM`,`timesheet_item`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`) limit 1) AS `CREATED_BY_USER_NAME`,`timesheet_item`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`) limit 1) AS `UPDATED_BY_USER_NAME`,`timesheet_item`.`CREATEDON` AS `CREATED_ON`,`timesheet_item`.`UPDATEDON` AS `UPDATED_ON`,`timesheet_item`.`IS_DELETED` AS `IS_DELETED`,`timesheet_item`.`PERIOD_ID` AS `PERIOD_ID` from `timesheet_item` */;

--
-- Final view structure for view `timesheet_period_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_period_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_period_mst_vw` AS select `period_mst_vw`.`PERIOD_ID` AS `PERIOD_ID`,`period_mst_vw`.`PERIOD_TYPE_ID` AS `PERIOD_TYPE_ID`,`period_mst_vw`.`PERIOD_TYP_CD` AS `PERIOD_TYP_CD`,`period_mst_vw`.`PERIOD_TYP` AS `PERIOD_TYP`,`period_mst_vw`.`PERIOD_START_DATE` AS `PERIOD_START_DATE`,`period_mst_vw`.`PERIOD_END_DATE` AS `PERIOD_END_DATE`,`period_mst_vw`.`FISCAL_PERIOD_DESC` AS `FISCAL_PERIOD_DESC`,`period_mst_vw`.`PERIOD_STATUS_ID` AS `PERIOD_STATUS_ID`,`period_mst_vw`.`PERIOD_STATUS_CD` AS `PERIOD_STATUS_CD`,`period_mst_vw`.`PERIOD_STATUS` AS `PERIOD_STATUS`,`period_mst_vw`.`OAID` AS `OAID`,`period_mst_vw`.`OA_CD` AS `OA_CD`,`period_mst_vw`.`OA_NM` AS `OA_NM`,`period_mst_vw`.`USERID` AS `USERID`,`period_mst_vw`.`USER_NM` AS `USER_NM`,`period_mst_vw`.`OABRANDID` AS `OABRANDID`,`period_mst_vw`.`OA_BRAND_CD` AS `OA_BRAND_CD`,`period_mst_vw`.`OA_BRAND_NM` AS `OA_BRAND_NM`,`period_mst_vw`.`CREATED_BY_USER_ID` AS `CREATED_BY_USER_ID`,`period_mst_vw`.`CREATED_BY_USER_NAME` AS `CREATED_BY_USER_NAME`,`period_mst_vw`.`UPDATED_BY_USER_ID` AS `UPDATED_BY_USER_ID`,`period_mst_vw`.`UPDATED_BY_USER_NAME` AS `UPDATED_BY_USER_NAME`,`period_mst_vw`.`CREATED_ON` AS `CREATED_ON`,`period_mst_vw`.`UPDATED_ON` AS `UPDATED_ON`,`period_mst_vw`.`IS_DELETED` AS `IS_DELETED` from `period_mst_vw` where (`period_mst_vw`.`PERIOD_TYP_CD` = 'OPTS') */;

--
-- Final view structure for view `timesheet_project_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_project_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_project_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 177) */;

--
-- Final view structure for view `timesheet_status_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_status_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_status_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 176) */;

--
-- Final view structure for view `timesheet_vw`
--

/*!50001 DROP VIEW IF EXISTS `timesheet_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timesheet_vw` AS select `timesheet`.`TS_ID` AS `TS_ID`,`timesheet`.`TS_EMP_ID` AS `TSEMPID`,(select `timesheet_employee`.`REF_EMP_ID` from `timesheet_employee` where (`timesheet_employee`.`TS_EMP_ID` = `TSEMPID`)) AS `EMP_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `EMP_ID`)) AS `EMP_NM`,`timesheet`.`PERIOD_ID` AS `PERIOD_ID`,(select `period_mst`.`FISCAL_PERIOD_DESC` from `period_mst` where (`timesheet`.`PERIOD_ID` = `period_mst`.`PERIOD_ID`)) AS `FISCAL_DESC`,cast(`timesheet`.`TS_DATE` as date) AS `TS_DATE`,cast(`timesheet`.`TS_START_DATE` as date) AS `TS_START_DATE`,cast(`timesheet`.`TS_END_DATE` as date) AS `TS_END_DATE`,`timesheet`.`TS_STATUS_ID` AS `TS_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet`.`TS_STATUS_ID` = `independent_mst`.`MSTR_ID`)) AS `STATUS_NM`,`timesheet`.`APPROVER_ID` AS `APPROVER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `timesheet`.`APPROVER_ID`)) AS `APPROVER_NM`,`timesheet`.`TOT_TS_DURATIONID` AS `TOT_TS_DURATIONID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timesheet`.`TOT_TS_DURATIONID`)) AS `TOTAL_TS_DURATIONID`,`timesheet`.`TOT_TS_DURATION` AS `TOTAL_TS_DURATION`,`timesheet`.`DURATION_UNIT_ID` AS `TOT_ACTY_DURATIONID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timesheet`.`DURATION_UNIT_ID`)) AS `TOTAL_ACTY_DURATIONID`,`timesheet`.`ACTIVITY_DURATION` AS `ACTIVITY_DURATION`,`timesheet`.`TS_PRJ_ID` AS `TS_PRJ_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet`.`TS_PRJ_ID` = `independent_mst`.`MSTR_ID`)) AS `PRJ_NM`,`timesheet`.`TS_ACTIVITY_ID` AS `TS_ACTIVITY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timesheet`.`TS_ACTIVITY_ID` = `independent_mst`.`MSTR_ID`)) AS `TS_ACTIVITY_NM`,`timesheet`.`COMMENT` AS `COMMENT`,`timesheet`.`APPR_CMNT` AS `APPROVER_COMMNET`,`timesheet`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`timesheet`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where ((`oa_brands`.`OA_BRAND_ID` = `OABRANDID`) and (`oa_brands`.`OA_ID` = `OAID`))) AS `OA_BRAND_NM`,`timesheet`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`timesheet`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`timesheet`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`timesheet`.`CREATEDON` AS `CREATED_ON`,`timesheet`.`UPDATEDON` AS `UPDATED_ON`,`timesheet`.`IS_DELETED` AS `IS_DELETED` from `timesheet` where (`timesheet`.`IS_DELETED` = 0) */;

--
-- Final view structure for view `timetable_assignment_config_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetable_assignment_config_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetable_assignment_config_vw` AS select `timetable_assignment_config`.`TIMETABLE_DETAILS_ID` AS `TIMETABLE_DETAILS_ID`,`timetable_assignment_config`.`TIMETABLE_SLOT_ID` AS `TIMETABLE_SLOT_ID`,`timetable_assignment_config`.`TEACHER_USER_ID` AS `TEACHER_USER_ID`,`timetable_assignment_config`.`SUBJECT_ID` AS `SUBJECT_ID`,`timetable_assignment_config`.`CHAPTER_ID` AS `CHAPTER_ID`,`timetable_assignment_config`.`CHAPTER_TOPIC_ID` AS `CHAPTER_TOPIC_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timetable_assignment_config`.`CLASS_ID`)) AS `CLASS`,`timetable_assignment_config`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timetable_assignment_config`.`SECTION_ID`)) AS `SECTION`,`timetable_assignment_config`.`SECTION_ID` AS `SECTION_ID`,`timetable_assignment_config`.`TIMETABLE_WEEK_ID` AS `TIMETABLE_WEEK_ID`,(select `timetable_name_mst`.`TIMETABLE_NAME` from (`timetable_week_mst` join `timetable_name_mst` on((`timetable_name_mst`.`TIMETABLE_NAME_ID` = `timetable_week_mst`.`TIMETABLE_NAME_ID`))) where (`timetable_week_mst`.`TIMETABLE_WEEK_ID` = `timetable_assignment_config`.`TIMETABLE_WEEK_ID`)) AS `TIMETABLE_WEEK`,`timetable_assignment_config`.`IS_DELETED` AS `IS_DELETED`,`timetable_assignment_config`.`OA_ID` AS `OA_ID`,`timetable_assignment_config`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`timetable_assignment_config`.`CREATED_BY` AS `CREATED_BY`,`timetable_assignment_config`.`CREATED_ON` AS `CREATED_ON`,`timetable_assignment_config`.`UPDATED_BY` AS `UPDATED_BY`,`timetable_assignment_config`.`UPDATED_ON` AS `UPDATED_ON` from `timetable_assignment_config` */;

--
-- Final view structure for view `timetable_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetable_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetable_name_mst_vw` AS select `timetable_name_mst`.`TIMETABLE_NAME_ID` AS `TIMETABLE_NAME_ID`,`timetable_name_mst`.`TIMETABLE_NAME` AS `TIMETABLE_NAME`,`timetable_name_mst`.`START_DATE` AS `START_DATE`,`timetable_name_mst`.`END_DATE` AS `END_DATE`,`timetable_name_mst`.`START_TIME` AS `START_TIME`,`timetable_name_mst`.`END_TIME` AS `END_TIME`,`timetable_name_mst`.`NO_OF_SLOT` AS `NO_OF_SLOT`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `timetable_name_mst`.`ACADEMIC_PERIOD_ID`)) AS `ACADEMIC_PERIOD`,`timetable_name_mst`.`ACADEMIC_PERIOD_ID` AS `ACADEMIC_PERIOD_ID`,`timetable_name_mst`.`IS_DELETED` AS `IS_DELETED`,`timetable_name_mst`.`OA_ID` AS `OA_ID`,`timetable_name_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`timetable_name_mst`.`CREATED_BY` AS `CREATED_BY`,`timetable_name_mst`.`CREATED_ON` AS `CREATED_ON`,`timetable_name_mst`.`UPDATED_BY` AS `UPDATED_BY`,`timetable_name_mst`.`UPDATED_ON` AS `UPDATED_ON` from `timetable_name_mst` */;

--
-- Final view structure for view `timetable_name_slot_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetable_name_slot_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetable_name_slot_mst_vw` AS select `tnsm`.`TIMETABLE_SLOT_ID` AS `TIMETABLE_SLOT_ID`,(select `tnm`.`TIMETABLE_NAME` from `timetable_name_mst` `tnm` where (`tnm`.`TIMETABLE_NAME_ID` = `tnsm`.`TIMETABLE_NAME_ID`)) AS `TIMETABLE_NAME`,`tnsm`.`TIMETABLE_NAME_ID` AS `TIMETABLE_NAME_ID`,`tnsm`.`SLOT_SEQ_NO` AS `SLOT_SEQ_NO`,`tnsm`.`SLOT_START_TIME` AS `SLOT_START_TIME`,`tnsm`.`SLOT_END_TIME` AS `SLOT_END_TIME`,`tnsm`.`SLOT_TYPE_ID` AS `SLOT_TYPE_ID`,`tnsm`.`IS_DELETED` AS `IS_DELETED`,`tnsm`.`OA_ID` AS `OA_ID`,`tnsm`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`tnsm`.`CREATED_BY` AS `CREATED_BY`,`tnsm`.`CREATED_ON` AS `CREATED_ON`,`tnsm`.`UPDATED_BY` AS `UPDATED_BY`,`tnsm`.`UPDATED_ON` AS `UPDATED_ON` from `timetable_name_slot_mst` `tnsm` */;

--
-- Final view structure for view `timetable_slot_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetable_slot_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetable_slot_mst_vw` AS select `tsm`.`TIMETABLE_SLOT_ID` AS `TIMETABLE_SLOT_ID`,`tsm`.`TIMETABLE_NAME_ID` AS `TIMETABLE_NAME_ID`,(select `tnm`.`TIMETABLE_NAME` from `timetable_name_mst` `tnm` where (`tnm`.`TIMETABLE_NAME_ID` = `tsm`.`TIMETABLE_NAME_ID`)) AS `TIMETABLE_NAME`,`tsm`.`TIMETABLE_WEEK_ID` AS `TIMETABLE_WEEK_ID`,`tsm`.`SLOT_DATE` AS `SLOT_DATE`,`tsm`.`SLOT_SEQ_NO` AS `SLOT_SEQ_NO`,`tsm`.`SLOT_START_TIME` AS `SLOT_START_TIME`,`tsm`.`SLOT_END_TIME` AS `SLOT_END_TIME`,`tsm`.`SLOT_TYPE_ID` AS `SLOT_TYPE_ID`,`tsm`.`IS_DELETED` AS `IS_DELETED`,`tsm`.`OA_ID` AS `OA_ID`,`tsm`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`tsm`.`CREATED_BY` AS `CREATED_BY`,`tsm`.`CREATED_ON` AS `CREATED_ON`,`tsm`.`UPDATED_BY` AS `UPDATED_BY`,`tsm`.`UPDATED_ON` AS `UPDATED_ON` from `timetable_slot_mst` `tsm` */;

--
-- Final view structure for view `timetable_week_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetable_week_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetable_week_mst_vw` AS select `twm`.`TIMETABLE_WEEK_ID` AS `TIMETABLE_WEEK_ID`,(select `tnm`.`TIMETABLE_NAME` from `timetable_name_mst` `tnm` where (`tnm`.`TIMETABLE_NAME_ID` = `twm`.`TIMETABLE_NAME_ID`)) AS `TIMETABLE_NAME`,`twm`.`TIMETABLE_NAME_ID` AS `TIMETABLE_NAME_ID`,`twm`.`WORKING_WEEK_DAY_ID` AS `WORKING_WEEK_DAY_ID`,(select group_concat(`independent_mst`.`MSTR_NM` separator ',') from (`independent_mst` join `working_week_mst` on((`independent_mst`.`MSTR_ID` = `working_week_mst`.`WEEK_DAY_ID`))) where (find_in_set(`working_week_mst`.`WORKING_WEEK_DAY_ID`,`twm`.`WORKING_WEEK_DAY_ID`) and (`working_week_mst`.`IS_WORKING` = 1))) AS `WORKING_WEEK_DAY`,if((`twm`.`IS_WORKING` = 0),'NO','YES') AS `IS_WORKING`,`twm`.`IS_DELETED` AS `IS_DELETED`,`twm`.`OA_ID` AS `OA_ID`,`twm`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`twm`.`CREATED_BY` AS `CREATED_BY`,`twm`.`CREATED_ON` AS `CREATED_ON`,`twm`.`UPDATED_BY` AS `UPDATED_BY`,`twm`.`UPDATED_ON` AS `UPDATED_ON` from `timetable_week_mst` `twm` */;

--
-- Final view structure for view `timetracker_vw`
--

/*!50001 DROP VIEW IF EXISTS `timetracker_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timetracker_vw` AS select `timetracker`.`TIMETRACKER_ID` AS `TIMETRACKER_ID`,`timetracker`.`USER` AS `USER`,`timetracker`.`PROJECT_ID` AS `PROJECT_ID`,`timetracker`.`TASK` AS `TASK`,`timetracker`.`COMMENT` AS `COMMENT`,`timetracker`.`STARTED` AS `STARTED`,`timetracker`.`ENDED` AS `ENDED`,`timetracker`.`HOURS` AS `HOURS`,`timetracker`.`PSTATUS` AS `PSTATUS`,`timetracker`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`timetracker`.`OA_ID` AS `OA_ID`,`timetracker`.`USER_ID` AS `USER_ID`,`timetracker`.`CREATED_ON` AS `CREATED_ON`,`timetracker`.`UPDATED_ON` AS `UPDATED_ON`,`timetracker`.`CREATED_BY` AS `CREATED_BY`,`timetracker`.`UPDATED_BY` AS `UPDATED_BY` from `timetracker` */;

--
-- Final view structure for view `timezone_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `timezone_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `timezone_mst_vw` AS select `timezone_mst`.`TIME_ZONE_ID` AS `TIME_ZONE_ID`,`timezone_mst`.`TIMEZONE` AS `TIMEZONE`,`timezone_mst`.`TIMEZONE_TYPE_ID` AS `TIMEZONE_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`timezone_mst`.`TIMEZONE_TYPE_ID` = `independent_mst`.`MSTR_ID`)) AS `TIMEZONE_TYP_NM`,`timezone_mst`.`IS_DELETED` AS `IS_DELETED`,`timezone_mst`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`timezone_mst`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`timezone_mst`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`timezone_mst`.`CREATEDBY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`timezone_mst`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`timezone_mst`.`CREATED_ON` AS `Created_On`,`timezone_mst`.`UPDATED_ON` AS `Updated_On` from `timezone_mst` */;

--
-- Final view structure for view `todays_appointment_vw`
--

/*!50001 DROP VIEW IF EXISTS `todays_appointment_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `todays_appointment_vw` AS select `appointment`.`ID` AS `ID`,`appointment`.`PATIENT_ID` AS `PATIENT_ID`,`appointment`.`PROVIDER` AS `PROVIDER`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `appointment`.`PROVIDER`)) AS `PROVIDER_NM`,`appointment`.`LOCATION` AS `LOCATION`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `appointment`.`LOCATION`)) AS `LOCATION_NM`,`appointment`.`VISIT_TYPE` AS `VISIT_TYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `appointment`.`VISIT_TYPE`)) AS `VISIT_TYPE_NM`,(select coalesce(`personal_information`.`FIRST_NAME`,`personal_information`.`LAST_NAME`) from `personal_information` where (`personal_information`.`PATIENT_ID` = `appointment`.`PATIENT_ID`)) AS `PATIENT_NAME`,`appointment`.`START_DATE` AS `START_DATE`,`appointment`.`END_DATE` AS `END_DATE`,`appointment`.`DATE_ORDER` AS `DATE_ORDER`,`appointment`.`OA_ID` AS `OA_ID`,`appointment`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`appointment`.`USER_ID` AS `USER_ID`,`appointment`.`CREATED_BY` AS `CREATED_BY`,`appointment`.`CREATED_ON` AS `CREATED_ON`,`appointment`.`UPDATED_BY` AS `UPDATED_BY`,`appointment`.`UPDATED_ON` AS `UPDATED_ON`,`appointment`.`IS_DELETED` AS `IS_DELETED` from `appointment` where (cast(`appointment`.`START_DATE` as date) = curdate()) */;

--
-- Final view structure for view `toolbar_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `toolbar_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `toolbar_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 29) */;

--
-- Final view structure for view `topics_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `topics_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `topics_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 671) */;

--
-- Final view structure for view `total_emp_count_vw`
--

/*!50001 DROP VIEW IF EXISTS `total_emp_count_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `total_emp_count_vw` AS select count(`attendance_employee_vw`.`ATTND_EMP_ID`) AS `Total_Employee` from `attendance_employee_vw` */;

--
-- Final view structure for view `total_logged__in_vw`
--

/*!50001 DROP VIEW IF EXISTS `total_logged__in_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `total_logged__in_vw` AS select count(`emp_attendance_record_vw`.`PUNCH_IN_USER_TIME`) AS `Total_Logged_count` from `emp_attendance_record_vw` */;

--
-- Final view structure for view `town_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `town_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `town_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 66) */;

--
-- Final view structure for view `transaction_form_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `transaction_form_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transaction_form_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 471) */;

--
-- Final view structure for view `transaction_type_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `transaction_type_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transaction_type_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 489) */;

--
-- Final view structure for view `transport_distance_vw`
--

/*!50001 DROP VIEW IF EXISTS `transport_distance_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transport_distance_vw` AS select `transport_distance`.`TRANSPORT_DIST_ID` AS `TRANSPORT_DIST_ID`,`transport_distance`.`DISTANCE` AS `DISTANCE`,`transport_distance`.`DISTANCE_TYPE` AS `DISTANCE_TYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `transport_distance`.`DISTANCE_TYPE`)) AS `DISTANCE_TYPE_NM`,if((`transport_distance`.`STATUS` = 1),'Enabled','Disabled') AS `STATUS`,`transport_distance`.`OA_ID` AS `OA_ID`,`transport_distance`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`transport_distance`.`USER_ID` AS `USER_ID`,`transport_distance`.`IS_DELETED` AS `IS_DELETED`,`transport_distance`.`CREATED_ON` AS `CREATED_ON`,`transport_distance`.`CREATED_BY` AS `CREATED_BY`,`transport_distance`.`UPDATED_ON` AS `UPDATED_ON`,`transport_distance`.`UPDATED_BY` AS `UPDATED_BY` from `transport_distance` */;

--
-- Final view structure for view `transport_fee_vw`
--

/*!50001 DROP VIEW IF EXISTS `transport_fee_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transport_fee_vw` AS select `transport_fee`.`TRANS_ID` AS `TRANS_ID`,`transport_fee`.`TRANSPORT_FEE_TYPE_ID` AS `TRANSPORT_FEE_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `transport_fee`.`TRANSPORT_FEE_TYPE_ID`)) AS `TRANSPORT_FEE_TYPE`,`transport_fee`.`FREQUENCY_ID` AS `FREQUENCY_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `transport_fee`.`FREQUENCY_ID`)) AS `FREQUENCY`,`transport_fee`.`DISTANCE_ID` AS `DISTANCE_ID`,(select concat(convert(`transport_distance`.`DISTANCE` using utf8),' ',(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `transport_distance`.`DISTANCE_TYPE`))) from `transport_distance` where (`transport_distance`.`TRANSPORT_DIST_ID` = `transport_fee`.`DISTANCE_ID`)) AS `DISTANCE_NM`,`transport_fee`.`EXCLUDED_MONTH_YEAR_ID` AS `EXCLUDED_MONTH_YEAR_ID`,`transport_fee`.`AMOUNT` AS `AMOUNT`,`transport_fee`.`IS_DELETED` AS `IS_DELETED`,`transport_fee`.`OA_ID` AS `OA_ID`,`transport_fee`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`transport_fee`.`USER_ID` AS `USER_ID`,`transport_fee`.`CREATED_ON` AS `CREATED_ON`,`transport_fee`.`CREATED_BY` AS `CREATED_BY`,`transport_fee`.`UPDATED_ON` AS `UPDATED_ON`,`transport_fee`.`UPDATED_BY` AS `UPDATED_BY` from `transport_fee` */;

--
-- Final view structure for view `transport_rates_vw`
--

/*!50001 DROP VIEW IF EXISTS `transport_rates_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transport_rates_vw` AS select `transport_rates`.`RATE_ID` AS `RATE_ID`,`transport_rates`.`VEHICLE_TYPE_ID` AS `VEHICLE_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `transport_rates`.`VEHICLE_TYPE_ID`)) AS `VEHICLE_TYPE_NM`,`transport_rates`.`LOWER_RANGE` AS `LOWER_RANGE`,`transport_rates`.`UPPER_RANGE` AS `UPPER_RANGE`,`transport_rates`.`RATE` AS `RATE`,`transport_rates`.`RATE_UNIT` AS `RATE_UNIT`,`transport_rates`.`EFFECTIVE_DATE` AS `EFFECTIVE_DATE`,`transport_rates`.`TAX_YEAR` AS `TAX_YEAR`,`transport_rates`.`RATE_TYPE` AS `RATE_TYPE`,`transport_rates`.`FY_ID` AS `FY_ID`,`transport_rates`.`IS_PASSENGER` AS `IS_PASSENGER`,`transport_rates`.`OA_ID` AS `OA_ID`,`transport_rates`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`transport_rates`.`USER_ID` AS `USER_ID`,`transport_rates`.`IS_DELETED` AS `IS_DELETED`,`transport_rates`.`CREATED_BY` AS `CREATED_BY`,`transport_rates`.`CREATED_ON` AS `CREATED_ON`,`transport_rates`.`UPDATED_BY` AS `UPDATED_BY`,`transport_rates`.`UPDATED_ON` AS `UPDATED_ON` from `transport_rates` */;

--
-- Final view structure for view `transport_vw`
--

/*!50001 DROP VIEW IF EXISTS `transport_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `transport_vw` AS select `transport`.`TRANSPORT_ID` AS `TRANSPORT_ID`,`transport`.`FEES_TYPE` AS `FEES_TYPE`,`transport`.`DISTANCE` AS `DISTANCE`,`transport`.`DISTANCE_TYPE` AS `DISTANCE_TYPE`,if((`transport`.`STATUS` = 0),'no','yes') AS `STATUS`,`transport`.`FREQUENCY` AS `FREQUENCY`,`transport`.`MONTH_YEAR` AS `MONTH_YEAR`,`transport`.`AMMOUNT` AS `AMMOUNT`,`transport`.`IS_DELETED` AS `IS_DELETED`,`transport`.`OA_ID` AS `OA_ID`,`transport`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`transport`.`USER_ID` AS `USER_ID`,`transport`.`CREATED_ON` AS `CREATED_ON`,`transport`.`CREATED_BY` AS `CREATED_BY`,`transport`.`UPDATED_ON` AS `UPDATED_ON`,`transport`.`UPDATED_BY` AS `UPDATED_BY` from `transport` */;

--
-- Final view structure for view `trial_balance_vw`
--

/*!50001 DROP VIEW IF EXISTS `trial_balance_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `trial_balance_vw` AS select `acc_transaction_vw`.`SUB_ACC_GROUP_ID` AS `SUB_ACC_GROUP_ID`,`acc_transaction_vw`.`SUB_ACC_GROUP` AS `SUB_ACC_GROUP`,sum(`acc_transaction_vw`.`DEBITVALUE`) AS `DEBITVALUE`,sum(`acc_transaction_vw`.`CREDITVALUE`) AS `CREDITVALUE`,`acc_transaction_vw`.`FINANCIAL_YEAR_ID` AS `FINANCIAL_YEAR_ID`,`acc_transaction_vw`.`FINANCIAL_YEAR_DESC` AS `FINANCIAL_YEAR_DESC`,`acc_transaction_vw`.`ACC_GROUP_ID` AS `ACC_GROUP_ID`,`acc_transaction_vw`.`ACC_GROUP` AS `ACC_GROUP`,`acc_transaction_vw`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`acc_transaction_vw`.`OA_ID` AS `OA_ID`,`acc_transaction_vw`.`OA_CD` AS `OA_CD`,`acc_transaction_vw`.`OA_NM` AS `OA_NM`,`acc_transaction_vw`.`OABRANDID` AS `OABRANDID`,`acc_transaction_vw`.`OA_BRAND_CD` AS `OA_BRAND_CD`,`acc_transaction_vw`.`OA_BRAND_NM` AS `OA_BRAND_NM` from `acc_transaction_vw` group by `acc_transaction_vw`.`FINANCIAL_YEAR_ID`,`acc_transaction_vw`.`FINANCIAL_YEAR_DESC`,`acc_transaction_vw`.`SUB_ACC_GROUP_ID`,`acc_transaction_vw`.`SUB_ACC_GROUP`,`acc_transaction_vw`.`ACC_GROUP_ID`,`acc_transaction_vw`.`ACC_GROUP`,`acc_transaction_vw`.`OA_BRAND_ID`,`acc_transaction_vw`.`OA_ID`,`acc_transaction_vw`.`OA_CD`,`acc_transaction_vw`.`OA_NM`,`acc_transaction_vw`.`OABRANDID`,`acc_transaction_vw`.`OA_BRAND_CD`,`acc_transaction_vw`.`OA_BRAND_NM` */;

--
-- Final view structure for view `ts_actions_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `ts_actions_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ts_actions_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 179) */;

--
-- Final view structure for view `ts_activity_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `ts_activity_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ts_activity_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 178) */;

--
-- Final view structure for view `ts_project_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `ts_project_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ts_project_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 177) */;

--
-- Final view structure for view `ts_status_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `ts_status_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ts_status_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 176) */;

--
-- Final view structure for view `unit_type_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `unit_type_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `unit_type_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 272) */;

--
-- Final view structure for view `university_or_board_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `university_or_board_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `university_or_board_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 662) */;

--
-- Final view structure for view `user_contact_type_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_contact_type_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_contact_type_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 47) */;

--
-- Final view structure for view `user_contacts_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_contacts_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_contacts_vw` AS select `user_contacts`.`USER_CNTCT_ID` AS `USER_CNTCT_ID`,`user_contacts`.`USER_ID` AS `USERCONTACT_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERCONTACT_USER_ID`)) AS `USER_NAME`,`user_contacts`.`CNTCT_ID` AS `CNTCT_ID`,`user_contacts`.`USER_CNTCT_TYPE_ID` AS `USER_CNTCT_TYPE_ID`,`user_contacts`.`EXT_REF_NBR` AS `EXT_REF_NBR`,`user_contacts`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_contacts`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_contacts`.`CREATED_ON` AS `CREATED_ON`,`user_contacts`.`UPDATED_ON` AS `UPDATED_ON` from `user_contacts` */;

--
-- Final view structure for view `user_domain_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_domain_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_domain_vw` AS select `user_domain`.`DMN_ID` AS `DMN_ID`,`user_domain`.`DMN_NM` AS `DMN_NM`,`user_domain`.`DSCRPTN` AS `DSCRPTN`,`user_domain`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`user_domain`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`user_domain`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`user_domain`.`IS_DELETED` AS `IS_DELETED`,`user_domain`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_domain`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_domain`.`CREATED_ON` AS `CREATED_ON`,`user_domain`.`UPDATED_ON` AS `UPDATED_ON` from `user_domain` */;

--
-- Final view structure for view `user_group_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_group_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_group_dtl_vw` AS select `user_group_dtl`.`USER_GRP_DTL_ID` AS `USER_GRP_DTL_ID`,`user_group_dtl`.`USER_GRP_ID` AS `USERGROUP_USER_GRP_ID`,(select `user_group`.`USER_GRP_NM` from `user_group` where (`user_group`.`USER_GRP_ID` = `USERGROUP_USER_GRP_ID`)) AS `USER_GRP_NM`,`user_group_dtl`.`USER_ID` AS `USERGROUP_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERGROUP_USER_ID`)) AS `USER_NAME`,`user_group_dtl`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`user_group_dtl`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`user_group_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_group_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_group_dtl`.`CREATED_ON` AS `CREATED_ON`,`user_group_dtl`.`UPDATED_ON` AS `UPDATED_ON`,`user_group_dtl`.`IS_DELETED` AS `IS_DELETED` from `user_group_dtl` */;

--
-- Final view structure for view `user_group_role_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_group_role_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_group_role_vw` AS select `user_group_role`.`GRP_ROLE_ID` AS `GRP_ROLE_ID`,`user_group_role`.`ROLE_ID` AS `GROUPROLE_ROLE_ID`,(select `role_mst`.`ROLE_NM` from `role_mst` where (`role_mst`.`ROLE_ID` = `GROUPROLE_ROLE_ID`)) AS `ROLE_NM`,`user_group_role`.`USER_GRP_ID` AS `GROUPROLE_USER_GRP_ID`,(select `user_group`.`USER_GRP_NM` from `user_group` where (`user_group`.`USER_GRP_ID` = `GROUPROLE_USER_GRP_ID`)) AS `USER_GRP_NM`,`user_group_role`.`USER_GRP_ID` AS `USER_GRP_ID`,`user_group_role`.`ROLE_ID` AS `ROLE_ID`,`user_group_role`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`user_group_role`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`user_group_role`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`user_group_role`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_group_role`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_group_role`.`CREATED_ON` AS `CREATED_ON`,`user_group_role`.`UPDATED_ON` AS `UPDATED_ON`,`user_group_role`.`IS_DELETED` AS `IS_DELETED` from `user_group_role` */;

--
-- Final view structure for view `user_group_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_group_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_group_vw` AS select `user_group`.`USER_GRP_ID` AS `USER_GRP_ID`,`user_group`.`USER_GRP_NM` AS `USER_GRP_NM`,`user_group`.`DMN_ID` AS `DOMAIN_ID`,`user_group`.`DMN_ID` AS `DMN_ID`,(select `user_domain_vw`.`DMN_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `DMN_NM`,(select `user_domain_vw`.`ORG_ACC_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `ORG_ACC_ID`,(select `user_domain_vw`.`OA_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_CD`,(select `user_domain_vw`.`OA_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_NM`,(select `user_domain_vw`.`BRAND_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `BRAND_ID`,(select `user_domain_vw`.`OA_BRAND_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_CD`,(select `user_domain_vw`.`OA_BRAND_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_NM`,`user_group`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`user_group`.`IS_DELETED` AS `IS_DELETED`,`user_group`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_group`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_group`.`CREATED_ON` AS `CREATED_ON`,`user_group`.`UPDATED_ON` AS `UPDATED_ON` from `user_group` */;

--
-- Final view structure for view `user_last_login_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_last_login_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_last_login_dtl_vw` AS select `user_last_login_dtl`.`USER_LAST_LOGIN_DTL_ID` AS `USER_LAST_LOGIN_DTL_ID`,`user_last_login_dtl`.`USER_ID` AS `LAST_LOGIN_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `LAST_LOGIN_USER_ID`)) AS `USER_NAME`,(select `user_mst`.`LAST_FAILED_ATTEMPT_ON` from `user_mst` where (`user_mst`.`USER_ID` = `LAST_LOGIN_USER_ID`)) AS `LAST_FAILED_ATTEMPT_ON`,(select `user_mst`.`FAILED_LOGIN_ATTEMPTS` from `user_mst` where (`user_mst`.`USER_ID` = `LAST_LOGIN_USER_ID`)) AS `FAILED_LOGIN_ATTEMPTS`,(select `user_mst`.`CONCURRENT_LOGIN_COUNT` from `user_mst` where (`user_mst`.`USER_ID` = `LAST_LOGIN_USER_ID`)) AS `CONCURRENT_LOGIN_COUNT`,(select `user_mst`.`SUSPENSION_FAILED_LOGIN_ATTEMPTS` from `user_mst` where (`user_mst`.`USER_ID` = `LAST_LOGIN_USER_ID`)) AS `SUSPENSION_FAILED_LOGIN_ATTEMPTS`,`user_last_login_dtl`.`LAST_LOGIN_AT` AS `LAST_LOGIN_AT`,`user_last_login_dtl`.`LAST_LOGGED_IN_IP` AS `LAST_LOGGED_IN_IP`,`user_last_login_dtl`.`APPRO_LOCATION` AS `APPRO_LOCATION`,`user_last_login_dtl`.`USER_AGENT` AS `USER_AGENT`,`user_last_login_dtl`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`user_last_login_dtl`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`user_last_login_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_last_login_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_last_login_dtl`.`IS_DELETED` AS `IS_DELETED` from `user_last_login_dtl` */;

--
-- Final view structure for view `user_mst_1_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_mst_1_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_mst_1_vw` AS select `user_mst`.`USER_ID` AS `USER_ID`,`user_mst`.`USER_NAME` AS `USER_NAME`,`user_mst`.`REG_EMAIL_ID` AS `REG_EMAIL_ID`,`user_mst`.`USER_STATUS_ID` AS `USER_STATUS_ID`,(select `independent_mst`.`MSTR_CD` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_STATUS_ID`)) AS `USER_STATUS_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_STATUS_ID`)) AS `USER_STATUS`,`user_mst`.`EXT_REF_NBR` AS `EXT_REF_NBR`,`user_mst`.`LAST_LOGIN_AT` AS `LAST_LOGIN_AT`,`user_mst`.`DMN_ID` AS `DOMAIN_ID`,(select `user_domain_vw`.`DMN_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `DMN_NM`,(select `user_domain_vw`.`ORG_ACC_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `ORG_ACC_ID`,(select `user_domain_vw`.`OA_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_CD`,(select `user_domain_vw`.`OA_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_NM`,(select `user_domain_vw`.`BRAND_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `BRAND_ID`,(select `user_domain_vw`.`OA_BRAND_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_CD`,(select `user_domain_vw`.`OA_BRAND_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_NM`,`user_mst`.`ACTIVATION` AS `ACTIVATION`,if((`user_mst`.`IS_EDITABLE` = 1),'Yes','No') AS `IS_EDITABLE`,if((`user_mst`.`IS_ADMIN` = 1),'Yes','No') AS `IS_ADMIN`,if((`user_mst`.`IS_ASSIGNABLE` = 1),'Yes','No') AS `IS_ASSIGNABLE`,`user_mst`.`USER_TYP_ID` AS `USER_TYP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_TYP_ID`)) AS `USER_TYPE`,if((`user_mst`.`IS_PREDEFINED` = 1),'Yes','No') AS `IS_PREDEFINED`,if((`user_mst`.`IS_ONLINE` = 1),'Yes','No') AS `IS_ONLINE`,`user_mst`.`DMN_ID` AS `DMN_ID`,`user_mst`.`TPIN` AS `TPIN`,`user_mst`.`MEMORABLE_WORD` AS `MEMORABLE_WORD`,`user_mst`.`IS_DELETED` AS `IS_DELETED`,`user_mst`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_mst`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_mst`.`CREATED_ON` AS `CREATED_ON`,`user_mst`.`UPDATED_ON` AS `UPDATED_ON` from `user_mst` */;

--
-- Final view structure for view `user_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_mst_vw` AS select `user_mst`.`USER_ID` AS `USER_ID`,`user_mst`.`USER_NAME` AS `USER_NAME`,`user_mst`.`REG_EMAIL_ID` AS `REG_EMAIL_ID`,`user_mst`.`USER_STATUS_ID` AS `USER_STATUS_ID`,(select `independent_mst`.`MSTR_CD` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_STATUS_ID`)) AS `USER_STATUS_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_STATUS_ID`)) AS `USER_STATUS`,`user_mst`.`EXT_REF_NBR` AS `EXT_REF_NBR`,`user_mst`.`LAST_LOGIN_AT` AS `LAST_LOGIN_AT`,`user_mst`.`DMN_ID` AS `DOMAIN_ID`,(select `user_domain_vw`.`DMN_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `DMN_NM`,(select `user_domain_vw`.`ORG_ACC_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `ORG_ACC_ID`,(select `user_domain_vw`.`OA_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_CD`,(select `user_domain_vw`.`OA_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_NM`,(select `user_domain_vw`.`BRAND_ID` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `BRAND_ID`,(select `user_domain_vw`.`OA_BRAND_CD` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_CD`,(select `user_domain_vw`.`OA_BRAND_NM` from `user_domain_vw` where (`user_domain_vw`.`DMN_ID` = `DOMAIN_ID`)) AS `OA_BRAND_NM`,`user_mst`.`ACTIVATION` AS `ACTIVATION`,if((`user_mst`.`IS_EDITABLE` = 1),'Yes','No') AS `IS_EDITABLE`,if((`user_mst`.`IS_ADMIN` = 1),'Yes','No') AS `IS_ADMIN`,if((`user_mst`.`IS_ASSIGNABLE` = 1),'Yes','No') AS `IS_ASSIGNABLE`,`user_mst`.`USER_TYP_ID` AS `USER_TYP_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_mst`.`USER_TYP_ID`)) AS `USER_TYPE`,if((`user_mst`.`IS_PREDEFINED` = 1),'Yes','No') AS `IS_PREDEFINED`,if((`user_mst`.`IS_ONLINE` = 1),'Yes','No') AS `IS_ONLINE`,`user_mst`.`DMN_ID` AS `DMN_ID`,`user_mst`.`TPIN` AS `TPIN`,`user_mst`.`MEMORABLE_WORD` AS `MEMORABLE_WORD`,`user_mst`.`IS_DELETED` AS `IS_DELETED`,`user_mst`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_mst`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_mst`.`CREATED_ON` AS `CREATED_ON`,`user_mst`.`UPDATED_ON` AS `UPDATED_ON` from `user_mst` */;

--
-- Final view structure for view `user_role_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_role_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_role_vw` AS select `user_role`.`USER_ROLE_ID` AS `USER_ROLE_ID`,`user_role`.`ROLE_ID` AS `USERROLE_ROLE_ID`,`user_role`.`ROLE_ID` AS `ROLE_ID`,(select `role_mst`.`ROLE_NM` from `role_mst` where (`role_mst`.`ROLE_ID` = `USERROLE_ROLE_ID`)) AS `ROLE_NM`,`user_role`.`USER_ID` AS `USERROLE_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERROLE_USER_ID`)) AS `USER_NAME`,`user_role`.`OA_ID` AS `ORG_ACC_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `ORG_ACC_ID`)) AS `OA_NM`,`user_role`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`user_role`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`user_role`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`user_role`.`CREATED_ON` AS `CREATED_ON`,`user_role`.`UPDATED_ON` AS `UPDATED_ON`,`user_role`.`IS_DELETED` AS `IS_DELETED` from `user_role` */;

--
-- Final view structure for view `user_status_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_status_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_status_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 46) */;

--
-- Final view structure for view `user_type_role_mapping_vw`
--

/*!50001 DROP VIEW IF EXISTS `user_type_role_mapping_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `user_type_role_mapping_vw` AS select `user_type_role_mapping`.`UTRM_ID` AS `UTRM_ID`,`user_type_role_mapping`.`USER_TYPE_ID` AS `USER_TYPE_ID`,`user_type_role_mapping`.`USER_TYPE_CD` AS `USER_TYPE_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_type_role_mapping`.`USER_TYPE_ID`)) AS `USER_TYPE`,`user_type_role_mapping`.`ROLE_ID` AS `ROLE_ID`,`user_type_role_mapping`.`ROLE_CD` AS `ROLE_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_type_role_mapping`.`ROLE_ID`)) AS `ROLE`,`user_type_role_mapping`.`PERMISSION_CLASS_ID` AS `PERMISSION_CLASS_ID`,`user_type_role_mapping`.`PERMISSION_CLASS_CD` AS `PERMISSION_CLASS_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_type_role_mapping`.`PERMISSION_CLASS_ID`)) AS `PERMISSION_CLASS`,`user_type_role_mapping`.`APP_ID` AS `APP_ID`,`user_type_role_mapping`.`APP_CD` AS `APP_CD`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `user_type_role_mapping`.`APP_ID`)) AS `APP`,`user_type_role_mapping`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `user_type_role_mapping`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `user_type_role_mapping`.`OA_ID`)) AS `OA_NM`,`user_type_role_mapping`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `user_type_role_mapping`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `user_type_role_mapping`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`user_type_role_mapping`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `user_type_role_mapping`.`USER_ID`)) AS `USER_NM`,`user_type_role_mapping`.`CREATED_BY` AS `CREATED_BY`,`user_type_role_mapping`.`CREATED_ON` AS `CREATED_ON`,`user_type_role_mapping`.`UPDATED_BY` AS `UPDATED_BY`,`user_type_role_mapping`.`UPDATED_ON` AS `UPDATED_ON`,`user_type_role_mapping`.`IS_DELETED` AS `IS_DELETED` from `user_type_role_mapping` */;

--
-- Final view structure for view `vacancy_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `vacancy_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vacancy_mst_vw` AS select `vacancy_mst`.`VACANCY_ID` AS `VACANCY_ID`,`vacancy_mst`.`JOB_TITLE_ID` AS `JOB_TITLE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `vacancy_mst`.`JOB_TITLE_ID`)) AS `JOB_TITLE_NAME`,`vacancy_mst`.`HIRING_MANAGER_ID` AS `HIRING_MANAGER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `vacancy_mst`.`HIRING_MANAGER_ID`)) AS `HIRING_MANAGER_NAME`,`vacancy_mst`.`VACANCY_NAME` AS `VACANCY_NAME`,`vacancy_mst`.`VACANCY_DESC` AS `VACANCY_DESC`,`vacancy_mst`.`TOTAL_POSITIONS` AS `TOTAL_POSITIONS`,`vacancy_mst`.`BALANCE_POSITIONS` AS `BALANCE_POSITIONS`,`vacancy_mst`.`VACANCY_STATUS_ID` AS `VACANCY_STATUS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `vacancy_mst`.`VACANCY_STATUS_ID`)) AS `VACANCY_STATUS_NAME`,`vacancy_mst`.`JOB_REFRENCE_NO` AS `JOB_REFRENCE_NO`,`vacancy_mst`.`MINI_SALARY_RANGE` AS `MINI_SALARY_RANGE`,`vacancy_mst`.`MAX_SALARY_RANGE` AS `MAX_SALARY_RANGE`,`vacancy_mst`.`JOB_LOC` AS `JOB_LOC`,`vacancy_mst`.`JOB_EXPIRY_DATE` AS `JOB_EXPIRY_DATE`,`vacancy_mst`.`JOB_COMPLETE_DESC` AS `JOB_COMPLETE_DESC`,`vacancy_mst`.`COMPANY` AS `COMPANY`,`vacancy_mst`.`DEPARTMENT` AS `DEPARTMENT`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `vacancy_mst`.`DEPARTMENT`)) AS `DEPARTMENT_NM`,`vacancy_mst`.`CONTACT` AS `CONTACT`,(select `party_master`.`PARTY_NAME` from `party_master` where (`party_master`.`PERTY_ID` = `vacancy_mst`.`CONTACT`)) AS `CONTACT_NM`,`vacancy_mst`.`CITY` AS `CITY`,`vacancy_mst`.`STATE` AS `STATE`,`vacancy_mst`.`RECRUITER` AS `RECRUITER`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `vacancy_mst`.`RECRUITER`)) AS `RECRUITER_NM`,`vacancy_mst`.`OWNER` AS `OWNER`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `vacancy_mst`.`OWNER`)) AS `OWNER_NM`,`vacancy_mst`.`STARTDATE` AS `STARTDATE`,`vacancy_mst`.`DURATION` AS `DURATION`,`vacancy_mst`.`MAXIMUMRATE` AS `MAXIMUMRATE`,`vacancy_mst`.`TYPE` AS `TYPE`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `vacancy_mst`.`TYPE`)) AS `VACANCY_TYPE`,`vacancy_mst`.`SALARY` AS `SALARY`,`vacancy_mst`.`OPENINGS` AS `OPENINGS`,`vacancy_mst`.`COMPANYJOBID` AS `COMPANYJOBID`,if((`vacancy_mst`.`HOT` = 0),'No','Yes') AS `HOT`,if((`vacancy_mst`.`PUBLICCHECK` = 0),'No','Yes') AS `PUBLICCHECK`,`vacancy_mst`.`DESCRIPTION` AS `DESCRIPTION`,`vacancy_mst`.`INTERNALNOTES` AS `INTERNALNOTES`,`vacancy_mst`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`vacancy_mst`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`vacancy_mst`.`OA_BRAND_ID` AS `BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `BRAND_ID`)) AS `OA_BRAND_NM`,`vacancy_mst`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`vacancy_mst`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`vacancy_mst`.`CREATED_ON` AS `CREATED_ON`,`vacancy_mst`.`UPDATED_ON` AS `UPDATED_ON`,`vacancy_mst`.`IS_DELETED` AS `IS_DELETED` from `vacancy_mst` */;

--
-- Final view structure for view `vacancy_status_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `vacancy_status_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vacancy_status_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 197) */;

--
-- Final view structure for view `vehicle_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `vehicle_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vehicle_mst_vw` AS select `vehicle_mst`.`VEHICLE_ID` AS `VEHICLE_ID`,`vehicle_mst`.`VEHICLE_REGISTRATION_NO` AS `VEHICLE_REGISTRATION_NO`,`vehicle_mst`.`VEHICLE_TYPE_ID` AS `VEHICLE_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`VEHICLE_TYPE_ID` = `independent_mst`.`MSTR_ID`)) AS `VEHICLE_TYPE__NM`,`vehicle_mst`.`VEHICLE_STATUS_TYPE_ID` AS `VEHICLE_STATUS_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`VEHICLE_STATUS_TYPE_ID` = `independent_mst`.`MSTR_ID`)) AS `VEHICLE_STATUS_TYPE_NM`,`vehicle_mst`.`VEHICLE_MAKE` AS `VEHICLE_MAKE`,`vehicle_mst`.`VEHICLE_MODEL` AS `VEHICLE_MODEL`,`vehicle_mst`.`VEHICLE_MODEL_VARIANT` AS `VEHICLE_MODEL_VARIANT`,`vehicle_mst`.`PRICE` AS `PRICE`,`vehicle_mst`.`YEAR` AS `YEAR`,`vehicle_mst`.`MILEAGE` AS `MILEAGE`,`vehicle_mst`.`MILEAGE_UNIT` AS `MILEAGE_UNIT`,`vehicle_mst`.`BODY_TYPE_ID` AS `BODY_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`BODY_TYPE_ID` = `independent_mst`.`MSTR_ID`)) AS `BODY_TYPE_NM`,`vehicle_mst`.`FUEL_TYPE_ID` AS `FUEL_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`FUEL_TYPE_ID` = `independent_mst`.`MSTR_ID`)) AS `FUEL_TYPE_NM`,`vehicle_mst`.`ENGINE_SIZE` AS `ENGINE_SIZE`,`vehicle_mst`.`FUEL_CONSUMPTION` AS `FUEL_CONSUMPTION`,`vehicle_mst`.`ACCELERATION` AS `ACCELERATION`,`vehicle_mst`.`GEARBOX_ID` AS `GEARBOX_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`GEARBOX_ID` = `independent_mst`.`MSTR_ID`)) AS `GEARBOX_NM`,`vehicle_mst`.`CO2_EMISSION` AS `CO2_EMISSION`,`vehicle_mst`.`DOORS` AS `DOORS`,`vehicle_mst`.`SEATS` AS `SEATS`,`vehicle_mst`.`INSURANCE_GROUP` AS `INSURANCE_GROUP`,`vehicle_mst`.`ANNUAL_TAX` AS `ANNUAL_TAX`,`vehicle_mst`.`COLOUR_ID` AS `COLOUR_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`vehicle_mst`.`COLOUR_ID` = `independent_mst`.`MSTR_ID`)) AS `COLOUR_NM`,`vehicle_mst`.`IS_DELETED` AS `IS_DELETED`,`vehicle_mst`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`vehicle_mst`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`vehicle_mst`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`vehicle_mst`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`vehicle_mst`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NAME`,`vehicle_mst`.`CREATED_ON` AS `CREATED_ON`,`vehicle_mst`.`UPDATED_ON` AS `UPDATED_ON` from `vehicle_mst` */;

--
-- Final view structure for view `venue_name_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `venue_name_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `venue_name_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 650) */;

--
-- Final view structure for view `verify_ct_audit_field_values_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_audit_field_values_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_audit_field_values_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`IS_DELETED` <> 0) or (`common_type`.`OA_ID` is not null) or (`common_type`.`OA_BRAND_ID` is not null) or (`common_type`.`USER_ID` is not null) or (`common_type`.`CREATED_BY` is not null) or (`common_type`.`UPDATED_BY` is not null) or (`common_type`.`CREATED_ON` is not null) or (`common_type`.`UPDATED_ON` is not null)) */;

--
-- Final view structure for view `verify_ct_data_for_blank_table_type_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_data_for_blank_table_type_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_data_for_blank_table_type_rpt_vw` AS select `system_entities_vw`.`TYP_ID` AS `TYP_ID`,`system_entities_vw`.`TYP_CD` AS `TYP_CD`,`system_entities_vw`.`TYP_NM` AS `TYP_NM`,`system_entities_vw`.`VIEW_NM` AS `VIEW_NM`,`system_entities_vw`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`system_entities_vw`.`PARENT_TYP_NM` AS `PARENT_TYP_NM`,`system_entities_vw`.`IS_EDITABLE` AS `IS_EDITABLE`,`system_entities_vw`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`system_entities_vw`.`TABLE_TYPE` AS `TABLE_TYPE`,`system_entities_vw`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`system_entities_vw`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`system_entities_vw`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`system_entities_vw`.`TOTAL_IM_RECORDS` AS `TOTAL_IM_RECORDS`,`system_entities_vw`.`IS_DELETED` AS `IS_DELETED`,`system_entities_vw`.`ORG_ACC_ID` AS `ORG_ACC_ID`,`system_entities_vw`.`OA_CD` AS `OA_CD`,`system_entities_vw`.`OA_NM` AS `OA_NM`,`system_entities_vw`.`BRAND_ID` AS `BRAND_ID`,`system_entities_vw`.`OA_BRAND_CD` AS `OA_BRAND_CD`,`system_entities_vw`.`OA_BRAND_NM` AS `OA_BRAND_NM`,`system_entities_vw`.`USERID` AS `USERID`,`system_entities_vw`.`USER_NM` AS `USER_NM`,`system_entities_vw`.`CREATED_BY_USER_ID` AS `CREATED_BY_USER_ID`,`system_entities_vw`.`CREATED_BY_USER_NAME` AS `CREATED_BY_USER_NAME`,`system_entities_vw`.`UPDATED_BY_USER_ID` AS `UPDATED_BY_USER_ID`,`system_entities_vw`.`UPDATED_BY_USER_NAME` AS `UPDATED_BY_USER_NAME`,`system_entities_vw`.`CREATED_ON` AS `CREATED_ON`,`system_entities_vw`.`UPDATED_ON` AS `UPDATED_ON` from `system_entities_vw` where (isnull(`system_entities_vw`.`TABLE_TYPE`) or (`system_entities_vw`.`TABLE_TYPE` = '')) */;

--
-- Final view structure for view `verify_ct_data_for_replicate_system_data_is_zero_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_data_for_replicate_system_data_is_zero_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_data_for_replicate_system_data_is_zero_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'SYSTEM') and (`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` <> 0)) */;

--
-- Final view structure for view `verify_ct_data_for_replicate_user_data_is_null_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_data_for_replicate_user_data_is_null_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_data_for_replicate_user_data_is_null_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'USER') and (`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` = 0)) */;

--
-- Final view structure for view `verify_ct_data_for_user_can_create_system_data_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_data_for_user_can_create_system_data_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_data_for_user_can_create_system_data_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'SYSTEM') and (`common_type`.`USER_CAN_CREATE_DATA` <> 0)) */;

--
-- Final view structure for view `verify_ct_data_for_user_can_create_user_data_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_data_for_user_can_create_user_data_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_data_for_user_can_create_user_data_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'USER') and (isnull(`common_type`.`USER_CAN_CREATE_DATA`) or (`common_type`.`USER_CAN_CREATE_DATA` <> 1))) */;

--
-- Final view structure for view `verify_ct_is_editable_for_system_data_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_is_editable_for_system_data_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_is_editable_for_system_data_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'SYSTEM') and (`common_type`.`IS_EDITABLE` <> 0)) */;

--
-- Final view structure for view `verify_ct_is_editable_for_user_data_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_is_editable_for_user_data_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_is_editable_for_user_data_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'USER') and ((`common_type`.`IS_EDITABLE` = 0) or (`common_type`.`IS_EDITABLE` <> 1))) */;

--
-- Final view structure for view `verify_ct_is_predefined_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_is_predefined_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_is_predefined_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where (`common_type`.`IS_PREDEFINED` <> 1) */;

--
-- Final view structure for view `verify_ct_visible_to_user_for_system_data_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_visible_to_user_for_system_data_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_visible_to_user_for_system_data_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'SYSTEM') and (`common_type`.`VISIBLE_TO_USER_FLAG` <> 0)) */;

--
-- Final view structure for view `verify_ct_visible_to_user_for_user_data_type_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_ct_visible_to_user_for_user_data_type_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_ct_visible_to_user_for_user_data_type_rpt_vw` AS select `common_type`.`TYP_ID` AS `TYP_ID`,`common_type`.`TYP_CD` AS `TYP_CD`,`common_type`.`TYP_NM` AS `TYP_NM`,`common_type`.`VIEW_NM` AS `VIEW_NM`,`common_type`.`PARENT_TYP_ID` AS `PARENT_TYP_ID`,`common_type`.`IS_EDITABLE` AS `IS_EDITABLE`,`common_type`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`VISIBLE_TO_USER_FLAG` AS `VISIBLE_TO_USER_FLAG`,`common_type`.`USER_CAN_CREATE_DATA` AS `USER_CAN_CREATE_DATA`,`common_type`.`REPLICATE_DATA_FOR_ALL_BRANDS` AS `REPLICATE_DATA_FOR_ALL_BRANDS`,`common_type`.`APP_ID` AS `APP_ID`,`common_type`.`APP_CD` AS `APP_CD`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,`common_type`.`MODULE_SEQ` AS `MODULE_SEQ`,`common_type`.`IS_DELETED` AS `IS_DELETED`,`common_type`.`OA_ID` AS `OA_ID`,`common_type`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`common_type`.`USER_ID` AS `USER_ID`,`common_type`.`CREATED_BY` AS `CREATED_BY`,`common_type`.`UPDATED_BY` AS `UPDATED_BY`,`common_type`.`CREATED_ON` AS `CREATED_ON`,`common_type`.`UPDATED_ON` AS `UPDATED_ON` from `common_type` where ((`common_type`.`TABLE_TYPE` = 'USER') and (`common_type`.`VISIBLE_TO_USER_FLAG` <> 1)) */;

--
-- Final view structure for view `verify_entity_obj_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_entity_obj_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_entity_obj_summary_vw` AS select `entity_obj_vw`.`OBJ_TYP` AS `OBJ_TYP`,count(1) AS `recordcount` from `entity_obj_vw` where 1 group by `entity_obj_vw`.`OBJ_TYP` */;

--
-- Final view structure for view `verify_eo_db_object_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eo_db_object_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eo_db_object_summary_vw` AS select `entity_obj_vw`.`OBJ_TYP` AS `OBJ_TYP`,count(1) AS `recordcount` from `entity_obj_vw` where 1 group by `entity_obj_vw`.`OBJ_TYP` */;

--
-- Final view structure for view `verify_eoa_deletion_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_deletion_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_deletion_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`IS_DELETED` AS `IS_DELETED`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`IS_DELETED` */;

--
-- Final view structure for view `verify_eoa_is_null_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_is_null_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_is_null_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`IS_NULL` AS `IS_NULL`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`IS_NULL` */;

--
-- Final view structure for view `verify_eoa_object_datatype_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_object_datatype_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_object_datatype_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_ATTRBT_DT_TYP` AS `OBJ_ATTRBT_DT_TYP`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_ATTRBT_DT_TYP` */;

--
-- Final view structure for view `verify_eoa_object_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_object_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_object_name_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_NM` AS `OBJ_NM`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_NM` */;

--
-- Final view structure for view `verify_eoa_object_sequence_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_object_sequence_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_object_sequence_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_ATTRBT_SEQ` AS `OBJ_ATTRBT_SEQ`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_ATTRBT_SEQ` */;

--
-- Final view structure for view `verify_eoa_precision_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_precision_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_precision_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_PRCSN` AS `OBJ_PRCSN`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_PRCSN` */;

--
-- Final view structure for view `verify_eoa_scale_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_scale_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_scale_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_SCALE` AS `OBJ_SCALE`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_SCALE` */;

--
-- Final view structure for view `verify_eoa_size_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_size_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_size_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`OBJ_SZ` AS `OBJ_SZ`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`OBJ_SZ` */;

--
-- Final view structure for view `verify_eoa_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP` */;

--
-- Final view structure for view `verify_eoa_visibility_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoa_visibility_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoa_visibility_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_TYP` AS `OBJ_TYP`,`entity_obj_attrbt`.`IS_VISIBLE` AS `IS_VISIBLE`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_TYP`,`entity_obj_attrbt`.`IS_VISIBLE` */;

--
-- Final view structure for view `verify_eoadd_account_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_account_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_account_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`OA_ID` AS `OA_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`OA_ID` */;

--
-- Final view structure for view `verify_eoadd_brand_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_brand_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_brand_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`OA_BRAND_ID` AS `OA_BRAND_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`OA_BRAND_ID` */;

--
-- Final view structure for view `verify_eoadd_is_deleted_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_is_deleted_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_is_deleted_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`IS_DELETED` AS `IS_DELETED`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`IS_DELETED` */;

--
-- Final view structure for view `verify_eoadd_is_visible_for_formview_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_is_visible_for_formview_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_is_visible_for_formview_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`IS_VISIBLE_FOR_FORMVIEW` AS `IS_VISIBLE_FOR_FORMVIEW`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`IS_VISIBLE_FOR_FORMVIEW` */;

--
-- Final view structure for view `verify_eoadd_is_visible_for_listview_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_is_visible_for_listview_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_is_visible_for_listview_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`IS_VISIBLE_FOR_LISTVIEW` AS `IS_VISIBLE_FOR_LISTVIEW`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`IS_VISIBLE_FOR_LISTVIEW` */;

--
-- Final view structure for view `verify_eoadd_object_attr_display_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_object_attr_display_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_object_attr_display_name_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_DSPLY_NM` AS `OBJ_ATTRBT_DSPLY_NM`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_DSPLY_NM` */;

--
-- Final view structure for view `verify_eoadd_object_attr_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_object_attr_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_object_attr_name_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_NM` AS `OBJ_ATTRBT_NM`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_NM` */;

--
-- Final view structure for view `verify_eoadd_object_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_object_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_object_name_wise_column_summary_vw` AS select `entity_obj_attrbt`.`OBJ_NM` AS `OBJ_NM`,count(1) AS `recordcount` from `entity_obj_attrbt` group by `entity_obj_attrbt`.`OBJ_NM` */;

--
-- Final view structure for view `verify_eoadd_obt_arrt_seq_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_obt_arrt_seq_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_obt_arrt_seq_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_SEQ` AS `OBJ_ATTRBT_SEQ`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`OBJ_ATTRBT_SEQ` */;

--
-- Final view structure for view `verify_eoadd_sys_account_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_account_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_account_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`OA_ID` AS `OA_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`OA_ID` */;

--
-- Final view structure for view `verify_eoadd_sys_brand_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_brand_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_brand_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`OA_BRAND_ID` AS `OA_BRAND_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`OA_BRAND_ID` */;

--
-- Final view structure for view `verify_eoadd_sys_is_deleted_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_is_deleted_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_is_deleted_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`IS_DELETED` AS `IS_DELETED`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`IS_DELETED` */;

--
-- Final view structure for view `verify_eoadd_sys_is_visible_for_formview_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_is_visible_for_formview_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_is_visible_for_formview_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`IS_VISIBLE_FOR_FORMVIEW` AS `IS_VISIBLE_FOR_FORMVIEW`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`IS_VISIBLE_FOR_FORMVIEW` */;

--
-- Final view structure for view `verify_eoadd_sys_is_visible_for_listview_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_is_visible_for_listview_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_is_visible_for_listview_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`IS_VISIBLE_FOR_LISTVIEW` AS `IS_VISIBLE_FOR_LISTVIEW`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`IS_VISIBLE_FOR_LISTVIEW` */;

--
-- Final view structure for view `verify_eoadd_sys_object_attr_display_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_object_attr_display_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_object_attr_display_name_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_DSPLY_NM` AS `OBJ_ATTRBT_DSPLY_NM`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_DSPLY_NM` */;

--
-- Final view structure for view `verify_eoadd_sys_object_attr_name_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_object_attr_name_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_object_attr_name_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_NM` AS `OBJ_ATTRBT_NM`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_NM` */;

--
-- Final view structure for view `verify_eoadd_sys_obt_arrt_seq_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_obt_arrt_seq_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_obt_arrt_seq_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_SEQ` AS `OBJ_ATTRBT_SEQ`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`OBJ_ATTRBT_SEQ` */;

--
-- Final view structure for view `verify_eoadd_sys_user_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_sys_user_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_sys_user_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl_sys`.`USER_ID` AS `USER_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl_sys` group by `entity_obj_attrbt_dsply_dtl_sys`.`USER_ID` */;

--
-- Final view structure for view `verify_eoadd_user_id_wise_column_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_eoadd_user_id_wise_column_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_eoadd_user_id_wise_column_summary_vw` AS select `entity_obj_attrbt_dsply_dtl`.`USER_ID` AS `USER_ID`,count(1) AS `recordcount` from `entity_obj_attrbt_dsply_dtl` group by `entity_obj_attrbt_dsply_dtl`.`USER_ID` */;

--
-- Final view structure for view `verify_im_data_for_NULL_record_type_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_NULL_record_type_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_NULL_record_type_rpt_vw` AS select `im`.`RECORD_TYP` AS `record_typ`,`ct`.`TABLE_TYPE` AS `TABLE_TYPE`,`im`.`MSTR_ID` AS `MSTR_ID`,`im`.`MSTR_CD` AS `MSTR_CD`,`im`.`MSTR_NM` AS `MSTR_NM`,`ct`.`TYP_CD` AS `TYP_CD`,`ct`.`TYP_NM` AS `TYP_NM`,locate(' ',`im`.`MSTR_NM`) AS `LOCATE(' ',im.MSTR_NM)`,left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)) AS `LEFT(MSTR_NM,LOCATE(' ',im.MSTR_NM))`,upper(concat(`ct`.`TYP_CD`,if((locate(' ',`im`.`MSTR_NM`) > 0),left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)),`im`.`MSTR_NM`))) AS `NEW_MSTR_CD`,upper(concat(`ct`.`TYP_CD`,if((locate(' ',`im`.`MSTR_NM`) > 0),left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)),`im`.`MSTR_NM`),`im`.`MSTR_ID`)) AS `NEW_MSTR_CD_WITH_ID` from (`independent_mst` `im` join `common_type` `ct`) where ((`im`.`TYP_ID` = `ct`.`TYP_ID`) and isnull(`im`.`RECORD_TYP`)) */;

--
-- Final view structure for view `verify_im_data_for_blank_master_code_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_master_code_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_master_code_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where isnull(`independent_mst`.`MSTR_CD`) */;

--
-- Final view structure for view `verify_im_data_for_blank_master_desc_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_master_desc_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_master_desc_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where isnull(`independent_mst`.`MSTR_DESC`) */;

--
-- Final view structure for view `verify_im_data_for_blank_master_id_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_master_id_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_master_id_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where isnull(`independent_mst`.`MSTR_ID`) */;

--
-- Final view structure for view `verify_im_data_for_blank_master_name_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_master_name_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_master_name_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where isnull(`independent_mst`.`MSTR_NM`) */;

--
-- Final view structure for view `verify_im_data_for_blank_record_type_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_record_type_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_record_type_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where isnull(`independent_mst`.`RECORD_TYP`) */;

--
-- Final view structure for view `verify_im_data_for_blank_type_id_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_blank_type_id_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_blank_type_id_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (isnull(`independent_mst`.`TYP_ID`) or (`independent_mst`.`TYP_ID` = '')) */;

--
-- Final view structure for view `verify_im_data_for_record_type_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_record_type_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_record_type_rpt_vw` AS select `im`.`RECORD_TYP` AS `record_typ`,`ct`.`TABLE_TYPE` AS `TABLE_TYPE`,`im`.`MSTR_ID` AS `MSTR_ID`,`im`.`MSTR_CD` AS `MSTR_CD`,`im`.`MSTR_NM` AS `MSTR_NM`,`ct`.`TYP_CD` AS `TYP_CD`,`ct`.`TYP_NM` AS `TYP_NM`,locate(' ',`im`.`MSTR_NM`) AS `LOCATE(' ',im.MSTR_NM)`,left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)) AS `LEFT(MSTR_NM,LOCATE(' ',im.MSTR_NM))`,upper(concat(`ct`.`TYP_CD`,if((locate(' ',`im`.`MSTR_NM`) > 0),left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)),`im`.`MSTR_NM`))) AS `NEW_MSTR_CD`,upper(concat(`ct`.`TYP_CD`,if((locate(' ',`im`.`MSTR_NM`) > 0),left(`im`.`MSTR_NM`,locate(' ',`im`.`MSTR_NM`)),`im`.`MSTR_NM`),`im`.`MSTR_ID`)) AS `NEW_MSTR_CD_WITH_ID` from (`independent_mst` `im` join `common_type` `ct`) where ((`im`.`TYP_ID` = `ct`.`TYP_ID`) and (if((`ct`.`TABLE_TYPE` = 'SYSTEM'),0,1) <> `im`.`RECORD_TYP`)) */;

--
-- Final view structure for view `verify_im_data_for_type_id_existence_rpt_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_im_data_for_type_id_existence_rpt_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_im_data_for_type_id_existence_rpt_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DEFAULT_FOR_SYNC` AS `IS_DEFAULT_FOR_SYNC`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`MODULE_CD` AS `MODULE_CD`,`independent_mst`.`APP_CD` AS `APP_CD`,`independent_mst`.`APP_ID` AS `APP_ID`,`independent_mst`.`IS_ENABLED` AS `IS_ENABLED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (not(`independent_mst`.`TYP_ID` in (select `common_type`.`TYP_ID` from `common_type`))) */;

--
-- Final view structure for view `verify_summary_data_ct_im_data_volume_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_summary_data_ct_im_data_volume_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_summary_data_ct_im_data_volume_vw` AS select `ct`.`TABLE_TYPE` AS `TABLE_TYPE`,`ct`.`TYP_ID` AS `TYP_ID`,`ct`.`TYP_CD` AS `TYP_CD`,`ct`.`TYP_NM` AS `TYP_NM`,count(1) AS `RECORD_COUNT` from (`independent_mst` `im` join `common_type` `ct`) where (`im`.`TYP_ID` = `ct`.`TYP_ID`) group by `ct`.`TYP_ID`,`ct`.`TYP_CD`,`ct`.`TYP_NM` */;

--
-- Final view structure for view `verify_summary_data_ct_setting_data_volume_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_summary_data_ct_setting_data_volume_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_summary_data_ct_setting_data_volume_vw` AS select `common_type`.`TABLE_TYPE` AS `TABLE_TYPE`,`common_type`.`ORIGINATING_SYSTEM` AS `ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` AS `ORIGINATING_MODULE`,count(1) AS `RECORD_COUNT` from `common_type` where (upper(`common_type`.`TYP_NM`) like '%SETTING%') group by `common_type`.`TABLE_TYPE`,`common_type`.`ORIGINATING_SYSTEM`,`common_type`.`ORIGINATING_MODULE` */;

--
-- Final view structure for view `verify_summary_data_im_record_type_volume_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_summary_data_im_record_type_volume_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_summary_data_im_record_type_volume_vw` AS select if((`im`.`RECORD_TYP` = 0),'SYSTEM','USER') AS `TABLE_TYPE`,`im`.`RECORD_TYP` AS `record_typ`,count(1) AS `RECORD_COUNT` from `independent_mst` `im` group by `im`.`RECORD_TYP` */;

--
-- Final view structure for view `verify_summary_data_im_setting_data_volume_vw`
--

/*!50001 DROP VIEW IF EXISTS `verify_summary_data_im_setting_data_volume_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `verify_summary_data_im_setting_data_volume_vw` AS select `im`.`RECORD_TYP` AS `RECORD_TYP`,`im`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`im`.`FOR_MODULE` AS `FOR_MODULE`,`im`.`TYP_ID` AS `TYP_ID`,`ct`.`TYP_NM` AS `TYP_NM`,count(1) AS `RECORD_COUNT` from (`independent_mst` `im` join `common_type` `ct`) where ((`ct`.`TYP_ID` = `im`.`TYP_ID`) and `im`.`TYP_ID` in (select `common_type`.`TYP_ID` from `common_type` where (`common_type`.`TYP_NM` like '%SETTING%'))) group by `im`.`RECORD_TYP`,`im`.`FOR_SYSTEM`,`im`.`FOR_MODULE`,`im`.`TYP_ID`,`ct`.`TYP_NM` */;

--
-- Final view structure for view `view_marksheet_vw`
--

/*!50001 DROP VIEW IF EXISTS `view_marksheet_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_marksheet_vw` AS select `view_marksheet`.`VIEW_MARKSHEET_ID` AS `VIEW_MARKSHEET_ID`,`view_marksheet`.`CLASS_ID` AS `CLASS_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `view_marksheet`.`CLASS_ID`)) AS `CLASS_NM`,`view_marksheet`.`STUDENT_ID` AS `STUDENT_ID`,(select concat(`student_detail_vw`.`FIRSTNAME`,' ',`student_detail_vw`.`LASTNAME`) from `student_detail_vw` where (`student_detail_vw`.`ID` = `view_marksheet`.`STUDENT_ID`)) AS `STUDENT_NM`,`view_marksheet`.`SUBJECT_ID` AS `SUBJECT_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `view_marksheet`.`SUBJECT_ID`)) AS `SUBJECT_NM`,`view_marksheet`.`REMARK1` AS `REMARK1`,`view_marksheet`.`REMARK2` AS `REMARK2`,`view_marksheet`.`TERM_ID` AS `TERM_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `view_marksheet`.`TERM_ID`)) AS `TERM_NM`,`view_marksheet`.`OA_ID` AS `OA_ID`,`view_marksheet`.`USER_ID` AS `USER_ID`,`view_marksheet`.`CREATED_ON` AS `CREATED_ON`,`view_marksheet`.`UPDATED_ON` AS `UPDATED_ON`,`view_marksheet`.`CREATED_BY` AS `CREATED_BY`,`view_marksheet`.`UPDATED_BY` AS `UPDATED_BY`,`view_marksheet`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`view_marksheet`.`IS_DELETED` AS `IS_DELETED` from `view_marksheet` */;

--
-- Final view structure for view `view_obj_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `view_obj_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_obj_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 22) */;

--
-- Final view structure for view `vitals_vw`
--

/*!50001 DROP VIEW IF EXISTS `vitals_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vitals_vw` AS select `vitals`.`ID` AS `ID`,`vitals`.`PATIENT_ID` AS `PATIENT_ID`,(select `personal_information`.`FIRST_NAME` from `personal_information` where (`personal_information`.`PATIENT_ID` = `vitals`.`PATIENT_ID`)) AS `PATIENT_NM`,`vitals`.`AGE` AS `AGE`,`vitals`.`GENDER` AS `GENDER`,`vitals`.`Height` AS `Height`,`vitals`.`HEIGHT_FT` AS `HEIGHT_FT`,`vitals`.`HEIGHT_INCH` AS `HEIGHT_INCH`,`vitals`.`HEIGHT_INCHES` AS `HEIGHT_INCHES`,`vitals`.`HEIGHT_CM` AS `HEIGHT_CM`,`vitals`.`Weight` AS `Weight`,`vitals`.`WEIGHT_KG` AS `WEIGHT_KG`,`vitals`.`WEIGHT_LBS` AS `WEIGHT_LBS`,`vitals`.`BSA` AS `BSA`,`vitals`.`BMI` AS `BMI`,`vitals`.`BMR` AS `BMR`,`vitals`.`Waist_Circumference` AS `Waist_Circumference`,`vitals`.`Body_Fat` AS `Body_Fat`,`vitals`.`DATE` AS `DATE`,`vitals`.`OA_ID` AS `OA_ID`,`vitals`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`vitals`.`USER_ID` AS `USER_ID`,`vitals`.`CREATED_BY` AS `CREATED_BY`,`vitals`.`CREATED_ON` AS `CREATED_ON`,`vitals`.`UPDATED_BY` AS `UPDATED_BY`,`vitals`.`UPDATED_ON` AS `UPDATED_ON`,`vitals`.`IS_DELETED` AS `IS_DELETED` from `vitals` */;

--
-- Final view structure for view `voucher_type_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `voucher_type_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `voucher_type_mst_vw` AS select `independent_mst`.`MSTR_ID` AS `MSTR_ID`,`independent_mst`.`MSTR_CD` AS `MSTR_CD`,`independent_mst`.`MSTR_NM` AS `MSTR_NM`,`independent_mst`.`MSTR_DESC` AS `MSTR_DESC`,`independent_mst`.`TYP_ID` AS `TYP_ID`,`independent_mst`.`RECORD_TYP` AS `RECORD_TYP`,`independent_mst`.`PARENT_MSTR_ID` AS `PARENT_MSTR_ID`,`independent_mst`.`PARENT_MSTR_CD` AS `PARENT_MSTR_CD`,`independent_mst`.`PARENT_MSTR_NM` AS `PARENT_MSTR_NM`,`independent_mst`.`IS_EDITABLE` AS `IS_EDITABLE`,`independent_mst`.`IS_PREDEFINED` AS `IS_PREDEFINED`,`independent_mst`.`IM_GROUP_CTR` AS `IM_GROUP_CTR`,`independent_mst`.`SEQUENCE` AS `SEQUENCE`,`independent_mst`.`FOR_MODULE` AS `FOR_MODULE`,`independent_mst`.`FOR_SYSTEM` AS `FOR_SYSTEM`,`independent_mst`.`IS_DELETED` AS `IS_DELETED`,`independent_mst`.`OA_ID` AS `OA_ID`,`independent_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`independent_mst`.`USER_ID` AS `USER_ID`,`independent_mst`.`CREATED_BY` AS `CREATED_BY`,`independent_mst`.`UPDATED_BY` AS `UPDATED_BY`,`independent_mst`.`CREATED_ON` AS `CREATED_ON`,`independent_mst`.`UPDATED_ON` AS `UPDATED_ON` from `independent_mst` where (`independent_mst`.`TYP_ID` = 481) */;

--
-- Final view structure for view `weekly_attendance_record_vw`
--

/*!50001 DROP VIEW IF EXISTS `weekly_attendance_record_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `weekly_attendance_record_vw` AS select `emp_attendance_record_vw`.`OAID` AS `OAID`,`emp_attendance_record_vw`.`OA_CD` AS `OA_CD`,`emp_attendance_record_vw`.`OA_NM` AS `OA_NM`,`emp_attendance_record_vw`.`OABRANDID` AS `OABRANDID`,`emp_attendance_record_vw`.`OA_BRAND_CD` AS `OA_BRAND_CD`,`emp_attendance_record_vw`.`OA_BRAND_NM` AS `OA_BRAND_NM`,`emp_attendance_record_vw`.`ATTND_EMP_ID` AS `ATTND_EMP_ID`,`emp_attendance_record_vw`.`EMPLOYEE_NM` AS `EMPLOYEE_NM`,`emp_attendance_record_vw`.`MANAGER_ID` AS `MANAGER_ID`,`emp_attendance_record_vw`.`IS_MANAGER` AS `IS_MANAGER`,`emp_attendance_record_vw`.`REF_EMP_ID` AS `REF_EMP_ID`,`emp_attendance_record_vw`.`REF_EMP_CD` AS `REF_EMP_CD`,`emp_attendance_record_vw`.`ATTND_STATUS_ID` AS `ATTND_STATUS_ID`,`emp_attendance_record_vw`.`ATTND_STATUS` AS `ATTND_STATUS`,`emp_attendance_record_vw`.`CAL_YEAR` AS `CAL_YEAR`,`emp_attendance_record_vw`.`CAL_WEEK` AS `CAL_WEEK`,sum(`emp_attendance_record_vw`.`HRS`) AS `HRS`,sum(`emp_attendance_record_vw`.`MINS`) AS `MINS`,sum(`emp_attendance_record_vw`.`SECONDS`) AS `SECONDS` from `emp_attendance_record_vw` group by `emp_attendance_record_vw`.`OAID`,`emp_attendance_record_vw`.`OA_CD`,`emp_attendance_record_vw`.`OA_NM`,`emp_attendance_record_vw`.`OABRANDID`,`emp_attendance_record_vw`.`OA_BRAND_CD`,`emp_attendance_record_vw`.`OA_BRAND_NM`,`emp_attendance_record_vw`.`ATTND_EMP_ID`,`emp_attendance_record_vw`.`EMPLOYEE_NM`,`emp_attendance_record_vw`.`MANAGER_ID`,`emp_attendance_record_vw`.`IS_MANAGER`,`emp_attendance_record_vw`.`REF_EMP_ID`,`emp_attendance_record_vw`.`REF_EMP_CD`,`emp_attendance_record_vw`.`ATTND_STATUS_ID`,`emp_attendance_record_vw`.`ATTND_STATUS`,`emp_attendance_record_vw`.`CAL_YEAR`,`emp_attendance_record_vw`.`CAL_WEEK` */;

--
-- Final view structure for view `weekly_pay_summary_vw`
--

/*!50001 DROP VIEW IF EXISTS `weekly_pay_summary_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `weekly_pay_summary_vw` AS select `E`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `E`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `E`.`OA_ID`)) AS `OA_NM`,`E`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `E`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `E`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`E`.`EMP_ID` AS `EMP_ID`,(select `emp_mst`.`EMP_NAME` from `emp_mst` where (`emp_mst`.`EMP_ID` = `E`.`EMP_ID`)) AS `EMP_NAME`,`E`.`FINANCIAL_YEAR_ID` AS `FINANCIAL_YEAR_ID`,(select `period_mst`.`FISCAL_PERIOD_DESC` from `period_mst` where (`period_mst`.`PERIOD_ID` = `E`.`FINANCIAL_YEAR_ID`)) AS `FINANCIAL_YEAR`,`E`.`CALENDAR_YEAR` AS `CALENDAR_YEAR`,`E`.`CALENDAR_WEEK` AS `CALENDAR_WEEK`,sum(`E`.`ACTUAL_AMOUNT`) AS `TOTAL_ACTUAL_AMOUNT`,sum(`E`.`EARNED_AMOUNT`) AS `TOTAL_EARNED_AMOUNT` from (`employee_payment_details` `E` join `independent_mst` `IM` on((`IM`.`MSTR_ID` = `E`.`PAY_FREQUENCY`))) where (`IM`.`MSTR_CD` = 'PFWLY') group by `E`.`OA_ID`,`E`.`OA_BRAND_ID`,`E`.`EMP_ID`,`E`.`FINANCIAL_YEAR_ID`,`E`.`PAY_FREQUENCY`,`E`.`CALENDAR_YEAR`,`E`.`CALENDAR_WEEK` */;

--
-- Final view structure for view `work_week_dtl_vw`
--

/*!50001 DROP VIEW IF EXISTS `work_week_dtl_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `work_week_dtl_vw` AS select `work_week_dtl`.`WORK_WEEK_ID` AS `WORK_WEEK_ID`,`work_week_dtl`.`OPERATIONAL_COUNTRY_ID` AS `OPERATIONAL_COUNTRY_ID`,(select `location_mst`.`LOC_NAME` from `location_mst` where (`location_mst`.`LOC_ID` = `work_week_dtl`.`OPERATIONAL_COUNTRY_ID`)) AS `LOC_NM`,`work_week_dtl`.`MON` AS `mon`,`work_week_dtl`.`TUE` AS `tue`,`work_week_dtl`.`WED` AS `wed`,`work_week_dtl`.`THU` AS `thu`,`work_week_dtl`.`FRI` AS `fri`,`work_week_dtl`.`SAT` AS `sat`,`work_week_dtl`.`SUN` AS `sun`,`work_week_dtl`.`OA_ID` AS `OAID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `OAID`)) AS `OA_NM`,`work_week_dtl`.`USER_ID` AS `USERID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `USERID`)) AS `USER_NM`,`work_week_dtl`.`OA_BRAND_ID` AS `OABRANDID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `OABRANDID`)) AS `OA_BRAND_NM`,`work_week_dtl`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`work_week_dtl`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`work_week_dtl`.`CREATED_ON` AS `Created_On`,`work_week_dtl`.`UPDATED_ON` AS `Updated_On` from `work_week_dtl` */;

--
-- Final view structure for view `workflow_conditions_vw`
--

/*!50001 DROP VIEW IF EXISTS `workflow_conditions_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `workflow_conditions_vw` AS select `workflow_conditions`.`WORKFLOW_CON_ID` AS `WORKFLOW_CON_ID`,`workflow_conditions`.`WORKFLOW_ID` AS `WORKFLOW_ID`,(select `workflow`.`WORKFLOW_DESC` from `workflow` where (`workflow`.`WORKFLOW_ID` = `workflow_conditions`.`WORKFLOW_ID`)) AS `WORKFLOW`,`workflow_conditions`.`CONDITION_TYPE_ID` AS `CONDITION_TYPE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `workflow_conditions`.`CONDITION_TYPE_ID`)) AS `CONDITION_TYPE`,`workflow_conditions`.`FIELD_NAME` AS `FIELD_NAME`,`workflow_conditions`.`CONDITION_ID` AS `CONDITION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `workflow_conditions`.`CONDITION_ID`)) AS `CONDITION`,`workflow_conditions`.`CONDITION_VALUE` AS `CONDITION_VALUE`,`workflow_conditions`.`IS_DELETED` AS `IS_DELETED`,`workflow_conditions`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `workflow_conditions`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `workflow_conditions`.`OA_ID`)) AS `OA_NM`,`workflow_conditions`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `workflow_conditions`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `workflow_conditions`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`workflow_conditions`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `workflow_conditions`.`USER_ID`)) AS `USER_NM`,`workflow_conditions`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`workflow_conditions`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`workflow_conditions`.`CREATED_ON` AS `CREATED_ON`,`workflow_conditions`.`UPDATED_ON` AS `UPDATED_ON` from `workflow_conditions` */;

--
-- Final view structure for view `workflow_vw`
--

/*!50001 DROP VIEW IF EXISTS `workflow_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `workflow_vw` AS select `workflow`.`WORKFLOW_ID` AS `WORKFLOW_ID`,`workflow`.`MODULE_ID` AS `MODULE_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `workflow`.`MODULE_ID`)) AS `MODULE`,`workflow`.`WORKFLOW_DESC` AS `WORKFLOW_DESC`,`workflow`.`WORKFLOW_EXECUTION_ID` AS `WORKFLOW_EXECUTION_ID`,(select `independent_mst`.`MSTR_NM` from `independent_mst` where (`independent_mst`.`MSTR_ID` = `workflow`.`WORKFLOW_EXECUTION_ID`)) AS `WORKFLOW_EXECUTION`,`workflow`.`IS_DELETED` AS `IS_DELETED`,`workflow`.`OA_ID` AS `OA_ID`,(select `org_accounts`.`OA_CD` from `org_accounts` where (`org_accounts`.`OA_ID` = `workflow`.`OA_ID`)) AS `OA_CD`,(select `org_accounts`.`OA_NM` from `org_accounts` where (`org_accounts`.`OA_ID` = `workflow`.`OA_ID`)) AS `OA_NM`,`workflow`.`OA_BRAND_ID` AS `OA_BRAND_ID`,(select `oa_brands`.`OA_BRAND_CD` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `workflow`.`OA_BRAND_ID`)) AS `OA_BRAND_CD`,(select `oa_brands`.`OA_BRAND_NM` from `oa_brands` where (`oa_brands`.`OA_BRAND_ID` = `workflow`.`OA_BRAND_ID`)) AS `OA_BRAND_NM`,`workflow`.`USER_ID` AS `USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `workflow`.`USER_ID`)) AS `USER_NM`,`workflow`.`CREATED_BY` AS `CREATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `CREATED_BY_USER_ID`)) AS `CREATED_BY_USER_NAME`,`workflow`.`UPDATED_BY` AS `UPDATED_BY_USER_ID`,(select `user_mst`.`USER_NAME` from `user_mst` where (`user_mst`.`USER_ID` = `UPDATED_BY_USER_ID`)) AS `UPDATED_BY_USER_NAME`,`workflow`.`CREATED_ON` AS `CREATED_ON`,`workflow`.`UPDATED_ON` AS `UPDATED_ON` from `workflow` */;

--
-- Final view structure for view `working_week_mst_vw`
--

/*!50001 DROP VIEW IF EXISTS `working_week_mst_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `working_week_mst_vw` AS select `working_week_mst`.`WORKING_WEEK_DAY_ID` AS `WORKING_WEEK_DAY_ID`,(select `im`.`MSTR_NM` from `independent_mst` `im` where (`im`.`MSTR_ID` = `working_week_mst`.`WEEK_DAY_ID`)) AS `WEEK_DAY`,`working_week_mst`.`WEEK_DAY_ID` AS `WEEK_DAY_ID`,if((`working_week_mst`.`IS_WORKING` = 0),'NO','YES') AS `IS_WORKING`,`working_week_mst`.`IS_DELETED` AS `IS_DELETED`,`working_week_mst`.`OA_ID` AS `OA_ID`,`working_week_mst`.`OA_BRAND_ID` AS `OA_BRAND_ID`,`working_week_mst`.`CREATED_BY` AS `CREATED_BY`,`working_week_mst`.`CREATED_ON` AS `CREATED_ON`,`working_week_mst`.`UPDATED_BY` AS `UPDATED_BY`,`working_week_mst`.`UPDATED_ON` AS `UPDATED_ON` from `working_week_mst` */;

--
-- Final view structure for view `yearly_attendance_record_vw`
--

/*!50001 DROP VIEW IF EXISTS `yearly_attendance_record_vw`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`invoice_gap_v2`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `yearly_attendance_record_vw` AS select `emp_attendance_record_vw`.`OAID` AS `OAID`,`emp_attendance_record_vw`.`OA_CD` AS `OA_CD`,`emp_attendance_record_vw`.`OA_NM` AS `OA_NM`,`emp_attendance_record_vw`.`OABRANDID` AS `OABRANDID`,`emp_attendance_record_vw`.`OA_BRAND_CD` AS `OA_BRAND_CD`,`emp_attendance_record_vw`.`OA_BRAND_NM` AS `OA_BRAND_NM`,`emp_attendance_record_vw`.`ATTND_EMP_ID` AS `ATTND_EMP_ID`,`emp_attendance_record_vw`.`EMPLOYEE_NM` AS `EMPLOYEE_NM`,`emp_attendance_record_vw`.`MANAGER_ID` AS `MANAGER_ID`,`emp_attendance_record_vw`.`IS_MANAGER` AS `IS_MANAGER`,`emp_attendance_record_vw`.`REF_EMP_ID` AS `REF_EMP_ID`,`emp_attendance_record_vw`.`REF_EMP_CD` AS `REF_EMP_CD`,`emp_attendance_record_vw`.`ATTND_STATUS_ID` AS `ATTND_STATUS_ID`,`emp_attendance_record_vw`.`ATTND_STATUS` AS `ATTND_STATUS`,`emp_attendance_record_vw`.`CAL_YEAR` AS `CAL_YEAR`,sum(`emp_attendance_record_vw`.`HRS`) AS `HRS`,sum(`emp_attendance_record_vw`.`MINS`) AS `MINS`,sum(`emp_attendance_record_vw`.`SECONDS`) AS `SECONDS` from `emp_attendance_record_vw` group by `emp_attendance_record_vw`.`OAID`,`emp_attendance_record_vw`.`OA_CD`,`emp_attendance_record_vw`.`OA_NM`,`emp_attendance_record_vw`.`OABRANDID`,`emp_attendance_record_vw`.`OA_BRAND_CD`,`emp_attendance_record_vw`.`OA_BRAND_NM`,`emp_attendance_record_vw`.`ATTND_EMP_ID`,`emp_attendance_record_vw`.`EMPLOYEE_NM`,`emp_attendance_record_vw`.`MANAGER_ID`,`emp_attendance_record_vw`.`IS_MANAGER`,`emp_attendance_record_vw`.`REF_EMP_ID`,`emp_attendance_record_vw`.`REF_EMP_CD`,`emp_attendance_record_vw`.`ATTND_STATUS_ID`,`emp_attendance_record_vw`.`ATTND_STATUS`,`emp_attendance_record_vw`.`CAL_YEAR` */;


