!function(){"use strict";var d,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ExceptionLogsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.pagesize="50",s.pageindex="1",s.pager=!0,s.acadyr_data=[],s.edit_code=!1,s.edt={};s.user_access=[],s.appcode=e.current.name.split(".");e=t.globals.currentUser.username;n.get(i.apiUrl+"api/AlertTransaction/Get_user_access_rights?username="+e+"&appl_code="+s.appcode[1]).then(function(e){s.user_rights=e.data;for(var t=0;t
In ArabicIn FrenchIn RegionalShort NameMOE CodeSubject Group Subject Type Country Name
"+e.subject_name_ar+" "+e.subject_name_fr+""+e.subject_name_ot+""+e.subject_name_abbr+""+e.subject_moe_code+""+e.subject_group_code_name+""+e.subject_type_name+""+e.subject_country_code_name+"
"),$(t.currentTarget).parents("tr").after(s),i.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",i.flag=!0)},i.ex=function(e){console.log("hello")},i.Add=function(){i.multi_array.push({});for(var e=0;e
"+s.getString("Form Field Value 1")+" "+s.getString("Form Field Value 2")+" "+s.getString("Form Field Value 3")+""+s.getString("Form Field Value 4")+"
"+e.sims_appl_form_field_value1+" "+e.sims_appl_form_field_value2+" "+e.sims_appl_form_field_value3+""+e.sims_appl_form_field_value4+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",o.flag=!0)},o.size=function(e){"All"==e?(o.currentPage="1",o.filteredTodos=o.parameter_data,o.pager=!1):(o.pager=!0,o.pagesize=e,o.currentPage=1,o.numPerPage=e,o.makeTodos()),o.numPerPage=e,console.log("numPerPage="+o.numPerPage)},o.index=function(e){o.pageindex=e,o.currentPage=e,o.makeTodos()},o.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_mod_name.toLowerCase().indexOf(t.toLowerCase())||-1
 "+o.getString("French Short Name")+"  "+o.getString("Regional Short Name")+"  "+o.getString("French Full Name")+" "+o.getString("Regional Full Name")+"
"+e.curriculum_short_name_fr+" "+e.curriculum_short_name_ot+" "+e.curriculum_full_name_fr+""+e.curriculum_full_name_ot+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).curriculum_code.toLowerCase().indexOf(t.toLowerCase())||-1"+e+''+t+""),o.close(),a.focus(),s.getdetail()),s.getdetail()})},s.reset_data=function(){s.filteredTodos=[],s.pager=!1,s.searchText="",s.cur="",s.acad=""},s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.obj,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),main.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=50,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t)},s.choiceReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;e={location:e.choice_report_location,parameter:{surveycode:e.sims_survey_code,usertype:e.sims_survey_user_group_code,cur:e.sims_cur_code,acadmic:e.sims_academic_year,operator:e.choice_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(e);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var e="SimsReports."+s.location+",SimsReports",t=window.location.href,t=(t.substring(0,t.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");console.log(t),s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:t,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:e,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),a(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)},s.textReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;e={location:e.text_report_location,parameter:{cur:e.sims_cur_code,acadmic:e.sims_academic_year,surveycode:e.sims_survey_code,usertype:e.sims_survey_user_group_code,operator:e.text_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(e);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var e="SimsReports."+s.location+",SimsReports",t=window.location.href,t=(t.substring(0,t.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");console.log(t),s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:t,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:e,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),a(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)}}])}(),function(){"use strict";var c,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ILocationCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.pagesize="10",s.pageindex=0,s.save_btn=!0,s.Update_btn=!1,s.display=!1,s.table=!0,s.table1=!0,s.propertyName=null,s.reverse=!1,s.user_access=[],s.appcode=e.current.name.split(".");e=t.globals.currentUser.username;n.get(i.apiUrl+"api/AlertTransaction/Get_user_access_rights?username="+e+"&appl_code="+s.appcode[1]).then(function(e){s.user_rights=e.data;for(var t=0;t';for(var a=0;a'+o[a].title+"";n+="",e.forEach(function(e,t){n+="";for(var a=0;a'+e[o[a].dataKey]+"";n+=""});var e={worksheet:t||"Worksheet",table:n+=""},i=document.createElement("a"),e=(i.href="data:application/vnd.ms-excel;base64,"+c.base64(c.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',e)),new Date);i.download=t.replace(/ /g,"_")+"_"+c.getFormatedDate(e,"dd./.mm./.yyyy. .hh.:.mn.:.ss").replace(/ /g,"_")+".xls",i.click()},c.exportExcelBtn=function(){c.sectionwisesub.forEach(function(e,t){e.RowNumber=t+1}),c.printExcel([{title:"Sr.",dataKey:"RowNumber"},{title:"Grade",dataKey:"sims_grade_name_en"},{title:"Section",dataKey:"sims_section_name_en"},{title:"Teacher",dataKey:"emp_name"},{title:"Subject",dataKey:"sims_subject_name_en"}],c.sectionwisesub,"SubjectHeadMapping")},c.search=function(){if(c.todos=c.searched(c.sectionwisesub,c.searchText),c.totalItems=c.todos.length,c.currentPage="1",""==c.searchText&&(c.todos=c.sectionwisesub),1==(m=document.getElementById("mainchk")).checked){m.checked=!1;for(var e=0;es&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r=i.current_year.sims_academic_year?(i.curiculum=!0,i.ac_year=!0,i.grade_nm=!0,i.temp=angular.copy(e),i.promote_code(e.sims_cur_code,e.sims_academic_year),i.update_btn=!0,i.dis1=!1,i.dis2=!0,i.select_list=!1,i.update_flag=!0,1==(l=document.getElementById("mainchk")).checked&&(l.checked=!1),i.check()):swal({title:"Alert",text:"Records from Previous Years Cannot Be Updated",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})},i.getPromoteCode=function(e){i.grd_name=$("#Select5 option:selected").text(),d.get(c.apiUrl+"api/Section/Master/getPromoteCode?grd_code="+e+"&grd_name="+i.grd_name).then(function(e){i.PromoteCode=e.data})},d.get(c.apiUrl+"api/Section/Master/getschooltype").then(function(e){i.schooltype=e.data}),i.save=function(e){e&&((e=i.temp).opr="I",r.push(e),"modern"==d.defaults.headers.common.schoolId?d.post(c.apiUrl+"api/Section/Master/CUDSection1",r).then(function(e){i.sectionsobj=e.data,r=[],1==i.sectionsobj?(r=[],i.dis1=!0,i.dis2=!1,swal({text:"section Inserted Successfully",imageUrl:"assets/img/check.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):(i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code),swal({text:"Section Not Inserted",imageUrl:"assets/img/close.png",width:380}))}):d.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){i.sectionsobj=e.data,r=[],1==i.sectionsobj?(r=[],i.dis1=!0,i.dis2=!1,swal({text:"section Inserted Successfully",imageUrl:"assets/img/check.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):(i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code),swal({text:"Section Not Inserted",imageUrl:"assets/img/close.png",width:380}))}))},i.select_promocode=function(e){i.temp.sims_section_boys_promote_code="",i.temp.sims_section_girls_promote_code="",i.temp.sims_academic_year>i.current_year.sims_academic_year&&swal({title:"Alert",text:"Classes are not created for next academic year.",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})},i.select_boy_girl=function(){i.temp.sims_section_promote_code="",i.temp.sims_academic_year>i.current_year.sims_academic_year&&swal({title:"Alert",text:"Classes are not created for next academic year.",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})},i.Update_data=function(){var e=i.temp;e.opr="U",e.sims_cur_code=i.edt.sims_cur_code,e.sims_academic_year=i.edt.sims_academic_year,e.grade_code=i.edt.sims_grade_code,e.sims_section_shift=i.temp.sims_section_shift,r.push(e),"modern"==d.defaults.headers.common.schoolId||"modernjr"==d.defaults.headers.common.schoolId?d.post(c.apiUrl+"api/Section/Master/CUDSection1",r).then(function(e){i.sectionsobj=e.data,r=[],1==i.sectionsobj?(i.dis1=!0,i.dis2=!1,swal({text:"Section Updated Successfully",imageUrl:"assets/img/check.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):0==i.sectionsobj?(swal({text:"Section Not Updated",imageUrl:"assets/img/close.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):swal("Error-"+i.sectionsobj)}):d.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){i.sectionsobj=e.data,r=[],1==i.sectionsobj?(i.dis1=!0,i.dis2=!1,swal({text:"Section Updated Successfully",imageUrl:"assets/img/check.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):0==i.sectionsobj?(swal({text:"Section Not Updated",imageUrl:"assets/img/close.png",width:380}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):swal("Error-"+i.sectionsobj)})},i.Delete_Records=function(){if(0==i.user_access.data_delete)swal({title:"Alert",text:"Login user does not have required privilege to perform this action.",width:350,height:200});else{r=[];for(var e,t="",a=(i.nodelete=!1,i.sims_statusfordelete=!1),o=0,s=(new Date).getFullYear().toString(),n=0;n=i.current_year.sims_academic_year?(i.flag2=a=!0,e={sims_cur_code:i.edt.sims_cur_code,sims_academic_year:i.edt.sims_academic_year,grade_code:i.edt.sims_grade_code,sims_section_code:i.filteredTodos[n].sims_section_code,opr:"D"},r.push(e)):i.filteredTodos[n].sims_academic_year<=s&&"0"==i.filteredTodos[n].count?a=i.flag2=!1:(i.flag2=!(a=!1),o=parseInt(o)+1,t=t+i.filteredTodos[n]._sims_section_name+" ,",i.nodelete=!0));1==i.nodelete&&(i.sims_statusfordelete=!(a=!1),1==o?swal({text:t+" This Section Is Mapped In Student Section Or Section Subject",width:380,showCloseButton:!0}):swal({text:t+" This Sections Are Mapped In Student Section Or Section Subject",width:380,showCloseButton:!0}),(l=document.getElementById("mainchk")).checked=!1,i.check()),1==a&&i.flag2?swal({title:"",text:"Are you sure you want to Delete?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e?d.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){i.sectionsobj=e.data,r=[],1==i.sectionsobj?(i.dis1=!0,i.dis2=!1,swal({text:"Section Deleted Successfully",imageUrl:"assets/img/check.png",width:350,showCancelButton:!0}),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)):0==i.sectionsobj?(i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code),swal({text:"Section Not Deleted. ",imageUrl:"assets/img/close.png",width:350,showCancelButton:!0})):swal("Error-"+i.sectionsobj)}):(1==(l=document.getElementById("mainchk")).checked&&(l.checked=!1),i.check())}):i.flag2?1!=i.sims_statusfordelete&&swal({text:"Select At Least One Record To Delete",imageUrl:"assets/img/notification-alert.png",width:320,showCancelButton:!0}):swal({title:"Alert",text:"Records from Previous Years Cannot Be Deleted",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})}},i.Reset=function(){i.edt.sims_grade_code="",i.edt.sims_academic_year="",i.filteredTodos=[],i.pager=!1,i.pagesize="10"},i.can=function(){i.dis1=!0,i.dis2=!1,i.temp="",i.promote_code(str.sims_cur_code,str.sims_academic_year)},d.get(c.apiUrl+"api/Section/Master/getSectionLocation").then(function(e){i.SectionLocation=e.data,console.log(i.SectionLocation)}),d.get(c.apiUrl+"api/Section/Master/getFundingStatus").then(function(e){i.FundingStatus=e.data,console.log(i.FundingStatus)}),d.get(c.apiUrl+"api/Section/Master/getMediumOfInstruction").then(function(e){i.MediumOfInstructionData=e.data,console.log(i.MediumOfInstructionData)}),i.New=function(){0==i.user_access.data_insert?swal({title:"Alert",text:"Login user does not have required privilege to perform this action.",width:350,height:200}):(i.curiculum=!1,i.ac_year=!1,i.grade_nm=!1,i.temp="",i.update_flag=!1,i.new_funs=!0,i.dis1=!1,i.dis2=!0,i.select_list=!0,i.update_btn=!1,i.temp={sims_cur_code:i.edt.sims_cur_code,sims_academic_year:i.edt.sims_academic_year,grade_code:i.edt.sims_grade_code,sims_status:!0,sims_allow_extra_status:!0},i.promote_code())},i.flag=!0,i.expand=function(e,t){if(1==i.flag)$(s).remove(),e.icon="fa fa-minus-circle",s=$("
 Name (Arabic)  Name (French) Name (Regional) Display Order
"+e.sims_section_name_ar+" "+e.sims_section_name_fr+" "+e.sims_section_name_ot+" "+e.sims_section_order_no+"
"),$(t.currentTarget).parents("tr").after(s),i.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"C"===e.sims_academic_year_status),i.getsections(i.temp.sims_cur_code,i.temp.sims_academic_year)})},i.getsections=function(e,t){d.get(c.apiUrl+"api/common/getAllGrades?cur_code="+e+"&academic_year="+t).then(function(e){i.grade=e.data,console.log(i.grade),console.log("$scope.edt.sims_cur_code,$scope.edt.sims_academic_year,$scope.edt.sims_grade_code in getsections: ",i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code),i.showSections(i.edt.sims_cur_code,i.edt.sims_academic_year,i.edt.sims_grade_code)})}}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]);var r,l=[];e.controller("CurriculumLevelController",["$scope","$state","$rootScope","$timeout","gettextCatalog","filterFilter","$http","ENV",function(a,o,s,e,t,n,i,d,c){a.display=!1,a.pagesize="10",a.pageindex="0",a.pager=!0,a.levelcodeRonly=!1,i.get(d.apiUrl+"api/common/CurLevel/getCurlevel").then(function(e){a.display=!1,a.grid=!0,a.user_access=[],a.appcode=o.current.name.split(".");var t=s.globals.currentUser.username;i.get(d.apiUrl+"api/AlertTransaction/Get_user_access_rights?username="+t+"&appl_code="+a.appcode[1]).then(function(e){a.user_rights=e.data;for(var t=0;t{e=parseInt(e.sims_academic_year_desc),t=parseInt(t.sims_academic_year_desc);return t"C"===e.sims_academic_year_status);(new Date).getFullYear();var t=s.Acdm_yr_obj.find(function(e){return"C"===e.sims_academic_year_status});t?s.selectedYears.push(t.sims_academic_year):(console.log("No object with sims_academic_year equal to the current year was found."),s.selectedYears=[]),setTimeout(function(){$("#acyr_list").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3),0=s.current_year.sims_academic_year)){s.flag2=!1;break}s.flag=!0,s.flag2=!0;var t={sims_cur_code:s.filteredTodos[e].level_grade_cur_code,sims_cur_level_code:s.filteredTodos[e].level_grade_level_code,sims_academic_year:s.filteredTodos[e].level_grade_academic_year,sims_grade_code:s.filteredTodos[e].level_grade_grade_code,opr:"D"};o.push(t)}s.flag&&s.flag2?swal({title:"",text:"Are you sure you want to Delete?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){if(e)n.post(i.apiUrl+"api/CurLevelGrade/CUDCurGradeLevel",o).then(function(e){s.msg1=e.data,1==s.msg1?swal({text:"Record Deleted Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&(s.currGradeLevelDisplay(),1==(d=document.getElementById("mainchk")).checked&&(d.checked=!1,s.row1=""),s.currentPage=!0)}):0==s.msg1?swal({text:"Record Not Deleted. ",imageUrl:"assets/img/close.png",showCloseButton:!0,width:380}).then(function(e){e&&(s.currGradeLevelDisplay(),1==(d=document.getElementById("mainchk")).checked&&(d.checked=!1,s.row1=""),s.currentPage=!0)}):swal("Error-"+s.msg1)});else{1==(d=document.getElementById("mainchk")).checked&&(d.checked=!1);for(var t=0;t
NAME(Arabic)NAME(French)NAME(Other)KEYWORDVERSION
"+e.comn_appl_name_ar+""+e.comn_appl_name_fr+""+e.comn_appl_name_ot+""+e.comn_appl_keywords+""+e.comn_appl_version+"
Location HTML URLHELP URLVIDEO URLLOCATIONDISPALY ORDERAPPLICATOIN TAG LOGIC
"+e.comn_appl_location_html+""+e.comn_appl_help_url+""+e.comn_appl_video_url+""+e.comn_appl_location+""+e.comn_appl_display_order+""+e.comn_appl_tag+""+e.comn_appl_logic+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a
NAME(Arabic)NAME(French)NAME(Other)KEYWORDVERSION
"+e.comn_appl_name_ar+""+e.comn_appl_name_fr+""+e.comn_appl_name_ot+""+e.comn_appl_keywords+""+e.comn_appl_version+"
Location HTML URLHELP URLVIDEO URLLOCATIONDISPALY ORDERAPPLICATOIN TAG LOGIC
"+e.comn_appl_location_html+""+e.comn_appl_help_url+""+e.comn_appl_video_url+""+e.comn_appl_location+""+e.comn_appl_display_order+""+e.comn_appl_tag+""+e.comn_appl_logic+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a
NAME(Arabic)NAME(French)NAME(Other)KEYWORDVERSION
"+e.comn_appl_name_ar+""+e.comn_appl_name_fr+""+e.comn_appl_name_ot+""+e.comn_appl_keywords+""+e.comn_appl_version+"
HELP URLLOCATIONDISPALY ORDERAPPLICATOIN TAG LOGIC
"+e.comn_appl_help_url+""+e.comn_appl_location+""+e.comn_appl_display_order+""+e.comn_appl_tag+""+e.comn_appl_logic+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a
  Email  Sms  Bcc Bcc Email Bcc Sms
   "+e.sims_email_flag+"  "+e.sims_sms_flag+"  "+e.sims_bcc_flag+" "+e.sims_bcc_email_flag+" "+e.sims_bcc_sms_flag+"
"),$(t.currentTarget).parents("tr").after(d)}}])}(),function(){"use strict";angular.module("sims.module.Setup").controller("LessonObservationSchedulingCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(a,e,t,o,s,n,i){a.pagesize="10",a.pageindex="0";t.globals.currentUser.username;var d=t.globals.currentUser.username,t=(a.update1=!1,a.temp=[],new Date),c=t.getDate(),r=t.getMonth()+1,l=t.getFullYear(),m=(a.date1=c+"-"+r+"-"+l,c+"-"+r+"-"+l);a.sims_lesson_status=!0,a.temp.att_date=("0"+c).slice(-2)+"-"+("0"+r).slice(-2)+"-"+l,t.getHours(),t.getMinutes(),t.getSeconds();a.dateTime=m,a.temp.sims_lesson_status=!0,a.gradetxt=!1,a.sectiontxt=!1,a.subdrop=!1,a.crrtxt=!1,a.academictxt=!1;moment().format("DD/MM/YYYY");o(function(){$("#fixTable").tableHeadFixer({top:1})},100),(c=(t=new Date).getDate())<10&&(c="0"+c);(r=t.getMonth()+1)<10&&(r="0"+r),l=t.getFullYear();a.temp.sims_lesson_date=c+"-"+r+"-"+l,n.get(i.apiUrl+"api/ERP/Grade/getCuriculum_new").then(function(e){a.curiculum=e.data,a.temp.sims_cur_code=a.curiculum[0].sims_cur_code,a.cur_change()}),a.load_data=function(){n.get(i.apiUrl+"api/LessonObservationSchedulibg/GetAll_lessonSuperSechedule?user_name="+d+"&sims_academic_year="+a.temp.sims_academic_year).then(function(e){a.allSupervisorSchedule=e.data,console.log("data",a.allSupervisorSchedule),a.totalItems=a.allSupervisorSchedule.length,a.todos=a.allSupervisorSchedule,a.makeTodos()}),n.get(i.apiUrl+"api/LessonObservationSchedulibg/GetScheduleCount?sims_academic_year="+a.temp.sims_academic_year).then(function(e){a.demo_values=e.data})},a.cur_change=function(){n.get(i.apiUrl+"api/attendance/getAttendanceyear?cur_code="+a.temp.sims_cur_code).then(function(e){a.academicyears=e.data,a.temp.sims_academic_year=a.academicyears[0].sims_academic_year,a.acdm_yr_change()})},a.sec_change=function(){n.get(i.apiUrl+"api/LearningAsd/getSubject?cur="+a.temp.sims_cur_code+"&academic_year="+a.temp.sims_academic_year+"&grade="+a.temp.sims_grade_code+"§ion="+a.temp.sims_section_code+"&user_name="+d).then(function(e){a.subjectlst=e.data})},a.acdm_yr_change=function(){n.get(i.apiUrl+"api/LearningAsd/getgrade?cur_code="+a.temp.sims_cur_code+"&academic_year="+a.temp.sims_academic_year+"&userName="+d).then(function(e){a.grades=e.data,a.grades.sims_grade_code=a.grades[0].sims_grade_code,a.grade_change(),a.load_data()}),n.get(i.apiUrl+"api/LearningAsd/getSlot?cur="+a.temp.sims_cur_code+"&academic_year="+a.temp.sims_academic_year+"&grade="+a.temp.sims_grade_code+"§ion="+a.temp.sims_section_code+"&sims_teacher_code="+d).then(function(e){a.attSlot1=e.data})},a.grade_change=function(){n.get(i.apiUrl+"api/LearningAsd/getsection?cur_code="+a.temp.sims_cur_code+"&academic_year="+a.temp.sims_academic_year+"&gradeCode="+a.temp.sims_grade_code+"&userName="+d).then(function(e){a.section=e.data})},setTimeout(function(){$("#supervisor_slot").select2()},100),setTimeout(function(){$("#employ_slot").select2()},100),"cbsesmf"==n.defaults.headers.common.schoolId||"uksmf"==n.defaults.headers.common.schoolId?n.post(i.apiUrl+"api/LessonObservationSchedulibg/lessionData",{opr:"K",user_name:d}).then(function(e){a.attsupervisor1=[],0s.pageCount()-5?s.pageCount()-5+1:t;a
User Id(Email) Status User Id(SMS)StatusUser Id(Bcc Portal) Status User Id(Bcc Email)StatusUser Id(Bcc SMS) Status
"+e.sims_comm_email_user_code+""+e.sims_comm_email_user_code_status+" "+e.sims_comm_sms_user_code+""+e.sims_comm_sms_user_code_status+""+e.sims_comm_bcc_user_code+""+e.sims_comm_bcc_user_code_status+" "+e.sims_comm_bcc_email_user_code+""+e.sims_comm_bcc_email_user_code_status+""+e.sims_comm_bcc_sms_user_code+""+e.sims_comm_bcc_sms_user_code_status+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)},s.ex=function(e){console.log("hello")}}])}(),function(){"use strict";var d,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ColloborationDetailsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(o,e,t,a,s,n,i){o.pagesize="50",o.pageindex="0",o.pager=!0,o.Coolloboration_data=[];o.user_access=[],o.IsAllChecked=!1,o.appcode=e.current.name.split(".");e=t.globals.currentUser.username;n.get(i.apiUrl+"api/AlertTransaction/Get_user_access_rights?username="+e+"&appl_code="+o.appcode[1]).then(function(e){o.user_rights=e.data;for(var t=0;t
"+s.getString("Character Count")+" "+s.getString("Character Sequence")+" "+s.getString("Number Count")+""+s.getString("Number Sequence")+"
"+e.comn_character_count+" "+e.comn_character_squence+" "+e.comm_number_count+""+e.comn_number_squence+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",o.flag=!0)}}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("UserApplicationsFinsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.Allusers=[],s.busy=!1,s.table=!1,s.newmode=!1,s.editonly=!1,s.edt={comn_user_date_created:new Date},n.get(i.apiUrl+"api/common/UserApplicationsFinsController/GetCompany").then(function(e){switch(s.Company=e.data,console.log(s.Company),s.Company.length){case 1:s.flg_comp1=!0,s.flg_comp2=!1,s.flg_comp3=!1;break;case 2:s.flg_comp1=!0,s.flg_comp2=!0,s.flg_comp3=!1;break;case 3:s.flg_comp1=!0,s.flg_comp2=!0,s.flg_comp3=!0}});s.copy="Update",s.FlagUpdate=!0,s.chkcopy=!0,n.get(i.apiUrl+"api/common/UserApplicationsController/GetRoles").then(function(e){s.role=e.data}),s.Submit_click=function(){n.get(i.apiUrl+"api/common/UserApplicationsFinsController/GetCompanyStatusWithAppl?userName="+s.userName).then(function(e){0s.pageCount()-5?s.pageCount()-5+1:t;ao.pageCount()-5?o.pageCount()-5+1:t;a"2"===e.sims_step_number));n.hasStepOne?(n.savedata=[],swal({title:"",text:"Cannot change the status for choices once verified,do you want to still verify?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){e&&i.get(d.apiUrl+"api/Streamapproveeligibility/Gettimelineinfo?year="+n.temp.sims_academic_year+"&criteria_code=C1").then(function(e){n.timelineinfo=e.data,n.verifieddata=[],n.savedata=[];for(var t=0;t"3"===e.sims_step_number));n.hasStepOne?""==n.temp.criteria_code||null==n.temp.criteria_code||null==n.temp.criteria_code?swal({text:"Please select criteria",imageUrl:"assets/img/check.png",width:350,height:200}):($("#loader").modal({backdrop:"static",keyboard:!1}),n.exammarks=[],n.datasend=[],n.prospectlist=!1,n.communicateppn=!1,n.communicateppnd=!1,n.choicelist=!1,n.pogresslist=!1,n.eligibitylist=!1,n.progresslisttb=!1,n.eligibitylistd=!1,i.get(d.apiUrl+"api/Streamapproveeligibility/Getcriteriatimelineinfo?year="+n.temp.sims_academic_year+"&criteria_code="+n.temp.criteria_code).then(function(e){n.timelineinfo=e.data,n.savedata=[];for(var t=0;t{e.style.color="black"}),e.outerHTML),e="data:application/vnd.ms-excel,"+escape(e),t=document.createElement("a");t.href=e,t.download="Attendence consistency check report.xls",t.click()},n.processelibitylist=function(){""==n.temp.criteria_code||null==n.temp.criteria_code||null==n.temp.criteria_code?swal({text:"Please select criteria",imageUrl:"assets/img/check.png",width:350,height:200}):i.get(d.apiUrl+"api/Streamapproveeligibility/Getcriteriatimelineinfo?year="+n.temp.sims_academic_year+"&criteria_code="+n.temp.criteria_code).then(function(e){n.timelineinfo=e.data;for(var t=0;t"4"===e.sims_step_number));n.hasStepOne?($("#loader").modal({backdrop:"static",keyboard:!1}),n.eligibility=[],n.datasend=[],n.prospectlist=!1,n.choicelist=!1,n.progresslist=!1,n.eligibitylist=!0,n.progresslisttb=!1,n.eligibitylistd=!1,n.communicateppn=!1,n.communicateppnd=!1,i.get(d.apiUrl+"api/Streamapproveeligibility/Getcriteriatimelineinfo?year="+n.temp.sims_academic_year+"&criteria_code="+n.temp.criteria_code).then(function(e){n.timelineinfo=e.data,n.savedata=[];for(var t=0;t"5"===e.sims_step_number),!n.hasStepOne))return void swal({text:"Please complete step 5",imageUrl:"assets/img/check.png",width:350,height:200})}),n.communicateppn=!0,n.communicateppnd=!1,n.prospectlist=!1,n.choicelist=!1,n.progresslist=!1,n.eligibitylist=!1,n.progresslisttb=!1,n.eligibitylistd=!1,n.gradebox=!0,n.sectionbox=!0},n.previewdata=function(e,t){i.get(d.apiUrl+"api/Streamapproveeligibility/getprocesseddata?grade_code="+e+"§ion_code="+t+"&year="+n.temp.sims_academic_year).then(function(e){var o,a;n.detailed_data=e.data.table,n.communicateppnd=!0,n.allchoices=[],n.studentdata=[],n.choiceCounts=[],n.detailed_data&&(e=n.detailed_data,o={},e.forEach(function(e){var t=e.stream_name,a=e.sims_choice_name;o[t]||(o[t]={name:t,choices:[]}),a&&!o[t].choices.includes(a)&&o[t].choices.push(a),a&&"Y"===e.sims_eligibility_status&&(n.choiceCounts[t]||(n.choiceCounts[t]={}),n.choiceCounts[t][a]=(n.choiceCounts[t][a]||0)+1)}),n.choicegroups=Object.values(o),n.allchoices=[],n.choicegroups.forEach(function(e){n.allchoices=n.allchoices.concat(e.choices)}),a={},e.forEach(function(e){var t=e.sims_enrollment_number;a[t]||(a[t]={sims_enroll_number:e.sims_enrollment_number,sims_student_full_name:e.student_name,sims_status:void 0!==e.sims_eligibility_status?e.sims_eligibility_status:"-",gender:e.sims_student_gender,class:e.sims_current_class,initiated_status:e.communication,tc_status:e.tc_status,outstanding_fee_status:e.outstanding_fee_status,balancefees:e.balancefees,parent_name:e.parent_name,parent_email:e.parent_email,select_stud:!1,subjectStatuses:[]}),e.sims_choice_name&&a[t].subjectStatuses.push({choice:e.sims_choice_name,status:e.sims_eligibility_status,stream:e.stream_name})}),n.processedStudents=Object.values(a).map(e=>({sims_enroll_number:e.sims_enrollment_number,sims_student_full_name:e.student_name,subjectStatuses:e.subjectStatuses})),n.processedStudents=Object.values(a),n.allchoices2=[],n.choicegroups.forEach(function(t){n.allchoices2=n.allchoices2.concat(t.choices.map(e=>e+" / "+t.name))}),n.mergedCounts={},Object.entries(n.choiceCounts).forEach(([a,e])=>{Object.entries(e).forEach(([e,t])=>{n.mergedCounts[e+" / "+a]=t})}),n.submitted=n.processedStudents.filter(function(e){return"N"!==e.initiated_status}).length,n.pending=n.processedStudents.length,console.log(n.mergedCounts))})},n.communicatedata=function(){n.savedata2=[];for(var e=0;es&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r"+e+''+t+""),o.close(),a.focus(),s.getdetail()),s.getdetail()})},s.reset_data=function(){s.filteredTodos=[],s.pager=!1,s.searchText="",s.cur="",s.acad=""},s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},s.size=function(e){"All"==e?(s.filteredTodos=s.tempSN,s.numPerPage=s.tempSN.length,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e),s.makeTodos()},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),main.checked=!1,s.CheckAllChecked()},s.tempSN=[],s.currentPage=1,s.numPerPage=50,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);console.log("begin="+e),console.log("end="+t),s.tempSN=s.todos.slice(e,t)}}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("UserApplicationsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,o,t,a,i,d){n.studentimagee=!1,n.parentimage=!1,n.employeeimage=!1,n.defaultImage="default.jpg",n.imageUrl=d.docUrl+i.defaults.headers.common.schoolId+"/Images/EmployeeImages/",n.Allusers=[],n.studimg=d.docUrl+i.defaults.headers.common.schoolId+"/Images/StudentImages/",n.parentimg=d.docUrl+i.defaults.headers.common.schoolId+"/Images/ParentImages/",n.busy=!1,n.table=!1,n.newmode=!1,n.editonly=!1,n.visible_StakeholderChk=!1,n.edt={comn_user_date_created:new Date},o.visible_stud=!1,o.visible_parent=!1,o.visible_search_parent=!1,o.visible_teacher=!1,o.visible_User=!0,o.visible_Employee=!1,o.chkMulti=!1,n.modal_cancel=function(){$("#searchUser").modal("hide")};n.copy="Update",n.FlagUpdate=!0,n.chkcopy=!0,n.UserApplicationList={};$("#Selected_User").jqxListBox({allowDrop:!0,allowDrag:!0,source:[],width:150,autoHeight:!0,theme:"energyblue"}),$("#Selected_Role").jqxListBox({allowDrop:!0,allowDrag:!0,source:[],width:150,autoHeight:!0,theme:"energyblue"}),i.get(d.apiUrl+"api/common/UserApplicationsController/GetRoles").then(function(e){n.role=e.data}),n.$on("global_cancel",function(e){_=[],n.temp={},n.parentimage=!1,n.employeeimage=!1,n.studentimagee=!1;var t=[];if(0n.pageCount()-5?n.pageCount()-5+1:t;a"+t+"":t}})}))}),[]);$("#Application").jqxListBox({allowDrop:!0,allowDrag:!0,source:s,width:"100%",height:300,theme:"energyblue"}),$("#SelectedApplication").jqxListBox({allowDrop:!0,allowDrag:!0,source:s,width:"100%",height:300,theme:"energyblue"})}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CreateEditUserCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","filterFilter","ENV","$window",function(a,e,o,t,s,n,i,d,c){a.display=!1,a.grid=!0,a.pagesize="10",a.pageindex="1";a.busy=!1,a.table=!1,n.get(d.apiUrl+"api/common/getAllComboBoxValues?academicYear=2015&routeCode=01").then(function(e){a.ComboBoxValues=e.data}),a.index=function(e){a.pageindex=e,a.currentPage=e,a.makeTodos()},a.UserSearch=function(){a.busy=!0,a.table=!1,a.filteredTodos="",n.get(d.apiUrl+"api/common/User/getUsers?data="+JSON.stringify(a.temp1)).then(function(e){a.Allusers=e.data,a.table=!0,0
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Parent Name "+e.parent_name+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Nationality "+e.sims_parent_father_nationality1_code+"
 Address Summary "+e.sims_parent_father_summary_address+"
 Country "+e.sims_parent_father_country_code+"
 Passport No "+e.sims_parent_father_passport_number+"
"),$(t.currentTarget).parents("tr").after(_),n.flag1=!1}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Parent Name "+e.parent_name+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag1=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Parent Name "+e.parent_name+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Nationality "+e.sims_parent_father_nationality1_code+"
 Address Summary "+e.sims_parent_father_summary_address+"
 Country "+e.sims_parent_father_country_code+"
 Passport No "+e.sims_parent_father_passport_number+"
"),$(t.currentTarget).parents("tr").after(_),n.flag1=!1}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o
 Sibling Name "+e.sib_name+"
 Class "+e.sib_class+"
 Parent Name "+e.parent_name+"
 Admission Date "+e.sib_admiss_date+"
 Gender "+e.sib_gender+"
"),$(t.currentTarget).parents("tr").after(_),n.flag1=!1,"Boy"!=e.sib_gender&&"Girl"==e.sib_gender?$("#gender").addClass("fa fa-female"):$("#gender").addClass("fa fa-male")}else{$("#innerRow").css({display:"none"});for(var o=0;o"+e+''+t+""),o.close(),a.focus(),s.getdetail()),s.getdetail()})},s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.obj,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),main.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=50,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.surveyquestions=function(){$("#MyModal1").modal("show")},s.choiceReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;e={location:e.detail_report_location,parameter:{surveycode:e.sims_survey_code,usertype:e.sims_survey_user_group_code,cur:e.sims_cur_code,acadmic:e.sims_academic_year,operator:e.choice_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(e);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var t,e="SimsReports."+s.location+",SimsReports",a=window.location.href,a=a.substring(0,a.indexOf(":"));a="ihsonlineom"==n.defaults.headers.common.schoolId||"mstagingom"==n.defaults.headers.common.schoolId||"ihsonlineag"==n.defaults.headers.common.schoolId||"mstagingag"==n.defaults.headers.common.schoolId||"iisonlinedso"==n.defaults.headers.common.schoolId||"mstagingdso"==n.defaults.headers.common.schoolId?(t="",i.AWS.includes(n.defaults.headers.common.schoolId)&&(t="reports-"),"https"==a?"https://"+t+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/":"http://"+t+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/"):"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/",s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:a,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:e,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),o(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)},s.textReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;e={location:e.text_report_location,parameter:{cur:e.sims_cur_code,acadmic:e.sims_academic_year,surveycode:e.sims_survey_code,usertype:e.sims_survey_user_group_code,operator:e.text_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(e);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var e="SimsReports."+s.location+",SimsReports",t=window.location.href,t=(t.substring(0,t.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:t,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:e,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),o(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)}}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]);e.controller("ReportCardParameterCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","AuthenticationService",function(e,t,a,o,s,n,i,d){try{e.rpt=JSON.parse(window.localStorage.ReportDetails),e.location=e.rpt.location,e.parameter=e.rpt.parameter,e.state=e.rpt.state,e.show_pdf=e.rpt.show_pdf}catch(e){}var _="SimsReports."+e.location+",SimsReports",d=d.GetRpt_url();console.log(d),e.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:d,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){},parameters:{editors:{multiSelect:telerikReportViewer.ParameterEditorTypes.COMBO_BOX,singleSelect:telerikReportViewer.ParameterEditorTypes.COMBO_BOX}}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:_,parameters:e.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),"y"==e.show_pdf&&($(".k-group li:nth-child(2)").css({display:"none"}),$(".k-group li:nth-child(3)").css({display:"none"}),$(".k-group li:nth-child(4)").css({display:"none"}),$(".k-group li:nth-child(5)").css({display:"none"}),$(".k-group li:nth-child(6)").css({display:"none"}),$(".k-group li:nth-child(7)").css({display:"none"}))},1e3),o(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),"y"==e.show_pdf&&($(".k-group li:nth-child(2)").css({display:"none"}),$(".k-group li:nth-child(3)").css({display:"none"}),$(".k-group li:nth-child(4)").css({display:"none"}),$(".k-group li:nth-child(5)").css({display:"none"}),$(".k-group li:nth-child(6)").css({display:"none"}),$(".k-group li:nth-child(7)").css({display:"none"}))},100),e.back=function(){goToState(e.state)}}])}(),function(){"use strict";var r,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ComplaintProcessComplateCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(a,e,o,t,s,n,i,d){a.pagesize="5",a.pageindex="1",a.acadyr_data=[],a.edit_code=!1,a.dis_no=!0,a.grid=!0,a.display=!1;var c=[],n=(a.btn_update=!1,"asd"==i.defaults.headers.common.schoolId&&(a.showASDFlag=!0),n("date")(new Date,"yyyy-MM-dd"));a.dt={sims_complaint_registration_date:n},t(function(){$("#fixedtable").tableHeadFixer({top:1})},100),a.filteredTodos=[],a.currentPage=1,a.numPerPage=5,a.maxSize=5,i.get(d.apiUrl+"api/common/AcademicYear/getAcademicStatus").then(function(e){a.obj3=e.data,console.log(a.obj3)}),i.get(d.apiUrl+"api/StudentReport/getcomplaintdetailsassign?username=").then(function(e){a.grid=!0,a.display=!1,a.acadyr_data=e.data,a.totalItems=a.acadyr_data.length,a.todos=a.acadyr_data,a.makeTodos()}),i.get(d.apiUrl+"api/StudentReport/getstatus").then(function(e){a.status_code=e.data}),a.makeTodos=function(){var e=parseInt(a.totalItems%a.numPerPage),e=(a.pagersize="0"==e?parseInt(a.totalItems/a.numPerPage):parseInt(a.totalItems/a.numPerPage)+1,(a.currentPage-1)*a.numPerPage),t=parseInt(e)+parseInt(a.numPerPage);a.filteredTodos=a.todos.slice(e,t)},a.SearchUser=function(){a.chku=!0,o.chkMulti=!1,o.visible_User=!0,a.visible_Employee=!1,o.visible_stud=!1,a.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},a.$on("global_cancel",function(){a.edte={sims_user_code_created_code:a.SelectedUserLst[0].user_name,sims_user_code_created_name:a.SelectedUserLst[0].name}}),a.edit=function(e){a.display=!0,a.grid=!1,a.update1=!0,a.delete1=!1,a.temp={sims_complaint_srl_no:e.sims_complaint_srl_no},""!=e.sims_complaint_assigned_to_user_code?(a.btn_update=!0,a.save1=!1,a.assign_to=!0,a.assign_date=!0,a.btn_search=!0,a.neweditdate=!0,a.edt={sims_action_code:e.sims_complaint_status,sims_complaint_subject:e.sims_complaint_subject},a.edte={sims_user_code_created_name:e.sims_complaint_assigned_to_user_code},a.dt={sims_complaint_registration_date:e.sims_complaint_registration_date}):(a.neweditdate=!1,a.save1=!0,a.btn_update=!1,a.assign_to=!1,a.assign_date=!1,a.btn_search=!1)},a.Update=function(){var e={sims_complaint_subject:a.edt.sims_complaint_subject,sims_action_code:a.edt.sims_action_code,sims_complaint_srl_no:a.temp.sims_complaint_srl_no,sims_complaint_registration_date:a.dt.sims_complaint_update_date,sims_complaint_register_user_code:o.globals.currentUser.username,sims_complaint_assigned_to_user_code:a.edte.sims_user_code_created_code,opr:"U"};c.push(e),i.post(d.apiUrl+"api/StudentReport/CUDcomplainttassign?complaintcode=",c).then(function(e){a.msg1=e.data,null==a.msg1&&null==a.msg1||(e=a.msg1.strMessage,swal({title:"Alert",text:e,width:450,height:200}),a.cancel())})},a.Save=function(){var e=[],t={sims_complaint_subject:a.edt.sims_complaint_subject,sims_action_code:a.edt.sims_action_code,sims_complaint_srl_no:a.temp.sims_complaint_srl_no,sims_complaint_registration_date:a.dt.sims_complaint_registration_date,sims_complaint_register_user_code:o.globals.currentUser.username,sims_complaint_assigned_to_user_code:a.edte.sims_user_code_created_code,opr:"E"};e.push(t),i.post(d.apiUrl+"api/StudentReport/CUDcomplainttassign?complaintcode=",e).then(function(e){a.msg1=e.data,null==a.msg1&&null==a.msg1||(e=a.msg1.strMessage,swal({title:"Alert",text:e,width:450,height:200}),a.cancel())})},a.getgrid=function(){a.currentPage=1,i.get(d.apiUrl+"api/common/AcademicYear/getAcademicYear").then(function(e){a.display=!1,a.grid=!0,a.acadyr_data=e.data,a.totalItems=a.acadyr_data.length,a.todos=a.acadyr_data,a.makeTodos()}),1==(r=document.getElementById("mainchk")).checked&&(r.checked=!1,a.row1=""),a.myForm.$setPristine(),a.myForm.$setUntouched()},a.New=function(){a.display=!0,a.grid=!1,a.save1=!0,a.update1=!1,a.delete1=!1,a.btn_update=!1,a.edt="",a.edit_code=!1,i.get(d.apiUrl+"api/StudentReport/getcomplaintcode").then(function(e){a.com_no=e.data,a.temp={sims_complaint_srl_no:a.com_no[0].sims_complaint_srl_no}})},a.cancel=function(){a.grid=!0,a.display=!1,a.edt=[],a.edte=[],a.dt=[],a.myForm.$setPristine(),a.myForm.$setUntouched()},a.size=function(e){console.log(e),a.pagesize=e,a.currentPage=1,a.numPerPage=e,console.log("numPerPage="+a.numPerPage),a.makeTodos()},a.index=function(e){a.pageindex=e,a.currentPage=e,console.log("currentPage="+a.currentPage),a.makeTodos(),r.checked=!1,a.row1=""},a.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_complaint_srl_no.toLowerCase().indexOf(t.toLowerCase())||e.sagar==t;var t})},a.search=function(){a.todos=a.searched(a.acadyr_data,a.searchText),a.totalItems=a.todos.length,a.currentPage="1",""==a.searchText&&(a.todos=a.acadyr_data),a.makeTodos()},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}])}(),function(){"use strict";var c,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ComplaintMaintenanceCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(s,e,o,t,a,n,i,d){s.pagesize="5",s.pageindex="1",s.acadyr_data=[],s.edit_code=!1,s.dis_no=!0,s.grid=!0,s.display=!1;"asd"==i.defaults.headers.common.schoolId&&(s.showASDFlag=!0);n=n("date")(new Date,"yyyy-MM-dd");s.dt={sims_complaint_registration_date:n},t(function(){$("#fixedtable").tableHeadFixer({top:1})},100),s.filteredTodos=[],s.currentPage=1,s.numPerPage=5,s.maxSize=5,i.get(d.apiUrl+"api/common/AcademicYear/getAcademicStatus").then(function(e){s.obj3=e.data,console.log(s.obj3)}),i.get(d.apiUrl+"api/StudentReport/getcomplaintdetails?username=").then(function(e){s.grid=!0,s.display=!1,s.acadyr_data=e.data,s.totalItems=s.acadyr_data.length,s.todos=s.acadyr_data,s.makeTodos()}),s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.edit=function(e){s.display=!0,s.grid=!1,s.save1=!1,s.update1=!0,s.delete1=!1,s.edt={sims_cur_code:e.sims_cur_code,sims_academic_year:e.sims_academic_year,sims_academic_year_start_date:e.sims_academic_year_start_date,sims_academic_year_end_date:e.sims_academic_year_end_date,sims_academic_year_status:e.sims_academic_year_status,sims_academic_year_desc:e.sims_academic_year_desc},s.edit_code=!0},s.Save=function(e){var t,a=[];e&&(0==s.update1?(t={sims_complaint_srl_no:s.temp.sims_complaint_srl_no,sims_complaint_subject:s.edt.sims_complaint_subject,sims_complaint_desc:s.edt.sims_complaint_desc,sims_complaint_status:null,sims_complaint_registration_date:s.dt.sims_complaint_registration_date,sims_complaint_register_user_code:o.globals.currentUser.username,sims_complaint_assigned_to_user_code:null,opr:"I"},a.push(t),i.post(d.apiUrl+"api/StudentReport/CUDcomplainttails?complaintcode=",a).then(function(e){s.msg1=e.data,null==s.msg1&&null==s.msg1||(e=s.msg1.strMessage,swal({title:"Alert",text:e,width:450,height:200}),s.cancel())})):s.Update(e))},s.getgrid=function(){s.currentPage=1,i.get(d.apiUrl+"api/common/AcademicYear/getAcademicYear").then(function(e){s.display=!1,s.grid=!0,s.acadyr_data=e.data,s.totalItems=s.acadyr_data.length,s.todos=s.acadyr_data,s.makeTodos()}),1==(c=document.getElementById("mainchk")).checked&&(c.checked=!1,s.row1=""),s.myForm.$setPristine(),s.myForm.$setUntouched()},s.Update=function(e){var t=[];e&&(e={sims_cur_code:s.edt.sims_cur_code,sims_academic_year:s.edt.sims_academic_year,sims_academic_year_start_date:s.edt.sims_academic_year_start_date,sims_academic_year_end_date:s.edt.sims_academic_year_end_date,sims_academic_year_status:s.edt.sims_academic_year_status,sims_academic_year_desc:s.edt.sims_academic_year_desc,opr:"U"},t.push(e),i.post(d.apiUrl+"api/common/AcademicYear/CUDInsertAcademicYear",t).then(function(e){s.display=!0,s.msg1=e.data,1==s.msg1?swal({text:"Academic Year Updated Successfully.",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):swal({title:"Alert",text:"Only one Academic Year can be set as current at a time.",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()})}))},s.New=function(){s.display=!0,s.grid=!1,s.save1=!0,s.update1=!1,s.delete1=!1,s.edt="",s.edit_code=!1,i.get(d.apiUrl+"api/StudentReport/getcomplaintcode").then(function(e){s.com_no=e.data,s.temp={sims_complaint_srl_no:s.com_no[0].sims_complaint_srl_no}})},s.cancel=function(){s.grid=!0,s.display=!1,s.myForm.$setPristine(),s.myForm.$setUntouched()},s.CheckAllChecked=function(){if(1==(c=document.getElementById("mainchk")).checked)for(var e=0;emoment(e)?(o.dt.sims_transport_effective_upto="",o.dateshow=!1):o.dateshow=!0},o.getTCNumber=function(){i.get(d.apiUrl+"api/StudentReport/Get_certificate_no").then(function(e){o.certificate_data=e.data,o.dt.sims_certificate_number=o.certificate_data[0].sims_certificate_number})},o.getInfo=function(t){i.post(d.apiUrl+"api/StudentReport/Check_Tc_details?userid="+t).then(function(e){o.msg=e.data,o.msg1=o.msg,!0===o.msg?swal("","TC Already Issued for this Student"):(i.get(d.apiUrl+"api/StudentReport/Get_Student_details_TC?enroll_No="+t+"&opr=R&academic_year="+o.dt.sims_certificate_academic_year).then(function(e){o.savedata=e.data,o.temp=o.savedata[0]}),o.enrollno=!0,i.get(d.apiUrl+"api/StudentReport/Get_doc_details?enroll_No="+t).then(function(e){o.Studentdata=e.data}),i.get(d.apiUrl+"api/StudentReport/Get_Stud_subject?enroll_No="+t).then(function(e){o.subject_studied=e.data,setTimeout(function(){$("#cmb_Subjects").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#cmb_Subjects").multipleSelect("checkAll")},1e3)}))})},o.radio1Click=function(){o.temp.sims_student_exam_result="Incomplete",o.temp.sims_certificate_general_conduct="Good",o.temp.sims_student_exam_appeared="",o.temp.sims_certificate_fee_paid=!0;var e=o.temp.present_class.split(" ");0moment(e)?(n.dt.sims_transport_effective_upto="",n.dateshow=!1):n.dateshow=!0},n.getInfo=function(t){i.post(d.apiUrl+"api/StudentReport/Check_Tc_details?userid="+t).then(function(e){n.msg=e.data,n.msg1=n.msg,!0===n.msg?swal("","TC Already Issued for this Student"):(i.get(d.apiUrl+"api/StudentReport/Get_Student_details_TC?enroll_No="+t+"&opr=R&academic_year="+n.dt.sims_certificate_academic_year).then(function(e){n.savedata=e.data,n.temp=n.savedata[0]}),n.enrollno=!0,i.get(d.apiUrl+"api/StudentReport/Get_doc_details?enroll_No="+t).then(function(e){n.Studentdata=e.data}),i.get(d.apiUrl+"api/StudentReport/Get_Stud_subject?enroll_No="+t).then(function(e){n.subject_studied=e.data,setTimeout(function(){$("#cmb_Subjects").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#cmb_Subjects").multipleSelect("checkAll")},1e3)}))})},n.radio1Click=function(){n.temp.sims_student_exam_result="Incomplete",n.temp.sims_certificate_general_conduct="Good",n.temp.sims_student_exam_appeared="",n.temp.sims_certificate_fee_paid=!0;var e=n.temp.present_class.split(" ");0n.pageCount()-5?n.pageCount()-5+1:t;a
  "+o.getString("French Short Name")+" "+o.getString("Regional Short Name")+" "+o.getString("French Full Name")+""+o.getString("Regional Full Name")+"
   "+e.curriculum_short_name_fr+" "+e.curriculum_short_name_ot+" "+e.curriculum_full_name_fr+""+e.curriculum_full_name_ot+"
"),$(t.currentTarget).parents("tr").after(d)},s.size=function(e){console.log(e),s.pagesize=e,s.currentPage=1,s.numPerPage=e,console.log("numPerPage="+s.numPerPage),s.makeTodos()},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),c.checked=!1,s.row1=""}}])}(),function(){"use strict";var s,e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("BadgeAllocationCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,i,t,a,d,c){n.showdisabled=!0,n.pagesize="10",n.pageindex="1",n.pager=!0,n.propertyName=null,n.reverse=!1,n.table1=!0,n.table2=!1,n.sortBy=function(e){n.reverse=n.propertyName===e&&!n.reverse,n.propertyName=e},n.countData=[{val:10,data:10},{val:20,data:20},{val:"All",data:"All"}],n.filteredTodos=[],n.currentPage=1,n.numPerPage=10,n.maxSize=10,n.makeTodos=function(){var e=parseInt(n.totalItems%n.numPerPage),e=(n.pagersize="0"==e?parseInt(n.totalItems/n.numPerPage):parseInt(n.totalItems/n.numPerPage)+1,(n.currentPage-1)*n.numPerPage),t=parseInt(e)+parseInt(n.numPerPage);console.log("begin="+e),console.log("end="+t),n.filteredTodos=n.todos.slice(e,t)},n.size=function(e){10!=e&&20!=e&&"All"!=e||("All"==e?(n.currentPage="1",n.filteredTodos=n.Route_Data,n.pager=!1):(n.pager=!0,n.pagesize=e,n.currentPage=1,n.numPerPage=e,n.makeTodos())),n.numPerPage=e},n.index=function(e){n.pageindex=e,n.currentPage=e,n.makeTodos(),s.checked=!1,n.row1=""},t(function(){$("#example").tableHeadFixer({top:1})},100),n.busyindicator=!1,d.get(c.apiUrl+"api/common/getCuriculum").then(function(e){n.curriculum=e.data,n.temp={sims_cur_code:n.curriculum[0].sims_cur_code},n.getAccYear()}),n.getAccYear=function(){d.get(c.apiUrl+"api/common/getAcademicYear?curCode="+n.temp.sims_cur_code).then(function(e){n.Acc_year=e.data,n.temp={sims_academic_year:n.Acc_year[0].sims_academic_year,sims_cur_code:n.temp.sims_cur_code},n.GetGrade()})},n.GetGrade=function(){d.get(c.apiUrl+"api/common/getAllGrades?cur_code="+n.temp.sims_cur_code+"&academic_year="+n.temp.sims_academic_year).then(function(e){n.Grade_code=e.data,setTimeout(function(){$("#cmb_grade_code").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},$(function(){$("#cmb_grade_code").multipleSelect({width:"100%"})}),n.getSection=function(){d.get(c.apiUrl+"api/StudentReport/getSectionFromGrade?cur_code="+n.temp.sims_cur_code+"&grade_code="+n.temp.sims_grade_code+"&academic_year="+n.temp.sims_academic_year).then(function(e){n.Section_code=e.data,setTimeout(function(){$("#cmb_section_code").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},$(function(){$("#cmb_section_code").multipleSelect({width:"100%"})}),n.getBadge=function(){d.get(c.apiUrl+"api/DeliveryMode/getBadgeOptions").then(function(e){n.Badge_code=e.data})},n.getBadge(),d.get(c.apiUrl+"api/DeliveryMode/getSeachOptions").then(function(e){n.searchoptions=e.data;for(var t=0;t
"+s.getString("School Name")+"
"+e.sims_appl_form_field_value1+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",o.flag=!0)},o.size=function(e){"All"==e?(o.currentPage="1",o.filteredTodos=o.parameter_data,o.pager=!1):(o.pager=!0,o.pagesize=e,o.currentPage=1,o.numPerPage=e,o.makeTodos()),o.numPerPage=e,console.log("numPerPage="+o.numPerPage)},o.index=function(e){o.pageindex=e,o.currentPage=e,o.makeTodos()},o.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_mod_name.toLowerCase().indexOf(t.toLowerCase())||-1{}]/g,"_"),""==e.pays_doc_srno&&(d.showUpdateBtn=!(a=!0),o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t.push(o)),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,d.photo_filename_doc.split("/")[1]),o=(d.filename1=d.filename_doc+"."+e,[]),e=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc)swal({title:"Alert",text:"Please Select File",width:300,height:200});else{if(1==a)for(var s=0;s{}]/g,"_"),(""==e.pays_doc_srno?(d.showUpdateBtn=!!0,o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},[]):(d.showUpdateBtn=!!1,o={pays_doc_srno:e.pays_doc_srno,pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t)).push(o),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc||null==d.photo_filename_doc){for(var s=0;s=e&&(swal({title:"Alert",text:"Date of birth should be less than future date",width:300,height:200}),a.temp.em_date_of_birth="")},a.checkDOJ=function(e){a.temp.em_dept_effect_from=e,a.temp.em_grade_effect_from=e,a.temp.em_date_of_birth>=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date of joining should be greater than date of birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date{d.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg"})}),null!=d.photo_filename||""!=d.photo_filename?"jpeg"==(t=d.photo_filename.split("/"))[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(e){d.$apply(function(){d.prev_img=e.target.result})},t.readAsDataURL(e)):(swal({text:"Only jpeg and png image format supported."}),$("#empimg").attr("src","")):(swal({text:"Image format not supported."}),$("#empimg").attr("src",""))},d.globalSearch=function(){t.visible_stud=!1,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!0,t.chkMulti=!1,d.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),d.temp.em_login_code="",d.temp.EmpName="",d.showBtn=!1},d.$on("global_cancel",function(e){0=d.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),d.temp.em_date_of_join="")},d.checkPassport=function(){d.temp.em_passport_exp_date
Reviewer 3 Date Schedule 3 Reviewer 4Date Schedule 4Reviewer 5 Date Schedule 5
"+e.emp_name3+" "+e.sims_sip_goal_target_schedule3+" "+e.emp_name4+" "+e.sims_sip_goal_target_schedule4+""+e.emp_name5+""+e.sims_sip_goal_target_schedule5+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a=d.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),d.temp.em_date_of_join="")},d.checkPassport=function(){d.temp.em_passport_exp_date';for(var n=0;n'+a[n].title+"";s+="",e.forEach(function(e){s+="";for(var t=0;t'+e[a[t].dataKey]+"";s+=""});var e={worksheet:t||"Worksheet",table:s+=""},i=document.createElement("a"),e=(i.href="data:application/vnd.ms-excel;base64,"+d.base64(d.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',e)),new Date);i.download=t.replace(/ /g,"_")+"_"+d.getFormatedDate(e,"dd./.mm./.yyyy. .hh.:.mn.:.ss").replace(/ /g,"_")+".xls",i.click()}}])}(),function(){"use strict";var l,m=[],p=[],e=angular.module("sims.module.SchoolSetup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("SectionSubjectCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter",function(n,e,t,a,o,i,d,s){function c(e,t){e?i.get(d.apiUrl+"api/ERP/Grade/getCuriculum_new").then(function(e){n.curriculum=e.data,n.edt.sims_cur_code=n.curriculum[0].sims_cur_code,n.getacyr(n.curriculum[0].sims_cur_code)}):i.get(d.apiUrl+"api/ERP/Grade/getCuriculumfor_Company?comp_code="+t).then(function(e){n.curriculum=e.data,n.edt.sims_cur_code=n.curriculum[0].sims_cur_code,n.getacyr(n.curriculum[0].sims_cur_code)})}n.display=!1,n.grid=!0,n.show=!1,n.table=!1,n.pagesize="30",n.pageindex="0",n.pager=!0,n.checkbox=!1,n.edt={},n.temp={},n.sims_view_mode=!1,n.serial=!0,n.serial1=!0,n.subjectcnt=!1,"smfcbse"==i.defaults.headers.common.schoolId?n.subjectcnt=!0:n.subjectcnt=!1,n.filteredTodos=[],n.currentPage=1,n.numPerPage=30,n.maxSize=100,n.makeTodos=function(){var e,t;"All"==n.pagesize?(n.currentPage=1,n.showPager=!1,n.filteredTodos=n.report_data):(e=parseInt(n.totalItems%n.numPerPage),n.pagersize="0"==e?parseInt(n.totalItems/n.numPerPage):parseInt(n.totalItems/n.numPerPage)+1,e=(n.currentPage-1)*n.numPerPage,t=parseInt(e)+parseInt(n.numPerPage),console.log("begin="+e),console.log("end="+t),n.filteredTodos=n.todos.slice(e,t))},n.getacyr=function(t){i.get(d.apiUrl+"api/common/getAcademicYear?curCode="+t).then(function(e){n.getAcademicYear=e.data,n.getsections(t,n.getAcademicYear[0].sims_academic_year)})},n.getsections=function(t,a){i.get(d.apiUrl+"api/common/getAllGrades?cur_code="+t+"&academic_year="+a).then(function(e){n.getAllGrades=e.data,n.edt={sims_cur_code:t,sims_academic_year:a,sims_grade_code:n.getAllGrades[0].sims_grade_code},n.getsection(t,a,n.getAllGrades[0].sims_grade_code)})},n.getsection=function(e,t,a){i.get(d.apiUrl+"api/common/getSectionFromGrade?cur_code="+e+"&grade_code="+a+"&academic_year="+t).then(function(e){n.getSectionFromGrade=e.data,setTimeout(function(){$("#Select22").select2()},100)})},i.get(d.apiUrl+"api/ERP/Grade/getAccecssUser?user="+t.globals.currentUser.username).then(function(e){n.global_count_comp=e.data,n.global_count_comp?c(!0,n.user_details.comp):c(!1,n.user_details.comp)});var r=[];n.getSectionGradesWise=function(){n.selected_year=s("filter")(n.getAcademicYear,{sims_academic_year:n.edt.sims_academic_year},!0),n.table=!1,n.busy=!0,n.SectionSubject=[],i.get(d.apiUrl+"api/common/SectionSubject/getSubjectByIndex?curcode="+n.edt.sims_cur_code+"&gradecode="+n.edt.sims_grade_code+"&academicyear="+n.edt.sims_academic_year+"§ioncode="+n.edt.sims_section_code).then(function(e){if(n.SectionSubject=e.data,0s&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r{e=parseInt(e.sims_academic_year),t=parseInt(t.sims_academic_year);return t=t?(s.display=!0,s.grid=!1,s.save1=!1,s.update1=!0,s.delete1=!1,s.edt={sims_cur_code:e.sims_cur_code,sims_academic_year:e.sims_academic_year,sims_term_code:e.sims_term_code,sims_term_desc_en:e.sims_term_desc_en,sims_term_desc_ar:e.sims_term_desc_ar,sims_term_desc_fr:e.sims_term_desc_fr,sims_term_desc_ot:e.sims_term_desc_ot,sims_term_status:e.sims_term_status,sims_term_start_date:e.sims_term_start_date,sims_term_end_date:e.sims_term_end_date},s.edit_code=!1,s.Getinfo(s.edt.sims_cur_code)):swal({title:"Alert",text:"Records from Previous Years Cannot Be Updated",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380}))},s.createdate=function(e){s.edt.sims_term_start_date=l(e)},s.createdate1=function(e){s.edt.sims_term_end_date=l(e)},s.Save=function(e){var t,a=[];e&&(!1===s.update1?(t={sims_cur_code:s.edt.sims_cur_code,sims_academic_year:s.edt.sims_academic_year,sims_term_code:s.edt.sims_term_code,sims_term_desc_en:s.edt.sims_term_desc_en,sims_term_desc_ar:s.edt.sims_term_desc_ar,sims_term_desc_fr:s.edt.sims_term_desc_fr,sims_term_desc_ot:s.edt.sims_term_desc_ot,sims_term_status:s.edt.sims_term_status,sims_term_start_date:s.edt.sims_term_start_date,sims_term_end_date:s.edt.sims_term_end_date,opr:"I"},a.push(t),n.post(i.apiUrl+"api/term/CUDInsertTerm",a).then(function(e){s.display=!0,s.msg1=e.data,!0===s.msg1?swal({title:"Alert",text:"Term Added Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):!1===s.msg1?swal({title:"Alert",text:"Term Already Exists. ",imageUrl:"assets/img/close.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):swal("Error-"+s.msg1)})):s.Update(e))},s.getgrid=function(){n.get(i.apiUrl+"api/term/getTermByIndex").then(function(e){if(s.display=!1,s.grid=!0,s.term_data=e.data,0=e)){s.flag2=!1;break}s.flag=!0,s.flag2=!0;var a={sims_cur_code:s.filteredTodos[t].sims_cur_code,sims_academic_year:s.filteredTodos[t].sims_academic_year,sims_term_code:s.filteredTodos[t].sims_term_code,opr:"D"};o.push(a)}s.flag&&s.flag2?swal({title:"Warning",text:"Are you sure you want to Delete?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){if(e)n.post(i.apiUrl+"api/term/CUDTerm",o).then(function(e){s.msg1=e.data,!0===s.msg1?swal({title:"Alert",text:"Term Deleted Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):!1===s.msg1?swal({title:"Alert",text:"Term Not Deleted Successfully. ",imageUrl:"assets/img/close.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):swal("Error-"+s.msg1)});else{!0===(m=document.getElementById("mainchk")).checked&&(m.checked=!1);for(var t=0;t
"+o.getString("Arabic")+" "+o.getString("French")+" "+o.getString("Regional")+""+o.getString("Start Date")+" "+o.getString("End Date")+"
"+e.sims_term_desc_ar+" "+e.sims_term_desc_fr+" "+e.sims_term_desc_ot+""+e.sims_term_start_date+" "+e.sims_term_end_date+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)},s.size=function(e){s.pager=10==e||20==e,"*"==e?(s.numPerPage=s.term_data.length,s.filteredTodos=s.term_data,s.pager=!1):(s.pagesize=e,s.currentPage=1,s.numPerPage=e),s.makeTodos()},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),m.checked=!1,s.row1=""},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_term_code.toLowerCase().indexOf(t.toLowerCase())||-1'+e+'';a.forEach(function(e){d+=''+e+""});for(var d=d+('')+'',_=0;_'+o[_].title+"";d+="",s.forEach(function(e){d+="";for(var t=0;t'+e[o[t].dataKey]+"";d+=""}),!1!==n&&void 0!==n&&(d+=n);a={worksheet:e||"Worksheet",table:d+="
"},s=document.createElement("a"),s.href="data:application/vnd.ms-excel;base64,"+c.base64(c.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',a)),n=new Date;s.download=e.replace(/ /g,"_")+"_"+c.getFormatedDate(n,"dd./.mm./.yyyy. .hh.:.mn.:.ss").replace(/ /g,"_")+".xls",s.click()}}])}(),function(){"use strict";var e=angular.module("sims.module.SchoolSetup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("SupervisorMappingCont",["$scope","$state","$rootScope","$stateParams","$timeout","gettextCatalog","$http","$filter","ENV",function(n,e,t,a,o,s,i,d,c){n.display=!0,n.grid=!0,n.page_div=!1,n.itemsPerPage="10",n.currentPage=0,n.supervisor_mapping=[],n.btn_save=!0,n.btn_delete=!1;var r,l=[];n.enroll_number_lists=[],n.test_emp=[],n.edt={},o(function(){$("#fixedtable").tableHeadFixer({top:1})},100),o(function(){$("#fixedtable1").tableHeadFixer({top:1})},100),i.get(c.apiUrl+"api/ERP/Grade/getCuriculum_m4").then(function(e){n.curmn=e.data,n.edt.sims_cur_code=n.curmn[0].sims_cur_code,n.GetData()}),n.GetData=function(e){i.get(c.apiUrl+"api/common/getAcademicYear?curCode="+n.edt.sims_cur_code).then(function(e){n.acad=e.data,n.edt.sims_academic_year=n.acad[0].sims_academic_year,null!=n.edt.sims_academic_year&&n.getAllData()})},n.getEmployee=function(){$("#Emp_Search_Modal").modal({backdrop:"static",keyboard:!0}),n.divemp=!0,n.EmployeeTable=!1},n.Search_by_employee=function(){n.NodataEmployee=!1,i.post(c.apiUrl+"api/common/GlobalSearch/SearchEmployee?data="+JSON.stringify(n.temp)).then(function(e){n.EmployeeDetails=e.data,console.log(n.EmployeeDetails),n.EmployeeTable=!0})},n.Empmodal_cancel=function(){n.glbl_obj="",n.global_Search="";for(var e=0;es&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.rt[a]?i.reverseSort[a]?-1:1:0})}}])}(),function(){"use strict";var e=angular.module("sims.module.SchoolSetup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("StaffCalenderNewCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(n,e,t,a,o,s,i,d){n.eventsList=[],n.display=!0,n.btn_delete=!1,n.check_time_flag=!1,s.get(d.apiUrl+"api/staffCalender/getCalender").then(function(e){n.display=!0,n.obj=e.data,n.eventsList=[];for(var t=0;t
 "+o.getString("French Short Name")+"  "+o.getString("Regional Short Name")+"  "+o.getString("French Full Name")+" "+o.getString("Regional Full Name")+"
"+e.curriculum_short_name_fr+" "+e.curriculum_short_name_ot+" "+e.curriculum_full_name_fr+""+e.curriculum_full_name_ot+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).curriculum_code.toLowerCase().indexOf(t.toLowerCase())||-1",google.maps.event.addListener(o,"click",function(){a.setContent("

"+o.title+"

"+o.content),a.open(s.map,o)}),s.markers.push(o),s.openInfoWindow=function(e,t){e.preventDefault(),google.maps.event.trigger(t,"click")}}),s.edit=function(){s.eo=!0,s.ro=!1,s.reg={sims_Region_name_en:s.obj.lic_school_region},s.obj.lic_school_curriculum=s.obj.lic_school_curriculum,s.getcountyr(s.obj.lic_school_region)},s.getcountyr=function(e){i.get(d.apiUrl+"api/SchoolLicense/GetAllCountries?region_code="+e).then(function(e){s.country1=e.data})},i.get(d.apiUrl+"api/SchoolLicense/GetAllRegions").then(function(e){s.display=!0,s.region=e.data}),i.get(d.apiUrl+"api/SchoolLicense/GetAllCurr").then(function(e){s.display=!0,s.curri=e.data}),i.get(d.apiUrl+"api/SchoolLicense/GetproductName").then(function(e){s.productcode=e.data}),i.get(d.apiUrl+"api/SchoolLicense/GetExpTime").then(function(e){s.ExTime=e.data[0]}),i.get(d.apiUrl+"api/SchoolLicense/GetschoolType").then(function(e){s.schoolType=e.data}),s.cancel=function(){s.eo=!1,s.ro=!0,s.myForm.$setPristine(),s.myForm.$setUntouched(),s.obj.Subsexpdate=""},s.Subdate=function(e){var t=(e=new Date(e)).getMonth()+1,a=e.getDate();return t<10&&(t="0"+t),a<10&&(a="0"+a),e.getFullYear()+"-"+t+"-"+a},s.Subsexpdate=function(e){s.dateoldd.lic_subscription_expiry_date;var t=s.dateoldd.lic_subscription_expiry_date.split("-")[0],a=(s.dateoldd.lic_subscription_expiry_date.split("-")[1],s.dateoldd.lic_subscription_expiry_date.split("-")[2],(e=new Date(e)).getMonth()+1),o=e.getDate(),o=(a<10&&(a="0"+a),o<10&&(o="0"+o),e.getFullYear(),a-t);1==o?(s.daysd1=30,s.lic_grace_30=s.daysd1):2==o?(s.daysd2=60,s.lic_grace_60=s.daysd2):(s.daysd3=90,s.lic_grace_90=s.daysd3)},s.agreedate=function(e){var t=(e=new Date(e)).getMonth()+1,a=e.getDate();return t<10&&(t="0"+t),a<10&&(a="0"+a),e.getFullYear()+"-"+t+"-"+a},s.getinfo=function(){i.get(d.apiUrl+"api/SchoolLicense/GetSchoolDetails").then(function(e){s.obj=e.data,s.eo=!1,s.ro=!0})},s.Save=function(){s.obj.lic_grace_30=s.daysd1,s.obj.lic_grace_60=s.daysd2,s.obj.lic_grace_90=s.daysd3;var e=[],t=s.obj,t=(t.opr="U",e.push(t),i.post(d.apiUrl+"api/SchoolLicense/UpdateSchoolDetails",e).then(function(e){s.msg1=e.data,s.getinfo(),30==s.daysd1&&swal({title:"Alert",text:"School License Updated Sucessfully with 30 days Grace Period",showCloseButton:!0,width:380}),n.strMessage=s.msg1.strMessage,$("#message").modal("show")}),new google.maps.LatLng(s.obj.lic_lat,s.obj.lic_long)),e={zoom:8,center:t,mapTypeId:google.maps.MapTypeId.TERRAIN},a=(s.map=new google.maps.Map(document.getElementById("map-canvas"),e),s.markers=[],new google.maps.InfoWindow),o=new google.maps.Marker({map:s.map,position:t,title:s.obj.lic_school_name});o.content='
'+s.obj.lic_school_address+"
",google.maps.event.addListener(o,"click",function(){a.setContent("

"+o.title+"

"+o.content),a.open(s.map,o)}),s.markers.push(o),s.openInfoWindow=function(e,t){e.preventDefault(),google.maps.event.trigger(t,"click")}},i.get(d.apiUrl+"api/SchoolLicense/GetOldDate1").then(function(e){s.dateoldd=e.data[0],console.log(s.dateoldd)}),s.getTheFiles=function(e){angular.forEach(e,function(e,t){_.append(t,e)})},s.file_school_logo=function(e,t){var a=s.obj.lic_product_name,e=e.files[0],o=e.type,a=(s.obj[t]=a+"."+o.split("/")[1],new FileReader),o=(a.onload=function(e){s.$apply(function(){s.school_logo=e.target.result})},a.readAsDataURL(e),{method:"POST",url:d.apiUrl+"api/AssignmentUpload/upload1?filename="+s.obj[t]+"&location=Images/SchoolLogo/",data:_,headers:{"Content-Type":void 0}});i(o).success(function(e){console.log("d",e)},function(){alert("Err")})},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),s.getdatee=function(){},$(document).ready(function(){$("#Subsexpdate,#Subsexpdate").datepicker({changeMonth:!0,changeYear:!0,firstDay:1,dateFormat:"dd/mm/yy"}),$("#Subsexpdate").datepicker({dateFormat:"dd-mm-yy"}),$("#Subsexpdate").datepicker({dateFormat:"dd-mm-yy"}),$("#Subsexpdate").change(function(){var e=$("#Subsexpdate").datepicker("getDate"),t=$("#Subsexpdate").datepicker("getDate");eo&&(o=t[a].id);e.id=++o,t.push(e)}$("#calendar").data("calendar").setDataSource(t),$("#event-modal").modal("hide")}s.eventsList=[],s.display=!0,s.btn_delete=!1,s.check_time_flag=!1,s.event_object={},n.get(i.apiUrl+"api/calender/getCalender").then(function(e){s.display=!0,s.obj=e.data,console.log(s.obj),s.eventsList=[];for(var t=0;t'+e.events[t].name+"";$(e.element).popover({trigger:"manual",container:"body",html:!0,content:a}),$(e.element).popover("show")}},mouseOutDay:function(e){0'+e.events[t].name+"";$(e.element).popover({trigger:"manual",container:"body",html:!0,content:a}),$(e.element).popover("show")}},mouseOutDay:function(e){0"+t+''+e+""),o.close(),a.focus()}}])}(),function(){"use strict";var e=angular.module("sims.module.SchoolSetup"),l=(e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.directive("ngFiles",["$parse",function(s){return{link:function(t,e,a){var o=s(a.ngFiles);e.on("change",function(e){o(t,{$files:e.target.files})})}}}]),new FormData);e.controller("SyllabusCreationCont_Pearl",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,t,a,o,i,d){var s,_=t.globals.currentUser.username,t=(n.School_Logo=n.obj1.lic_school_logo,n.School_Name=n.obj1.lic_school_name,n.schoolLogoImg=d.docUrl+i.defaults.headers.common.schoolId+"/Images/SchoolLogo/"+n.School_Logo,new Date),c=t.getMonth()+1,r=t.getDate(),r=(n.doc_date=(r=r<10?"0"+r:r)+"-"+(c=c<10?"0"+c:c)+"-"+t.getFullYear(),n.busyindicator=!0,n.headcolor="1",n.syllabusnames=!0,n.syllabusscreen=!0,n.Grid=!0,n.savebtn=!0,n.pagesize="5",n.Expand2=!0,n.Expand1=!0,n.busy=!1,n.savebtndissyll=!0,n.savebtndisunit=!1,n.savebtndistopic=!0,n.edt={},n.unit={},n.topic={},n.sub_topic={},n.edt.sims_syllabus_status=!0,n.unit.sims_syllabus_unit_status=!0,n.topic.sims_syllabus_unit_topic_status=!0,n.topic.sims_syllabus_unit_sub_topic_status=!0,n.edt.sims_syllabus_created_by=_,n.sub_topic.sims_syllabus_unit_sub_topic_created_by=_,n.unit.sims_syllabus_unit_created_by=_,n.topic.sims_syllabus_unit_topic_created_by=_,n.edt.sims_syllabus_creation_date=n.doc_date,n.unit.sims_syllabus_unit_creation_date=n.doc_date,n.topic.sims_syllabus_unit_topic_creation_date=n.doc_date,n.sub_topic.sims_syllabus_unit_sub_topic_creation_date=n.doc_date,i.defaults.headers.common.schoolId);n.path1=d.docUrl+r+"/Images/Syllabus/",i.get(d.apiUrl+"api/common/getCuriculum").then(function(e){n.curriculum=e.data,n.edt.sims_cur_code=n.curriculum[0].sims_cur_code,n.getacyr(n.curriculum[0].sims_cur_code)}),n.getacyr=function(e){n.cur_code=e,i.get(d.apiUrl+"api/common/getAcademicYear?curCode="+e).then(function(e){n.Academic_year=e.data,n.edt.sims_academic_year=n.Academic_year[0].sims_academic_year,n.get()})},$(function(){$("#cmb_grade").multipleSelect({width:"100%"})}),n.MonthObject=[{month_name:"April",month_code:"4"},{month_name:"May",month_code:"5"},{month_name:"June",month_code:"6"},{month_name:"July",month_code:"7"},{month_name:"August",month_code:"8"},{month_name:"September",month_code:"9"},{month_name:"October",month_code:"10"},{month_name:"November",month_code:"11"},{month_name:"December",month_code:"12"},{month_name:"January",month_code:"1"},{month_name:"February",month_code:"2"},{month_name:"March",month_code:"3"}],n.getsection=function(){var e={sims_cur_code:n.edt.sims_cur_code,sims_academic_year:n.edt.sims_academic_year,sims_subject_code:n.edt.sims_subject_code,sims_grade_code:n.edt.sims_grade_code,lesson_user:_};i.post(d.apiUrl+"api/syllabus_lesson/syllabus_section",e).then(function(e){n.section1=e.data,setTimeout(function(){$("#cmb_grade").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},n.getsections=function(){var e={sims_cur_code:n.edt.sims_cur_code,sims_academic_year:n.edt.sims_academic_year,sims_subject_code:n.edt.sims_subject_code,lesson_user:_};i.post(d.apiUrl+"api/syllabus_lesson/syllabus_grade",e).then(function(e){n.grade=e.data})},n.get=function(e){var t={sims_cur_code:n.edt.sims_cur_code,sims_academic_year:n.edt.sims_academic_year,lesson_user:_};i.post(d.apiUrl+"api/syllabus_lesson/syllabus_subject",t).then(function(e){n.cmb_subject_name=e.data})},n.syllabus_table=!1,n.unit_tpoic_table=!1,n.closesyllabus_table=function(){n.syllabus_table=!1,n.unit_tpoic_table=!1},n.closesyllabus_table_topic=function(){n.Unit_topic_table=!1},n.closesyllabus_table_unit=function(){n.Unit_table=!1},n.Getsyllabus=function(){n.savebtndissyll=!1;for(var e=n.edt.sims_section_code1="",t=0;tt&&(o.sims_cur_code=n.Get_syllabus_lesson[t].sims_cur_code,o.sims_academic_year=n.edt.sims_academic_year,o.sims_grade_code=n.edt.sims_grade_code,o.sims_section_code=n.Get_syllabus_lesson[t].sims_section_code,o.sims_subject_code=n.edt.sims_subject_code,o.sims_syllabus_code="",o.sims_syllabus_unit_code="",o.sims_syllabus_unit_name=n.mdata[a].sims_syllabus_unit_name,o.sims_syllabus_unit_short_desc="",o.sims_syllabus_unit_creation_date=n.unit.sims_syllabus_unit_creation_date,o.sims_syllabus_unit_created_by=n.unit.sims_syllabus_unit_created_by,o.sims_syllabus_unit_status=n.unit.sims_syllabus_unit_status,o.sims_month_code=n.edt.sims_month_code,o.opr="IU",n.saveunitobject.push(o))}0t&&(a.sims_cur_code=n.edt.sims_cur_code,a.sims_academic_year=n.edt.sims_academic_year,a.sims_grade_code=n.edt.sims_grade_code,a.sims_section_code=n.edt.sims_section_code[t],a.sims_subject_code=n.edt.sims_subject_code,a.sims_syllabus_code="",a.sims_syllabus_unit_code="",a.sims_syllabus_unit_name=n.mdata[e].sims_syllabus_unit_name,a.sims_syllabus_unit_short_desc="",a.sims_syllabus_unit_topic_name=n.mdata[e].sims_syllabus_unit_topic_name,a.sims_syllabus_unit_topic_short_desc="",a.sims_syllabus_unit_topic_creation_date=n.topic.sims_syllabus_unit_topic_creation_date,a.sims_syllabus_unit_creation_date=n.unit.sims_syllabus_unit_creation_date,a.sims_syllabus_unit_topic_created_by=n.topic.sims_syllabus_unit_topic_created_by,a.sims_syllabus_unit_created_by=n.unit.sims_syllabus_unit_created_by,a.sims_syllabus_unit_topic_status=n.topic.sims_syllabus_unit_topic_status,a.sims_syllabus_unit_status=n.unit.sims_syllabus_unit_status,a.sims_month_code=n.edt.sims_month_code,a.opr="TI",n.TopicDataObject.push(a))}0
Created By Remark Syllabus Start DateSyllabus End Date
"+e.sims_syllabus_created_by+" "+e.sims_syllabus_remark+" "+e.sims_syllabus_start_date+""+e.sims_syllabus_end_date+"
"),$(t.currentTarget).parents("tr").after(s),n.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"+t+''+e+""),o.close(),a.focus()},n.SelectMultipleRecords=function(){for(var e=document.getElementById("mainchk"),t=0;t
Created By Remark Syllabus Start DateSyllabus End Date
"+e.sims_syllabus_created_by+" "+e.sims_syllabus_remark+" "+e.sims_syllabus_start_date+""+e.sims_syllabus_end_date+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;aa&&(s.sims_cur_code=n.Get_syllabus_lesson[a].sims_cur_code,s.sims_academic_year=n.edt.sims_academic_year,s.sims_grade_code=n.edt.sims_grade_code,s.sims_section_code=n.Get_syllabus_lesson[a].sims_section_code,s.sims_subject_code=n.edt.sims_subject_code,s.sims_syllabus_code=n.edt.sims_syllabus_code,s.sims_syllabus_unit_code=n.unit.sims_syllabus_unit_code,s.sims_syllabus_unit_name=t[o],s.sims_syllabus_unit_short_desc=n.unit.sims_syllabus_unit_short_desc,s.sims_syllabus_unit_creation_date=n.unit.sims_syllabus_unit_creation_date,s.sims_syllabus_unit_created_by=n.unit.sims_syllabus_unit_created_by,s.sims_syllabus_unit_approval_date=n.unit.sims_syllabus_unit_approval_date,s.sims_syllabus_unit_approved_by=n.unit.sims_syllabus_unit_approved_by,s.sims_syllabus_unit_approvar_remark=n.unit.sims_syllabus_unit_approvar_remark,s.sims_syllabus_unit_status=n.unit.sims_syllabus_unit_status,s.sims_month_code=n.edt.sims_month_code,s.opr="IU",n.saveunitobject.push(s))}0
Created By Remark Syllabus Start DateSyllabus End Date
"+e.sims_syllabus_created_by+" "+e.sims_syllabus_remark+" "+e.sims_syllabus_start_date+""+e.sims_syllabus_end_date+"
"),$(t.currentTarget).parents("tr").after(s),n.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"+t+''+e+""),o.close(),a.focus()},n.SelectMultipleRecords=function(){for(var e=document.getElementById("mainchk"),t=0;ta;a++)o.subData={},o.subData.employee_number=e.sheets.Sheet1[a].employee_number,o.subData.company_code=e.sheets.Sheet1[a].company_code,o.subData.pay_code=e.sheets.Sheet1[a].pay_code,o.subData.effective_from_date=e.sheets.Sheet1[a].effective_from_date,o.subData.amount=e.sheets.Sheet1[a].amount,o.subData.effective_upto_date=e.sheets.Sheet1[a].effective_upto_date,o.subData.remark=e.sheets.Sheet1[a].remark,o.sheetsData.push(o.subData);n.post(i.apiUrl+"api/DataImportController/DataImport",o.sheetsData).then(function(e){o.Pers326_Get_attednce_deatils=e.data,o.datasend=[];for(var t=0;o.Pers326_Get_attednce_deatils.length>t;t++)o.Pers326_Get_attednce_deatils[t].employee_number?(o.Pers326_Get_attednce_deatils[t].employee_number.fcolor="black",o.modalbusy=!1):(o.Pers326_Get_attednce_deatils[t].employee_number.fcolor="red",o.modalbusy=!1,o.errorlabel=!0);console.log(o.Pers326_Get_attednce_deatils)}),o.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else o.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),o.busy=!1,o.modalbusy=!1}),t={method:"POST",url:i.apiUrl+"/api/file/uploadDocument?filename="+o.filename.name+$filter("date")(new Date,"dd-MM-yyyy")+"-"+$filter("date")(new Date,"HH-mm-ss")+"&location=Docs/Student",data:_,headers:{"Content-Type":void 0}},n(t).success(function(e){e={sims_admission_user_code:s.globals.currentUser.username,sims_admission_doc_path:e};n.post(i.apiUrl+"api/document/insertdoc",e).then(function(e){o.ins=e.data,e.data?swal({title:"Document Uploaded Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Document Upload Failed, Check Connection",imageUrl:"assets/img/close.png"})})}),angular.forEach(angular.element("input[type='file']"),function(e){angular.element(e).val(null)}))};o.save_data=function(){var e=o.Pers326_Get_attednce_deatils;n.post(i.apiUrl+"api/DataImportController/DataImportSave",e).then(function(e){o.msg1=e.data,1==o.msg1?swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:300,height:200}):swal({text:"Record Not Inserted "+o.msg1,imageUrl:"assets/img/close.png",showCloseButton:!0,width:300,height:200}),n.get(i.apiUrl+"api/DataImportController/DataImport").then(function(e){o.CreDiv=e.data,o.totalItems=o.CreDiv.length,o.todos=o.CreDiv,o.makeTodos()})}),o.table=!0,o.display=!1},o.uploadClick=function(){_=new FormData,o.modalbusy=!1,o.busy=!1},o.cancelData=function(){$("#uploadModal").modal("hide"),o.busy=!1}}])}(),function(){"use strict";angular.module("sims.module.Setup").controller("MograVersionDetailUpdateCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(a,e,t,o,s,n,i){n.get(i.apiUrl+"api/TimeLineAlert/getprojectName").then(function(e){a.projectName=e.data}),n.get(i.apiUrl+"api/TimeLineAlert/getModuleName").then(function(e){a.ModuleName=e.data}),a.getApplications=function(e){n.get(i.apiUrl+"api/TimeLineAlert/getProjectApplications?mod_code="+e).then(function(e){a.appication_Name=e.data})},a.temp={},a.searchdata=function(){n.get(i.apiUrl+"api/TimeLineAlert/getinnerChangesetData?change_setNo="+a.temp.changeset_code+"&pro_name="+a.temp.comn_appl_project_code+"&dev_name="+a.temp.comn_developer_name+"&appl_code="+a.temp.comn_appl_code).then(function(e){0e.user_number1),0e.user_number1),0Fee Due DetailsEnrollment No:"+d.filteredTodos[e].sims_enroll_number+" Student Name:"+d.filteredTodos[e].student_name+"Fee TypeFee Amount";for(var t=0;t"+d.defaulterdata[0][t].sims_fee_type_desc+""+d.defaulterdata[0][t].sims_balance_amount+"");d.message_details=d.message_details+="Grand Total :"+d.filteredTodos[e].sims_balance_amount_total+"",d.message_details=d.message_details+"";document.getElementById("text-editor").value;var a=document.getElementById("text-editor1").value.replace("{details}",d.message_details);d.filteredTodos[e].email_message=a+"

",d.data.push(d.filteredTodos[e])}if("smsm"==s.defaults.headers.common.schoolId)for(e=0;eo.pageCount()-5?o.pageCount()-5+1:t;ac.pageCount()-5?c.pageCount()-5+1:t;a").html(c.codevalue).text(),r.get(l.apiUrl+"api/common/AdmissionDashboard_dpsdNew/GetAdmissionTemplatesBody?template_subject="+t).then(function(e){c.tempBody_data=e.data,c.flag=!1,c.edt.sims_subject=t;e=$("#editor").data("kendoEditor");c.edt.body=e.value(c.tempBody_data.sims_msg_body),c.email.email_subject=t,r.get(l.apiUrl+"api/common/Email/GetcheckEmailProfile?sr_no="+c.tempBody_data.sims_msg_sr_no).then(function(e){c.emailProfile_data=e.data})})},r.get(l.apiUrl+"api/common/AdmissionDashboard_dpsdNew/GetAdmissionTemplates").then(function(e){c.template_data=e.data;for(var t=0;t").html(c.codevalue).text();var e=!0;if("true"==c.edt.sims_Email&&(""!=c.edt.sims_subject&&null!=c.edt.sims_subject||""!=c.edt.body&&null!=c.edt.body||(e=!1,swal({text:"Subject & Message Body Is Required",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})),!0===e))if("true"==c.edt.sims_parent)if(jQuery.isEmptyObject(c.ParentEmailIds))swal({text:"Please Specify Atleast One Recipient",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380});else{for(var t=0;tc.pageCount()-5?c.pageCount()-5+1:t;a").html(c.codevalue).text(),r.get(l.apiUrl+"api/common/AdmissionDashboard_dpsdNew/GetAdmissionTemplatesBody?template_subject="+t).then(function(e){c.tempBody_data=e.data,c.flag=!1,c.edt.sims_subject=t;e=$("#editor").data("kendoEditor");c.edt.body=e.value(c.tempBody_data.sims_msg_body),c.email.email_subject=t,r.get(l.apiUrl+"api/common/Email/GetcheckEmailProfile?sr_no="+c.tempBody_data.sims_msg_sr_no).then(function(e){c.emailProfile_data=e.data})})},r.get(l.apiUrl+"api/common/AdmissionDashboard_dpsdNew/GetAdmissionTemplates").then(function(e){c.template_data=e.data;for(var t=0;t").html(c.codevalue).text();var e=!0;if("true"==c.edt.sims_Email&&(""!=c.edt.sims_subject&&null!=c.edt.sims_subject||""!=c.edt.body&&null!=c.edt.body||(e=!1,swal({text:"Subject & Message Body Is Required",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})),!0===e))if("true"==c.edt.sims_parent)if(jQuery.isEmptyObject(c.ParentEmailIds))swal({text:"Please Specify Atleast One Recipient",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380});else{for(var t=0;to.totalItems?o.pagersize=Math.round(o.totalItems/o.numPerPage):o.pagersize=Math.round(o.totalItems/o.numPerPage)+1;var e=(o.currentPage-1)*o.numPerPage,t=parseInt(e)+parseInt(o.numPerPage);o.filteredTodos=o.todos.slice(e,t)},o.size=function(e){"All"===e?(o.currentPage=1,o.numPerPage=o.summeryData.length):(o.pagesize=e,o.currentPage=1,o.currentPage_ind=e,o.numPerPage=e),o.makeTodos()},o.index=function(e){o.pageindex=e,o.currentPage_ind=e,o.currentPage=e,o.makeTodos()},o.CheckMultipleSearch=function(){for(var e=document.getElementById("chkSearch"),t=0;tFee Due DetailsEnrollment No:"+o.filteredTodos[e].sims_enroll_number+" Student Name:"+o.filteredTodos[e].student_name+"Fee TypeFee Amount";for(var t=0;t"+o.defaulterdata[0][t].sims_fee_type_desc+""+o.defaulterdata[0][t].sims_balance_amount+"");o.message_details=o.message_details+="Grand Total :"+o.filteredTodos[e].sims_balance_amount_total+"",o.message_details=o.message_details+"";var a=document.getElementById("text-editor").value.replace("{details}",o.message_details);o.filteredTodos[e].email_message=a+"

",o.data.push(o.filteredTodos[e])}o.data.length<=0?swal({showCloseButton:!0,text:"Please Select student to send Email Message.",imageUrl:"assets/img/notification-alert.png",width:350,showCloseButon:!0}):n.post(i.apiUrl+"api/Fee/SFS/emailtoDefaulters",o.data).then(function(e){!0===e.data?($("#MyModal").modal("hide"),o.email_subject="",o.email_message="",swal({showCloseButton:!0,text:"Email Message Scheduled Or Sent Sucessfully.",imageUrl:"assets/img/check.png",width:350,showCloseButon:!0})):swal({showCloseButton:!0,text:"Error in Sending Email Message.",imageUrl:"assets/img/notification-alert.png",width:350,showCloseButon:!0})})}}}])}(),function(){"use strict";var e=angular.module("sims.module.Collaboration");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("DefaulterStatusSISO",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(o,e,t,a,s,n,i){o.pagesize="20",$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"}),o.edt=[],o.edt={},$("#text-editor").wysihtml5(),o.cur_change=function(){n.get(i.apiUrl+"api/Fee/SFS/GetAllAcademicYears?cur_code="+o.edt.sims_cur_code).then(function(e){o.admissionYear=e.data,0o.totalItems?o.pagersize=Math.round(o.totalItems/o.numPerPage):o.pagersize=Math.round(o.totalItems/o.numPerPage)+1;var e=(o.currentPage-1)*o.numPerPage,t=parseInt(e)+parseInt(o.numPerPage);o.filteredTodos=o.todos.slice(e,t)},o.size=function(e){"All"==e?(o.currentPage=1,o.numPerPage=o.summeryData.length):(o.pagesize=e,o.currentPage=1,o.currentPage_ind=e,o.numPerPage=e),o.makeTodos()},o.index=function(e){o.pageindex=e,o.currentPage_ind=e,o.currentPage=e,o.makeTodos()},o.CheckMultipleSearch=function(){for(var e=document.getElementById("chkSearch"),t=0;tFee Due DetailsEnrollment No:"+o.filteredTodos[e].sims_enroll_number+" Student Name:"+o.filteredTodos[e].student_name+"Fee TypeFee Amount";for(var t=0;t"+o.edt.sims_fee_code+""+o.defaulterdata[t].final_total+"");o.message_details=o.message_details+="Grand Total :"+o.filteredTodos[e].final_total+"",o.message_details=o.message_details+"";var a=document.getElementById("text-editor").value.replace("{details}",o.message_details);o.filteredTodos[e].email_message=a+"

",o.data.push(o.filteredTodos[e])}o.data.length<=0?swal({showCloseButton:!0,text:"Please Select student to send Emailsubmitdata Message.",width:350,showCloseButon:!0}):n.post(i.apiUrl+"api/Fee/SFS/emailtoDefaulters_SISO",o.data).then(function(e){1==e.data?($("#MyModal").modal("hide"),o.email_subject="",o.email_message="",swal({showCloseButton:!0,text:"Email Message Scheduled Or Sent Sucessfully.",imageUrl:"assets/img/check.png",width:350,showCloseButon:!0})):swal({showCloseButton:!0,text:"Error in Sending Email Message.",imageUrl:"assets/img/notification-alert.png",width:350,showCloseButon:!0})})}}}])}(),function(){"use strict";var e=angular.module("sims.module.Collaboration");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("AlertCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(n,e,t,a,o,s,i,d){n.url=i.docUrl+s.defaults.headers.common.schoolId,n.itemsPerPage="5",n.currentPage=0,n.view=!0,n.create=!1,n.edt=[];var _=t.globals.currentUser.username,c=($('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0}),new Date),r=c.getMonth()+1,l=c.getDate();r<10&&(r="0"+r),l<10&&(l="0"+l),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),n.setStart=function(e){},n.setEnd=function(e){},n.size=function(e){n.itemsPerPage=e},s.get(i.apiUrl+"api/common/Alert/getModule?username="+t.globals.currentUser.username).then(function(e){n.getModule=e.data,"ALL"==d.flag&&(e={fromdate:"",todate:n.endDate,usercode:_,alert_status:"U",module_code:null},n.buzy=!0,s.post(i.apiUrl+"api/common/Alert/AlertDetails",e).then(function(e){n.AlertDetails=e.data,0d.pageCount()-5?d.pageCount()-5+1:t;a
Message
"),$(t.currentTarget).parents("tr").after(c),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]}}])}(),function(){"use strict";var e=angular.module("sims.module.TimeTable");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CircularUserStatusCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.temp={},s.detailsField=!0,s.hideprintpdf=!1,s.pagesize="30",s.pageindex="0",s.pager=!0,s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),s.chk={},s.chk.chk_all=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=30,s.maxSize=100,s.makeTodos=function(){var e,t;"All"==s.pagesize?(s.currentPage=1,s.showPager=!1,s.filteredTodos=s.report_data_new):(e=parseInt(s.totalItems%s.numPerPage),s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,e=(s.currentPage-1)*s.numPerPage,t=parseInt(e)+parseInt(s.numPerPage),console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t))},n.get(i.apiUrl+"api/common/getCuriculum").then(function(e){s.cur_data=e.data,s.temp.sims_cur_code=s.cur_data[0].sims_cur_code,s.getAcademic_year(s.cur_data[0].sims_cur_code)}),s.getAcademic_year=function(e){n.get(i.apiUrl+"api/common/getAcademicYear?curCode="+e).then(function(e){s.acad_data=e.data,s.temp.sims_academic_year=s.acad_data[0].sims_academic_year})},n.get(i.apiUrl+"api/commoncircular/GetCircularstatusbyparent").then(function(e){s.status_data=e.data,s.temp.sims_status=s.status_data[0].comn_appl_parameter}),n.get(i.apiUrl+"api/commoncircular/Getgroupcode").then(function(e){s.group_data=e.data,s.temp.user_group_code=s.group_data[0].comn_user_group_code}),s.getCircdetail=function(){s.report_data_new=[],s.detailsField=!0,n.get(i.apiUrl+"api/CircularStatusByParent/GetCircularuserstatus?cur_code="+s.temp.sims_cur_code+"&acad_year="+s.temp.sims_academic_year+"&circular_status="+s.temp.sims_status+"&user_group="+s.temp.user_group_code+"&from="+s.from_date+"&to="+s.to_date+"&search="+s.searchParent+"&report_view="+s.temp.show_expire_circular).then(function(e){0"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]},s.ischeck=function(){s.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),function(){"use strict";var e=angular.module("sims.module.TimeTable");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CommunicationReportNewCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.temp={},s.detailsField=!0,s.hideprintpdf=!1,s.pagesize="30",s.pageindex="0",s.pager=!0,s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),s.chk={},s.chk.chk_all=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=30,s.maxSize=100,s.makeTodos=function(){var e,t;"All"==s.pagesize?(s.currentPage=1,s.showPager=!1,s.filteredTodos=s.report_data_new):(e=parseInt(s.totalItems%s.numPerPage),s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,e=(s.currentPage-1)*s.numPerPage,t=parseInt(e)+parseInt(s.numPerPage),console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t))},n.get(i.apiUrl+"api/common/getCuriculum").then(function(e){s.cur_data=e.data,s.temp.sims_cur_code=s.cur_data[0].sims_cur_code,s.getAcademic_year(s.cur_data[0].sims_cur_code)}),s.getAcademic_year=function(e){n.get(i.apiUrl+"api/common/getAcademicYear?curCode="+e).then(function(e){s.acad_data=e.data,s.temp.sims_academic_year=s.acad_data[0].sims_academic_year})},n.get(i.apiUrl+"api/commoncircular/Getcomstatus").then(function(e){s.status_data=e.data,s.temp.sims_status=s.status_data[0].comn_appl_parameter}),n.get(i.apiUrl+"api/commoncircular/Getgroupcode").then(function(e){s.group_data=e.data,s.temp.user_group_code=s.group_data[0].comn_user_group_code,setTimeout(function(){$("#group_box").change(function(){}).multipleSelect({width:"100%"})},1e3)}),$(function(){$("#group_box").multipleSelect({width:"100%"})}),s.getCircdetail=function(){s.report_data_new=[],s.detailsField=!0,n.get(i.apiUrl+"api/CircularStatusByParent/Getcommunicationreport?cur_code="+s.temp.sims_cur_code+"&acad_year="+s.temp.sims_academic_year+"&circular_status="+s.temp.sims_status+"&user_group="+s.temp.user_group_code+"&from="+s.from_date+"&to="+s.to_date+"&search="+s.com_initiated_by).then(function(e){0"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]},s.ischeck=function(){s.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),function(){"use strict";var e=angular.module("sims.module.TimeTable");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("EmailStatusReportCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.temp={},s.detailsField=!0,s.hideprintpdf=!1,s.pagesize="30",s.pageindex="0",s.pager=!0,s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),s.chk={},s.chk.chk_all=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=30,s.maxSize=100,s.makeTodos=function(){var e,t;"All"==s.pagesize?(s.currentPage=1,s.showPager=!1,s.filteredTodos=s.report_data_new):(e=parseInt(s.totalItems%s.numPerPage),s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,e=(s.currentPage-1)*s.numPerPage,t=parseInt(e)+parseInt(s.numPerPage),console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t))},n.get(i.apiUrl+"api/commoncircular/Getemailtransactionstatus").then(function(e){s.status_data=e.data,s.temp.sims_appl_parameter=s.status_data[0].sims_appl_parameter}),n.get(i.apiUrl+"api/commoncircular/GetViewasreport").then(function(e){s.group_data=e.data,s.temp.comn_appl_parameter=s.group_data[0].comn_appl_parameter}),s.getCircdetail=function(){s.report_data_new=[],s.detailsField=!0,n.get(i.apiUrl+"api/CircularStatusByParent/Getemailstatusdetails?from="+s.from_date+"&to="+s.to_date+"&status="+s.temp.sims_appl_parameter+"&view_as="+s.temp.comn_appl_parameter).then(function(e){0"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]},s.ischeck=function(){s.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),function(){"use strict";var e=angular.module("sims.module.TimeTable");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("NewsReportbyUserCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.temp={},s.detailsField=!0,s.hideprintpdf=!1,s.pagesize="30",s.pageindex="0",s.pager=!0,s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),s.chk={},s.chk.chk_all=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=30,s.maxSize=100,s.makeTodos=function(){var e,t;"All"==s.pagesize?(s.currentPage=1,s.showPager=!1,s.filteredTodos=s.report_data_new):(e=parseInt(s.totalItems%s.numPerPage),s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,e=(s.currentPage-1)*s.numPerPage,t=parseInt(e)+parseInt(s.numPerPage),console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t))},n.get(i.apiUrl+"api/common/getCuriculum").then(function(e){s.cur_data=e.data,s.temp.sims_cur_code=s.cur_data[0].sims_cur_code,s.getAcademic_year(s.cur_data[0].sims_cur_code)}),n.get(i.apiUrl+"api/commoncircular/Getcomstatus").then(function(e){s.status_data=e.data,s.temp.sims_status=s.status_data[0].comn_appl_parameter}),n.get(i.apiUrl+"api/commoncircular/Getgroupcode").then(function(e){s.group_data=e.data,s.temp.user_group_code=s.group_data[0].comn_user_group_code,setTimeout(function(){$("#group_box").change(function(){}).multipleSelect({width:"100%"})},1e3)}),$(function(){$("#group_box").multipleSelect({width:"100%"})}),s.getCircdetail=function(){s.report_data_new=[],s.detailsField=!0,n.get(i.apiUrl+"api/CircularStatusByParent/Getnewbyuser?cur_code="+s.temp.sims_cur_code+"&user_group="+s.temp.user_group_code+"&from="+s.from_date+"&to="+s.to_date+"&search="+s.com_initiated_by).then(function(e){0"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]},s.ischeck=function(){s.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),function(){"use strict";var e=angular.module("sims.module.Collaboration");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CallVisitorLogCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(a,e,t,o,s,n,i){a.temp={},t.visible_stud=!1,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!1,t.chkMulti=!0,a.showSearchVisitorName=!0,document.getElementById("txt_visitor_name").disabled=!0,document.getElementById("rdoStudent").checked=!0;var d=new Date,_=d.getDate(),c=(_<10&&(_="0"+_),d.getMonth()+1),r=(c<10&&(c="0"+c),d.getFullYear()),d=($(".clockpicker").clockpicker({autoclose:!0}),new Date),l=d.getHours(),m=d.getMinutes(),p=(m<10&&(m="0"+m),d.getSeconds()),d=(p<10&&(p="0"+p),a.temp.comn_log_visitor_visit_intime=l+":"+m+":"+p,a.temp.comn_log_visitor_visit_date=_+"-"+c+"-"+r,t.globals.currentUser.username),u=(a.temp.comn_log_created_by_user_code=d,a.temp.comn_log_created_date=_+"-"+c+"-"+r,a.VisitorName=function(e){console.log("str",e),"S"==e||"E"==e||"P"==e?(a.showSearchVisitorName=!0,document.getElementById("txt_visitor_name").disabled=!0):"O"==e&&(a.showSearchVisitorName=!1,a.temp.comn_log_visitor_user_name="",a.temp.comn_log_visitor_user_phone="",document.getElementById("txt_visitor_name").removeAttribute("disabled"))},a.Search=function(){"S"==a.temp.comn_log_user_group_code?(t.visible_stud=!0,t.visible_Employee=!1,t.visible_parent=!1):"E"==a.temp.comn_log_user_group_code?(t.visible_stud=!1,t.visible_Employee=!0,t.visible_parent=!1):"P"==a.temp.comn_log_user_group_code&&(t.visible_stud=!1,t.visible_Employee=!1,t.visible_parent=!0),a.getSearchData()},a.getSearchData=function(){a.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},a.$on("global_cancel",function(){console.log(a.SelectedUserLst),a.VisitorName_result=a.SelectedUserLst,"S"==a.temp.comn_log_user_group_code||"P"==a.temp.comn_log_user_group_code?(a.temp.comn_log_visitor_user_code=a.VisitorName_result[0].user_name,a.temp.comn_log_visitor_user_name=a.VisitorName_result[0].name,a.temp.comn_log_visitor_user_phone=a.VisitorName_result[0].mobile_no):"E"==a.temp.comn_log_user_group_code&&(a.temp.comn_log_visitor_user_code=a.VisitorName_result[0].em_login_code,a.temp.comn_log_visitor_user_name=a.VisitorName_result[0].empName,a.temp.comn_log_visitor_user_phone=a.VisitorName_result[0].em_mobile)}),n.get(i.apiUrl+"api/CallVisitorLogController/getLogType").then(function(e){a.LogTypeData=e.data}),n.get(i.apiUrl+"api/CallVisitorLogController/getLogLocation").then(function(e){a.LogLocationData=e.data}),n.get(i.apiUrl+"api/CallVisitorLogController/getVisitorLocation").then(function(e){a.VisitorLocationData=e.data}),n.get(i.apiUrl+"api/CallVisitorLogController/getPersonToMeet").then(function(e){a.PersonToMeetData=e.data,console.log("PersonToMeetData",a.PersonToMeetData)}),a.CallPurpose=function(e){n.get(i.apiUrl+"api/CallVisitorLogController/getPurposeOfCall?logtype="+e).then(function(e){a.VisitingPurposeData=e.data})},[]);a.Save=function(e){var t;e&&(e=a.temp.comn_log_visiting_user_alert,t=a.temp.comn_log_visiting_user_email,a.temp.comn_log_visiting_user_notification=1==e&&1==t?"AE":1==e&&0==t|1==e&&"undefined"==t||1==e&&""==t||1==e&&null==t?"A":1==t&&0==e||1==t&&"undefined"==e||1==t&&""==e||1==t&&null==e?"E":"",u=[],(t=a.temp).opr="I",u.push(t),n.post(i.apiUrl+"api/CallVisitorLogController/InsertVisitor_Log",u).then(function(e){a.msg1=e.data,1==a.msg1?(swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",width:380,showCloseButton:!0}),a.Cancel()):0==a.msg1?swal({text:"Record Not Inserted. ",imageUrl:"assets/img/close.png",width:380,showCloseButton:!0}):swal("Error-"+a.msg1)}))},a.Cancel=function(){a.temp.comn_log_type_code="",a.temp.comn_log_loc_code="",a.temp.comn_log_user_group_code="",a.temp.comn_log_visitor_user_code="",a.temp.comn_log_visitor_user_name="",a.temp.comn_log_visitor_user_phone="",a.temp.comn_log_visitor_visit_date=_+"-"+c+"-"+r,a.temp.comn_log_visitor_visit_intime=l+":"+m+":"+p,a.temp.comn_log_visitor_visit_outtime="",a.temp.comn_log_visiting_user_code="",a.temp.comn_log_visiting_user_name="",a.temp.comn_log_visiting_loc_code="",a.temp.comn_log_visiting_purpose_code="",a.temp.comn_log_visitor_visit_remark="",a.temp.comn_log_visiting_user_alert="",a.temp.comn_log_visiting_user_email="",a.showSearchVisitorName=!0}}])}(),function(){"use strict";var e=angular.module("sims.module.Collaboration");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("VisitorLogQueryReportCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(t,e,a,o,s,n,i){t.showdisabled=!1,t.showdisabled1=!1,o(function(){$("#example").tableHeadFixer({top:1})},100),t.busyindicator=!1,t.ShowCheckBoxes=!0;var o=new Date,d=o.getDate(),_=(d<10&&(d="0"+d),o.getMonth()+1),c=(_<10&&(_="0"+_),o.getFullYear());t.from_date=d+"-"+_+"-"+c,t.to_date=d+"-"+_+"-"+c,t.Show_Data=function(){1==t.comn_log_type_desc||1==t.comn_log_loc_desc||1==t.comn_log_user_group_desc||1==t.comn_log_visitor_user_name||1==t.comn_log_visitor_user_phone||1==t.comn_log_visitor_visit_date||1==t.comn_log_visitor_visit_intime||1==t.comn_log_visitor_visit_outtime||1==t.comn_log_visiting_user_code||1==t.comn_log_visiting_user_notification_desc||1==t.comn_log_visiting_loc_desc||1==t.comn_log_visiting_purpose_desc||1==t.comn_log_visitor_visit_remark?n.get(i.apiUrl+"api/VisitorLogQueryReport/getVisitorLogQueryData?from_date="+t.from_date+"&to_date="+t.to_date).then(function(e){t.VisitorLogQueryData=e.data,console.log("VisitorLogQueryData",t.VisitorLogQueryData),0==t.VisitorLogQueryData.length?(swal({title:"Alert",text:"Record Not Found",showCloseButton:!0,width:450,height:200}),t.ShowCheckBoxes=!0):(t.table=!0,t.busyindicator=!0,t.ShowCheckBoxes=!1)}):swal({title:"Alert",text:"Select Atleast One Checkbox Then Try Again",showCloseButton:!0,width:450,height:200})},t.Show_Data1=function(){1==t.comn_log_type_desc||1==t.comn_log_loc_desc||1==t.comn_log_user_group_desc||1==t.comn_log_visitor_user_name||1==t.comn_log_visitor_user_phone||1==t.comn_log_visitor_visit_date||1==t.comn_log_visitor_visit_intime||1==t.comn_log_visitor_visit_outtime||1==t.comn_log_visiting_user_code||1==t.comn_log_visiting_user_notification_desc||1==t.comn_log_visiting_loc_desc||1==t.comn_log_visiting_purpose_desc||1==t.comn_log_visitor_visit_remark?n.get(i.apiUrl+"api/VisitorLogQueryReport/getVisitorLogQueryData?from_date="+t.from_date+"&to_date="+t.to_date).then(function(e){t.VisitorLogQueryData=e.data,0==t.VisitorLogQueryData.length?(swal({title:"Alert",text:"Record Not Found",showCloseButton:!0,width:450,height:200}),t.ShowCheckBoxes=!0):(t.busyindicator=!1,t.ShowCheckBoxes=!0,t.exportData1())}):swal({title:"Alert",text:"Select Atleast One Checkbox Then Try Again",showCloseButton:!0,width:450,height:200})},t.back=function(){t.table=!1,t.busyindicator=!1,t.ShowCheckBoxes=!0},t.checkallClick=function(e){e?(t.showdisabled=!1,t.comn_log_type_desc=!0,t.comn_log_loc_desc=!0,t.comn_log_user_group_desc=!0,t.comn_log_visitor_user_name=!0,t.comn_log_visitor_user_phone=!0,t.comn_log_visitor_visit_date=!0,t.comn_log_visitor_visit_intime=!0,t.comn_log_visitor_visit_outtime=!0,t.comn_log_visiting_user_code=!0,t.comn_log_visiting_user_name=!0,t.comn_log_visiting_user_notification_desc=!0,t.comn_log_visiting_loc_desc=!0,t.comn_log_visiting_purpose_desc=!0,t.comn_log_visitor_visit_remark=!0):t.Uncheck()},t.colname=null,t.reverse=!1,t.sort=function(e){t.reverse=t.propertyName===e&&!t.reverse,t.propertyName=e},t.Uncheck=function(){t.showdisabled=!1,t.comn_log_type_desc=!1,t.comn_log_loc_desc=!1,t.comn_log_user_group_desc=!1,t.comn_log_visitor_user_name=!1,t.comn_log_visitor_user_phone=!1,t.comn_log_visitor_visit_date=!1,t.comn_log_visitor_visit_intime=!1,t.comn_log_visitor_visit_outtime=!1,t.comn_log_visiting_user_code=!1,t.comn_log_visiting_user_name=!1,t.comn_log_visiting_user_notification_desc=!1,t.comn_log_visiting_loc_desc=!1,t.comn_log_visiting_purpose_desc=!1,t.comn_log_visitor_visit_remark=!1},t.Reset=function(){t.Uncheck(),t.select_all=!1,t.from_date=d+"-"+_+"-"+c,t.to_date=d+"-"+_+"-"+c},t.checkevent=function(){1==t.comn_log_type_desc||1==t.comn_log_loc_desc||1==t.comn_log_user_group_desc||1==t.comn_log_visitor_user_name||1==t.comn_log_visitor_user_phone||1==t.comn_log_visitor_visit_date||1==t.comn_log_visitor_visit_intime||1==t.comn_log_visitor_visit_outtime||1==t.comn_log_visiting_user_code||1==t.comn_log_visiting_user_notification_desc||1==t.comn_log_visiting_loc_desc||1==t.comn_log_visiting_purpose_desc||1==t.comn_log_visitor_visit_remark?t.showdisabled=!1:t.showdisabled=!0},t.exportData=function(){swal({title:"",text:"Are you sure you want to Save?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&alasql('SELECT * INTO XLSX("Visitor Log Report.xlsx",{headers:true}) FROM HTML("#example",{headers:true,skipdisplaynone:true})')})},t.exportData1=function(){swal({title:"",text:"Are you sure you want to Save?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&alasql('SELECT * INTO XLSX("Visitor Log Report.xlsx",{headers:true}) FROM HTML("#example",{headers:true,skipdisplaynone:true})')}),t.table=!1}}])}(),function(){"use strict";var e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ViewPayslipCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(o,e,t,a,s,n,i){o.display=!0,o.Financial=!0,n.get(i.apiUrl+"api/common/ViewPayslip/GetReportName").then(function(e){o.Report_Name=e.data}),n.get(i.apiUrl+"api/attendance/getAttendanceyear?cur_code=01").then(function(e){o.academicyears_obj=e.data,0=d.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),d.temp.em_date_of_join="")},d.checkPassport=function(){d.temp.em_passport_exp_date=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date{d.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg"})}),null!=d.photo_filename||""!=d.photo_filename?"jpeg"==(t=d.photo_filename.split("/"))[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(e){d.$apply(function(){d.prev_img=e.target.result})},t.readAsDataURL(e)):(swal({text:"Only jpeg and png image format supported."}),$("#empimg").attr("src","")):(swal({text:"Image format not supported."}),$("#empimg").attr("src",""))},d.globalSearch=function(){t.visible_stud=!1,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!0,t.chkMulti=!1,d.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),d.temp.em_login_code="",d.temp.EmpName="",d.showBtn=!1},d.$on("global_cancel",function(e){console.log(d.SelectedUserLst),0=d.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),d.temp.em_date_of_join="")},d.checkPassport=function(){d.temp.em_passport_exp_date{s.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg/png"})}),null!=s.photo_filename||""!=s.photo_filename?"jpeg"==(t=s.photo_filename.split("/"))[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(e){s.$apply(function(){s.prev_img=e.target.result})},t.readAsDataURL(e)):(swal({text:"Only jpeg and png image format supported."}),$("#empimg").attr("src","")):(swal({text:"Image format not supported."}),$("#empimg").attr("src",""))},s.globalSearch=function(){n.visible_stud=!1,n.visible_parent=!1,n.visible_search_parent=!1,n.visible_teacher=!1,n.visible_User=!1,n.visible_Employee=!0,n.chkMulti=!1,s.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),s.temp.em_login_code="",s.temp.EmpName="",s.showBtn=!1},s.$on("global_cancel",function(e){console.log(s.SelectedUserLst),0=s.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),s.temp.em_date_of_join="")},s.checkPassport=function(){s.temp.em_passport_exp_date{d.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg"})}),console.log("comopressed image ",d.sims_photo_compressed),d.photo_filename=e.type,null!=d.photo_filename||""!=d.photo_filename?(t=d.photo_filename.split("/"),console.log("imageType",t[1]),"jpeg"==t[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(t){d.$apply(function(){var e=t.target.result;$(function(){$("#empimg").attr("src",e)})})},t.readAsDataURL(e)):(swal({text:"Only jpeg and png image format supported."}),$("#empimg").attr("src",""))):(swal({text:"Image format not supported."}),$("#empimg").attr("src","")))},d.uploadImgClickF=function(){d.uploadImgClickFShow=!0},d.uploadImgCancel=function(){d.uploadImgClickFShow=!1},d.image_click=function(){d.ImgLoaded=!0},d.globalSearch=function(){$("#MyModal").modal("show"),d.showBtn=!1},d.EmployeeDetails=function(){d.NodataEmployee=!1,n.post(_.apiUrl+"api/common/SearchEmployee?data="+JSON.stringify(d.temp)).then(function(e){d.Employee_Details=e.data,d.EmployeeTable=!0,0{}]/g,"_"),console.log("space",d.filename_doc),""==e.pays_doc_srno&&(d.showUpdateBtn=!(a=!0),o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t.push(o)),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,d.photo_filename_doc.split("/")[1]),o=(d.filename1=d.filename_doc+"."+e,[]),e=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc)swal({title:"Alert",text:"Please Select File",width:300,height:200});else{if(1==a)for(var s=0;s{}]/g,"_"),console.log("space",d.filename_doc),(""==e.pays_doc_srno?(d.showUpdateBtn=!!0,o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},[]):(d.showUpdateBtn=!!1,o={pays_doc_srno:e.pays_doc_srno,pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t)).push(o),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc||null==d.photo_filename_doc){for(var s=0;s"+t+''+e+""),o.close(),a.focus()},n.get(i.apiUrl+"api/common/Empdashboard/get_removed_Application_Dash?user="+a.globals.currentUser.username).then(function(e){for(var t=0;tt;t++)"P"==a.attendanceCount[t].att_absent_flag&&a.presentCount.push(a.attendanceCount[t]),"A"==a.attendanceCount[t].att_absent_flag&&a.absentCount.push(a.attendanceCount[t]),"LA"==a.attendanceCount[t].att_absent_flag&&a.lateCount.push(a.attendanceCount[t]),"LWP"==a.attendanceCount[t].att_absent_flag&&a.lwpCount.push(a.attendanceCount[t])})},a.getAttendanceCountData(a.dt.sims_attendance_date),a.selecteto="TO",a.selecteCA="CA",n.get(_.apiUrl+"api/dailystatusdash/getAcademicYear").then(function(e){a.acayears=e.data,a.edt.sims_academic_year=a.acayears[0].sims_academic_year,a.edt.sims_academic_year1=a.acayears[0].sims_academic_year}),a.close=function(){n.get(_.apiUrl+"api/dailystatusdash/getAcademicYear").then(function(e){a.acayears=e.data,a.edt.sims_academic_year=a.acayears[0].sims_academic_yearadmissionModal,a.edt.sims_academic_year1=a.acayears[0].sims_academic_year})},a.punchModal=function(e){a.getServiceCode(e),a.leftcol="L"!=e,a.servicecol="L"!=e&&"V"!=e&&"B"!=e&&"N"!=e,$("#punchModal").modal({backdrop:"static",keyboard:!1})},a.leaveModal=function(){$("#leaveModal").modal({backdrop:"static",keyboard:!1})},a.attendanceModal=function(){$("#attendanceModal").modal({backdrop:"static",keyboard:!1})},a.admissionModal=function(e){a.getGradeCode(e),$("#admissionModal").modal({backdrop:"static",keyboard:!1})},a.canceladmissionModal=function(e){a.getVisadetails(e),"National id"==e&&(a.nationalhide=!1,a.visatypedata="",$("#nationalid").modal({backdrop:"static",keyboard:!1})),"Visa"!=e&&"Visa expired"!=e&&"Expire in Month"!=e||(a.visahide=!0,a.visatypedata="",$("#canceladmissionModal").modal({backdrop:"static",keyboard:!1})),"Labour Card"!=e&&"Labour Card exp"!=e||(a.visatypedata="",$("#LabourCard").modal({backdrop:"static",keyboard:!1}))},a.collectionModal=function(){$("#collectionModal").modal({backdrop:"static",keyboard:!1})},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy"})}])}(),function(){"use strict";var e=angular.module("sims.module.Fee");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PurchaseReportCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){t.globals.currentUser.username,s.CurrentDate=new Date,new Date;s.records=!0,s.tabledata=!1,n.get(i.apiUrl+"api/common/Empdashboard/getInventoryDataforOrders").then(function(e){s.hrms_data1=e.data,s.chartLabels5=[],s.chartData5=[],s.chartColor=[];for(var t=0;tparseFloat(o.maindata.leave_max)?(swal("","Maximum leave not less than taken leave."),o.maindata.leave_max=o.maindata.leave_max_old):o.maindata.leave_max_old=o.maindata.leave_max},o.onlyNumbers=function(e,t){var a,o={escape:27,backspace:8,tab:9,enter:13,del:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57};for(a in o)if(o.hasOwnProperty(a)&&(e.charCode===o[a]||e.keyCode===o[a]))return;e.preventDefault()},o.Show_data=function(){n.post(i.apiUrl+"api/UpdateLeaveBal/LeaveDetails?dept="+o.edt.dep_code+"&desg="+o.edt.dg_code+"&l_type="+o.edt.leave_code+"&empcode="+o.edt.emp_code+"&gr_code="+o.edt.gr_code+"&company_code="+o.edt.company_code).then(function(e){o.GetLeaveDetails=e.data,0
Field Value 1 Field Value 2 Field Value 3Field Value 4
"+e.pays_appl_form_field_value1+" "+e.pays_appl_form_field_value2+" "+e.pays_appl_form_field_value3+""+e.pays_appl_form_field_value4+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"+e+''+t+""),o.close(),a.focus(),s.detailsField=!1,s.colsvis=!1,s.getsubdetail())})},s.reset_data=function(){s.filteredTodos=[];try{$("#cmb_grade_code").multipleSelect("uncheckAll")}catch(e){}try{$("#cmb_section_code").multipleSelect("uncheckAll")}catch(e){}s.temp.sims_bell_code="",s.report_data_new=[]},s.ischeck=function(){s.checklick=function(){var e=document.getElementById("summary");1==e.checked&&e.checked}}}])}(),function(){"use strict";var r,e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("AchievementCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.pagesize="5",s.pageindex=0,s.save_btn=!0,s.Update_btn=!1,s.display=!1,s.table=!0,s.user_access=[],s.appcode=e.current.name.split(".");e=t.globals.currentUser.username;n.get(i.apiUrl+"api/AlertTransaction/Get_user_access_rights?username="+e+"&appl_code="+s.appcode[1]).then(function(e){s.user_rights=e.data;for(var t=0;t
Grace Start Time for IN(1)Grace End Time for IN(1)Grace Start Time for OUT(1)Grace End Time for OUT(1)
"+e.sh_shift1_in_greece_start+" "+e.sh_shift1_in_greece_end+""+e.sh_shift1_out_greece_start+""+e.sh_shift1_out_greece_end+"
Grace Start Time for IN(2)Grace End Time for IN(2) Grace Start Time for OUT(2) Grace End Time for OUT(2)
"+e.sh_shift2_in_greece_start+""+e.sh_shift2_in_greece_end+""+e.sh_shift2_out_greece_start+""+e.sh_shift2_out_greece_end+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)}}])}(),function(){"use strict";var _,e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ShiftTemplateCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,t,a,o,i,d){n.expanded=!0,n.display=!0,n.pagesize="5",n.pageindex="1",n.grid=!0,n.edit_data=!1,n.shifttemplate_data=[];var s=[];n.valstatus=!1,n.tempid=!1,i.get(d.apiUrl+"api/common/ShiftMaster/getCompany").then(function(e){n.comp_data=e.data,n.edt={sh_company_code:n.comp_data[0].sh_company_code},n.getdetails(n.edt.sh_company_code)}),a(function(){$("#fixedtable,#fixedtable1,#fixedtable2,#fixedtable3").tableHeadFixer({top:1})},100),n.getdetails=function(e){i.get(d.apiUrl+"api/common/ShiftTemplate/GetShiftTemplateDetails?company_code="+e).then(function(e){n.display=!0,n.grid=!0,n.shifttemplate_data=e.data})},n.get_ischecked=function(e){e.ischecked=!0},n.btn_create=function(e){n.tem=[],n.temp=!1,n.tem.sh_day_status=!0,void 0===e?swal({title:"Alert",text:"Please Select Company",showCloseButton:!0,width:380}):(i.get(d.apiUrl+"api/common/ShiftTemplate/GetAllShift").then(function(e){n.shift_data=e.data}),i.get(d.apiUrl+"api/common/ShiftTemplate/getAllTemplateName?company_code="+n.edt.sh_company_code).then(function(e){n.AllTemplateName=e.data}),$("#shiftModal").modal({backdrop:"static",keyboard:!0}))},n.getTempalte=function(a){n.tempid=!0,i.get(d.apiUrl+"api/common/ShiftTemplate/GetIdOfTemplateName?templateName="+a+"&company_code="+n.edt.sh_company_code).then(function(e){n.shifttemp_data=e.data;for(var t=0;te.lo_number==t);s.temp={lo_gaunt_name:e.em_first_name,lo_gaunt_comp_name:e.companyName,lo_gaunt_address1:e.lo_gaunt_address1,lo_gaunt_desg:e.designation}},s.employeedata=[],s.CheckEmployee=function(e){s.employeedata=[];for(var t=0;te.lo_number===t.lo_number)?swal({text:"Name Already exists",imageUrl:"assets/img/notification-alert.png",width:300,height:200}):(i.post(d.apiUrl+"api/LoanCodeRegister/LoanCodeRegisterCUD",t).then(function(t){s.msg1=t.data,s.operation=!1,i.get(d.apiUrl+"api/LoanCodeRegister/getAllLoanRegister").then(function(e){s.AllLoanRegister_Data=e.data,s.totalItems=s.AllLoanRegister_Data.length,s.todos=s.AllLoanRegister_Data,s.makeTodos(),s.msg1=t.data,s.edt={},s.temp={},s.myForm.$setPristine(),s.myForm.$setUntouched(),1==s.msg1?swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==s.msg1?swal({text:"Record Not Inserted. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+s.msg1)})}),s.table1=!0,s.operation=!1))},s.Update=function(){var e={lo_number:s.edt.lo_number,lo_company_code:s.edt.lo_company_code,employeeName:s.edt.employeeName,lo_code:s.edt.lo_code,lo_sanction_date:s.edt.lo_sanction_date,lo_amount:s.edt.lo_amount,lo_no_of_installment:s.edt.lo_no_of_installment,lo_paid_amount:s.edt.lo_paid_amount,lo_reference:s.edt.lo_reference,lo_repaid_installment:s.edt.lo_repaid_installment,lo_gaunt_no:s.edt.lo_gaunt_no,lo_gaunt_name:s.temp.lo_gaunt_name,lo_gaunt_comp_name:s.temp.lo_gaunt_comp_name,lo_gaunt_address1:s.temp.lo_gaunt_address1,lo_gaunt_desg:s.temp.lo_gaunt_desg,lo_gaunt_address2:s.edt.lo_gaunt_address2,lo_gaunt_address3:s.edt.lo_gaunt_address3,lo_fully_rec_tag:s.edt.lo_fully_rec_tag,lo_monthly_rec_tag:s.edt.lo_monthly_rec_tag,lo_mgr_confirm_tag:s.edt.lo_mgr_confirm_tag,opr:"U"};i.post(d.apiUrl+"api/LoanCodeRegister/LoanCodeRegisterCUD",e).then(function(t){s.msg1=t.data,s.operation=!1,i.get(d.apiUrl+"api/LoanCodeRegister/getAllLoanRegister").then(function(e){s.AllLoanRegister_Data=e.data,s.totalItems=s.AllLoanRegister_Data.length,s.todos=s.AllLoanRegister_Data,s.makeTodos(),s.msg1=t.data,s.myForm.$setPristine(),s.myForm.$setUntouched(),1==s.msg1?swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==s.msg1?swal({text:"Record Not Updated. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+s.msg1)})}),s.operation=!1,s.table1=!0},s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.CheckAllChecked=function(){if(!0===(m=document.getElementById("mainchk")).checked)for(var e=0;ee.lm_number===t.lm_number)?swal({text:"Employee name order Already exists",imageUrl:"assets/img/notification-alert.png",width:300,height:200}):n.post(i.apiUrl+"api/LoanCodeConfirmation/LoanCodeConfirmationCUD",t).then(function(t){o.msg1=t.data,o.operation=!1,n.get(i.apiUrl+"api/LoanCodeConfirmation/getAllLoanConfirmation").then(function(e){o.LoanCode_Data=e.data,o.totalItems=o.LoanCode_Data.length,o.todos=o.LoanCode_Data,o.makeTodos(),o.msg1=t.data,1==o.msg1?swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==o.msg1?swal({text:"Record Not Inserted. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+o.msg1)})}),o.table1=!0,o.operation=!1)},o.Update=function(){var e=o.edt;e.opr="U",n.post(i.apiUrl+"api/LoanCodeConfirmation/LoanCodeConfirmationCUD",e).then(function(e){o.msg1=e.data,o.operation=!1,n.get(i.apiUrl+"api/LoanCodeConfirmation/getAllLoanConfirmation").then(function(e){o.LoanConfirmation_Data=e.data,o.totalItems=o.LoanConfirmation_Data.length,o.todos=o.LoanConfirmation_Data,o.makeTodos(),1==o.msg1?swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==o.msg1?swal({text:"Record Not Updated. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+o.msg1)})}),o.operation=!1,o.table1=!0},o.filteredTodos=[],o.currentPage=1,o.numPerPage=10,o.maxSize=10,o.makeTodos=function(){var e=parseInt(o.totalItems%o.numPerPage),e=(o.pagersize="0"==e?parseInt(o.totalItems/o.numPerPage):parseInt(o.totalItems/o.numPerPage)+1,(o.currentPage-1)*o.numPerPage),t=parseInt(e)+parseInt(o.numPerPage);o.filteredTodos=o.todos.slice(e,t)},o.CheckAllChecked=function(){if(1==(d=document.getElementById("mainchk")).checked)for(var e=0;e
Reviewer 3 Date Schedule 3 Reviewer 4Date Schedule 4Reviewer 5 Date Schedule 5
"+e.emp_name3+" "+e.sims_sip_goal_target_schedule3+" "+e.emp_name4+" "+e.sims_sip_goal_target_schedule4+""+e.emp_name5+""+e.sims_sip_goal_target_schedule5+"
"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;amoment(o.effupto[0].effective_from,"DD-MM-YYYY").format("YYYY-MM-DD")&&""!==o.effupto[0].effective_from&&null!=o.effupto[0].effective_from&&(""===o.effupto[0].effective_upto||null==o.effupto[0].effective_upto))return void swal("","Please save effective upto date for current active payroll component.");e={em_number:o.Employee_Details,em_company_code:"01",pa_effective_from:o.pa_effective_from,code:o.rdp_effective_upto,pd_pay_code:o.temp.pd_pay_code,pd_amount:o.pd_amount,pa_remark:o.pa_remark,cnt:o.eff[0].cnt};t.push(e),n.post(i.apiUrl+"api/PayrollEmployeeDPSD/InsertUpdatePaysPayable",t).then(function(e){o.msg2=e.data,!0===o.msg2?(swal({title:"Alert",text:"Payroll Component Added Successfully",width:300,height:200}),o.getgrid(),setTimeout(function(){$(document).ready(function(){$("#from_date, #to_date").kendoDatePicker({format:"dd-MM-yyyy",value:""})})},700),o.Reset()):!1===o.msg2?swal({title:"Alert",text:"Payroll Component Not Added. ",width:300,height:200}):swal("Error-"+o.msg2)})})})},o.getgrid=function(){n.get(i.apiUrl+"api/PayrollEmployeeDPSD/GetSalaryGeneratedForSelectedMonthOrNot?sd_number="+o.temp.em_number+"&start="+o.pa_effective_from+"&end="+o.rdp_effective_upto).then(function(t){o.sal=t.data,o.salCopy=angular.copy(o.sal);for(let e=o.total=0;emoment(o.effupto[0].effective_from,"DD-MM-YYYY").format("YYYY-MM-DD")&&""!==o.effupto[0].effective_from&&null!=o.effupto[0].effective_from&&(""===o.effupto[0].effective_upto||null==o.effupto[0].effective_upto))return void swal("","Please save effective upto date for current active payroll component.");e={em_number:o.Employee_Details,em_company_code:"01",pa_effective_from:o.pa_effective_from,code:o.rdp_effective_upto,pd_pay_code:o.temp.pd_pay_code,pd_amount:o.pd_amount,pa_remark:o.pa_remark,cnt:o.eff[0].cnt};t.push(e),n.post(i.apiUrl+"api/PayrollEmployeeDPSD/InsertUpdatePaysPayable",t).then(function(e){o.msg2=e.data,!0===o.msg2?(swal({title:"Alert",text:"Payroll Component Added Successfully",width:300,height:200}),o.getgrid(),setTimeout(function(){$(document).ready(function(){$("#from_date, #to_date").kendoDatePicker({format:"dd-MM-yyyy",value:""})})},700),o.Reset()):!1===o.msg2?swal({title:"Alert",text:"Payroll Component Not Added. ",width:300,height:200}):swal("Error-"+o.msg2)})})})},o.getgrid=function(){n.get(i.apiUrl+"api/PayrollEmployeeDPSD/GetSalaryGeneratedForSelectedMonthOrNot_new?sd_number="+o.temp.em_number+"&start="+o.pa_effective_from+"&end="+o.rdp_effective_upto).then(function(t){o.sal=t.data,o.salCopy=angular.copy(o.sal);for(let e=o.total=0;e{throw new Error("Application took too long to load")},6e4);d.post(_.apiUrl+"api/EmpAttendanceController/EDA355_Get_attednce_deatils?sdate="+a+"&edate="+o+"&dept="+e+"&desg="+t).then(function(e){var t=[];if(i.Pers326_Get_attednce_deatils1=e.data,1==document.getElementById("Checkbox8").checked)for(var a=0;aa;a++)i.subData={},i.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,i.subData.att_date=e.sheets.Sheet1[a].Date,i.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,i.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,i.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,i.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,i.sheetsData.push(i.subData);d.post(_.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",i.sheetsData).then(function(e){i.em_numbers=e.data,i.datasend=[];for(var t=0;i.em_numbers.length>t;t++)i.em_numbers[t].emp_id_flag?(i.em_numbers[t].fcolor="black",i.modalbusy=!1):(i.em_numbers[t].fcolor="red",i.modalbusy=!1,i.errorlabel=!0);console.log(i.em_numbers)}),i.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else i.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),i.busy=!1,i.modalbusy=!1}),t={method:"POST",url:_.apiUrl+"/api/file/uploadDocument?filename="+i.filename.name+n("date")(new Date,"dd-MM-yyyy")+"-"+n("date")(new Date,"HH-mm-ss")+"&location=Docs/Student",data:l,headers:{"Content-Type":void 0}},d(t).success(function(e){e={sims_admission_user_code:o.globals.currentUser.username,sims_admission_doc_path:e};d.post(_.apiUrl+"api/document/insertdoc",e).then(function(e){i.ins=e.data,e.data?swal({title:"Document Uploaded Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Document Upload Failed, Check Connection",imageUrl:"assets/img/close.png"})})}),angular.forEach(angular.element("input[type='file']"),function(e){angular.element(e).val(null)}),i.CheckMultiple())},i.CheckAllChecked=function(){if(1==document.getElementById("allchk").checked)for(var e=0;e"+e+''+t+""),o.close(),a.focus(),i.btn_Submit()),i.btn_Submit()})},i.printclick=!1,i.downloadFormat=function(){i.url=_.docUrl+"format/attendance/attendance.xls",window.open(i.url,"_self","location=yes")}}]),e.directive("ngFiles",["$parse","$scope",function(s,e){return{link:function(t,e,a){var o=s(a.ngFiles);e.on("change",function(e){o(t,{$files:e.target.files})})}}}]),e.factory("XLSXReaderService",["$q","$rootScope",function(s,n){function e(e){angular.extend(this,e)}return e.readFile=function(e,t,a){var o=s.defer();return XLSXReader(e,t,a,function(e){n.$apply(function(){o.resolve(e)})}),o.promise},e}])}(),function(){"use strict";var e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("UpdateEmployeeCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(o,t,e,a,s,n,i,d){var e=e.globals.currentUser.username,_=(o.Emp_ID=e,o.showForASD=!0,o.CompReadonly=!0,o.DOJReadonly=!0,o.DestReadonly=!0,o.DesgReadonly=!0,o.StaffTypeReadonly=!0,o.DeptReadonly=!0,o.DeptEFReadonly=!0,o.GradeReadonly=!0,o.GradeEFReadonly=!0,o.pass_num=!0,o.pass_issue_date=!0,o.pass_expiry_date=!0,o.visa_num=!0,o.visa_issue_date=!0,o.visa_expiry_date=!0,o.emirated_id=!0,o.emi_issue_date=!0,o.emi_expiry_date=!0,o.searchText=!1,o.ImgLoaded=!1,o.showBtn=!1,o.searchBtn=!1,o.searchEmp=function(e,t){o.searchBtn=!1},n.get(i.apiUrl+"api/HRMS/getLicSchool").then(function(e){o.lic_school_data=e.data,"Qatar"==o.lic_school_data[0].lic_school_country?(o.uae=!1,o.qatar=!0):(o.uae=!0,o.qatar=!1)}),n.get(i.apiUrl+"api/HRMS/getCompany").then(function(e){o.company_data=e.data}),n.get(i.apiUrl+"api/HRMS/getDestination").then(function(e){o.dest_data=e.data,o.temp={em_Company_Code:o.company_data[0].em_Company_Code,em_Dest_Code:o.dest_data[0].em_Dest_Code}}),o.EmployeeDetails=function(){o.NodataEmployee=!1,n.post(i.apiUrl+"api/common/SearchEmployee?data="+JSON.stringify(o.temp)).then(function(e){o.Employee_Details=e.data,o.EmployeeTable=!0,0=o.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),o.temp.em_date_of_join="")},o.checkPassport=function(){o.temp.em_passport_exp_date{}]/g,"_"),""==e.pays_doc_srno&&(x=!0,p.showUpdateBtn=!1,a={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},C.push(a)),p.pays_doc_empl_id=e.pays_doc_empl_id,p.pays_doc_desc1=e.pays_doc_desc1,p.photo_filename.split("/")[1]),a=(p.filename1=p.filename+"."+t,[]),e=[];if(null==p.photo_filename||""==p.photo_filename)swal({title:"Alert",text:"Please Select File",width:300,height:200});else{if(1==x)for(var o=0;o{}]/g,"_"),(""==e.pays_doc_srno?(x=!0,p.showUpdateBtn=!1,a={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},C):(x=!1,p.showUpdateBtn=!0,a={pays_doc_srno:e.pays_doc_srno,pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},D)).push(a),p.pays_doc_empl_id=e.pays_doc_empl_id,p.pays_doc_desc1=e.pays_doc_desc1,[]),t=[];if(null==p.photo_filename||""==p.photo_filename||null==p.photo_filename){for(var o=0;o()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,_.operation=!0,_.Update_btn=!1,_.display=!0,_.roleList=!0}),$("a#fee").click(function(){return!1}),_.updateBtn=!1,_.saveBtn=!1,_.diableAirFareField=!0,_.temp.afe_finalize_status=!0,$("#dob").kendoDatePicker({format:"dd-MM-yyyy",min:new Date(1900,1,1),max:new Date}),_.globSearch=function(){t.visible_stud=!1,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!0,t.chkMulti=!1,_.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),_.temp.em_login_code="",_.temp.EmpName="",_.showBtn=!1,_.diableAirFareField=!0,_.temp.afe_finalize_status=!0},_.$on("global_cancel",function(e){console.log(_.SelectedUserLst),0<_.SelectedUserLst.length&&(_.temp.enroll_number=_.SelectedUserLst[0].em_number,_.temp.name=_.SelectedUserLst[0].empName,_.EmpSearch1(_.SelectedUserLst[0].em_number))}),_.searchGlobalClick=function(){_.Global_Search_by_employee()},_.showAgreementDetails=!0,s.get(n.apiUrl+"api/Qual/getAllQualification").then(function(e){_.all_Qual_Data=e.data}),s.get(n.apiUrl+"api/common/Subject/getSubject").then(function(e){_.sub_data=e.data}),s.get(n.apiUrl+"api/HRMSOES/getRoles").then(function(e){_.roles_data=e.data,console.log(_.roles_data)}),s.get(n.apiUrl+"api/HRMSOES/GetAccommodationStatus").then(function(e){_.AccommondationStatus=e.data,console.log("AccommondationStatus",_.AccommondationStatus)}),s.get(n.apiUrl+"api/AirFareEmp/getairfaredetails").then(function(e){_.airfare_data=e.data,console.log(_.airfare_data)});_.getairfareother=function(e){i=e.split("-"),_.gr_code=i[0],null==_.gr_code||""==_.gr_code||null==_.gr_code?_.diableAirFareField=!0:_.diableAirFareField=!1,_.temp.afe_nation_code=i[1],_.temp.afe_Dest_Code=i[2],_.temp.afe_class=i[3];for(var t=0;t<_.airfare_data.length;t++)e==_.airfare_data[t].gr_code&&(_.temp.afe_applicable_frequency=_.airfare_data[t].af_applicable_frequency,_.temp.afe_adult_rate=_.airfare_data[t].af_adult_rate,_.temp.afe_infant_rate=_.airfare_data[t].af_infant_rate,_.temp.afe_child_rate=_.airfare_data[t].af_child_rate,_.temp.afe_applicable_month=_.airfare_data[t].af_default_applicable_month);console.log("temp",_.temp)},_.setGrade_Dept=function(e){_.temp.em_dept_effect_from=e,_.temp.em_grade_effect_from=e},_.Cancel=function(){_.temp={},_.Myform.$setPristine(),_.Myform.$setUntouched(),_.Save_btn=!0,_.Update_btn=!1,_.diableAirFareField=!0,_.temp.afe_finalize_status=!0,_.temp.em_Company_Code=_.obj[0].em_Company_Code,_.temp.em_service_status_code="V"},_.getstate=function(e){s.get(n.apiUrl+"api/HRMSOES/getState?em_Country_Code="+e).then(function(e){_.stt=e.data})},_.getcity=function(e){s.get(n.apiUrl+"api/HRMSOES/getCity?em_State_Code="+e).then(function(e){_.ctt=e.data})},_.getContract=function(){s.get(n.apiUrl+"api/contract/Get_ContractDetails").then(function(e){_.Contract_data=e.data,console.log(_.Contract_data)})},_.getContract(),_.setAgreementDate=function(e){_.showAgreementDetails=!1;for(var t=0;t<_.Contract_data.length;t++)if(_.Contract_data[t].cn_code==e){var a=_.Contract_data[t].cn_duration;break}var o,s=new Date,s=("0"+s.getDate()).slice(-2)+"-"+("0"+(s.getMonth()+1)).slice(-2)+"-"+s.getFullYear(),s=(_.temp.em_agreement_start_date=s,_.temp.em_date_of_join.split("-")[0]),n=_.temp.em_date_of_join.split("-")[1],i=_.temp.em_date_of_join.split("-")[2],d=(isNaN(n)&&(n=_.temp.em_date_of_join.split("-")[1]),parseInt(n)+parseInt(a));console.log(n),12=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date")+""+"";for(var s=0;s"+e.paycodeList[s].pay_discription+"";c=c+"Total"+"";for(s=0;s"+e.paycodeList[s].pa_amount+"";c=(c=c+""+o+"")+""+"";var n=$(""+c+"");$(t.currentTarget).parents("tr").after(n),i.flag=!1}else $(".innerRow").css("display","none"),$("#"+a).removeClass("fa fa-minus-circle"),$("#"+a).addClass("fa fa-plus-circle"),i.flag=!0},i.submit=function(){i.submitBtnDisabled=!0,i.busyindicator=!1,i.postData=[],i.postData=i.all_EmpGrt_Data,i.opr={username:t.globals.currentUser.username,yearmonth:i.temp.sims_academic_year+i.temp.sims_academic_month,grtyearmonth:i.temp.yearCode},console.log("postData",i.postData),console.log("opr",i.opr),d.post(_.apiUrl+"api/EmpGrtview/SaveAllGratuityData?data1="+JSON.stringify(i.opr),i.postData).then(function(e){i.msg=e.data,1==i.msg?(console.log("emp_id",i.emp_id),d.post(_.apiUrl+"api/EmpGrtview/PostingGratuity?year_month="+i.temp.sims_academic_year+i.temp.sims_academic_month+"&emp_id="+i.emp_id+"&company_code="+i.temp.company_code+"&username="+t.globals.currentUser.username).then(function(e){i.postingStatus=e.data,i.emp_id="",1==i.postingStatus?(swal({title:"Alert",text:"Gratuity Posted Successfully"}),i.Myform.$setPristine(),i.Myform.$setUntouched(),i.clear(),i.busyindicator=!0):swal({title:"Alert",text:"Gratuity calculated-Posting failed"}),$("#myModal").modal("hide")})):0==i.msg?swal({text:"Gratuity not updated. ",width:380}):swal("Error-"+i.msg)})}}])}(),function(){"use strict";var e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("UpdateEmployeeADISWCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(a,t,e,o,s,n,i,d){var e=e.globals.currentUser.username,_=(a.Emp_ID=e,a.showForASD=!0,a.CompReadonly=!0,a.DOJReadonly=!0,a.DestReadonly=!0,a.DesgReadonly=!0,a.StaffTypeReadonly=!0,a.DeptReadonly=!0,a.DeptEFReadonly=!0,a.GradeReadonly=!0,a.GradeEFReadonly=!0,a.pass_num=!0,a.pass_issue_date=!0,a.pass_expiry_date=!0,a.visa_num=!0,a.visa_issue_date=!0,a.visa_expiry_date=!0,a.emirated_id=!0,a.emi_issue_date=!0,a.emi_expiry_date=!0,a.searchText=!1,a.ImgLoaded=!1,a.showBtn=!1,a.searchBtn=!1,a.searchEmp=function(e,t){a.searchBtn=!1},n.get(i.apiUrl+"api/HRMS/getLicSchool").then(function(e){a.lic_school_data=e.data,"Qatar"==a.lic_school_data[0].lic_school_country?(a.uae=!1,a.qatar=!0):(a.uae=!0,a.qatar=!1)}),n.get(i.apiUrl+"api/HRMS/getCompany").then(function(e){a.company_data=e.data}),n.get(i.apiUrl+"api/HRMS/getDestination").then(function(e){a.dest_data=e.data,a.temp={em_Company_Code:a.company_data[0].em_Company_Code,em_Dest_Code:a.dest_data[0].em_Dest_Code}}),n.get(i.apiUrl+"api/HRMS/Adisw/getCurLevel").then(function(e){a.curlevel_data=e.data}),n.get(i.apiUrl+"api/HRMS/Adisw/getQualification").then(function(e){a.qualification_data=e.data}),n.get(i.apiUrl+"api/HRMS/Adisw/getDesignation").then(function(e){a.designation_data=e.data}),n.get(i.apiUrl+"api/HRMS/Adisw/getSubjects").then(function(e){a.subjects_data=e.data}),a.EmployeeDetails=function(){a.NodataEmployee=!1,n.post(i.apiUrl+"api/common/SearchEmployee?data="+JSON.stringify(a.temp)).then(function(e){a.Employee_Details=e.data,a.EmployeeTable=!0,0=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a{o.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg"}),o.disableButton(!1)}),o.photo_filename=e.type,new FileReader);t.onload=function(e){o.$apply(function(){o.prev_img=e.target.result,$(function(){$("#prevImg").attr("src",o.prev_img)})})},t.readAsDataURL(e),o.Upload=function(){var t=Math.random(),a={em_number:d,em_img:d+t+".png",em_img_lowres:d+t+"_lowres.png",opr:"K"};n.post(i.apiUrl+"api/HRMS/EmpImgShow/CUDUpdateEmpPics",a).then(function(e){o.result=e.data,$("#prevImg").val(""),o.edt.em_img="",$("#myModal").modal("hide"),!0===o.result&&swal({text:"Image Upload Successfully",imageUrl:"assets/img/check.png",width:300,height:200});e={method:"POST",url:i.apiUrl+"/api/file/Imageupload?filename="+a.em_number+t+"&location=/EmployeeImages",data:c,headers:{"Content-Type":void 0}},n(e).success(function(e){o.Show_Data(),o.clear()},function(){o.clear()}),e=new FormData,e.append(a.em_img_lowres,o.sims_photo_compressed),e={method:"POST",url:i.apiUrl+"/api/file/Imageupload?filename="+a.em_number+t+"_lowres&location=/EmployeeImages",data:e,headers:{"Content-Type":void 0}};n(e).success(function(e){o.Show_Data(),o.clear()},function(){o.clear()})},function(){$("#ErrorMessage").modal({backdrop:"static"}),o.clear()}),o.prev_img="",o.edt.em_img=""},o.getTheFiles=function(a){c=new FormData,o.filesize=!0,angular.forEach(a,function(e,t){c.append(t,e);209715200e.ol_account_number===t.ol_account_number||e.em_number===t.empname)?swal({text:"Record Already exists",imageUrl:"assets/img/notification-alert.png",width:300,height:200}):(e={LoanNumber:t.empname,CompanyName:t.comp_code,LoanName:t.lc_code,LedgerName:t.sllc_ldgr_code,ol_account_number:t.ol_account_number,opr:t.opr},a.push(e),i.post(d.apiUrl+"api/OtherLoan/OtherLoanCUD",a).then(function(t){s.msg1=t.data,s.OtherLoanOperation=!1,a=[],i.get(d.apiUrl+"api/OtherLoan/getOtherLoanDetail").then(function(e){s.OtherLoanData=e.data,s.totalItems=s.OtherLoanData.length,s.todos=s.OtherLoanData,s.makeTodos(),s.msg1=t.data,1==s.msg1?swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==s.msg1?swal({text:"Record Not Inserted. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+s.msg1)})}),s.OtherLoanDetail=!0,s.OtherLoanOperation=!1)))},s.up=function(e){s.edt={sllc_ldgr_code:e.sllc_ldgr_code,lc_code:e.lc_code,comp_code:e.comp_code,empname:e.em_number,ol_account_number:e.ol_account_number},s.account_number=e.ol_account_number,s.editmode=!0,s.newmode=!0,s.savebtn=!1,s.updatebtn=!0,s.readonly=!0,s.OtherLoanDetail=!1,s.OtherLoanOperation=!0},s.Update=function(){var t=s.edt,e=[],a=(t.opr="U",{LoanNumber:t.empname,CompanyName:t.comp_code,LoanName:t.lc_code,LedgerName:t.sllc_ldgr_code,ol_account_number:t.ol_account_number,opr:t.opr}),a=(e.push(a),s.filteredTodos.find(e=>e.ol_account_number===t.ol_account_number&&e.ol_account_number!==s.account_number));a?swal({text:"Record Already exists",imageUrl:"assets/img/notification-alert.png",width:300,height:200}):(i.post(d.apiUrl+"api/OtherLoan/OtherLoanCUD",e).then(function(t){s.msg1=t.data,s.OtherLoanOperation=!1,e=[],i.get(d.apiUrl+"api/OtherLoan/getOtherLoanDetail").then(function(e){s.OtherLoanData=e.data,s.totalItems=s.OtherLoanData.length,s.todos=s.OtherLoanData,s.makeTodos(),s.msg1=t.data,1==s.msg1?swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==s.msg1?swal({text:"Record Not Updated. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+s.msg1)})}),s.OtherLoanDetail=!0,s.OtherLoanOperation=!1)},s.check_all=function(){if(1==(c=document.getElementById("all_chk")).checked)for(var e=0;ea;a++)i.subData={},i.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,i.subData.att_date=e.sheets.Sheet1[a].Date,i.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,i.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,i.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,i.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,i.sheetsData.push(i.subData);n.post(d.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",i.sheetsData).then(function(e){i.em_numbers=e.data,i.datasend=[];for(var t=0;i.em_numbers.length>t;t++)i.em_numbers[t].emp_id_flag?(i.em_numbers[t].fcolor="black",i.modalbusy=!1):(i.em_numbers[t].fcolor="red",i.modalbusy=!1,i.errorlabel=!0)}),i.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else i.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),i.busy=!1,i.modalbusy=!1}),t={method:"POST",url:d.apiUrl+"/api/file/uploadDocument?filename="+i.filename.name+_("date")(new Date,"dd-MM-yyyy")+"-"+_("date")(new Date,"HH-mm-ss")+"&location=Docs/Student",data:l,headers:{"Content-Type":void 0}},n(t).success(function(e){e={sims_admission_user_code:o.globals.currentUser.username,sims_admission_doc_path:e};n.post(d.apiUrl+"api/document/insertdoc",e).then(function(e){i.ins=e.data,e.data?swal({title:"Document Uploaded Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Document Upload Failed, Check Connection",imageUrl:"assets/img/close.png"})})}),angular.forEach(angular.element("input[type='file']"),function(e){angular.element(e).val(null)}),i.CheckMultiple())},i.RemarkKeyUp=function(e,t,a){0a;a++)i.subData={},i.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,i.subData.att_date=e.sheets.Sheet1[a].Date,i.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,i.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,i.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,i.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,i.sheetsData.push(i.subData);n.post(d.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",i.sheetsData).then(function(e){i.em_numbers=e.data,i.datasend=[];for(var t=0;i.em_numbers.length>t;t++)i.em_numbers[t].emp_id_flag?(i.em_numbers[t].fcolor="black",i.modalbusy=!1):(i.em_numbers[t].fcolor="red",i.modalbusy=!1,i.errorlabel=!0)}),i.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else i.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),i.busy=!1,i.modalbusy=!1}),t={method:"POST",url:d.apiUrl+"/api/file/uploadDocument?filename="+i.filename.name+_("date")(new Date,"dd-MM-yyyy")+"-"+_("date")(new Date,"HH-mm-ss")+"&location=Docs/Student",data:l,headers:{"Content-Type":void 0}},n(t).success(function(e){e={sims_admission_user_code:o.globals.currentUser.username,sims_admission_doc_path:e};n.post(d.apiUrl+"api/document/insertdoc",e).then(function(e){i.ins=e.data,e.data?swal({title:"Document Uploaded Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Document Upload Failed, Check Connection",imageUrl:"assets/img/close.png"})})}),angular.forEach(angular.element("input[type='file']"),function(e){angular.element(e).val(null)}),i.CheckMultiple())},i.RemarkKeyUp=function(e,t,a){0i.pageCount()-5?i.pageCount()-5+1:t;a"),$(t.currentTarget).parents("tr").after(d)}}])}(),function(){"use strict";var s,c=[],r=[],e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("GratuityCriteriaCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,t,a,o,i,d){n.display=!1,n.pagesize="10",n.pageindex="0",n.pager=!0,n.grid=!0,n.edit_data=!1,n.GratCri_data=[],n.edit_code=!1,n.propertyName=null,n.reverse=!1,i.get(d.apiUrl+"api/OverTimeRate/getformuladesc").then(function(e){n.formuladesc=e.data}),i.get(d.apiUrl+"api/PDCSubmission/GetComp_Name").then(function(e){n.cmbCompany=e.data,1==e.data.length?(n.companyName=e.data[0].comp_name,n.finnComp=e.data[0].comp_code,i.get(d.apiUrl+"api/PDCSubmission/GetFinancial_year?comp_code="+n.finnComp).then(function(e){0=n.edt.grt_min_days||null==n.edt.grt_min_days?(s={grt_criteria_code:n.edt.grt_criteria_code,grt_criteria_name:n.edt.grt_criteria_name,grt_criteria_min_days:n.edt.grt_min_days,grt_pay_grade:n.edt.grt_pay_grade,grt_acct_code:n.edt.grt_acct_code,grt_bank_acct_code:n.edt.grt_bank_acct_code,grt_cash_acct_code:n.edt.grt_cash_acct_code,grt_airfare_acct_code:n.edt.grt_airfare_acct_code,grt_prov_acct_code:n.edt.grt_prov_acct_code,grt_status:n.edt.grt_status,grt_formula_code:n.edt.grt_formula_code,grt_working_days:n.edt.grt_working_days,grt_criteria_max_days:n.edt.grt_max_days,opr:"I"},e.push(s),i.post(d.apiUrl+"api/GratuityCriteria/CUDInsertpaysGratuityCriteria",e).then(function(e){n.msg1=e.data,1==n.msg1?swal({text:"Record Inserted Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==n.msg1?swal({text:"Record Not Inserted. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+n.msg1),n.getgrid()})):swal({text:"Max Criteria Days should be greater than Min Criteria Days",imageUrl:"assets/img/close.png",width:300,height:200}))},n.Update=function(e){var t,a,o,s;e&&(e=[],s=[],t=null!=n.edt.grt_year?365*n.edt.grt_year:0,a=null!=n.edt.grt_month?30*n.edt.grt_month:0,o=null!=n.edt.grt_days?0=n.edt.grt_min_days?(s={grt_criteria_code:n.edt.grt_criteria_code,grt_criteria_name:n.edt.grt_criteria_name,grt_criteria_min_days:n.edt.grt_min_days,grt_pay_grade:n.edt.grt_pay_grade,grt_acct_code:n.edt.grt_acct_code,grt_bank_acct_code:n.edt.grt_bank_acct_code,grt_cash_acct_code:n.edt.grt_cash_acct_code,grt_airfare_acct_code:n.edt.grt_airfare_acct_code,grt_prov_acct_code:n.edt.grt_prov_acct_code,grt_status:n.edt.grt_status,grt_formula_code:n.edt.grt_formula_code,grt_working_days:n.edt.grt_working_days,grt_criteria_max_days:n.edt.grt_max_days,opr:"U"},e.push(s),i.post(d.apiUrl+"api/GratuityCriteria/CUDInsertpaysGratuityCriteria",e).then(function(e){n.msg1=e.data,1==n.msg1?swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",width:300,height:200}):0==n.msg1?swal({text:"Record Not Updated.",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+n.msg1),n.operation=!1,n.getgrid()}),n.operation=!1,n.table1=!0):swal({text:"Max Criteria Days should be greater than Min Criteria Days",imageUrl:"assets/img/close.png",width:300,height:200}))},n.cancel=function(){n.grid=!0,n.display=!1,n.edt={grt_criteria_code:"",grt_criteria_name:"",grt_year:"",grt_month:"",grt_days:"",grt_prov_acct_code:"",grt_working_days:"",grt_criteria_min_days:"",grt_criteria_max_days:""},n.myForm.$setPristine(),n.myForm.$setUntouched()},n.Delete=function(){var o=[];n.flag=!1;for(var e,t=0;tparseFloat(s.edt.gr_max_basic)&&(swal({title:"Alert",text:"Minimum Basic Can Not Grater than Maximum Basic",showCloseButton:!0,width:380}),s.edt.gr_min_basic="")},s.Save=function(e){var t,a=[];e&&(0==s.update1?(""==s.edt.gr_amt&&(s.edt.gr_amt=0),t={gr_company_code:s.edt.gr_company_code,gr_code:s.edt.gr_code,gr_desc:s.edt.gr_desc,gr_category_code:s.edt.gr_category_code,gr_print_order:s.edt.gr_print_order,gr_min_basic:parseFloat(s.edt.gr_min_basic),gr_max_basic:parseFloat(s.edt.gr_max_basic),gr_amt:s.edt.gr_amt,opr:"I"},a.push(t),n.post(i.apiUrl+"api/common/PaysGrade/CUDPaysGrade",a).then(function(e){s.display=!0,s.msg1=e.data,1==s.msg1?swal({text:"Pays Grade Added Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):0==s.msg1?swal({text:"Pays Grade Not Added Successfully. ",imageUrl:"assets/img/close.png",showCloseButton:!0,width:380}).then(function(e){e&&s.getgrid()}):swal("Error-"+s.msg1)})):s.Update(e))},s.getgrid=function(){s.print_order=[];s.currentPage=1,n.get(i.apiUrl+"api/common/PaysGrade/Get_paygrade").then(function(e){s.display=!1,s.grid=!0,s.paysgrade_data=e.data,0s&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r=moment(r.edt.lt_start_date,"DD-MM-YYYY").format("YYYY-MM-DD")){for(var e=0,t=0;tparseFloat(v)&&0{const e=n.GetMapped_Employee.filter(e=>e.emp_code===t.emp_code&&e.leavelist);0{t.emp_leave_name&&e.forEach(e=>{e=e.leavelist.find(e=>e.emp_leave_name===t.emp_leave_name);e&&(e.emp_leave_available=t.emp_leave_available,e.emp_leave_maximum_days=t.emp_leave_maximum_days,e.emp_leave_days_taken=t.emp_leave_days_taken)})})}),n.todos=n.GetMapped_Employee,0=moment(n.edt.lt_start_date,"DD-MM-YYYY").format("YYYY-MM-DD")?i.get(d.apiUrl+"api/leavedetails/Get_approved_employee_list_filtered_by_date?leave_code="+n.edt.leave_type1+"&dept_code="+n.edt.comp_code+"&login_code="+$("#cmb_emps").find("option:selected").text()+"&start_date="+n.edt.lt_start_date+"&end_date="+n.edt.lt_end_date).then(function(e){n.Get_cancel_employee_list=e.data,"0"==n.Get_cancel_employee_list.length&&swal({title:"",text:"No data",confirmButtonText:"Yes",width:380}),n.busy=!1,n.searchtable_cancelapprove=!0}):(swal({title:"",text:"end date is less",confirmButtonText:"Yes",width:380}),isConfirm):(swal({title:"",text:"date is not valid",confirmButtonText:"Yes",width:380}),isConfirm)):i.get(d.apiUrl+"api/leavedetails/Get_approed_employee_list?leave_code="+n.edt.leave_type1+"&dept_code="+n.edt.comp_code+"&login_code="+$("#cmb_emps").find("option:selected").text()).then(function(e){n.Get_cancel_employee_list=e.data,n.busy=!1,n.searchtable_cancelapprove=!0}))};let c=[],r=(n.getfinsdepts=function(){n.filteredTodos_cancel=[],n.Get_approed_employee_list=[],n.filteredTodos_update=[],i.get(d.apiUrl+"api/leavedetails/Get_dept_Idcompany?compcode="+n.edt.compcode1).then(function(e){n.Getdepartment=e.data})},n.CheckEmployeeLeave=function(){$("#ApproveModal").modal({backdrop:"static"}),n.edt.leave_type="",n.edt.login_code="",i.get(d.apiUrl+"api/common/FinancialPeriod/getGetCompany").then(function(e){n.comp_data=e.data,0=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_dateparseInt(c)||parseInt(s.qualiList[a].em_qual_to_year)>parseInt(c))return void swal({title:"Alert",text:"Future year not allowed",timer:5e3,width:320});m=s.qualiList[a].emp_qual_qual_code;var o={emp_qual_em_code:s.popobj.emp_qual_em_code,emp_qual_qual_code:m,emp_qual_institute:s.qualiList[a].emp_qual_institute,emp_qual_type_code:s.qualiList[a].emp_qual_type_code,em_qual_from_month:s.qualiList[a].em_qual_from_month,em_qual_from_year:s.qualiList[a].em_qual_from_year,em_qual_to_month:s.qualiList[a].em_qual_to_month,em_qual_year:s.qualiList[a].em_qual_to_year,emp_qual_percentage:s.qualiList[a].emp_qual_percentage,emp_qual_remark:s.qualiList[a].emp_qual_remark,em_qual_status:s.qualiList[a].em_qual_status,opr:"I"};t.push(o)}i.post(d.apiUrl+"api/Qualification/CUDQualification?year=",t).then(function(e){s.msg1=e.data,swal({text:s.msg1.strMessage,timer:5e3}),s.display=!1,i.get(d.apiUrl+"api/Qualification/getAllQualification?data="+JSON.stringify(void 0)).then(function(e){s.obj1=e.data,s.totalItems=s.obj1.length,s.todos=s.obj1,s.makeTodos(),s.Table1234=!1}),t=[],s.grid=!0,s.display=!1,s.temp.emp_name_id=""})}},s.update=function(e){var t=[];if(e){for(var a=0;aparseInt(c)||parseInt(s.qualiList[a].em_qual_to_year)>parseInt(c))return void swal({title:"Alert",text:"Future year not allowed",timer:5e3,width:320});m=s.qualiList[a].emp_qual_qual_code;var o={emp_qual_em_code:s.popobj.emp_qual_em_code,emp_qual_qual_code:m,emp_qual_institute:s.qualiList[a].emp_qual_institute,emp_qual_type_code:s.qualiList[a].emp_qual_type_code,em_qual_from_month:s.qualiList[a].em_qual_from_month,em_qual_from_year:s.qualiList[a].em_qual_from_year,em_qual_to_month:s.qualiList[a].em_qual_to_month,em_qual_year:s.qualiList[a].em_qual_to_year,emp_qual_percentage:s.qualiList[a].emp_qual_percentage,emp_qual_remark:s.qualiList[a].emp_qual_remark,em_qual_status:s.qualiList[a].em_qual_status,opr:"U"};t.push(o)}0!=s.qualiList.length?i.post(d.apiUrl+"api/Qualification/UpadateQualification?simsobj2=",t).then(function(e){s.msg1=e.data,swal({text:s.msg1.strMessage,timer:5e3}),s.display=!1;e={emp_qual_qual_code:s.popobj.emp_qual_qual_code1,emp_qual_dept_code:s.popobj.emp_qual_dept_code1,emp_qual_company_code:s.popobj.emp_qual_company_code1};i.get(d.apiUrl+"api/Qualification/getAllQualification?data="+JSON.stringify(e)).then(function(e){s.obj1=e.data,s.totalItems=s.obj1.length,s.todos=s.obj1,s.makeTodos()}),s.grid=!0,s.display=!1}):swal({text:"You not edit correct record",timer:5e3})}},s.GetData=function(){void 0===s.temp.emp_qual_dept_code||""===s.temp.emp_qual_dept_code||void 0===s.temp.emp_qual_qual_code||""===s.temp.emp_qual_qual_code?swal({title:"Alert",text:"Please select department and qualification",width:360,height:200}):i.get(d.apiUrl+"api/Qualification/getAllQualification?data="+JSON.stringify(s.temp)).then(function(e){s.obj1=e.data,s.obj1<"0"?(swal({title:"Alert",text:"Please add qualification before searching",width:360,height:200}),s.Table1234=!0):(s.Table1234=!1,s.totalItems=s.obj1.length,s.todos=s.obj1,s.makeTodos())}),s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t);for(var a=0;a"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;as.edt.to_date&&(swal({title:"Please Select future Date",width:380,height:100}),s.edt.to_date="")},n(function(){$("#fixTable").tableHeadFixer({top:1})},100),n(function(){$("#fixTable1").tableHeadFixer({top:1})},100),i.get(o.apiUrl+"api/JVCreation/GetReportUrl?opr=J&sub_opr=SRI").then(function(e){s.final_doc_url=e.data}),i.get(o.apiUrl+"api/JVCreation/GetReportUrl?opr=J&sub_opr=SRI1").then(function(e){s.final_doc_url1=e.data}),s.Show=function(){void 0!==s.edt.search&&""!==s.edt.search||(s.edt.search=""),s.grades="",s.sections="",s.fee_type="";for(let e=0;e{e.running_total=0===t?parseFloat((parseFloat(e.sltr_dr_amount)+-1*parseFloat(e.sltr_cr_amount)+parseFloat(n.opbal_dr)+-1*parseFloat(n.opbal_cr)).toFixed(n.decimal_dsc)):parseFloat((parseFloat(n.accountDatashow[t-1].running_total)+parseFloat(e.sltr_dr_amount)+-1*parseFloat(e.sltr_cr_amount)).toFixed(n.decimal_dsc))}),n.totalItems=n.accountDatashow.length,n.todos=n.accountDatashow,n.makeTodos(),0"+t+''+a+""),s.close(),o.focus()},n.exportStaffResigned=function(){swal({title:"",text:"Are you sure you want to save "+n.acct_name+"_SLQueryDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){var s;e&&(n.accountDatashow&&0"),$(t.currentTarget).parents("tr").after(d),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a(P=r+"-"+l+"-"+m)&&(swal({title:"Alert",text:"Please Select Before Current Date",showCloseButton:!0,width:380}),i.temp.PostDate="")},i.AddintoGrid=function(t){if(t)if(null!=i.edt.gldd_tax_amount&&""!=i.edt.gldd_tax_amount&&null!=i.edt.gldd_tax_amount||(i.edt.gldd_tax_amount=0),i.flag1=!1,null==i.edt.gldd_acct_code||""==i.edt.gldd_acct_code)i.flag1=!0,swal({title:"Alert",text:"Please select Account name",showCloseButton:!0,width:380});else if(null==i.edt.gldd_doc_amount||""==i.edt.gldd_doc_amount)i.flag1=!0,swal({title:"Alert",text:"Please Enter Amount",showCloseButton:!0,width:380});else if(null==i.edt.slma_pty_bank_id||""==i.edt.slma_pty_bank_id)i.flag1=!0,swal({title:"Alert",text:"Please select bank name",showCloseButton:!0,width:380});else if(null==i.edt2||""==i.edt2.chequeno1||null==i.edt2.chequeno1)i.flag1=!0,swal({title:"Alert",text:"Please Enter Cheque Number",showCloseButton:!0,width:380});else if(null==i.temp1.ChequeDate||""==i.temp1.ChequeDate)i.flag1=!0,swal({title:"Alert",text:"Please Enter Cheque Date",showCloseButton:!0,width:380});else if(i.flag1=!1,!i.flag1){let e="";var t=document.getElementById("bankName"),t=t.options[t.selectedIndex].text,a=document.getElementById("cmb_acc_Code"),a=(i.selectedText=a.options[a.selectedIndex].text,document.getElementById("cmb_vat_Code"));i.selectedText_vat=a.options[a.selectedIndex].text,null==i.edt.gldd_doc_narr&&(i.edt.gldd_doc_narr=""),i.gldd_doc_narr1=i.edt.gldd_doc_narr,e=null==i.edt.sllc_ldgr_code||""==i.edt.sllc_ldgr_code?"00":i.edt.sllc_ldgr_code;for(let e=0;e=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}}else if("Select Records"===s.edt.SelectOption){if(s.pdcSubmissionList.length>=s.edt.txt_filter_range)for(let e=0;e=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}},s.search=function(){s.todos=s.searched(s.pdcSubmissionList,s.searchText),s.totalItems=s.todos.length,s.currentPage="1",""===s.searchText&&(s.todos=s.pdcSubmissionList)},s.isSearched=!1,s.filterRecords=function(e){s.isSearched=void 0!==e&&""!==e},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).ps_cheque_no.toLowerCase().indexOf(t.toLowerCase())||-1=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption){if(2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}}else if("Parent ID"===s.edt.SelectOption)for(let e=0;e=s.edt.txt_filter_range)for(let e=0;e=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption){if(2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}}else if("Parent ID"===s.edt.SelectOption)for(let e=0;e=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}}else if("Select Records"===s.edt.SelectOption){if(s.pdcSubmissionList.length>=s.edt.txt_filter_range)for(let e=0;e=t[0]&&s.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(t=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):t).length){s.minchkno=0;for(let e=s.maxchkno=0;e=s.minchkno&&s.pdcSubmissionList[e].ps_cheque_no<=s.maxchkno&&(document.getElementById(e+e).checked=!0,s.pdcSubmissionList[e].row_color="#ffffcc")}},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"}),s.check_post_date=function(){void 0===s.block1.pdc_clearance_date&&""===s.block1.pdc_clearance_date||n.get(i.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+s.block1.pdc_clearance_date+"&comp_cd="+d+"&fyear="+c).then(function(e){s.msg=e.data,""!==s.msg?(swal({title:"Alert",text:s.msg,width:300,height:200}),s.save_btn=!1):s.save_btn=!0})},s.isSearched=!1,s.filterRecords=function(e){void 0===e||""===e?(s.isSearched=!1,setTimeout(function(){for(var e=0;e=e[0]&&s.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,s.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(e=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):e).length){s.minchkno=0;for(var a=s.maxchkno=0;a=s.minchkno&&s.pdcSubmissionList[t].ps_cheque_no<=s.maxchkno&&(document.getElementById(t+t).checked=!0,s.pdcSubmissionList[t].row_color="#ffffcc")}}else if("Select Records"===s.edt.SelectOption){if(s.pdcSubmissionList.length>=s.edt.txt_filter_range)for(t=0;t=e[0]&&s.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,s.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"===s.edt.SelectOption&&2<=(e=void 0!==s.edt.txt_filter_range?s.edt.txt_filter_range.split("-"):e).length){s.minchkno=0;for(a=s.maxchkno=0;a=s.minchkno&&s.pdcSubmissionList[t].ps_cheque_no<=s.maxchkno&&(document.getElementById(t+t).checked=!0,s.pdcSubmissionList[t].row_color="#ffffcc")}},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"}),a(function(){$("#fixTable").tableHeadFixer({top:1})},100)}])}(),function(){"use strict";let u=[],g,h,f,y;var e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PDCSubmissionCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,t,a,o,i,d){n.save_btn=!0,n.tot_btn=!0,n.Maintabledata=!1,n.Update_btn=!1,n.busyindicator=!1,n.display=!1,n.table=!0,n.records=!1,n.edt=[];let s=t.globals.currentUser.username,_=(n.finnDetail=JSON.parse(window.localStorage.Finn_comp),setTimeout(function(){$("#account_codes7").select2()},100),n.finnDetail.company),c=n.finnDetail.year;t=new Date;n.block1={receipt_date:"receipt",cheque:"cheque",from_date:("0"+t.getDate()).slice(-2)+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+t.getFullYear(),to_date:("0"+t.getDate()).slice(-2)+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+t.getFullYear(),pc_submission_date:("0"+t.getDate()).slice(-2)+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+t.getFullYear()},$(function(){$("#Select4").multipleSelect({width:"100%"})}),n.propertyName=null,n.reverse=!1,n.sortBy=function(e){n.reverse=n.propertyName===e&&!n.reverse,n.propertyName=e},i.get(d.apiUrl+"api/Financialyear/getDocumentStatus").then(function(e){n.docstatus_Data=e.data}),i.get(d.apiUrl+"api/PDCSubmission/getBankName?comp_code="+_).then(function(e){n.bank_name=e.data,setTimeout(function(){$("#Select4").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),i.get(d.apiUrl+"api/PDCSubmission/GetCreatedBy_user").then(function(e){n.user_list=e.data}),i.get(d.apiUrl+"api/PDCSubmission/getDepartment?finance_year="+c+"&comp_code="+_).then(function(e){n.Department=e.data}),i.get(d.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+c+"&comp_code="+_).then(function(e){n.LdgrCode=e.data}),i.get(d.apiUrl+"api/JVCreation/GetAllGLActNo_pdc_sub?glma_accountcode=&cmpnycode="+_+"&fyear="+c).then(function(e){n.getAllAccNos=e.data}),n.getSLAccNo=function(){var e=n.getAllAccNos.gldd_acct_code;"00"!==n.block1.gldd_ledger_code?i.get(d.apiUrl+"api/JVCreation/GetSLAccNumber?ldgr_code="+n.block1.gldd_ledger_code+"&cmp_cd="+_+"&year="+c).then(function(e){n.getAllAccNos=e.data}):i.get(d.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+_+"&fyear="+c+"&user=").then(function(e){n.getAllAccNos=e.data})};let r,l=(n.getViewDetails=function(){$("#loader").modal({backdrop:"static",keyboard:!1}),h="cheque"===n.block1.cheque?"Ch":"Dd",g="receipt"===n.block1.receipt_date?"R":"C",y=[],y=void 0===n.block1.bank_code||0===n.block1.bank_code.length||void 0===n.block1?"":(r=n.block1.bank_code,y+","+r);var e={ps_comp_code:_,ps_dept_no:n.block1.dept_no,ps_ldgr_code:n.block1.gldd_ledger_code,ps_sl_acno:n.block1.gldd_acct_code,ps_discd:"O",pc_calendar:null,ps_bank_code:y,filterText:n.edt.SelectOption,filterRange:n.edt.txt_filter_range,createdBY:n.block1.createdby_usr,recFromDate:"R"===g?n.block1.from_date:null,recToDate:"R"===g?n.block1.to_date:null,ps_due_dateStr:"C"===g?n.block1.from_date:null,subMissionDate:"C"===g?n.block1.to_date:null,pc_ref_no:null,pc_payment_mode:h};i.post(d.apiUrl+"api/PDCSubmission/AllPDCSubmission_new_data",e).then(function(t){a(function(){$("#fixTable").tableHeadFixer({top:1})},100),0=t[0]&&n.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,n.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===n.edt.SelectOption&&2<=(t=void 0!==n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):t).length){n.minchkno=0;for(let e=n.maxchkno=0;e=n.minchkno&&n.pdcSubmissionList[e].ps_cheque_no<=n.maxchkno&&(document.getElementById(e+e).checked=!0,n.pdcSubmissionList[e].row_color="#ffffcc")}}else if("Select Records"===n.edt.SelectOption){if(n.pdcSubmissionList.length>=n.edt.txt_filter_range)for(let e=0;e=t[0]&&n.pdcSubmissionList[e].ps_amount<=t[1]&&(document.getElementById(e+e).checked=!0,n.pdcSubmissionList[e].row_color="#ffffcc")}else if("Cheque Series between"===n.edt.SelectOption&&2<=(t=void 0!==n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):t).length){n.minchkno=0;for(let e=n.maxchkno=0;e=n.minchkno&&n.pdcSubmissionList[e].ps_cheque_no<=n.maxchkno&&(document.getElementById(e+e).checked=!0,n.pdcSubmissionList[e].row_color="#ffffcc")}},n.checkAcctCode=function(t){t&&swal({title:"",text:"Do you want to apply to all selected cheques?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:400,cancelButtonText:"No"}).then(function(e){if(e)for(let e=0;e=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(var a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}}else if("Select Records"==n.edt.SelectOption){if(n.pdcSubmissionList.length>=n.edt.txt_filter_range)for(t=0;t=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}},n.showdate=function(e,t){var a=e.split("-")[0],o=e.split("-")[1],e=e.split("-")[2];n.temp[t]=a+"-"+o+"-"+e},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"})}])}(),function(){"use strict";var m,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("BankReconciliationCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(o,e,t,a,s,n,i){o.pagesize="10",o.pageindex=0,o.save_btn=!0,o.Update_btn=!1,o.display=!1,o.table=!0,a(function(){$("#fixTable").tableHeadFixer({top:1})},100);var a=new Date,d=a.getDate(),c=a.getMonth()+1,r=a.getFullYear();o.temp={enddate1:d+"-"+c+"-"+r},o.finnDetail=JSON.parse(window.localStorage.Finn_comp);var d=(a=new Date).getDate(),c=a.getMonth()+1,d=(a.getFullYear(),(a=new Date).getDate()),l=t.globals.currentUser.username;d<10&&(d="0"+d);(c=a.getMonth()+1)<10&&(c="0"+c);r=a.getFullYear(),o.sdate=d+"-"+c+"-"+r,o.edate=d+"-"+c+"-"+r,o.startdate=d+"-"+c+"-"+r,o.mom_end_date=d+"-"+c+"-"+r,o.finnDetail.company,a=o.finnDetail.year,d=new Date,c=d.getMonth()+1,r=d.getDate(),o.currentDate=(r=r<10?"0"+r:r)+"-"+(c=c<10?"0"+c:c)+"-"+d.getFullYear(),o.Prepare=function(e,t,a){$("#loader").modal({backdrop:"static",keyboard:!1});n.get(i.apiUrl+"api/BankRecancellation/getAllBankRecancellation?start_date="+e+"&end_date="+t+"&acct_code="+a+"&flag=P").then(function(e){if(o.All_Details=e.data,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop"),0moment(e)&&(o.temp.startdate="",swal({title:"Alert",text:"Please select date between "+o.sDate+" to "+o.eDate+" in financial year",showCloseButton:!0,width:380}))},o.onChange=function(){var e=moment(o.sDate,"DD-MM-YYYY").format("YYYY-MM-DD"),t=moment(o.temp.startdate,"DD-MM-YYYY").format("YYYY-MM-DD");moment(t)"+t+''+e+""),o.close(),a.focus()}}])}(),function(){"use strict";var g,h=[],e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PdcPaymentSubmissionCont",["$scope","$state","$rootScope","$filter","$timeout","gettextCatalog","$http","ENV",function(d,e,t,a,o,s,_,c){t.globals.currentUser.username;d.finnDetail=JSON.parse(window.localStorage.Finn_comp);var r=d.finnDetail.company,n=d.finnDetail.year,l=t.globals.currentUser.username.toLowerCase(),t=(d.pagesize="5",d.pageindex=0,d.save_btn=!0,d.display=!0,d.table=!1,d.filterVisible=!1,d.edt1={copy1:"S"},new Date),m=t.getDate(),p=t.getMonth()+1,u=(p<10&&(p="0"+p),t.getFullYear());d.sdate=m+"-"+p+"-"+u,d.edate=m+"-"+p+"-"+u,d.temp1={startdate:m+"-"+p+"-"+u,enddate:m+"-"+p+"-"+u},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),d.total=0,_.get(c.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+r).then(function(e){d.Departments=e.data}),d.temp={chk_previous_clear:!0},d.ClearPreviousChange=function(e){},d.ShowFilterText=function(e){d.filterVisible=""!==e},$(function(){$("#app_on1").multipleSelect({width:"100%"})}),_.get(c.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){d.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),d.myFunct=function(e){13===e.which&&(d.temp.startdate=m+"-"+p+"-"+u)},d.myFunct1=function(e){13===e.which&&(d.temp.enddate=m+"-"+p+"-"+u)},d.PooData=function(){var e,t;d.flag1=!1,null===d.temp1.startdate||""===d.temp1.startdate?(d.flag1=!0,swal({title:"Alert",text:"Please Select Start Date",showCloseButton:!0,width:380})):null!==d.temp1.enddate&&""!==d.temp1.enddate||(d.flag1=!0,swal({title:"Alert",text:"Please Select End Date",showCloseButton:!0,width:380})),d.flag||(e=d.temp1.startdate,t=d.temp1.enddate,_.get(c.apiUrl+"api/PDCBillOtherProcess/getPDC_Bills_Pool_data?compcode="+r+"&from_date="+e+"&to_date="+t).then(function(e){d.PoolData=e.data,swal({title:"Alert",text:d.PoolData,showCloseButton:!0,width:380})}))},_.get(c.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+n+"&comp_code="+r).then(function(e){d.LdgrCode=e.data}),_.get(c.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+r+"&fyear="+n).then(function(e){d.getAllAccNos=e.data}),d.getSLAccNo=function(e){d.getAllAccNos=[],"00"===e||void 0===e?_.get(c.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+d.temp.payable_acc_code+"&cmpnycode="+r+"&fyear="+n).then(function(e){d.getAllAccNos=e.data}):_.get(c.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+r+"&fyear="+n).then(function(e){d.getAllAccNos=e.data})},d.ChkDate=function(e){e.split("-")[0]+"-"+e.split("-")[1]+"-"+e.split("-")[2]=e[0]&&d.GetAllPDCBillsData[t].pb_amount<=e[1]&&(document.getElementById(t).checked=!0,d.GetAllPDCBillsData[t].row_color="#ffffcc")}else if("Cheque Series between"===d.edt.SelectOption&&2<=(e=void 0!==d.edt.txt_filter_range?d.edt.txt_filter_range.split("-"):e).length){d.minchkno=0;for(var a=d.maxchkno=0;a=d.minchkno&&d.GetAllPDCBillsData[t].pb_cheque_no<=d.maxchkno&&(document.getElementById(t).checked=!0,d.GetAllPDCBillsData[t].row_color="#ffffcc")}}else if("Select Records"===d.edt.SelectOption){if(d.GetAllPDCBillsData.length>=d.edt.txt_filter_range)for(t=0;t=e[0]&&d.GetAllPDCBillsData[t].pb_amount<=e[1]&&(document.getElementById(t).checked=!0,d.GetAllPDCBillsData[t].row_color="#ffffcc")}else if("Cheque Series between"===d.edt.SelectOption&&2<=(e=void 0!==d.edt.txt_filter_range?d.edt.txt_filter_range.split("-"):e).length){d.minchkno=0;for(a=d.maxchkno=0;a=d.minchkno&&d.GetAllPDCBillsData[t].pb_cheque_no<=d.maxchkno&&(document.getElementById(t).checked=!0,d.GetAllPDCBillsData[t].row_color="#ffffcc")}}}])}(),function(){"use strict";var f,y,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PdcPaymentResubmissionCont",["$scope","$state","$rootScope","$filter","$timeout","gettextCatalog","$http","ENV",function(l,e,t,a,o,s,d,c){t.globals.currentUser.username;l.finnDetail=JSON.parse(window.localStorage.Finn_comp);var r=l.finnDetail.company,n=l.finnDetail.company,m=l.finnDetail.year,p=t.globals.currentUser.username.toLowerCase(),t=(l.pagesize="5",l.pageindex=0,l.save_btn=!0,l.display=!0,l.table=!1,l.filterVisible=!1,l.edt1={copy1:"S"},new Date),u=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());l.sdate=u+"-"+g+"-"+h,l.edate=u+"-"+g+"-"+h,l.temp1={startdate:u+"-"+g+"-"+h,enddate:u+"-"+g+"-"+h},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),l.total=0,d.get(c.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+r).then(function(e){l.Departments=e.data}),l.size=function(e){l.pagesize=e,l.currentPage=1,l.numPerPage=e,l.makeTodos()},l.index=function(e){l.pageindex=e,l.currentPage=e,l.makeTodos(),f.checked=!1,l.row1=""},l.temp={chk_previous_clear:!0},l.ClearPreviousChange=function(e){},l.ShowFilterText=function(e){l.filterVisible=""!==e},$(function(){$("#app_on1").multipleSelect({width:"100%"})}),l.filteredTodos=[],l.currentPage=1,l.numPerPage=5,l.maxSize=5,d.get(c.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){l.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),l.makeTodos=function(){var e=parseInt(l.totalItems%l.numPerPage),e=(l.pagersize="0"===e?parseInt(l.totalItems/l.numPerPage):parseInt(l.totalItems/l.numPerPage)+1,(l.currentPage-1)*l.numPerPage),t=parseInt(e)+parseInt(l.numPerPage);l.filteredTodos=l.todos.slice(e,t)},l.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_sl_acno_name.toLowerCase().indexOf(t.toLowerCase())||e.pb_amount===t;var t})},l.myFunct=function(e){13===e.which&&(l.temp.startdate=u+"-"+g+"-"+h)},l.myFunct1=function(e){13===e.which&&(l.temp.enddate=u+"-"+g+"-"+h)},d.get(c.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+m+"&comp_code="+n).then(function(e){l.LdgrCode=e.data}),d.get(c.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+n+"&fyear="+m).then(function(e){l.getAllAccNos=e.data}),l.GetAllGLAcc=function(e,t){d.get(c.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+n+"&fyear="+m).then(function(e){l.getAllAccNos=e.data})},l.getSLAccNo=function(e){l.getAllAccNos=[],"00"===e||void 0===e?l.GetAllGLAcc(l.temp.payable_acc_code,r):d.get(c.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+n+"&fyear="+m).then(function(e){l.getAllAccNos=e.data}),""===cmbvalue?(l.edt.gldd_acct_code="",l.edt1.coad_dept_no="",$("#cmb_acc_Code").select2("val",cmbvalue)):l.edt.gldd_acct_code=cmbvalue},l.getBankDetails=function(){d.get(c.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){l.BankDetails=e.data})},l.ChkDate=function(e){e.split("-")[0]+"-"+e.split("-")[1]+"-"+e.split("-")[2]=e[0]&&l.GetAllPDCBillsData[o].pb_amount<=e[1]&&(document.getElementById(o).checked=!0,l.GetAllPDCBillsData[o].row_color="#ffffcc")}else if("Cheque Series between"===l.edt.SelectOption&&2<=(e=void 0!==l.edt.txt_filter_range?l.edt.txt_filter_range.split("-"):e).length){l.minchkno=0;for(var s=l.maxchkno=0;s=l.minchkno&&l.GetAllPDCBillsData[n].pb_cheque_no<=l.maxchkno&&(document.getElementById(n).checked=!0,l.GetAllPDCBillsData[n].row_color="#ffffcc")}}else if("Select Records"===l.edt.SelectOption){if(l.GetAllPDCBillsData.length>=l.edt.txt_filter_range)for(var d=0;d=e[0]&&l.GetAllPDCBillsData[_].pb_amount<=e[1]&&(document.getElementById(_).checked=!0,l.GetAllPDCBillsData[_].row_color="#ffffcc")}else if("Cheque Series between"===l.edt.SelectOption&&2<=(e=void 0!==l.edt.txt_filter_range?l.edt.txt_filter_range.split("-"):e).length){l.minchkno=0;for(var c=l.maxchkno=0;c=l.minchkno&&l.GetAllPDCBillsData[r].pb_cheque_no<=l.maxchkno&&(document.getElementById(r).checked=!0,l.GetAllPDCBillsData[r].row_color="#ffffcc")}}}])}(),function(){"use strict";var f,y,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PdcPaymentReturnCont",["$scope","$state","$rootScope","$filter","$timeout","gettextCatalog","$http","ENV",function(c,e,t,a,o,s,r,l){c.finnDetail=JSON.parse(window.localStorage.Finn_comp);var m=c.finnDetail.company,n=c.finnDetail.company,d=c.finnDetail.year,p=t.globals.currentUser.username.toLowerCase(),t=(c.pagesize="5",c.pageindex=0,c.save_btn=!0,c.display=!0,c.table=!1,c.filterVisible=!1,c.edt1={copy1:"S"},new Date),u=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());c.sdate=u+"-"+g+"-"+h,c.edate=u+"-"+g+"-"+h,c.temp1={startdate:u+"-"+g+"-"+h,enddate:u+"-"+g+"-"+h},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),c.total=0,r.get(l.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+m).then(function(e){c.Departments=e.data}),c.size=function(e){c.pagesize=e,c.currentPage=1,c.numPerPage=e,c.makeTodos()},c.index=function(e){c.pageindex=e,c.currentPage=e,c.makeTodos(),f.checked=!1,c.row1=""},c.temp={chk_previous_clear:!0},c.ClearPreviousChange=function(e){},c.ShowFilterText=function(e){c.filterVisible=""!==e},$(function(){$("#app_on1").multipleSelect({width:"100%"})}),c.filteredTodos=[],c.currentPage=1,c.numPerPage=5,c.maxSize=5,r.get(l.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){c.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),c.makeTodos=function(){var e=parseInt(c.totalItems%c.numPerPage),e=(c.pagersize="0"===e?parseInt(c.totalItems/c.numPerPage):parseInt(c.totalItems/c.numPerPage)+1,(c.currentPage-1)*c.numPerPage),t=parseInt(e)+parseInt(c.numPerPage);c.filteredTodos=c.todos.slice(e,t)},c.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_sl_acno_name.toLowerCase().indexOf(t.toLowerCase())||e.pb_amount===t;var t})},c.myFunct=function(e){13===e.which&&(c.temp.startdate=u+"-"+g+"-"+h)},c.myFunct1=function(e){13===e.which&&(c.temp.enddate=u+"-"+g+"-"+h)},r.get(l.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+d+"&comp_code="+n).then(function(e){c.LdgrCode=e.data}),r.get(l.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data}),c.GetAllGLAcc=function(e,t){r.get(l.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data})},c.getSLAccNo=function(e){c.getAllAccNos=[],"00"===e||void 0===e?c.GetAllGLAcc(c.temp.payable_acc_code,m):r.get(l.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data}),""===cmbvalue?(c.edt.gldd_acct_code="",c.edt1.coad_dept_no="",$("#cmb_acc_Code").select2("val",cmbvalue)):c.edt.gldd_acct_code=cmbvalue},c.getBankDetails=function(){r.get(l.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){c.BankDetails=e.data})},c.ChkDate=function(e){e.split("-")[0]+"-"+e.split("-")[1]+"-"+e.split("-")[2]=t[0]&&c.GetAllPDCBillsData[e].pb_amount<=t[1]&&(document.getElementById(e).checked=!0,c.GetAllPDCBillsData[e].row_color="#ffffcc")}else if("Cheque Series between"===c.edt.SelectOption&&2<=(t=void 0!==c.edt.txt_filter_range?c.edt.txt_filter_range.split("-"):t).length){c.minchkno=0;for(let e=c.maxchkno=0;e=c.minchkno&&c.GetAllPDCBillsData[e].pb_cheque_no<=c.maxchkno&&(document.getElementById(e).checked=!0,c.GetAllPDCBillsData[e].row_color="#ffffcc")}}else if("Select Records"===c.edt.SelectOption){if(c.GetAllPDCBillsData.length>=c.edt.txt_filter_range)for(let e=0;e=t[0]&&c.GetAllPDCBillsData[e].pb_amount<=t[1]&&(document.getElementById(e).checked=!0,c.GetAllPDCBillsData[e].row_color="#ffffcc")}else if("Cheque Series between"===c.edt.SelectOption&&2<=(t=void 0!==c.edt.txt_filter_range?c.edt.txt_filter_range.split("-"):t).length){c.minchkno=0;for(let e=c.maxchkno=0;e=c.minchkno&&c.GetAllPDCBillsData[e].pb_cheque_no<=c.maxchkno&&(document.getElementById(e).checked=!0,c.GetAllPDCBillsData[e].row_color="#ffffcc")}}}])}(),function(){"use strict";var f,y,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PdcPaymentCancelCont",["$scope","$state","$rootScope","$filter","$timeout","gettextCatalog","$http","ENV",function(d,e,t,a,o,s,c,r){d.finnDetail=JSON.parse(window.localStorage.Finn_comp);var l=d.finnDetail.company,n=d.finnDetail.company,m=d.finnDetail.year,p=t.globals.currentUser.username.toLowerCase(),t=(d.pagesize="5",d.pageindex=0,d.save_btn=!0,d.display=!0,d.table=!1,d.filterVisible=!1,d.edt1={copy1:"S"},new Date),u=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());d.sdate=u+"-"+g+"-"+h,d.edate=u+"-"+g+"-"+h,d.temp1={startdate:u+"-"+g+"-"+h,enddate:u+"-"+g+"-"+h},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),d.total=0,c.get(r.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+l).then(function(e){d.Departments=e.data}),d.size=function(e){d.pagesize=e,d.currentPage=1,d.numPerPage=e},d.index=function(e){d.pageindex=e,d.currentPage=e,f.checked=!1,d.row1=""},d.temp={chk_previous_clear:!0},d.ClearPreviousChange=function(e){},d.ShowFilterText=function(e){d.filterVisible=""!=e},$(function(){$("#app_on1").multipleSelect({width:"100%"})}),d.filteredTodos=[],d.currentPage=1,d.numPerPage=5,d.maxSize=5,c.get(r.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){d.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),d.makeTodos=function(){var e=parseInt(d.totalItems%d.numPerPage),e=(d.pagersize="0"==e?parseInt(d.totalItems/d.numPerPage):parseInt(d.totalItems/d.numPerPage)+1,(d.currentPage-1)*d.numPerPage),t=parseInt(e)+parseInt(d.numPerPage);d.filteredTodos=d.todos.slice(e,t)},d.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_sl_acno_name.toLowerCase().indexOf(t.toLowerCase())||e.pb_amount===t;var t})},d.myFunct=function(e){13==e.which&&(d.temp.startdate=u+"-"+g+"-"+h)},d.myFunct1=function(e){13==e.which&&(d.temp.enddate=u+"-"+g+"-"+h)},c.get(r.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+m+"&comp_code="+n).then(function(e){d.LdgrCode=e.data}),c.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+n+"&fyear="+m).then(function(e){d.getAllAccNos=e.data}),d.GetAllGLAcc=function(e,t){c.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+n+"&fyear="+m).then(function(e){d.getAllAccNos=e.data})},d.getSLAccNo=function(e){d.getAllAccNos=[],"00"==e||null==e?d.GetAllGLAcc(d.temp.payable_acc_code,l):c.get(r.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+n+"&fyear="+m).then(function(e){d.getAllAccNos=e.data}),""===cmbvalue?(d.edt.gldd_acct_code="",d.edt1.coad_dept_no="",$("#cmb_acc_Code").select2("val",cmbvalue)):d.edt.gldd_acct_code=cmbvalue},d.getBankDetails=function(){c.get(r.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){d.BankDetails=e.data})},d.ChkDate=function(e){e.split("-")[0]+"-"+e.split("-")[1]+"-"+e.split("-")[2]=t[0]&&d.GetAllPDCBillsData[e].pb_amount<=t[1]&&(document.getElementById(e).checked=!0,d.GetAllPDCBillsData[e].row_color="#ffffcc")}else if("Cheque Series between"===d.edt.SelectOption&&2<=(t=null!=d.edt.txt_filter_range?d.edt.txt_filter_range.split("-"):t).length){d.minchkno=0;for(let e=d.maxchkno=0;e=d.minchkno&&d.GetAllPDCBillsData[e].pb_cheque_no<=d.maxchkno&&(document.getElementById(e).checked=!0,d.GetAllPDCBillsData[e].row_color="#ffffcc")}}else if("Select Records"===d.edt.SelectOption){if(d.GetAllPDCBillsData.length>=d.edt.txt_filter_range)for(let e=0;e=t[0]&&d.GetAllPDCBillsData[e].pb_amount<=t[1]&&(document.getElementById(e).checked=!0,d.GetAllPDCBillsData[e].row_color="#ffffcc")}else if("Cheque Series between"===d.edt.SelectOption&&2<=(t=null!=d.edt.txt_filter_range?d.edt.txt_filter_range.split("-"):t).length){d.minchkno=0;for(let e=d.maxchkno=0;e=d.minchkno&&d.GetAllPDCBillsData[e].pb_cheque_no<=d.maxchkno&&(document.getElementById(e).checked=!0,d.GetAllPDCBillsData[e].row_color="#ffffcc")}}}])}(),function(){"use strict";var f,y=[],e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PdcPaymentRealizeCont",["$scope","$state","$rootScope","$filter","$timeout","gettextCatalog","$http","ENV",function(c,e,t,a,o,s,r,l){t.globals.currentUser.username;c.finnDetail=JSON.parse(window.localStorage.Finn_comp);var m=c.finnDetail.company,n=c.finnDetail.company,d=c.finnDetail.year,p=t.globals.currentUser.username.toLowerCase(),t=(c.pagesize="5",c.pageindex=0,c.save_btn=!0,c.display=!0,c.table=!1,c.filterVisible=!1,c.edt1={copy1:"S"},new Date),u=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),u<10&&(u="0"+u),t.getFullYear());c.sdate=u+"-"+g+"-"+h,c.edate=u+"-"+g+"-"+h,c.temp1={startdate:u+"-"+g+"-"+h,enddate:u+"-"+g+"-"+h,ps_approv_date:u+"-"+g+"-"+h},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),r.get(l.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+m).then(function(e){c.Departments=e.data}),c.size=function(e){c.pagesize=e,c.currentPage=1,c.numPerPage=e,c.makeTodos()},c.index=function(e){c.pageindex=e,c.currentPage=e,c.makeTodos(),y.checked=!1,c.row1=""},c.temp={chk_previous_clear:!0},c.ClearPreviousChange=function(e){},c.ShowFilterText=function(e){c.filterVisible=""!==e},c.total=0,$(function(){$("#app_on1").multipleSelect({width:"100%"})}),c.filteredTodos=[],c.currentPage=1,c.numPerPage=5,c.maxSize=5,r.get(l.apiUrl+"api/PDCBill/getGlAcctBankDetails?comp_code="+n+"&fyear="+d).then(function(e){c.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),c.makeTodos=function(){var e=parseInt(c.totalItems%c.numPerPage),e=(c.pagersize="0"==e?parseInt(c.totalItems/c.numPerPage):parseInt(c.totalItems/c.numPerPage)+1,(c.currentPage-1)*c.numPerPage),t=parseInt(e)+parseInt(c.numPerPage);c.filteredTodos=c.todos.slice(e,t)},c.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_sl_acno_name.toLowerCase().indexOf(t.toLowerCase())||e.pb_amount===t;var t})},c.myFunct=function(e){13==e.which&&(c.temp.startdate=u+"-"+g+"-"+h)},c.myFunct1=function(e){13==e.which&&(c.temp.enddate=u+"-"+g+"-"+h)},r.get(l.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+d+"&comp_code="+n).then(function(e){c.LdgrCode=e.data}),r.get(l.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data}),c.GetAllGLAcc=function(e,t){r.get(l.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data})},c.getSLAccNo=function(e){c.getAllAccNos=[],"00"==e||null==e?c.GetAllGLAcc(c.temp.payable_acc_code,m):r.get(l.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+n+"&fyear="+d).then(function(e){c.getAllAccNos=e.data}),""===cmbvalue?(c.edt.gldd_acct_code="",c.edt1.coad_dept_no="",$("#cmb_acc_Code").select2("val",cmbvalue)):c.edt.gldd_acct_code=cmbvalue},c.getBankDetails=function(){r.get(l.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){c.BankDetails=e.data})},c.ChkDate=function(e){e.split("-")[0]+"-"+e.split("-")[1]+"-"+e.split("-")[2]=e[0]&&c.GetAllPDCBillsData[t].pb_amount<=e[1]&&(document.getElementById(t).checked=!0,c.GetAllPDCBillsData[t].row_color="#ffffcc")}else if("Cheque Series between"===c.edt.SelectOption&&2<=(e=null!=c.edt.txt_filter_range?c.edt.txt_filter_range.split("-"):e).length){c.minchkno=0;for(var a=c.maxchkno=0;a=c.minchkno&&c.GetAllPDCBillsData[t].pb_cheque_no<=c.maxchkno&&(document.getElementById(t).checked=!0,c.GetAllPDCBillsData[t].row_color="#ffffcc")}}else if("Select Records"===c.edt.SelectOption){if(c.GetAllPDCBillsData.length>=c.edt.txt_filter_range)for(t=0;t=e[0]&&c.GetAllPDCBillsData[t].pb_amount<=e[1]&&(document.getElementById(t).checked=!0,c.GetAllPDCBillsData[t].row_color="#ffffcc")}else if("Cheque Series between"===c.edt.SelectOption&&2<=(e=null!=c.edt.txt_filter_range?c.edt.txt_filter_range.split("-"):e).length){c.minchkno=0;for(a=c.maxchkno=0;a=c.minchkno&&c.GetAllPDCBillsData[t].pb_cheque_no<=c.maxchkno&&(document.getElementById(t).checked=!0,c.GetAllPDCBillsData[t].row_color="#ffffcc")}},r.get(l.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){c.decimal_degit=e.data,c.decimal_dsc=c.decimal_degit[0].comp_curcy_dec}),r.get(l.apiUrl+"api/GLSLQuery/getDate_SL_Query?finance_year="+d).then(function(e){c.getDates=e.data,0{a.gldd_tax_acct_code&&e.forEach((e,t)=>{o!==t&&a.gldd_acct_code===e.gldd_tax_acct_code&&(a.gldd_tax_amount=(parseFloat(e.gldd_doc_amount_debit)+parseFloat(e.gldd_doc_amount_credit)).toFixed(i.decimal_dsc))})}),a=e,d.post(_.apiUrl+"api/BankPayment/Insert_JV_Fins_temp_doc_details_vatFin",a).then(function(e){if(i.msg1=e.data,""!=i.prvno&&!0===i.msg1){if(!0===i.vis.update){if(swal({title:"Alert",text:"Document Updated Successfully\nProvision No.:"+i.temp_doc.gltd_doc_code+"-"+i.prvno,width:300,height:200}),0{throw new Error("Something went wrong")},6e4);n.opening_data=e.data,console.log("opening_data",n.trans_data);for(var a=0;a{if(e[0]&&(null!=e[0].glma_acct_code||""!=e[0].glma_acct_code))return e=e[0].glma_acct_code,!t.has(e)&&(t.set(e,!0),!0)})}(n.trans_drcr_value)})},n.exportStaffResigned=function(){swal({title:"",text:"Are you sure you want to Save "+n.acct_name+"_GLQueryDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){if(e){for(var e=document.getElementById("printdata4").cloneNode(!0),t=e.getElementsByTagName("tr"),a=t.length-1;0<=a;a--)""===t[a].textContent.trim()&&t[a].parentNode.removeChild(t[a]);e=new Blob([e.innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"});saveAs(e,n.acct_name+"_GLQueryDetails.xls")}})},n.printStaffResigned=function(e){var t=document.head.outerHTML,a=document.getElementById("printdata4").outerHTML,o=window.open("","_blank","location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=800, height=600, resizable=yes, screenX=250, screenY=10, personalbar=no, scrollbars=yes"),s=o.document;s.open(),s.write(""+t+''+a+""),s.close(),o.focus()},n.maxmize=function(){$("#jv_Voucher").css({height:"100%",width:"100%"}),n.windowflg=!0},n.manimize=function(){$("#jv_Voucher").css({height:"600px",width:"900px"}),n.windowflg=!1},s.get(i.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){n.decimal_degit=e.data,n.decimal_dsc=n.decimal_degit[0].comp_curcy_dec}),n.back=function(){n.report_show=!0},n.closemodal=function(){n.report_show=!0},n.UpdatedVoucherDetails=function(e,t,a){$("#myModal4").modal("hide"),$("#updatedVoucherDetails").modal("show"),s.get(i.apiUrl+"api/GLSLQuery/getUpdatedVoucherRecords?comp_code="+e+"&doccode="+t+"&doc_no="+a).then(function(e){n.VoucherData=e.data})},n.closeReportmodal=function(){$("#myModal4").modal("hide"),$("#reportModal").modal("hide")},s.get(i.apiUrl+"api/JVCreation/GetReportUrl?opr=J&sub_opr=Final").then(function(e){n.voucher_doc_url=e.data}),n.exportDetailsVoucher=function(){swal({title:"",text:"Are you sure you want to Save "+n.acct_name+"_GLQueryVoucherDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("DetailsOfSelectedVoucher").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,n.acct_name+"_GLQueryVoucherDetails.xls"))})},n.countData=[{val:15,data:15},{val:50,data:50},{val:100,data:100}],n.index=function(e,t){n.pageindex=e,n.currentPage=e,console.log("currentPage="+n.currentPage),n.makeTodos(e,t),n.chk={},n.chk.chk_all=!1,n.row1=""},n.makeTodos=function(e,t){n.test1=[];for(var a,o,s=0;ss.post(i.apiUrl+"api/GLSLQuery/list_All_GL_QueryNew?comp_code="+p+"&acct_code="+n.acc_name+"&doc_code="+n.block1.gltd_doc_code+"&from_date="+n.block1.from_date+"&to_date="+n.block1.to_date)).then(e=>{if(n.loadata=!0,n.trans_data=e.data,n.count+=n.trans_data.length,n.trans_datafinal.push(n.trans_data),n.trans_data1=n.trans_datafinal,n.new_i===n.block1.gldd_acct_code.length-1){if(3400{e&&(n.tble_show=!1,n.exportToExcel())});n.getViewDetails()}}).catch(e=>{console.error("Error during $http call:",e)})}}))},n.getViewDetails=function(){if(n.count=0,!n.block1.gldd_acct_code||null===n.block1.gldd_acct_code||void 0===n.block1.gldd_acct_code||n.block1.gldd_acct_code.length<=0)swal({title:"",text:"Please select the account",showCloseButton:!0,showCancelButton:!0});else{n.tble_show=!0,n.view=!0,n.total=!1;for(var e=0;e{if(e[0]&&(null!=e[0].glma_acct_code||""!=e[0].glma_acct_code))return e=e[0].glma_acct_code,!t.has(e)&&(t.set(e,!0),!0)})}(n.trans_drcr_value)})},n.exportStaffResigned=function(){swal({title:"",text:"Are you sure you want to Save "+n.acct_name+"_GLQueryDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){if(e){for(var e=document.getElementById("printdata4").cloneNode(!0),t=e.getElementsByTagName("tr"),a=t.length-1;0<=a;a--)""===t[a].textContent.trim()&&t[a].parentNode.removeChild(t[a]);e=new Blob([e.innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"});saveAs(e,n.acct_name+"_GLQueryDetails.xls")}})},n.printStaffResigned=function(e){var t=document.head.outerHTML,a=document.getElementById("printdata4").outerHTML,o=window.open("","_blank","location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=800, height=600, resizable=yes, screenX=250, screenY=10, personalbar=no, scrollbars=yes"),s=o.document;s.open(),s.write(""+t+''+a+""),s.close(),o.focus()},n.maxmize=function(){$("#jv_Voucher").css({height:"100%",width:"100%"}),n.windowflg=!0},n.manimize=function(){$("#jv_Voucher").css({height:"600px",width:"900px"}),n.windowflg=!1},s.get(i.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){n.decimal_degit=e.data,n.decimal_dsc=n.decimal_degit[0].comp_curcy_dec}),n.back=function(){n.report_show=!0},n.closemodal=function(){n.report_show=!0},n.UpdatedVoucherDetails=function(e,t,a){$("#myModal4").modal("hide"),$("#updatedVoucherDetails").modal("show"),s.get(i.apiUrl+"api/GLSLQuery/getUpdatedVoucherRecords?comp_code="+e+"&doccode="+t+"&doc_no="+a).then(function(e){n.VoucherData=e.data})},n.closeReportmodal=function(){$("#myModal4").modal("hide"),$("#reportModal").modal("hide")},s.get(i.apiUrl+"api/JVCreation/GetReportUrl?opr=J&sub_opr=Final").then(function(e){n.voucher_doc_url=e.data}),n.exportDetailsVoucher=function(){swal({title:"",text:"Are you sure you want to Save "+n.acct_name+"_GLQueryVoucherDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("DetailsOfSelectedVoucher").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,n.acct_name+"_GLQueryVoucherDetails.xls"))})},n.countData=[{val:15,data:15},{val:50,data:50},{val:100,data:100}],n.index=function(e,t){n.pageindex=e,n.currentPage=e,console.log("currentPage="+n.currentPage),n.makeTodos(e,t),n.chk={},n.chk.chk_all=!1,n.row1=""},n.makeTodos=function(e,t){n.test1=[];for(var a,o,s=0;smoment(e)&&(_.edt.FromDate="",swal({title:"Alert",text:"Please select date between "+_.sDate+" to "+_.eDate+" in financial year",showCloseButton:!0,width:380}))},_.onChange=function(){var e=moment(_.sDate,"DD-MM-YYYY").format("YYYY-MM-DD"),t=moment(_.edt.FromDate,"DD-MM-YYYY").format("YYYY-MM-DD");moment(t)"+t+''+a+""),s.close(),o.focus()},_.exportStaffResigned=function(){swal({title:"",text:"Are you sure you want to Save "+_.acct_name+"_SLQueryDetails.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("printdata33").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,_.obj1.lic_school_name+_.acct_name+"_SLQueryDetails.xls"))})},_.back=function(){_.report_show=!0},c.get(r.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){_.Date_option=e.data}),_.data_option=function(){_.block1.date_option="1"},_.onChange1=function(){"3"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")),"4"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"5"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").endOf("week").format("DD-MM-YYYY")),"6"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"week").endOf("week").format("DD-MM-YYYY")),"7"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"8"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")),"9"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")),"10"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").month("September").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").add("year",1).month("August").endOf("month").format("DD-MM-YYYY")),"11"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract("year",1).month("September").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").month("August").startOf("month").format("DD-MM-YYYY")),"12"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY")),"13"==_.block1.date_option&&(_.current_Quatar_from_date=moment(_.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),_.edt.FromDate=moment(_.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),_.current_Quatar_to_date=moment(_.FromDate,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"14"==_.block1.date_option&&(_.current_Quatar_from_date=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),_.edt.FromDate=moment(_.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),_.current_Quatar_to_date=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"quarter").endOf("quarter").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"15"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"16"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"17"==_.block1.date_option&&(_.current_Quatar_from_date=moment(_.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),_.edt.FromDate=moment(_.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"18"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"19"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"20"==_.block1.date_option&&(_.current_Quatar_from_date=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),_.edt.FromDate=moment(_.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"21"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"22"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY")),"23"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY")),"24"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"week").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"week").endOf("week").format("DD-MM-YYYY")),"25"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").add(4,"week").startOf("week").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").add(4,"week").endOf("week").format("DD-MM-YYYY")),"26"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"month").startOf("month").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"month").endOf("month").format("DD-MM-YYYY")),"27"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"year").startOf("year").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").add(1,"year").endOf("year").format("DD-MM-YYYY")),"28"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(30,"days").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"29"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(60,"days").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"30"==_.block1.date_option&&(_.edt.FromDate=moment(_.FromDate,"DD-MM-YYYY").subtract(90,"days").format("DD-MM-YYYY"),_.edt.ToDate=moment(_.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY"))},_.report_show=!0,_.Report=function(){_.report_show=!1,c.get(r.apiUrl+"api/JVCreation/GetDocReportUrl?opr=J&sub_opr=Doc_URL&comp_code="+l+"&fyear="+m+"&condition="+_.docCode1+"&condition1=&condition2=&condition3=&condition4=&condition5=").then(function(e){_.final_doc_urlNew=e.data;e={location:_.final_doc_urlNew,parameter:{comp_detail:l,doc_code:_.docCode1,doc_no:_.provNo1},state:"main.Fin123"};window.localStorage.ReportDetails=JSON.stringify(e);try{_.rpt=JSON.parse(window.localStorage.ReportDetails),_.location=_.rpt.location,_.parameter=_.rpt.parameter,_.state=_.rpt.state}catch(e){}var e="SimsReports."+_.location+",SimsReports",t=s.GetRpt_url();console.log(t),_.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:t,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:e,parameters:_.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),a(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)})}}])}(),function(){"use strict";var s,v,w="",k=!1,C=!1,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("JVCreateBlmCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","AuthenticationService",function(i,e,t,n,a,d,_,c){i.pagesize="5",i.edt="",i.amount_difference=0,i.operation=!0,i.chkcost=!0,i.cost_combo=!0,i.doc_cd_prov_no="",i.doc_cd_final_doc_no="",i.block1=[],i.block2=[],i.block3=[],i.temp_doc=[],i.vis=[],i.vis.main=!0,i.vis.onchangedoccodeshow=!1,i.dramount=!1,i.cramount=!1,i.vis.doc_detail_grid=!0,i.vis.main_acct_grid=!0,i.save1=!0,i.vis.add_grid=!0,i.checkprintbtn=!1,i.vis.Add_show_hide=!0,i.prdocdata=[],i.cmb_doc_cd=[],i.vis.update=!1,i.doc_detail_data=[],i.chkcost=!1,i.block3.gldd_vat_enable=!1,i.block3.gldd_include_vat=!1,i.block3.gldd_doc_vat_amt=0,i.cost_combo=!1,i.readonly=!0,i.vis.ok=!0,i.vis.is_recur=!0,i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0,i.vis.cmb_acct=!0,i.vis.txt_acct=!1,i.dis_recur_date=!0,i.revdelete=!1,i.edt2=[],i.edt=[],i.voucher_report_show=!0;var r=(r=t.globals.currentUser.username).toLowerCase(),o=new FormData,l=(i.finnDetail=JSON.parse(window.localStorage.Finn_comp),i.finnDetail.company),m=i.finnDetail.year,p=i.finnDetail.comp_vat_per,u=i.finnDetail.comp_vat_status,g=i.finnDetail.input_vat_acct,h="",t=new Date,f=t.getDate(),y=t.getMonth()+1,b=(y<10&&(y="0"+y),t.getFullYear());i.block1={gltd_payment_date:f+"-"+y+"-"+b},setTimeout(function(){$("#cmb_acc_Code3").select2()},100),i.deleteReverted=function(){i.data=[];var e={gltd_doc_code:i.block1.gltd_doc_code,gltd_prov_doc_no:i.block1.gltd_prov_doc_no,gltd_comp_code:l};i.data.push(e),d.post(_.apiUrl+"api/JVCreation/revertedDelete",i.data).then(function(e){i.msg1=e.data,!0===i.msg1?(swal({title:"Alert",text:"Record Deleted successfully",imageUrl:"assets/img/check.png",width:300,height:200}),window.location.reload()):swal({title:"Alert",text:"Record Not Deleted. ",imageUrl:"assets/img/close.png",width:300,height:200})})},d.get(_.apiUrl+"api/JVCreation/getLoggedUser").then(function(e){i.data=[],i.loggedUser=e.data;for(var t=0;te.gldu_user_name_data).join(",");console.log(e),r.get(l.apiUrl+"api/JVCreation/GetEmail?em_login_code="+e).then(function(e){_.email_data=e.data,_.listColl[0].forEach(t=>{var e=_.email_data.find(e=>e.em_login_code===t.gldu_user_name_data);t.email=e?e.em_email:""})})})}),_.backCPN=function(){c.go("main.FINS19")},_.testData(),_.testDatadocs(),_.Bankdetails=[],_.Bankdetails.push({gldd_vat_enable:"Y"==v,gldd_include_vat:!1,sllc_ldgr_code:"00",vat_details:!1,gldd_doc_amount:0,gldd_doc_vat_amt:0}),_.Update_temp_docs=function(){var e=[],t=(null==_.temp1&&(_.temp1=""),{gltd_comp_code:f,gltd_doc_code:_.temp_doc.gltd_doc_code,gltd_prov_doc_no:s.Class.prov_code,gltd_final_doc_no:_.final_doc_no,gltd_doc_date:_.docdata[0].gltd_doc_date,gltd_doc_narr:_.temp_doc.gltd_doc_narr,gltd_remarks:_.docdata[0].gltd_remarks,gltd_doc_flag:_.docdata[0].gltd_doc_flag,gltd_cur_status:_.docdata[0].gltd_cur_status,gltd_prepare_date:_.docdata[0].gltd_prepare_date,gltd_verify_user:_.docdata[0].gltd_verify_user,gltd_verify_date:_.docdata[0].gltd_verify_date,gltd_authorize_user:_.docdata[0].gltd_authorize_user,gltd_authorize_date:_.docdata[0].gltd_authorize_date,gltd_payment_user:_.docdata[0].gltd_payment_user,gltd_payment_date:_.docdata[0].gltd_payment_date,gltd_post_date:_.temp_doc.gltd_post_date,gltd_post_no:_.docdata[0].gltd_post_no,gltd_save_srl:_.temp.sims_dep,gltd_batch_source:_.docdata[0].gltd_batch_source,gltd_paid_to:_.temp_doc.gltd_paid_to,gltd_cheque_no:_.temp_doc.gltd_cheque_No,gltd_reference_doc_code:_.docdata[0].gltd_reference_doc_code,gltd_reference_final_doc_no:_.docdata[0].gltd_reference_final_doc_no,gltd_cheque_due_date:_.docdata[0].gltd_cheque_due_date,gltd_doc_path:_.docdata[0].gltd_doc_path,gltd_app_name:"JCN160"});e.push(t),r.post(l.apiUrl+"api/BankPayment/UPDATE_Fins_temp_docsFin",e).then(function(e){_.prvno=e.data,""!=_.prvno&&null!=_.prvno?_.Update_Fins_temp_doc_details():swal({text:"Record Not inserted. "+_.prvno,imageUrl:"assets/img/close.png",width:300,height:200})})},_.Update_Fins_temp_doc_details=function(){for(var e,t=[],a=1,o=0;o<_.prdocdata.length;o++)e=void 0!==_.prdocdata[o].vat_code&&""!==_.prdocdata[o].vat_code?{gldd_doc_narr:_.prdocdata[o].gldd_doc_narr,gldd_dept_code:_.prdocdata[o].gldd_dept_code,gldd_ledger_code:_.prdocdata[o].gldd_ledger_code,gldd_acct_code:_.prdocdata[o].gldd_acct_code,gldd_party_ref_no:_.prdocdata[o].gldd_party_ref_no,gldd_party_ref_date:_.prdocdata[o].gldd_party_ref_date,gldd_doc_amount_debit:_.prdocdata[o].gldd_doc_amount_debit,gldd_doc_amount_credit:_.prdocdata[o].gldd_doc_amount_credit,gldd_cost_center_code:_.prdocdata[o].glco_cost_centre_code,gldd_comp_code:f,gldd_doc_code:s.Class.doc_code,gldd_prov_doc_no:s.Class.prov_code,gldd_final_doc_no:s.Class.final_doc_no,gldd_line_no:a,gltd_remarks:s.Class.doc_code+"/"+s.Class.final_doc_no+"#"+a+"$",finance_year:y,gltd_post_date:_.temp_doc.gltd_post_date,gldd_tax_code:_.prdocdata[o].vat_code,gldd_tax_acct_code:_.prdocdata[o].gldd_acct_code,gldd_tax_percentage:_.prdocdata[o].gldd_tax_percentage,gldd_tax_amount:_.prdocdata[o].gldd_tax_amount}:{gldd_doc_narr:_.prdocdata[o].gldd_doc_narr,gldd_dept_code:_.prdocdata[o].gldd_dept_code,gldd_ledger_code:_.prdocdata[o].gldd_ledger_code,gldd_acct_code:_.prdocdata[o].gldd_acct_code,gldd_party_ref_no:_.prdocdata[o].gldd_party_ref_no,gldd_party_ref_date:_.prdocdata[o].gldd_party_ref_date,gldd_doc_amount_debit:_.prdocdata[o].gldd_doc_amount_debit,gldd_doc_amount_credit:_.prdocdata[o].gldd_doc_amount_credit,gldd_cost_center_code:_.prdocdata[o].glco_cost_centre_code,gldd_comp_code:f,gldd_doc_code:s.Class.doc_code,gldd_prov_doc_no:s.Class.prov_code,gldd_final_doc_no:s.Class.final_doc_no,gldd_line_no:a,gltd_remarks:s.Class.doc_code+"/"+s.Class.final_doc_no+"#"+a+"$",finance_year:y,gltd_post_date:_.temp_doc.gltd_post_date},a++,t.push(e),void 0!==_.prdocdata[o].vat_code&&""!==_.prdocdata[o].vat_code&&(e={gldd_comp_code:f,gldd_doc_code:s.Class.doc_code,gldd_prov_doc_no:s.Class.prov_code,gldd_final_doc_no:s.Class.final_doc_no,gldd_acct_code:_.prdocdata[o].gldd_acct_code,gldd_line_no:a,gldd_fc_code:"PRM",gldd_fc_rate:0,gldd_dept_code:_.prdocdata[o].gldd_dept_code,gldd_doc_narr:_.prdocdata[o].gldd_doc_narr,gldd_ledger_code:_.prdocdata[o].gldd_ledger_code,gldd_tax_code:_.prdocdata[o].vat_code,gldd_tax_acct_code:_.prdocdata[o].gldd_acct_code,gldd_tax_percentage:_.prdocdata[o].gldd_tax_percentage,gldd_tax_amount:_.prdocdata[o].gldd_tax_amount},t.push(e));r.post(l.apiUrl+"api/BankPayment/UPDATE_JV_Fins_temp_doc_details_vatFin",t).then(function(e){_.msg1=e.data,1==_.msg1?((e=[]).push({gldd_comp_code:t[0].gldd_comp_code,gldd_doc_code:t[0].gldd_doc_code,gldd_prov_doc_no:t[0].gldd_prov_doc_no}),r.post(l.apiUrl+"api/BankPayment/UPDATE_JV_Fins_temp_doc_details_vatFin1",e).then(function(e){_.msg1=e.data,1==_.msg1&&r.post(l.apiUrl+"api/BankPayment/UPDATE_batch_sl_gl_transaction",t).then(function(e){_.msg1=e.data,_.msg1?swal({title:"Alert",text:"Record Updated Successfully. ",width:300,height:200}).then(function(){var t=1,a=[];if(0<_.doc_detail_data.length){for(let e=0;e<_.doc_detail_data.length;e++){var o={gltd_remarks:_.doc_detail_data[e].gltd_remarks,gltd_doc_type:_.doc_detail_data[e].gltd_doc_type,gltd_doc_no:_.doc_detail_data[e].gltd_doc_no,gldd_doc_amount_debit:_.doc_detail_data[e].gldd_doc_amount_debit,gldd_doc_amount_credit:_.doc_detail_data[e].gldd_doc_amount_credit,gltd_comp_code:_.doc_detail_data[e].gltd_comp_code,gltd_doc_code:_.temp_doc.gltd_doc_code,gltd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gltd_attribute1:_.doc_detail_data[e].gltd_attribute1,gltd_doc_line_no:t};t++,a.push(o)}r.post(l.apiUrl+"api/JVCreation/Insert_JV_document_details",a).then(function(e){_.chk_msg=e.data})}c.go("main.FINS19")}):swal({title:"Alert",text:"Record Not Updated. ",width:300,height:200}).then(function(){c.go("main.FINS19")})})})):0==_.msg1?swal({text:"Record Not inserted. ",imageUrl:"assets/img/close.png",width:300,height:200}):swal("Error-"+_.msg1)})},"");_.doc_final_doc_number="";var D=new Date,x=D.getDate(),S=D.getMonth()+1,U=(S<10&&(S="0"+S),D.getFullYear());function P(e,t){e=e.split("-").map(Number),t=t.split("-").map(Number);return e[2]!==t[2]?t[2]-e[2]:e[1]!==t[1]?t[1]-e[1]:t[0]-e[0]}_.block1={gltd_payment_date:x+"-"+S+"-"+U},setTimeout(function(){$("#cmb_acc_Code3").select2()},100),_.prdocdata1=[],_.prdocdata1.push({gldd_doc_amount_debit:0,gldd_doc_amount_credit:0,gldd_doc_vat_amt:0,gldd_ledger_code:"00"}),setTimeout(function(){$("#PostDateNew10").kendoDatePicker({format:"dd-MM-yyyy"})},500),setTimeout(function(){$("#cmb_acct_code10").select2()},100),_.add_Grid1=function(e,t,a,o){_.prdocdata1.push({gldd_doc_amount_debit:0,gldd_doc_amount_credit:0,gldd_doc_vat_amt:0,gldd_ledger_code:"00"}),setTimeout(function(){$("#PostDateNew1"+(_.prdocdata1.length-1)).kendoDatePicker({format:"dd-MM-yyyy"})},500),setTimeout(function(){$("#cmb_acct_code1"+(_.prdocdata1.length-1)).select2()},100)},r.get(l.apiUrl+"api/GLAccountsCreateView/GetAll_glmaster_Department_Code?co_code="+f+"&year="+y).then(function(e){_.dep_data=e.data;for(var t=0,a=0;a<_.dep_data.length;a++)"Finance"===_.dep_data[a].glma_short_name?_.temp.sims_dep=_.dep_data[a].glma_dept_no:_.dep_data[a].glma_dept_no>t&&(t=_.dep_data[a].glma_dept_no,_.temp.sims_dep=t)}),_.vatFiledData=function(){r.get(l.apiUrl+"api/VATFiling/getAllVATFiledData1?from_date="+_.temp_doc.gltd_post_date+"&to_date="+_.temp_doc.gltd_post_date+"&search=null&comp_code="+f+"&financial_year="+y+"&vat_profile="+_.vat_code).then(function(e){_.filedData=e.data,0<_.filedData.length?(_.vat_flag=_.filedData[0].flag,_.vat_desc_msg=_.filedData[0].vat_desc,"Pos"==_.vat_flag&&(swal({text:_.vat_desc_msg,width:380}),_.vat_code="")):(_.vat_flag="",_.vat_desc_msg="")})},_.showButtons=!1,_.showAllButtons=function(){""!=_.temp_doc.gltd_doc_code&&null!=_.temp_doc.gltd_doc_code&&""!=_.temp.sims_dep&&null!=_.temp.sims_dep&&(_.showButtons=!0)},_.Calculator=function(){try{window.location.href="calculator://"}catch(e){console.error("Error opening Calculator:",e),alert("Error opening Calculator. Please make sure it is installed on your system.")}},_.validateDebit=function(e,t,a){var o,s=a.gldd_doc_amount_debit.indexOf(".");-1!==s&&(o=a.gldd_doc_amount_debit.slice(0,s),a=a.gldd_doc_amount_debit.slice(s+1,s+3),_.prdocdata[t].gldd_doc_amount_debit=o+"."+a)},_.validateCredit=function(e,t,a){var o,s=a.gldd_doc_amount_credit.indexOf(".");-1!==s&&(o=a.gldd_doc_amount_credit.slice(0,s),a=a.gldd_doc_amount_credit.slice(s+1,s+3),_.prdocdata[t].gldd_doc_amount_credit=o+"."+a)},_.isValidKey=function(e){var t=e.which||e.keyCode,a=String.fromCharCode(t);return(/[\d,\.]/.test(a)||8===t)&&("."!==a||!e.target.value.includes("."))||(e.preventDefault(),!1)},_.add_Grid=function(e,t,a,o){setTimeout(function(){_.Scroll()},700),0{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.verify_data.length;o++){var s=_.verify_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}_.verify_data=a}),r.get(l.apiUrl+"api/JVCreation/getDocCodeJV?comp_code="+f+"&finance_year="+y).then(function(e){_.geDocCode_jv2=e.data}),_.filteredDocCode="",_.filteredDocCode2="",_.filterTableData=function(){_.VerifyTab&&r.get(l.apiUrl+"api/JVCreation/getFinn140_SearchFins_temp_docs?compcode="+f+"&username="+h).then(function(e){if(_.verify_data=e.data,_.verify_data=_.verify_data.filter(function(e){return e.gltd_doc_code===_.filteredDocCode}),0<_.verify_data.length){_.verify_data.sort((e,t)=>{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.verify_data.length;o++){var s=_.verify_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}_.verify_data=a}else swal({title:"Alert",text:"No Data Found",showCloseButton:!0,width:380})}),_.AproveTab&&r.get(l.apiUrl+"api/JVCreation/getFinn142_SearchFins_temp_docs?compcode="+f+"&username="+h).then(function(e){if(_.Authorize_data=e.data,_.Authorize_data=_.Authorize_data.filter(function(e){return e.gltd_doc_code===_.filteredDocCode2}),0<_.Authorize_data.length){_.Authorize_data.sort((e,t)=>{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.Authorize_data.length;o++){var s=_.Authorize_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}_.Authorize_data=a,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop")}else swal({title:"Alert",text:"No Data Found",showCloseButton:!0,width:380})})},_.VerifyTab=!1,_.Verify=function(){_.VerifyTab=!0,_.AproveTab=!1,jQuery(".verifybtn").addClass("voucherbtn"),jQuery(".preparebtn").removeClass("voucherbtn"),jQuery(".authorizebtn").removeClass("voucherbtn"),_.edt="",_.edt1="",_.edt2="",_.vis.main=!0,_.jvtitle="- Verify",_.vis.prepare=!1,_.vis.verify=!0,_.vis.Autorize=!1,_.vis.user_vry=!1,_.vis.user_aut=!1,$("#loader").modal({backdrop:"static",keyboard:!1}),r.get(l.apiUrl+"api/JVCreation/getFinn140_SearchFins_temp_docs?compcode="+f+"&username="+h).then(function(e){_.verify_data=e.data,_.verify_data.sort((e,t)=>{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.verify_data.length;o++){var s=_.verify_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}r.get(l.apiUrl+"api/JVCreation/getFinn145_SearchFins_temp_docs?compcode="+f+"&username="+h+"&cur_status=Vry").then(function(e){_.Verifyuserdata=e.data}),_.verify_data=a,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop")})},r.get(l.apiUrl+"api/JVCreation/getFinn142_SearchFins_temp_docs?compcode="+f+"&username="+h).then(function(e){_.Authorize_data=e.data,_.Authorize_data.sort((e,t)=>{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.Authorize_data.length;o++){var s=_.Authorize_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}_.Authorize_data=a,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop")}),_.AproveTab=!1,_.Authorize=function(e){_.VerifyTab=!1,_.AproveTab=!0,jQuery(".verifybtn").removeClass("voucherbtn"),jQuery(".preparebtn").removeClass("voucherbtn"),jQuery(".authorizebtn").addClass("voucherbtn"),_.jvtitle="- Authorize",_.edt="",_.edt1="",_.edt2="",_.vis.main=!0,_.vis.prepare=!1,_.vis.verify=!1,_.vis.Autorize=!0,_.vis.user_vry=!0,_.vis.user_aut=!1,$("#loader").modal({backdrop:"static",keyboard:!1}),r.get(l.apiUrl+"api/JVCreation/getFinn142_SearchFins_temp_docs?compcode="+f+"&username="+h).then(function(e){_.Authorize_data=e.data,_.Authorize_data.sort((e,t)=>{var a=t.gltd_prov_doc_no.localeCompare(e.gltd_prov_doc_no);return 0!==a?a:P(e.gltd_doc_date,t.gltd_doc_date)});for(var t={},a=[],o=0;o<_.Authorize_data.length;o++){var s=_.Authorize_data[o],n=s.gltd_doc_code+"_"+s.gltd_prov_doc_no;t[n]?t[n].gltd_doc_path+=","+s.gltd_doc_path:(t[n]=angular.copy(s),a.push(t[n]))}r.get(l.apiUrl+"api/JVCreation/getFinn145_SearchFins_temp_docs?compcode="+f+"&username="+h+"&cur_status=Aut").then(function(e){_.Authuserdata=e.data}),_.Authorize_data=a,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop")})},_.back=function(){_.doc_data=!1,jQuery(".verifybtn").removeClass("voucherbtn"),jQuery(".preparebtn").removeClass("voucherbtn"),jQuery(".authorizebtn").removeClass("voucherbtn"),_.vis.main=!0,_.vis.verify=!1,_.vis.Autorize=!1,_.jvtitle=" ",_.checkprintbtn=!1,_.totalDebit=0,_.totalcredit=0,_.totaldiff=0,_.prvno="",_.dcode=!1,_.block1=[],_.block2=[],_.block3=[],_.temp_doc=[],_.edt2=[],_.edt=[],_.prdocdata=[],_.doc_detail_data=[],_.vis.cmb_acct=!0,_.vis.txt_acct=!1,_.ldgcd=!1,_.vis.is_recur=!0,_.vis.ok=!0,_.vis.update=!1,_.vis.SendToVerify=!1,_.checkprintbtn=!1,_.vis.onchangedoccodeshow=!1,_.vis.onchangedoccodeshowin=!1,_.dis_recur_date=!0,_.lbl_recur="",_.vis.recur_periods=!1,D=new Date,x=D.getDate(),(S=D.getMonth()+1)<10&&(S="0"+S),U=D.getFullYear(),_.sdate=x+"-"+S+"-"+U,_.edate=x+"-"+S+"-"+U,_.temp_doc={gltd_doc_date:x+"-"+S+"-"+U,gltd_post_date:x+"-"+S+"-"+U}},_.clear=function(){_.showStatistics=!1,_.dcode=!1,_.block1=[],_.block2=[],_.block3=[],_.temp_doc=[],_.checkprintbtn=!1,_.prvno="",_.totalDebit=0,_.totalcredit=0,_.totaldiff=0,_.edt2=[],_.edt=[],_.prdocdata=[],_.doc_detail_data=[],_.vis.cmb_acct=!0,_.vis.txt_acct=!1,_.ldgcd=!1,_.vis.is_recur=!0,_.vis.ok=!0,_.vis.update=!1,_.vis.SendToVerify=!1,_.checkprintbtn=!1,_.vis.onchangedoccodeshow=!1,_.vis.onchangedoccodeshowin=!1,_.vis.doc_detail_grid=!0,E=!1,B=!1,_.dis_recur_date=!0,_.lbl_recur="",_.vis.recur_periods=!1,D=new Date,x=D.getDate(),(S=D.getMonth()+1)<10&&(S="0"+S),U=D.getFullYear(),_.sdate=x+"-"+S+"-"+U,_.edate=x+"-"+S+"-"+U,_.temp_doc={gltd_doc_date:x+"-"+S+"-"+U,gltd_post_date:x+"-"+S+"-"+U},r.get(l.apiUrl+"api/BankPayment/GetVerifyAuthorizeUsers?comp_code="+f+"&fyear="+y).then(function(e){_.users=e.data,0!=_.users.length&&(_.users[0]==h&&_.users[1]==h?(_.vis.autoriz=!0,_.vis.very=!0):_.users[0]!=h||""!=_.users[1]&&_.users[1]==h?(_.vis.autoriz=!1,_.vis.very=!1):(_.vis.autoriz=!1,_.vis.very=!0))})},_.Show=function(){null!=_.block1.gltd_doc_code&&""!=_.block1.gltd_doc_code&&null!=_.block1.gltd_prov_doc_no&&""!=_.block1.gltd_prov_doc_no?(_.dcode=!0,r.get(l.apiUrl+"api/JVCreation/getAllRecords_Vat?doccode="+_.block1.gltd_doc_code+"&prnumber="+_.block1.gltd_prov_doc_no+"&comp_code="+f).then(function(e){_.prdocdata=[],_.voucher_details=e.data;for(let t=0;t<_.voucher_details.length;t++)0==_.voucher_details[t].gldd_doc_amount_debit&&0==_.voucher_details[t].gldd_doc_amount_credit||(_.prdocdata.push({gldd_ledger_code:_.voucher_details[t].gldd_ledger_code,gldd_acct_code:_.voucher_details[t].gldd_acct_code,gldd_acct_name:_.voucher_details[t].gldd_acct_name,coce_cost_centre_name:_.selectedText,gldd_party_ref_no:_.voucher_details[t].gldd_party_ref_no,gldd_dept_code:_.voucher_details[t].gldd_dept_code,codp_dept_name:_.getAllAccNos[t].gldd_dept_name,gldd_doc_narr:_.voucher_details[t].gldd_doc_narr,gldd_doc_amount_debit:_.voucher_details[t].gldd_doc_amount_debit,gldd_doc_amount_credit:_.voucher_details[t].gldd_doc_amount_credit,vat_code:_.voucher_details[t].vat_code,gldd_tax_amount:_.voucher_details[t].gldd_tax_amount,gldd_tax_percentage:_.voucher_details[t].vat_per_value,gldu_authorize:_.voucher_details[t].gldu_authorize,gldu_verify:_.voucher_details[t].gldu_verify,gltd_authorize_date:_.voucher_details[t].gltd_authorize_date,gltd_verify_date:_.voucher_details[t].gltd_verify_date,gltd_paid_to:_.voucher_details[t].gltd_paid_to,gltd_cheque_no:_.voucher_details[t].gltd_cheque_no}),_.temp_doc.PostDate=_.voucher_details[t].gltd_post_date,_.temp_doc.gltd_doc_code=_.voucher_details[t].gldd_doc_code,"00"===_.voucher_details[t].gldd_ledger_code?r.get(l.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+f+"&fyear="+y+"&doc_code="+_.temp_doc.gltd_doc_code).then(function(e){_.getAllAccNos=e.data,_.prdocdata[t].getAllAccNos=_.getAllAccNos}):r.get(l.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+_.voucher_details[t].gldd_ledger_code+"&cmp_cd="+f+"&fyear="+y).then(function(e){_.getAllAccNos=e.data,_.prdocdata[t].getAllAccNos=_.getAllAccNos}));_.totalDebit=0,_.totalcredit=0,_.totaldiff=0,setTimeout(function(){$(".divclass").kendoDatePicker({format:"dd-MM-yyyy"})},500)}),r.get(l.apiUrl+"api/JVCreation/GetDocument_Details_DPS?doccode="+_.block1.gltd_doc_code+"&prnumber="+_.block1.gltd_prov_doc_no+"&comp_code="+f).then(function(e){_.doc_detail_data=e.data,0<_.doc_detail_data.length&&(_.temp.temp_chk_doc_details=!0,_.chk_doc_details())}),_.vis.ok=!1,_.vis.update=!0,_.vis.SendToVerify=!0,_.vis.is_recur=!1,_.vis.autoriz=!1,_.vis.very=!1,_.getRemark()):(_.flag1=!0,swal({title:"Alert",text:"Please select Doc Code & Provision No",showCloseButton:!0,width:380}))},_.chk_click_ver=function(e){e.gltd_revert&&(e.gltd_revert=!1,e.gltd_verify=!0)},_.chk_click_rev=function(e){e.gltd_verify&&(e.gltd_revert=!0,e.gltd_verify=!1)},_.chk_click_aut=function(e){e.gltd_verify&&(e.gltd_verify=!1,e.gltd_authorize=!0)},_.chk_click_very=function(e){e.gltd_authorize&&(e.gltd_verify=!0,e.gltd_authorize=!1)},_.chk_clickAll=function(e){if(e)for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_authorize=!0;else for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_authorize=!1},_.chk_click_verifyAll=function(e){if(e){for(let e=0;e<_.verify_data.length;e++)_.verify_data[e].gltd_verify=!0,_.verify_data[e].gltd_revert=!1;_.v_data.gltd_revert1=!1}else for(let e=0;e<_.verify_data.length;e++)_.verify_data[e].gltd_verify=!1},_.chk_click_revertAll=function(e){if(e){for(let e=0;e<_.verify_data.length;e++)_.verify_data[e].gltd_revert=!0,_.verify_data[e].gltd_verify=!1;_.v_data.gltd_verify1=!1}else for(let e=0;e<_.verify_data.length;e++)_.verify_data[e].gltd_revert=!1},_.chk_clickAll=function(e){if(e){for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_authorize=!0,_.Authorize_data[e].gltd_verify=!1;_.A_data.gltd_very1=!1}else for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_authorize=!1},_.very_chk_clickAll=function(e){if(e){for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_verify=!0,_.Authorize_data[e].gltd_authorize=!1;_.A_data.gltd_authorize1=!1}else for(let e=0;e<_.Authorize_data.length;e++)_.Authorize_data[e].gltd_verify=!1},_.ShowFilterText=function(e){_.filterVisible=""!=e,_.block1.chk_previous_clear=!0,_.edt.txt_filter_range="0"},_.ShowFilterText_Aut=function(e){_.filterVisible_aut=""!=e,_.block1.chk_previous_clear_aut=!0,_.edt.txt_filter_range_aut="0"},_.showhide2=function(){"BR"==_.temp_doc.gltd_doc_code||"CR"==_.temp_doc.gltd_doc_code?(_.creditshow=!1,_.debitshow=!0):"BP"==_.temp_doc.gltd_doc_code||"CP"==_.temp_doc.gltd_doc_code?(_.creditshow=!0,_.debitshow=!1):(_.creditshow=!0,_.debitshow=!0)},_.showhide=function(){_.cmb_doc_cd=[];var e=$("#cmb_doc_code").prop("selectedIndex");_.cmb_doc_cd=_.geDocCode_jv[e],_.prdocdata1=[],_.prdocdata1.push({gldd_doc_amount_debit:0,gldd_doc_amount_credit:0,gldd_doc_vat_amt:0,gldd_ledger_code:"00"}),setTimeout(function(){$("#PostDateNew10").kendoDatePicker({format:"dd-MM-yyyy"})},500),_.isUpdated||setTimeout(function(){$("#cmb_acct_code10").select2()},500),_.prdocdata=[],_.prdocdata.push({gldd_vat_enable:"Y"==v,gldd_include_vat:!1,gldd_doc_amount_debit:0,gldd_doc_amount_credit:0,gldd_doc_vat_amt:0,gldd_ledger_code:"00"}),setTimeout(function(){$("#PostDateNew"+(_.prdocdata.length-1)).kendoDatePicker({format:"dd-MM-yyyy"})},500),_.isUpdated||setTimeout(function(){$("#cmb_acct_code"+(_.prdocdata.length-1)).select2()},500),_.getAccount_Number(_.prdocdata[_.prdocdata.length-1]),r.get(l.apiUrl+"api/JVCreation/GetAllCashBankGLMasterAccountNo?cmp_cd="+f+"&financialyear="+y+"&doc_cd="+_.temp_doc.gltd_doc_code+"&username="+h).then(function(e){_.bankname=e.data,0<_.bankname.length&&_.getAccountName(e.data[0].master_ac_cdname)}),_.vis.doc_detail_grid=!0,"BP"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!0,_.vis.onchangedoccodeshowin=!1,_.block2.gldd_doc_amount_debit="0.00",_.block2.gldd_doc_amount_credit="0.00",_.content="Paid To",_.vis.cheq_no=!0,_.dvalue=!0,_.cvalue=!1,_.dramount=!1,_.cramount=!0):"BR"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!0,_.vis.onchangedoccodeshowin=!1,_.block2.gldd_doc_amount_credit="0.00",_.vis.cheq_no=!0,_.content="Received From",_.dvalue=!1,_.cvalue=!0,_.dramount=!0,_.cramount=!1):"CP"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!0,_.vis.onchangedoccodeshowin=!1,_.block2.gldd_doc_amount_debit="0.00",_.vis.cheq_no=!1,_.content="Paid To",_.dvalue=!0,_.cvalue=!1,_.dramount=!1,_.cramount=!0):"CR"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!0,_.vis.onchangedoccodeshowin=!1,_.block2.gldd_doc_amount_credit="0.00",_.content="Received From",_.vis.cheq_no=!1,_.dvalue=!1,_.cvalue=!0,_.dramount=!0,_.cramount=!1):"CN"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!0,_.vis.onchangedoccodeshowin=!1,_.block2.gldd_doc_amount_debit="0.00",_.block2.gldd_doc_amount_credit="0.00",_.content="Paid To",_.vis.cheq_no=!0,_.dvalue=!1,_.cvalue=!1,_.dramount=!1,_.cramount=!1,_.vis.doc_detail_grid=!1):"PR"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshowin=!0,_.vis.onchangedoccodeshow=!1,_.block2.gldd_doc_amount_debit="0.00",_.block2.gldd_doc_amount_credit="0.00",_.vis.invo_no=!0,_.dvalue=!0,_.cvalue=!1,_.dramount=!1,_.cramount=!0):"PB"==_.cmb_doc_cd.gldc_doc_code_type?(_.vis.onchangedoccodeshow=!1,_.vis.onchangedoccodeshowpb=!0,_.content="Paid To",_.vis.cheq_no=!0,_.dvalue=!0,_.cvalue=!1,_.dramount=!1,_.cramount=!0):(_.vis.onchangedoccodeshow=!1,_.vis.onchangedoccodeshowin=!1,_.dramount=!1,_.cramount=!1)},r.get(l.apiUrl+"api/JVCreation/getDocCodeJV?comp_code="+f+"&finance_year="+y).then(function(e){_.geDocCode_jv=e.data,r.get(l.apiUrl+"api/FinancialDoc/getAllFinancialDocument?comp_cd="+f+"&fyear="+y).then(function(e){_.fin_doc=e.data,_.fin_doc=_.fin_doc.filter(function(e){return"JV"==e.gldc_doc_code_type});var t=_.fin_doc.map(function(e){return e.gldc_doc_code_type});_.geDocCode_jv=_.geDocCode_jv.filter(function(e){return t.includes(e.gltd_doc_code)})}),_.temp_doc.gltd_doc_code=_.geDocCode_jv[0].gltd_doc_code}),r.get(l.apiUrl+"api/BankPayment/GetVerifyAuthorizeUsers?comp_code="+f+"&fyear="+y).then(function(e){_.users=e.data,0!=_.users.length&&(_.users[0]==h&&_.users[1]==h?(_.preparebtn=!1,_.verifybtn=!1,_.authorizebtn=!1,_.vis.autoriz=!0,_.vis.very=!0):_.users[0]!=h||""!=_.users[1]&&_.users[1]==h?(_.preparebtn=!1,_.verifybtn=!0,_.authorizebtn=!0,_.vis.autoriz=!1,_.vis.very=!1):(_.verifybtn=!1,_.preparebtn=!1,_.authorizebtn=!0,_.vis.autoriz=!1,_.vis.very=!0))}),r.get(l.apiUrl+"api/BankPayment/GetLedgerNumber?financialyear="+y+"&comp_code="+f).then(function(e){_.LdgrCode=e.data}),_.fillaccountno=function(){r.get(l.apiUrl+"api/JVCreation/GetAllCashBankGLMasterAccountNo?cmp_cd="+f+"&financialyear="+y+"&doc_cd="+_.temp_doc.gltd_doc_code+"&username="+h).then(function(e){_.bankname=e.data,0<_.bankname.length&&(_.block2.master_acct_detail=e.data[0],_.getAccountName(e.data[0].master_ac_cdname))})},r.get(l.apiUrl+"api/BankPayment/getVATProfileDetails?comp_code="+f).then(function(e){_.vatProfile=e.data}),_.getAccountName=function(e){e=F=e.master_acno;r.get(l.apiUrl+"api/BankPayment/getCostCenter?aacno="+e+"&comp_cd="+f+"&fyear="+y).then(function(e){_.costcenter_account=e.data,0<_.costcenter_account.length?_.chkcost_Ac=!0:(_.chkcost_Ac=!1,_.cost_combo_AC=!1)})},_.getViewDetails=function(e){_.isUpdated||(_.acct_name=$("#cmb_acct_code option:selected").text()),_.from=_.temp_doc.gltd_post_date,_.to=_.block1.to_date,_.tble_show=!0;f,_.temp_doc.gltd_doc_code,_.temp_doc.gltd_post_date,_.temp_doc.gltd_post_date;r.get(l.apiUrl+"api/GLSLQuery/Get_GL_opening_bal?comp_code="+f+"&fyear="+y+"&acct_code="+e+"&from_date="+_.temp_doc.gltd_post_date).then(function(e){_.block1.sltr_yob_amt=e.data})},_.getBudgetAmt=function(e){r.get(l.apiUrl+"api/GLSLQuery/Get_Bud_amt?comp_code="+f+"&fyear="+y+"&acct_code="+e).then(function(e){_.mainn=e.data,_.main2=e.data[0].glma_acct_name,_.main3=e.data[0].gltr_attr1,_.main4=e.data[0].gltr_attr2,_.main5=e.data[0].acct_opening_bal,_.main6=e.data[0].gltr_attr_class1,_.main7=e.data[0].gltr_attr_class1})},_.getDepartcode=function(t,a){_.dept_flg=!1,_.debiterrorBEW=!1,_.crediterrorBEW=!1,_.debiterrorBES=!1,_.crediterrorBES=!1;for(let e=0;e_.main5?(_.debiterrorBEW=!0,_.debiterrorBES=!1,_.crediterrorBES=!1,_.crediterrorBEW=!1,_.dvalue=!0,_.cvalue=!0):(_.debiterrorBEW=!1,_.debiterrorBES=!1,_.crediterrorBES=!1,_.crediterrorBEW=!1,_.dvalue=!1,_.cvalue=!1)):0_.main5?(_.crediterrorBEW=!0,_.debiterrorBEW=!1,_.debiterrorBES=!1,_.crediterrorBES=!1,_.dvalue=!0,_.cvalue=!0):(_.crediterrorBEW=!1,_.debiterrorBEW=!1,_.debiterrorBES=!1,_.crediterrorBES=!1,_.dvalue=!1,_.cvalue=!1)):"BES"==_.comp_enable_budget&&0<_.main5&&(0_.main5?(_.debiterrorBES=!0,_.debiterrorBEW=!1,_.crediterrorBES=!1,_.crediterrorBEW=!1,_.dvalue=!0,_.cvalue=!0):(_.debiterrorBES=!1,_.crediterrorBES=!1,_.debiterrorBEW=!1,_.crediterrorBEW=!1,_.dvalue=!1,_.cvalue=!1)):0_.main5?(_.crediterrorBES=!0,_.debiterrorBES=!1,_.debiterrorBEW=!1,_.crediterrorBEW=!1,_.dvalue=!0,_.cvalue=!0):(_.crediterrorBES=!1,_.debiterrorBES=!1,_.debiterrorBEW=!1,_.crediterrorBEW=!1,_.dvalue=!1,_.cvalue=!1)))},_.Add_inner_grid=function(){_.chkcost=!1,_.cost_combo=!1,_.temp={cost_chk_ac:!1};let e="";if(null!=_.block3.gldd_acct_code){if(e=null==_.block3.gldd_ledger_code?"00":_.block3.gldd_ledger_code,""!=_.block3.gldd_doc_amount_debit&&null!=_.block3.gldd_doc_amount_debit&&"0.00"!=_.block3.gldd_doc_amount_debit||(_.block3.gldd_doc_amount_debit="0.00"),""!=_.block3.gldd_doc_amount_credit&&null!=_.block3.gldd_doc_amount_credit&&"0.00"!=_.block3.gldd_doc_amount_credit||(_.block3.gldd_doc_amount_credit="0.00"),parseFloat(_.block3.gldd_doc_amount_debit)<=0&&parseFloat(_.block3.gldd_doc_amount_credit)<=0)return void swal({text:"Please Enter Debit/Credit Amount",width:380});var a=document.getElementById("cmb_acc_Code3");_.selectedText=a.options[a.selectedIndex].text;let t=!1;for(let e=0;e<_.prdocdata.length;e++)if(_.prdocdata[e].gldd_acct_code==_.block3.gldd_acct_code&&_.prdocdata[e].gldd_doc_narr==_.block3.gldd_doc_narr){t=!0;break}if(!0===t)swal({text:_.block3.gldd_acct_name+" A/c Already Added",width:380});else{a=document.getElementById("costCenter"),a=a.options[a.selectedIndex].text;_.center=_.center||""!=_.block2.glco_cost_centre_code,"Y"==v&&!0===_.block3.gldd_include_vat&&!0===_.block3.gldd_vat_enable&&(0!=_.block3.gldd_doc_amount_debit?(o=parseFloat(_.block3.gldd_doc_amount_debit),_.block3.gldd_doc_vat_amt=parseFloat(o*parseFloat(b)/(100+parseFloat(b))).toFixed(_.decimal_dsc),_.block3.gldd_doc_amount_debit=parseFloat(o)-parseFloat(o*parseFloat(b)/(100+parseFloat(b))).toFixed(_.decimal_dsc)):(o=parseFloat(_.block3.gldd_doc_amount_credit),_.block3.gldd_doc_vat_amt=parseFloat(o*parseFloat(b)/(100+parseFloat(b))).toFixed(_.decimal_dsc),_.block3.gldd_doc_amount_credit=parseFloat(o)-parseFloat(o*parseFloat(b)/(100+parseFloat(b))).toFixed(_.decimal_dsc))),_.prdocdata.push({gldd_comp_code:f,gldd_ledger_code:e,gldd_acct_code:_.block3.gldd_acct_code,gldd_acct_name:_.block3.gldd_acct_name,gldd_dept_code:_.block3.gldd_dept_code,gldd_party_ref_no:_.block3.gldd_party_ref_no,gldd_doc_narr:_.block3.gldd_doc_narr,gldd_doc_amount_debit:_.block3.gldd_doc_amount_debit,gldd_doc_amount_credit:_.block3.gldd_doc_amount_credit,glco_cost_centre_code:_.block2.glco_cost_centre_code,coce_cost_centre_name:a,gldd_trn_no:_.block3.gldd_trn_no,gldd_PTY_name:_.block3.gldd_PTY_name}),"Y"==v&&!0===_.block3.gldd_vat_enable&&_.prdocdata.push({gldd_comp_code:f,gldd_ledger_code:"00",gldd_acct_code:w,gldd_acct_name:C,gldd_dept_code:w.substr(1,2),gldd_party_ref_no:"",gldd_doc_narr:"VAT/"+_.block3.gldd_acct_code+"("+_.block3.gldd_acct_name+") #"+(0<_.block3.gldd_doc_amount_debit?_.block3.gldd_doc_amount_debit:"-"+_.block3.gldd_doc_amount_credit),gldd_doc_amount_debit:0!=_.block3.gldd_doc_amount_debit?_.block3.gldd_doc_vat_amt:0,gldd_doc_amount_credit:0!=_.block3.gldd_doc_amount_credit?_.block3.gldd_doc_vat_amt:0,glco_cost_centre_code:_.block2.glco_cost_centre_code,coce_cost_centre_name:a,gldd_trn_no:_.block3.gldd_trn_no,gldd_PTY_name:_.block3.gldd_PTY_name}),_.totalDebit=0;for(let e=_.totalcredit=0;e<_.prdocdata.length;e++)_.totalDebit=parseFloat(parseFloat(_.totalDebit)+parseFloat(_.prdocdata[e].gldd_doc_amount_debit)).toFixed(_.decimal_dsc),_.totalcredit=parseFloat(parseFloat(_.totalcredit)+parseFloat(_.prdocdata[e].gldd_doc_amount_credit)).toFixed(_.decimal_dsc);_.edt1="",_.edt2="",_.block3.gldd_doc_vat_amt=0,$("#cmb_acc_Code3").select2("val",""),_.myForm.$setPristine(),_.myForm.$setUntouched(),_.dcode=!1,_.cancel()}}else swal({text:" please select Account Code ",width:380});var o=_.getAllAccNos.gldd_acct_code;_.GetAllGLAcc(o,f),_.block3.gldd_vat_enable=!1},_.update_grid=function(e){$("#cmb_acc_Code3").select2(),_.vis.main_acct_grid=!0,_.tempobj=e,_.vis.updatebtn=!0,_.vis.add_grid=!1,_.vis.cmb_acct=!0,_.vis.txt_acct=!0,_.ldgcd=!1,_.block3=JSON.parse(JSON.stringify(e)),_.getSLAccNo()},_.update_grid_data=function(){if(_.temp_obj=_.block3,""!=_.block3.gldd_doc_amount_debit&&null!=_.block3.gldd_doc_amount_debit&&"0.00"!=_.block3.gldd_doc_amount_debit||(_.block3.gldd_doc_amount_debit="0.00"),""!=_.block3.gldd_doc_amount_credit&&null!=_.block3.gldd_doc_amount_credit&&"0.00"!=_.block3.gldd_doc_amount_credit||(_.block3.gldd_doc_amount_credit="0.00"),parseFloat(_.block3.gldd_doc_amount_debit)<=0&&parseFloat(_.block3.gldd_doc_amount_credit)<=0)swal({text:"Please Enter Debit/Credit Amount",width:380});else if(""==_.block3.gldd_acct_code||null==_.block3.gldd_acct_code)swal({text:"Please select Account Code",width:380});else{_.totalDebit=0;for(let e=_.totalcredit=0;e<_.prdocdata.length;e++)_.prdocdata[e].$$hashKey==_.tempobj.$$hashKey&&(_.prdocdata[e].gldd_doc_amount_credit=_.block3.gldd_doc_amount_credit,_.prdocdata[e].gldd_doc_amount_debit=_.block3.gldd_doc_amount_debit,_.prdocdata[e].gldd_doc_narr=_.block3.gldd_doc_narr,_.prdocdata[e].gldd_acct_code=_.block3.gldd_acct_code,_.prdocdata[e].gldd_party_ref_no=_.block3.gldd_party_ref_no,_.prdocdata[e].gldd_acct_name=_.block3.gldd_acct_name,_.prdocdata[e].gldd_ledger_code=_.block3.gldd_ledger_code,_.prdocdata[e].gldd_trn_no=_.block3.gldd_trn_no,_.prdocdata[e].gldd_PTY_name=_.block3.gldd_PTY_name),_.totalDebit=parseFloat(parseFloat(_.totalDebit)+parseFloat(_.prdocdata[e].gldd_doc_amount_debit)).toFixed(_.decimal_dsc),_.totalcredit=parseFloat(parseFloat(_.totalcredit)+parseFloat(_.prdocdata[e].gldd_doc_amount_credit)).toFixed(_.decimal_dsc);_.cancel()}},_.Updatedatavalue=function(){var e;""!=_.temp_doc.gltd_doc_code&&null!=_.temp_doc.gltd_doc_code?""==_.temp_doc.gltd_post_date||null==_.temp_doc.gltd_post_date?swal({text:" please select Post Date ",width:380}):_.prdocdata.length<=0?swal({text:" Please Add Transaction Details ",width:380}):_.totalDebit!=_.totalcredit?swal({text:"Debit Amount: "+_.totalDebit+" Is Not Equal To Credit Amount: "+_.totalcredit,width:380}):(I="Save",null==_.temp&&(_.temp=""),e={gltd_comp_code:f,gltd_prepare_user:h,gltd_doc_code:_.block1.gltd_doc_code,gltd_prov_doc_no:_.block1.gltd_prov_doc_no,gltd_doc_date:_.temp_doc.gltd_doc_date,gltd_cur_status:I,gltd_post_date:_.temp_doc.gltd_post_date,gltd_doc_narr:_.temp_doc.gltd_doc_narr,gltd_remarks:_.temp_doc.gltd_remarks,gltd_prepare_date:_.temp_doc.gltd_doc_date,gltd_final_doc_no:"0",gltd_verify_user:h,gltd_verify_date:_.temp_doc.gltd_doc_date,gltd_authorize_user:h,gltd_authorize_date:_.temp_doc.gltd_doc_date,gltd_paid_to:_.block1.gltd_paid_to,gltd_cheque_no:_.block1.gltd_cheque_No,gltd_cheque_due_date:_.block1.gltd_cheque_due_date},r.post(l.apiUrl+"api/JVCreation/UpdateFins_temp_docs",e).then(function(e){_.msg1=e.data,!0===_.msg1?(_.prvno=_.block1.gltd_prov_doc_no,_.Insert_Fins_temp_doc_details()):!1===_.msg1?swal({title:"Alert",text:"Record Not Updated. ",width:300,height:200}):swal("Error-"+_.msg1)})):swal({text:" please select Doc Code ",width:380})},_.cancel=function(){$("#cmb_acc_Code3").select2("val",""),_.vis.updatebtn=!1,_.vis.add_grid=!0,_.cramount=!1,_.dramount=!1,_.vis.cmb_acct=!0,_.vis.txt_acct=!1,_.ldgcd=!1,_.chkcost=!1,_.cost_combo=!1,_.block3=[],_.block3.gldd_include_vat=!1,_.block3.gldd_vat_enable=!1,_.gltd_attr1="",_.sims_invoice_image1="",_.gltd_attribute1="","CN"==_.cmb_doc_cd.gldc_doc_code_type&&(_.vis.main_acct_grid=!1)},_.checkevaluesdebit=function(){var e;(""!=_.block3.gldd_doc_amount_debit||null!=_.block3.gldd_doc_amount_debit)&&0An item has been assigned to you

In Create Voucher, the voucher ${_.prvno} initiated by ${h} is now with you for the Voucher Approval

${_.temp_doc.gltd_doc_code} / ${_.prvno}

Created by: ${h}

Narration: ${_.temp_doc.gltd_doc_narr}

School code: ${_.schoolId}

Total Debit: ${_.totalDebit}

Total Credit: ${_.totalcredit}

`,_.email_subject="Voucher Approval",_.p_email=_.listColl[0][e].email,_.email_cc="",a={email_message:_.email_msg,email_subject:_.email_subject,p_email:_.p_email,email_cc:_.email_cc,fin_year:y},(t=[]).push(a),r.post(l.apiUrl+"api/JVCreation/VoucherSendEmail",t).then(function(e){}))},_.Insert_temp_docs=function(){if(""!=_.temp_doc.gltd_doc_code&&null!=_.temp_doc.gltd_doc_code)if(""==_.temp_doc.gltd_post_date||null==_.temp_doc.gltd_post_date)swal({text:" please select Post Date ",width:380});else if(_.prdocdata.length<=0)swal({text:" Please Add Transaction Details ",width:380});else if(_.totalDebit!=_.totalcredit)swal({text:"Debit Amount: "+_.totalDebit+" Is Not Equal To Credit Amount: "+_.totalcredit,width:380});else if(!0!==_.temp_doc.chk_recur||"0"!=_.temp_doc.gltd_recur_period&&""!=_.temp_doc.gltd_recur_period&&null!=_.temp_doc.gltd_recur_period){var e=[];I=!0===E?"Aut":!0===B?"Verify":"Save",null==_.temp&&(_.temp=""),!0===_.temp_doc.chk_recur&&(_.chk_rcur="R");for(var t=0;t<_.prdocdata.length;t++){if(_.chk_conditions=_.prdocdata.every(e=>e.gldd_acct_code),!1===_.chk_conditions)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===_.chk_conditions&&(_.totalcredit<=0||_.totalcredit<="0")&&(_.totalDebit<=0||_.totalDebit<="0"))return void swal({text:"Please Enter Amount",width:380})}var a={gltd_comp_code:f,gltd_prepare_user:h,gltd_doc_code:_.temp_doc.gltd_doc_code,gltd_doc_date:_.temp_doc.gltd_doc_date,gltd_cur_status:I,gltd_save_srl:_.temp.sims_dep,gltd_app_name:"JCN160",gltd_post_date:_.temp_doc.gltd_post_date,gltd_doc_narr:_.temp_doc.gltd_doc_narr,gltd_remarks:_.temp_doc.gltd_remarks,gltd_prepare_date:_.temp_doc.gltd_doc_date,gltd_final_doc_no:"0",gltd_verify_user:h,gltd_verify_date:!0===B?_.temp_doc.gltd_doc_date:null,gltd_authorize_user:!0===E?h:null,gltd_authorize_date:!0===E?_.temp_doc.gltd_doc_date:null,gltd_paid_to:_.block1.gltd_paid_to,gltd_cheque_no:_.block1.gltd_cheque_No,gltd_batch_source:_.chk_rcur,gltd_payment_date:_.block1.gltd_payment_date};e.push(a),r.post(l.apiUrl+"api/BankPayment/Insert_Fins_temp_docsFin2",e).then(function(e){_.prvno=e.data,""!=_.prvno&&null!=_.prvno?(_.Insert_Fins_temp_doc_details(),_.Docno="0"):swal({title:"Alert",text:"Record Not inserted. "+_.prvno,width:300,height:200})})}else swal({text:"Please Enter Recurring Period",width:380});else swal({text:" please select Doc Code ",width:380})},_.Docno="0",_.Insert_Fins_temp_doc_details=function(){let t=[],a=[],o=1,s=1;if("CN"!=_.cmb_doc_cd.gldc_doc_code_type)for(let e=0;e<_.prdocdata.length;e++){var n={gldd_doc_narr:_.prdocdata[e].gldd_doc_narr,gldd_dept_code:_.prdocdata[e].gldd_dept_code,gldd_ledger_code:_.prdocdata[e].gldd_ledger_code,gldd_acct_code:_.prdocdata[e].gldd_acct_code,gldd_party_ref_no:_.prdocdata[e].gldd_party_ref_no,gldd_party_ref_date:_.prdocdata[e].ptyref_date,gldd_cost_center_code:_.prdocdata[e].glco_cost_centre_code,gldd_doc_amount_debit:_.prdocdata[e].gldd_doc_amount_debit,gldd_doc_amount_credit:_.prdocdata[e].gldd_doc_amount_credit,gldd_tax_code:_.prdocdata[e].gldd_tax_code,gldd_tax_acct_code:_.prdocdata[e].gldd_tax_acct_code,gldd_tax_percentage:_.prdocdata[e].gldd_tax_percentage,gldd_tax_amount:_.prdocdata[e].gldd_tax_amount,gldd_comp_code:f,gldd_doc_code:_.temp_doc.gltd_doc_code,gldd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gldd_line_no:o,finance_year:y,gltd_post_date:_.temp_doc.gltd_post_date,gldd_trn_no:_.prdocdata[e].gldd_trn_no,gldd_PTY_name:_.prdocdata[e].gldd_PTY_name,gltd_remarks:_.prdocdata[e].gltd_remarks,gldd_state_code:_.prdocdata[e].gldd_state_code};"RCM"==n.gldd_tax_code&&(0==n.gldd_doc_amount_debit?(n.gldd_tax_amount=n.gldd_doc_amount_credit/(1+n.gldd_tax_percentage/100),n.gldd_tax_amount=n.gldd_tax_amount*n.gldd_tax_percentage/100):0==n.gldd_doc_amount_credit&&(n.gldd_tax_amount=n.gldd_doc_amount_debit/(1+n.gldd_tax_percentage/100),n.gldd_tax_amount=n.gldd_tax_amount*n.gldd_tax_percentage/100)),o++,t.push(n)}for(let e=0;e<_.prdocdata1.length;e++){var i;null!=_.prdocdata1[e].master_acno&&(i={gldd_doc_narr:_.prdocdata1[e].gldd_doc_narr,gldd_dept_code:_.prdocdata1[e].master_acno.gldd_dept_code,gldd_ledger_code:_.prdocdata1[e].gldd_ledger_code,gldd_acct_code:_.prdocdata1[e].master_acno.master_acno,gldd_party_ref_no:_.prdocdata1[e].gldd_party_ref_no,gldd_party_ref_date:_.prdocdata1[e].ptyref_date,gldd_cost_center_code:_.prdocdata1[e].glco_cost_centre_code,gldd_doc_amount_debit:_.prdocdata1[e].gldd_doc_amount_debit,gldd_doc_amount_credit:_.prdocdata1[e].gldd_doc_amount_credit,gldd_comp_code:f,gldd_doc_code:_.temp_doc.gltd_doc_code,gldd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gldd_line_no:o,finance_year:y,gltd_post_date:_.temp_doc.gltd_post_date,gldd_trn_no:_.prdocdata1[e].gldd_trn_no,gldd_PTY_name:_.prdocdata1[e].gldd_PTY_name},o++,t.push(i))}let d=0;for(let e=0;etype: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}$(document).ready(function(){function e(){$("input[type=file]").change(function(){var e=this.files,t=$(this).parent();1type: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}e(),$("input[type=file]").on("focus",function(){$(this).parent().addClass("focus")}),$("input[type=file]").on("blur",function(){$(this).parent().removeClass("focus")}),$("#clearButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#cancelButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#backButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#prepareButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#verifyButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#authorizeButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(T),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)})}),_.showStatisticalData=function(){_.showStatistics=!0},_.handleTabKey=function(e,t,a,o){9===t.which&&a===e.length-1&&_.add_Grid(e,t,a,o)},_.doc_data=!1,_.ddt={},_.file_changed=function(e,t){if(10485760
"),$(t.currentTarget).parents("tr").after(p),s.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;an.getDates[0].sims_financial_year_start_date?n.edt.to_date=n.check_today:n.edt.to_date=n.getDates[0].sims_financial_year_end_date,console.log("from date to date :"+n.getDates[0].sims_financial_year_start_date+" "+n.getDates[0].sims_financial_year_end_date)}),s.get(i.apiUrl+"api/GLPeriodReportController/getTrialBalanceGroup").then(function(e){n.group_data=e.data,setTimeout(function(){$("#group_id").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#group_id").multipleSelect("checkAll")},1e3)}),s.get(i.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){n.decimal_degit=e.data,n.decimal_dsc=n.decimal_degit[0].comp_curcy_dec}),n.propertyName=null,n.reverse=!1,n.sort=function(e){n.colname=e,n.reverse=n.colname===e&&!n.reverse},n.main_ex=!0,n.mainexpand=function(e){n.main_ex=e;for(var t=0;t"+e+''+t+""),o.close(),a.focus(),n.detailsField=!1,n.colsvis=!1,n.show_report_header=!1,n.getsubdetail())})},n.ischeck=function(){n.checklick=function(){var e=document.getElementById("Show_Schedule");1==e.checked&&e.checked}},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}])}(),function(){"use strict";var e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("FixedAssetDepreciationCalculationCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(o,e,t,a,s,n,i,d){o.pagesize="5",o.pageindex=0,o.cum_deprn=0,o.mth_deprn=0,o.book_value=0,o.save_btn=!0,o.Update_btn=!1,o.display=!0,o.table=!1,o.export_btn=!1,o.busy=!1,o.temp=[],o.show_btn=!1,o.SaveBtnDisabled=!0;let c=t.globals.currentUser.username,r=(c=c.toLowerCase(),o.finnDetail=JSON.parse(window.localStorage.Finn_comp),o.finnDetail.company),l=o.finnDetail.year;setTimeout(function(){$("#cmb_acc_Code3").select2()},100),o.temp.year1=l,n.get(d.apiUrl+"api/AssetDepreciation/getDepreciationAcademicyear?comp_year="+r).then(function(e){o.getyear=e.data,o.sims_academic_year=o.getyear[0].sims_academic_year,o.showCalculated_Depreciationof_all()}),o.getItemsName=function(e){n.get(d.apiUrl+"api/AssetDepreciation/getItemName?item_name="+e).then(function(e){o.getAsset_type=e.data})},n.get(d.apiUrl+"api/AssetDepreciation/getAssetType").then(function(e){o.asset_type_data=e.data}),n.get(d.apiUrl+"api/AssetDepreciation/getPeriods?fins_year="+l+"&fins_comp="+r).then(function(e){o.periods_Name=e.data,o.showCalculated_Depreciation()}),o.showCalculated_Depreciationof_all=function(){n.get(d.apiUrl+"api/AssetDepreciation/getallPeriodsData?fins_year="+o.sims_academic_year+"&fins_comp="+r).then(function(e){o.btn1=!0,o.periods_all_data=e.data})},o.closemodal=function(){o.showCalculated_Depreciationof_all()},o.showCalculated_Depreciation=function(){n.get(d.apiUrl+"api/AssetDepreciation/getallPeriodsData?fins_year="+o.sims_academic_year+"&fins_comp="+r).then(function(e){o.periods_all_data=e.data})},a(function(){$("#fixTable").tableHeadFixer({top:1})},100),o.size=function(e){o.pagesize=e,o.currentPage=1,o.numPerPage=e,o.makeTodos()},o.index=function(e){o.pageindex=e,o.currentPage=e,o.makeTodos(),(void 0).checked=!1,o.CheckAllChecked()},o.filteredTodos=[],o.currentPage=1,o.numPerPage=5,o.maxSize=5,o.makeTodos=function(){var e=parseInt(o.totalItems%o.numPerPage),e=(o.pagersize="0"==e?parseInt(o.totalItems/o.numPerPage):parseInt(o.totalItems/o.numPerPage)+1,(o.currentPage-1)*o.numPerPage),t=parseInt(e)+parseInt(o.numPerPage);o.filteredTodos=o.todos.slice(e,t);for(let e=0;e"),$(t.currentTarget).parents("tr").after(m),o.flag=!1;else{$("#innerRow").css({display:"none"});for(let e=0;es.max_value&&(swal({title:"Alert",text:"Minimum Value less than Maximum Value",showCloseButton:!0,width:300,height:200}),s.temp.glpc_min_limit="")},s.max_limit_cal1=function(e,t){s.max_value1=parseInt(e),s.min_value1=parseInt(t),s.min_value1>s.max_value1&&(swal({title:"Alert",text:"Minimum Value less than Maximum Value",showCloseButton:!0,width:300,height:200}),s.temp.glpc_max_limit_per_transaction="")},n.get(i.apiUrl+"api/BankMaster/GetGLAccountNumber").then(function(e){s.GlACNO=e.data}),s.size=function(e){s.pagesize=e,s.currentPage=1,s.numPerPage=e,u.checked=!1,s.makeTodos()},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),u.checked=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=5,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_bank_code.toLowerCase().indexOf(t.toLowerCase())||-1s.max_value&&(swal({title:"Alert",text:"Minimum Value less than Maximum Value",showCloseButton:!0,width:300,height:200}),s.temp.glpc_min_limit="")},s.max_limit_cal1=function(e,t){s.max_value1=parseInt(e),s.min_value1=parseInt(t),s.min_value1>s.max_value1&&(swal({title:"Alert",text:"Minimum Value less than Maximum Value",showCloseButton:!0,width:300,height:200}),s.temp.glpc_max_limit_per_transaction="")},n.get(i.apiUrl+"api/BankMaster/GetGLAccountNumber").then(function(e){s.GlACNO=e.data}),s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.get_allData,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos()),p.checked=!1},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),p.checked=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).pb_bank_code.toLowerCase().indexOf(t.toLowerCase())||-1s&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.rs&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r=s.report_data[t].prevYearInv?(s.report_data[t].prevYearInv_line_total=s.report_data[t].prevYearInv,s.report_data[t].nFive-s.report_data[t].prevYearInv>s.report_data[t].prev_prevYearInv?(s.report_data[t].prev_prevYearInv_line_total=s.report_data[t].prev_prevYearInv,0"+e+''+t+""),o.close(),a.focus(),s.getdetailNew()),s.getdetailNew()})},s.reset_data=function(){s.filteredTodos=[],s.temp.sims_grade_code="",s.temp.sims_section_code="",s.sims_appl_parameter=!1,s.grade="",s.section="",s.total_length="",s.status="",s.searchText="",s.cur="",s.acad="",s.temp.curYearInv_total=0,s.temp.prevYearInv_total=0,s.temp.prev_prevYearInv_total=0,s.temp.moreThan3Year_total=0,s.temp.nFive_total=0,s.temp.grand_total=0,s.busy=!1,s.pager=!1;try{$("#cmb_grade_code").multipleSelect("uncheckAll")}catch(e){}try{$("#cmb_section_code").multipleSelect("uncheckAll")}catch(e){}try{$("#cmb_status").multipleSelect("checkAll")}catch(e){}},s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},s.size=function(e){"All"==e?(s.currentPage=1,s.filteredTodos=s.report_data,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.isCollapsed=!1,s.toggleCollapse=function(){s.isCollapsed=!s.isCollapsed},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),main.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=100,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t)}}])}(),function(){"use strict";var n,i=[],e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("DocumentUser_PCCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(d,e,t,a,o,c,r){d.pagesize="5",d.pageindex=0,d.save_btn=!0;d.Update_btn=!1,d.display=!1,d.table=!0,d.obj=[],d.autorise=[],d.finnDetail=JSON.parse(window.localStorage.Finn_comp);var l=d.finnDetail.company,s=d.finnDetail.year;c.get(r.apiUrl+"api/DocumentUser_PC/getDocumentUserDetails_PC?comp_code="+l+"&fyear="+s).then(function(e){d.docuser=e.data,d.totalItems=d.docuser.length,d.todos=d.docuser,d.makeTodos()}),c.get(r.apiUrl+"api/DocumentUser_PC/GetDepartment_PC?comp_code="+l+"&fyear="+s).then(function(e){d.dept=e.data}),c.get(r.apiUrl+"api/JVCreation/getDocCodeJV_DPS?comp_code="+l+"&finance_year="+s).then(function(e){d.geDocCode_jv=e.data}),d.size=function(e){d.pagesize=e,d.currentPage=1,d.numPerPage=e},d.index=function(e){d.pageindex=e,d.currentPage=e,d.makeTodos()},d.filteredTodos=[],d.currentPage=1,d.numPerPage=5,d.maxSize=5,d.makeTodos=function(){var e=parseInt(d.totalItems%d.numPerPage),e=(d.pagersize="0"==e?parseInt(d.totalItems/d.numPerPage):parseInt(d.totalItems/d.numPerPage)+1,(d.currentPage-1)*d.numPerPage),t=parseInt(e)+parseInt(d.numPerPage);d.filteredTodos=d.todos.slice(e,t)},d.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).gldu_doc_code.toLowerCase().indexOf(t.toLowerCase())||-1s&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r"),$(t.currentTarget).parents("tr").after(c),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"),$(t.currentTarget).parents("tr").after(r),i.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",i.flag=!0)},i.getpartyclass=function(e){null!=e&&d.get(c.apiUrl+"api/common/SubLedgerMaster/GetAllPartyControlClass?comp_code="+l+"&fin_yr="+m+"&ledger_code="+e).then(function(e){i.partyclass_data=e.data})},i.exportData=function(){swal({title:"",text:"Do you want to Export in MS-Excel?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("rpt_data").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,"Report.xls"))})},i.searchd=function(e,t){return _.filter(e,function(e){return p(e,t)})},i.search=function(){i.todos=i.searchd(i.subledger_data,i.searchText),i.totalItems=i.todos.length,i.currentPage="1",""==i.searchText&&(i.todos=i.subledger_data),i.makeTodos()},i.sublist=function(){for(var e=0;es&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r"+e+''+t+""),o.close(),a.focus()},s.exportDenominations=function(){var e;0!=s.denomination_collectn_amt?e=!0:(e=!1,swal({title:"Alert",text:"Please Enter Denomination details",width:300,height:200})),1==e&&swal({title:"",text:"Are you sure you want to Save CashInHand.xls ?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:390,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("printdata4").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,"CashInHand.xls"),s.clearDem(),s.getDenominations())})}}])}(),function(){"use strict";var e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CumulativeGLQueryCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,e,t,a,o,s,i){n.edt={},n.main_true=!0,n.assetmaster_data=[];n.dept_comp_code,n.slma_acno_dept_no,n.finyr,n.valstatus=!1,n.edit_data=!1,n.display=!1,n.pagesize="10",n.pageindex="0",n.pager=!0,n.grid=!0,n.grid1=!1,n.main_table=!0,n.show_report_header=!1,n.ng_if_schedule_group=!1,n.ng_if_show_schedule=!1,n.ng_if_sims_show_budget=!1,n.ng_if_sims_show_budget_varience=!1,n.ng_if_sims_show_varience_percentage=!1,n.filteredTodos=[],n.currentPage=1,n.numPerPage=10,n.maxSize=10,t.globals.currentUser.username.toLowerCase();n.finnDetail=JSON.parse(window.localStorage.Finn_comp);var d=new Date,c=d.getDate(),r=d.getMonth()+1,c=(d.getFullYear(),(d=new Date).getDate());t.globals.currentUser.username;c<10&&(c="0"+c);(r=d.getMonth()+1)<10&&(r="0"+r);var l,m,p,u,g,d=d.getFullYear(),h=(n.sdate=c+"-"+r+"-"+d,n.edate=c+"-"+r+"-"+d,n.from_date=c+"-"+r+"-"+d,n.mom_end_date=c+"-"+r+"-"+d,n.finnDetail.company),f=n.finnDetail.year;function y(e){(e=e||window.event).preventDefault(),u=e.clientX,g=e.clientY,document.onmouseup=v,document.onmousemove=b}function b(e){(e=e||window.event).preventDefault(),m=u-e.clientX,p=g-e.clientY,u=e.clientX,g=e.clientY,l.style.top=l.offsetTop-p+"px",l.style.left=l.offsetLeft-m+"px"}function v(){document.onmouseup=null,document.onmousemove=null}s.get(i.apiUrl+"api/GLSLQuery/getDate_SL_Query?finance_year="+f).then(function(e){n.getDates=e.data,n.edt.from_date=n.getDates[0].sims_financial_year_start_date,n.check_todayn.getDates[0].sims_financial_year_start_date?n.edt.to_date=n.check_today:n.edt.to_date=n.getDates[0].sims_financial_year_end_date,console.log("from date to date :"+n.getDates[0].sims_financial_year_start_date+" "+n.getDates[0].sims_financial_year_end_date)}),s.get(i.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data}),s.get(i.apiUrl+"api/PrintVoucher/getTrialBalanceGroup").then(function(e){n.group_data=e.data,setTimeout(function(){$("#group_id").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#group_id").multipleSelect("checkAll")},1e3)}),s.get(i.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){n.decimal_degit=e.data,n.decimal_dsc=n.decimal_degit[0].comp_curcy_dec}),n.propertyName=null,n.reverse=!1,n.sort=function(e){n.colname=e,n.reverse=n.colname===e&&!n.reverse},n.main_ex=!0,n.mainexpand=function(e){n.main_ex=e;for(var t=0;t"+e+''+t+""),o.close(),a.focus(),n.detailsField=!1,n.colsvis=!1,n.show_report_header=!1,n.getsubdetail())})},n.ischeck=function(){n.checklick=function(){var e=document.getElementById("Show_Schedule");1==e.checked&&e.checked}},n.getSchdCode=function(){s.get(i.apiUrl+"api/CumSubSumReport/getScheduleCodebygrp?comp_code="+h+"&finance_year="+f+"&group_code="+n.temp.sims_group).then(function(e){n.schdCodes=e.data,setTimeout(function(){$("#schedule_code").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},n.getSchdAcctCode=function(){s.get(i.apiUrl+"api/CumSubSumReport/getScheduleAcctCode?comp_code="+h+"&finance_year="+f+"&group_code="+n.temp.sims_group+"&schd_code="+n.temp.schedulecode).then(function(e){n.schdAcctCodes=e.data,setTimeout(function(){$("#schd_acccount_code").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},s.get(i.apiUrl+"api/GLSLQuery/getDate_SL_Query?finance_year="+f).then(function(e){n.getDates=e.data,0moment(e)&&(n.edt.from_date="",swal({title:"Alert",text:"Please select date between "+n.sDate+" to "+n.eDate+" in financial year",showCloseButton:!0,width:380}))},l=document.getElementById("mydiv"),g=u=p=m=0,document.getElementById(l.id+"header")?document.getElementById(l.id+"header").onmousedown=y:l.onmousedown=y,n.onChange1=function(){"3"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")),"4"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"5"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("week").format("DD-MM-YYYY")),"6"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").endOf("week").format("DD-MM-YYYY")),"7"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"8"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")),"9"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")),"10"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").month("September").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").add("year",1).month("August").endOf("month").format("DD-MM-YYYY")),"11"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract("year",1).month("September").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").month("August").startOf("month").format("DD-MM-YYYY")),"12"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY")),"13"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),n.edt.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"14"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").endOf("quarter").format("DD-MM-YYYY"),n.edt.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"15"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"16"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"17"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"18"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"19"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"20"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"21"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"22"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY")),"23"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY")),"24"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"week").endOf("week").format("DD-MM-YYYY")),"25"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").add(4,"week").startOf("week").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").add(4,"week").endOf("week").format("DD-MM-YYYY")),"26"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"month").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"month").endOf("month").format("DD-MM-YYYY")),"27"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"year").endOf("year").format("DD-MM-YYYY")),"28"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(30,"days").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"29"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(60,"days").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"30"==n.edt.date_option&&(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(90,"days").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY"))},n.onChange=function(){var e=moment(n.sDate,"DD-MM-YYYY").format("YYYY-MM-DD"),t=moment(n.edt.from_date,"DD-MM-YYYY").format("YYYY-MM-DD");moment(t)c.getDates[0].sims_financial_year_start_date?c.edt.to_date=c.check_today:c.edt.to_date=c.getDates[0].sims_financial_year_end_date,console.log("from date to date :"+c.getDates[0].sims_financial_year_start_date+" "+c.getDates[0].sims_financial_year_end_date)}),s.get(n.apiUrl+"api/PrintVoucher/getTrialBalanceGroup").then(function(e){c.group_data=e.data,setTimeout(function(){$("#group_id").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#group_id").multipleSelect("checkAll")},1e3)}),s.get(n.apiUrl+"api/GLAccountsCreateView/GetAll_glmaster_Department_Code?co_code="+c.comp_code+"&year="+m).then(function(e){c.dep_data=e.data,setTimeout(function(){$("#dep_id").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#dep_id").multipleSelect("checkAll")},1e3)}),s.get(n.apiUrl+"api/StudentFee/getDecimalPlaces").then(function(e){c.decimal_degit=e.data,c.decimal_dsc=c.decimal_degit[0].comp_curcy_dec}),s.get(n.apiUrl+"api/PrintVoucher/getheaderformat").then(function(e){c.head=e.data,c.header_format=c.head[0].sims_appl_form_field_value1,"2"==c.header_format?(c.header_format2=!0,c.header_format1=!1):(c.header_format1=!0,c.header_format2=!1),console.log("Header",c.header_format)}),c.propertyName=null,c.reverse=!1,c.sort=function(e){c.colname=e,c.reverse=c.colname===e&&!c.reverse},c.main_ex=!0,c.mainexpand=function(e){c.main_ex=e;for(var t=0;t"+e+''+t+""),o.close(),a.focus(),c.detailsField=!1,c.colsvis=!1,c.show_report_header=!1,c.getsubdetail())})},c.ischeck=function(){c.checklick=function(){var e=document.getElementById("Show_Schedule");1==e.checked&&e.checked}},c.exportData=function(){swal({title:"Alert",text:"Do you want to Export in MS-Excel?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("rpt_data").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,"CumulativeSubledgerSummaryReport.xls"))})},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}])}(),function(){"use strict";var e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("TrialBalanceViewContV2",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","AuthenticationService",function(c,e,t,a,o,s,n,i){c.edt={};var d=new Date,r=(c.get_date=d).getDate(),l=(r<10&&(r="0"+r),d.getMonth()+1),d=(l<10&&(l="0"+l),d.getFullYear()),m=(c.check_today=r+"-"+l+"-"+d,c.main_true=!0,c.main_true1=!0,c.main_true2=!0,c.main_true3=!0,c.main_true4=!0,c.main_true5=!0,c.main_true6=!0,c.main_true7=!0,c.assetmaster_data=[],c.dept_comp_code,c.slma_acno_dept_no,c.finyr,c.valstatus=!1,c.edit_data=!1,c.display=!1,c.pagesize="10",c.pageindex="0",c.pager=!0,c.grid=!0,c.grid1=!1,c.main_table=!0,c.edt={view_mode:!0},c.show_report_header=!1,c.ng_if_schedule_group=!1,c.ng_if_show_schedule=!1,c.ng_if_show_parent_acc=!1,c.ng_if_sims_show_budget=!1,c.ng_if_sims_show_budget_varience=!1,c.ng_if_sims_show_varience_percentage=!1,c.filteredTodos=[],c.currentPage=1,c.numPerPage=10,c.maxSize=10,t.globals.currentUser.username.toLowerCase(),c.finnDetail=JSON.parse(window.localStorage.Finn_comp),c.finnDetail.company,c.finnDetail.year);c.comp_code=c.finnDetail.company,s.get(n.apiUrl+"api/CumSubSumReport/getCompCode").then(function(e){c.sims_cur=e.data,0"+e+''+t+""),o.close(),a.focus(),c.detailsField=!1,c.colsvis=!1,c.show_report_header=!1,c.getsubdetail())})},c.ischeck=function(){c.checklick=function(){var e=document.getElementById("Show_Schedule");1==e.checked&&e.checked}},c.exportData=function(){swal({title:"Alert",text:"Do you want to Export in MS-Excel?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&(e=new Blob([document.getElementById("rpt_data").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,"CumulativeSubledgerSummaryReport.xls"))})},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}])}(),function(){"use strict";var e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("TrialBalanceViewnewvCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","AuthenticationService",function(n,e,t,a,o,s,i,d){n.edt={},n.groupedData={};var _=new Date,c=(n.get_date=_).getDate(),r=(c<10&&(c="0"+c),_.getMonth()+1),_=(r<10&&(r="0"+r),_.getFullYear()),l=(n.from_date=c+"-"+r+"-"+_,t.globals.currentUser.username);n.allGroupTotal={opBalDr:0,opBalCr:0,transAmtDr:0,transAmtCr:0,clBalDr:0,clBalCr:0},n.isCompact=!0,n.toggleFontSize=function(){$("#loader").modal({backdrop:"static",keyboard:!1}),n.isCompact=!n.isCompact,$("#loader").modal("hide")},n.fetchdata=function(){var e=new Date,e=($("#loader").modal({backdrop:"static",keyboard:!1}),e.getFullYear().toString()+(e.getMonth()+1).toString().padStart(2,"0")+e.getDate().toString().padStart(2,"0")+e.getHours().toString().padStart(2,"0")+e.getMinutes().toString().padStart(2,"0")+e.getSeconds().toString().padStart(2,"0")+e.getMilliseconds().toString().padStart(3,"0"));s.get(i.apiUrl+"api/Trialbalv/Getinfo?from_date="+n.edt.from_date+"&to_date="+n.edt.to_date+"&user="+l+"&random="+e).then(function(e){n.tbdata=e.data.table,n.tbdata.forEach(e=>{n.groupedData[e.glac_group_name]||(n.groupedData[e.glac_group_name]={expanded:!0,schedules:{},groupTotal:{opBalDr:0,opBalCr:0,transAmtDr:0,transAmtCr:0,clBalDr:0,clBalCr:0}});var t=n.groupedData[e.glac_group_name],a=(t.schedules[e.glac_sched_name]||(t.schedules[e.glac_sched_name]={expanded:!0,parents:{},scheduleTotal:{groupName:e.glac_group_name,opBalDr:0,opBalCr:0,transAmtDr:0,transAmtCr:0,clBalDr:0,clBalCr:0}}),t.schedules[e.glac_sched_name]),o=void 0!==e.glac_parent_name?e.glac_parent_name:"-",s=(a.parents[o]||(a.parents[o]={accounts:[],expanded:!0,parentTotal:{groupName:e.glac_group_name,scheduleName:e.glac_sched_name,opBalDr:0,opBalCr:0,transAmtDr:0,transAmtCr:0,clBalDr:0,clBalCr:0}}),a.parents[o]),o={groupName:e.glac_group_name,scheduleName:e.glac_sched_name,parentName:o,accountCode:e.glac_code,accountName:e.glac_name,opBalDr:e.dr_ob,opBalCr:e.cr_ob,transAmtDr:e.dr_prd,transAmtCr:e.cr_prd,clBalDr:e.dr_ob+e.dr_prd,clBalCr:e.cr_ob+e.cr_prd};s.accounts.push(o),s.parentTotal.opBalDr+=o.opBalDr,s.parentTotal.opBalCr+=o.opBalCr,s.parentTotal.transAmtDr+=o.transAmtDr,s.parentTotal.transAmtCr+=o.transAmtCr,s.parentTotal.clBalDr+=o.clBalDr,s.parentTotal.clBalCr+=o.clBalCr,a.scheduleTotal.opBalDr+=o.opBalDr,a.scheduleTotal.opBalCr+=o.opBalCr,a.scheduleTotal.transAmtDr+=o.transAmtDr,a.scheduleTotal.transAmtCr+=o.transAmtCr,a.scheduleTotal.clBalDr+=o.clBalDr,a.scheduleTotal.clBalCr+=o.clBalCr,t.groupTotal.opBalDr+=o.opBalDr,t.groupTotal.opBalCr+=o.opBalCr,t.groupTotal.transAmtDr+=o.transAmtDr,t.groupTotal.transAmtCr+=o.transAmtCr,t.groupTotal.clBalDr+=o.clBalDr,t.groupTotal.clBalCr+=o.clBalCr,n.allGroupTotal.opBalDr+=o.opBalDr,n.allGroupTotal.opBalCr+=o.opBalCr,n.allGroupTotal.transAmtDr+=o.transAmtDr,n.allGroupTotal.transAmtCr+=o.transAmtCr,n.allGroupTotal.clBalDr+=o.clBalDr,n.allGroupTotal.clBalCr+=o.clBalCr}),console.log(n.groupedData),console.log(n.groupedData),$("#loader").modal("hide")})},n.exportToCSV=function(){var e=n.getExportData();let t="data:text/csv;charset=utf-8,";t+=["Acct Type","Acct group","Parent Acct","Acct Code","Acct Name","Op Bal Dr","Op Bal Cr","Trans Amt Dr","Trans Amt Cr","Cl Bal Dr","Cl Bal Cr"].join(",")+"\n",e.forEach(function(e){e=[e.groupName,e.scheduleName,e.parentName,e.accountCode,e.accountName,e.opBalDr,e.opBalCr,e.transAmtDr,e.transAmtCr,e.clBalDr,e.clBalCr];t+=e.join(",")+"\n"});var e=encodeURI(t),a=document.createElement("a");a.setAttribute("href",e),a.setAttribute("download","trial_balance.csv"),document.body.appendChild(a),a.click(),document.body.removeChild(a)},n.getExportData=function(){let s=[];return angular.forEach(n.groupedData,function(e,o){angular.forEach(e.schedules,function(e,a){angular.forEach(e.parents,function(e,t){angular.forEach(e.accounts,function(e){s.push({groupName:o,scheduleName:a,parentName:t,accountCode:e.accountCode,accountName:e.accountName,opBalDr:e.opBalDr,opBalCr:e.opBalCr,transAmtDr:e.transAmtDr,transAmtCr:e.transAmtCr,clBalDr:e.clBalDr,clBalCr:e.clBalCr})})})})}),s},s.get(i.apiUrl+"api/TrialBalanceVer3/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data,s.get(i.apiUrl+"api/Trialbalv/Getgetdate?opr=C").then(function(e){n.date_range=e.data.table,n.edt.date_option="10",n.onChange1()}),s.get(i.apiUrl+"api/Trialbalv/Getgetdate?opr=P").then(function(e){n.date_range1=e.data.table})}),n.onChange1=function(){"2"==n.edt.date_option||"1"==n.edt.date_option?(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")):"3"==n.edt.date_option?(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")):"4"==n.edt.date_option?(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")):"8"==n.edt.date_option?(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")):"9"==n.edt.date_option?(n.edt.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")):"10"==n.edt.date_option?(n.edt.from_date=moment(n.date_range[0].sims_financial_year_start_date,"DD-MM-YYYY").format("DD-MM-YYYY"),n.edt.to_date=moment(n.date_range[0].sims_financial_year_end_date,"DD-MM-YYYY").format("DD-MM-YYYY")):"11"==n.edt.date_option&&(n.edt.from_date=moment(n.date_range1[0].sims_financial_year_start_date,"DD-MM-YYYY").format("DD-MM-YYYY"),n.edt.to_date=moment(n.date_range1[0].sims_financial_year_end_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"13"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),n.edt.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"14"==n.edt.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").subtract(4,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),n.edt.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").subtract(4,"month").endOf("month").format("DD-MM-YYYY"))}}])}(),function(){"use strict";var u,g=[],e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("FinancialYearCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(o,e,t,a,s,n,i){o.pagesize="10",o.pageindex=0,o.save_btn=!0,o.Update_btn=!1,o.display=!1,o.table=!0,o.flag1=!1,n.get(i.apiUrl+"api/Financialyear/getDocumentStatus").then(function(e){o.docstatus_Data=e.data,o.temp.sims_financial_year_status=o.docstatus_Data[0].sims_financial_year_status}),n.get(i.apiUrl+"api/Financialyear/getDocumentDDLYear").then(function(e){o.docyear_Data1=e.data,o.temp.sims_financial_year=o.docyear_Data1[6].sims_academic_year}),n.get(i.apiUrl+"api/Financialyear/getAllFinancialYear").then(function(e){o.fin_year=e.data,o.totalItems=o.fin_year.length,o.todos=o.fin_year,o.makeTodos(),o.flag=!1}),o.size=function(e){o.pagesize=e,o.currentPage=1,o.numPerPage=e},o.index=function(e){o.pageindex=e,o.currentPage=e,o.makeTodos(),u.checked=!1,o.row1=""},o.filteredTodos=[],o.currentPage=1,o.numPerPage=10,o.maxSize=10,o.makeTodos=function(){var e=parseInt(o.totalItems%o.numPerPage),e=(o.pagersize="0"==e?parseInt(o.totalItems/o.numPerPage):parseInt(o.totalItems/o.numPerPage)+1,(o.currentPage-1)*o.numPerPage),t=parseInt(e)+parseInt(o.numPerPage);o.filteredTodos=o.todos.slice(e,t)},o.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_financial_year.toLowerCase().indexOf(t.toLowerCase())||-1
CONSEQUENCE WORKING DAY CONSEQUENCE LEAVE DAY MIN WORKING DAYDURATIONFIRST LEAVE DAY
"+e.cn_cons_cl_working_days+" "+e.cn_cons_cl_leave_days+" "+e.cn_min_work_days+""+e.cn_duration+""+e.cn_first_cl_leave_days+"
Currency Tag M Cut Off Day Holiday OverTime FormulaHoliday OverTime Rate Normal Hours Normal Other HrsNormal OverTime rate
"+e.comp_currency_tag_M+" "+e.comp_cut_off_day+" "+e.comp_hot_formula_desc+""+e.comp_hot_rate+" "+e.comp_normal_hrs+" "+e.comp_normal_ot_hrs+""+e.comp_not_rate+"
Short Formula Short Rate Special OverTime FormulaSpecial OverTime Rate Company Special Hrs Company Travel RateNormal OverTime Formula
"+e.comp_shot_formula_desc+" "+e.comp_shot_rate+" "+e.comp_sot_formula_desc+""+e.comp_sot_rate+" "+e.comp_special_hrs+" "+e.comp_travel_rate+""+e.comp_not_formula_desc+"
 Qualification  Institute  Qualification Type  From Year  To Year
"+e.emp_qual_qual_name+" "+e.emp_qual_institute+" "+e.emp_qual_type_name+" "+e.em_qual_from_year+""+e.em_qual_year+"
 Percentage Remark
"+e.emp_qual_percentage+" "+e.emp_qual_remark+"
"),$(t.currentTarget).parents("tr").after(r),s.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_dates&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r=e&&(swal({title:"Alert",text:"Date of birth should be less than future date",width:300,height:200}),a.temp.em_date_of_birth="")},a.checkDOJ=function(e){a.temp.em_dept_effect_from=e,a.temp.em_grade_effect_from=e,a.temp.em_date_of_birth>=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date of joining should be greater than date of birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date=s.temp.sims_sip_goal_max_point&&swal({title:"Alert",text:"Minimum Point should less than Maximum Point",width:300,height:200})},n.get(i.apiUrl+"api/GoalTarget/getGoalName").then(function(e){s.goal_Name=e.data,console.log(s.goal_Name)}),n.get(i.apiUrl+"api/GoalTarget/getAcademicYear").then(function(e){s.Acc_year=e.data,console.log(s.Acc_year),s.temp.sims_sip_academic_year=s.Acc_year[0].sims_sip_academic_year}),n.get(i.apiUrl+"api/Goal/Get_revision_type").then(function(e){s.Revision_type=e.data,console.log(s.Revision_type)}),n.get(i.apiUrl+"api/Goal/getAllGoal").then(function(e){s.Goal_Details=e.data,console.log("Goal Data:",s.Goal_Details),s.totalItems=s.Goal_Details.length,s.todos=s.Goal_Details,s.makeTodos()}),s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.Goal_Details,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos()),console.log("numPerPage="+s.numPerPage)},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),p.checked=!1,s.row1=""},a(function(){$("#fixTable").tableHeadFixer({top:1})},100),s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_sip_goal_desc.toLowerCase().indexOf(t.toLowerCase())||-1",console.log("EmpName :",a),e=$("#attendance_type option:selected").text(),console.log("attendance_name",e));var s={emp_name:a,attendance_type:e,sims_from_date:i.dt.sims_from_date};console.log("obj",s),d.post(c.apiUrl+"api/StudentReport/CUDEmployeeAbsentStudentList?data1="+JSON.stringify(s),t).then(function(e){i.msg1=e.data,null==i.msg1.strMessage||null==i.msg1.strMessage&&""==i.msg1.strMessage&&null==i.msg1.strMessage||(swal({title:"Alert",text:i.msg1.strMessage,width:380,height:200}),i.Reset(),i.currentPage=!0)})}if(1==i.edt1.sims_send_alert&&null!=i.edt1.sims_send_alert){for(t=[],o=0;o=moment(E.edt.lt_start_date,"DD-MM-YYYY").format("YYYY-MM-DD")){for(var e=0,t=0;t=moment(E.edt.lt_start_date,"DD-MM-YYYY").format("YYYY-MM-DD")){if("sis"==B.defaults.headers.common.schoolId||"imert"==B.defaults.headers.common.schoolId||"abqis"==B.defaults.headers.common.schoolId||"asis"==B.defaults.headers.common.schoolId||"siso"==B.defaults.headers.common.schoolId||"ahis"==B.defaults.headers.common.schoolId)for(var e=0;eparseInt(E.leaveInfo[u].el_maximum_days)?(T=$-parseInt(E.leaveInfo[u].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),C=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(T)-1,"days").format("DD-MM-YYYY"),D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:r,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:S,lt_end_date:k,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},parseInt(T)>parseInt(E.leaveInfo[u].el_maximum_days)?(A=parseInt(T)-parseInt(E.leaveInfo[u].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(A)-1,"days").format("DD-MM-YYYY"),w={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:l,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:C,lt_end_date:b,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},parseInt(A)>parseInt(E.leaveInfo[u].el_maximum_days)?(I=parseInt(A)-parseInt(E.leaveInfo[u].el_maximum_days),h=moment(v,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),f=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(I)-1,"days").format("DD-MM-YYYY"),y={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:v,lt_end_date:h,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},g={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:I,lt_start_date:f,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):y={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:parseInt(A),lt_start_date:v,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):w={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:l,lt_days:T,lt_start_date:C,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:r,lt_days:$,lt_start_date:S,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):U={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:c,lt_days:j,lt_start_date:E.edt.lt_start_date,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}),E.postArray.push(U),null!=D&&E.postArray.push(D),null!=w&&E.postArray.push(w),null!=y&&E.postArray.push(y),null!=g&&E.postArray.push(g);break}if(parseInt(E.leaveInfo[u].el_days_taken)!=parseInt(E.leaveInfo[u].el_maximum_days)&&"2"==E.leaveInfo[u].cl_display_order){parseInt(E.leaveInfo[u].el_days_taken)parseInt(E.leaveInfo[u].el_maximum_days)?(T=$-parseInt(E.leaveInfo[u].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),C=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(T)-1,"days").format("DD-MM-YYYY"),D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:l,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:S,lt_end_date:k,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},parseInt(T)>parseInt(E.leaveInfo[u].el_maximum_days)?(A=parseInt(T)-parseInt(E.leaveInfo[u].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(A)-1,"days").format("DD-MM-YYYY"),w={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:C,lt_end_date:b,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},y=parseInt(A)>parseInt(E.leaveInfo[u].el_maximum_days)?(I=parseInt(A)-parseInt(E.leaveInfo[u].el_maximum_days),h=moment(v,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),f=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(I)-1,"days").format("DD-MM-YYYY"),{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:v,lt_end_date:h,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:parseInt(A),lt_start_date:v,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):w={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:T,lt_start_date:C,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:l,lt_days:$,lt_start_date:S,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):U={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:r,lt_days:j,lt_start_date:E.edt.lt_start_date,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}),E.postArray.push(U),null!=D&&E.postArray.push(D),null!=w&&E.postArray.push(w),null!=y&&E.postArray.push(y),null!=g&&E.postArray.push(g);break}if(parseInt(E.leaveInfo[u].el_days_taken)!=parseInt(E.leaveInfo[u].el_maximum_days)&&"3"==E.leaveInfo[u].cl_display_order){parseInt(E.leaveInfo[u].el_days_taken)parseInt(E.leaveInfo[u].el_maximum_days)?(T=$-parseInt(E.leaveInfo[u].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),C=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(T)-1,"days").format("DD-MM-YYYY"),D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:S,lt_end_date:k,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F},w=parseInt(T)>parseInt(E.leaveInfo[u].el_maximum_days)?(A=parseInt(T)-parseInt(E.leaveInfo[u].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(A)-1,"days").format("DD-MM-YYYY"),{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:C,lt_end_date:b,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:T,lt_start_date:C,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):D={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:$,lt_start_date:S,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):U={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:l,lt_days:j,lt_start_date:E.edt.lt_start_date,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}),E.postArray.push(U),null!=D&&E.postArray.push(D),null!=w&&E.postArray.push(w),null!=y&&E.postArray.push(y),null!=g&&E.postArray.push(g);break}if(parseInt(E.leaveInfo[u].el_days_taken)!=parseInt(E.leaveInfo[u].el_maximum_days)&&"4"==E.leaveInfo[u].cl_display_order){parseInt(E.leaveInfo[u].el_days_taken)parseInt(E.leaveInfo[u].el_maximum_days)?(T=$-parseInt(E.leaveInfo[u].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[u].el_maximum_days)-1,"days").format("DD-MM-YYYY"),C=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(T)-1,"days").format("DD-MM-YYYY"),{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:parseInt(E.leaveInfo[u].el_maximum_days),lt_start_date:S,lt_end_date:k,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):{em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:p,lt_days:$,lt_start_date:S,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}):U={em_login_code:R,comp_code:E.emp_data[0].comp_code,leave_code:m,lt_days:j,lt_start_date:E.edt.lt_start_date,lt_end_date:E.edt.lt_end_date,lt_remarks:E.edt.lt_remarks,lt_mgr_confirm_tag:"N",lt_converted_hours:"",lt_hours:F}),E.postArray.push(U),null!=D&&E.postArray.push(D),null!=w&&E.postArray.push(w),null!=y&&E.postArray.push(y),null!=g&&E.postArray.push(g);break}if(parseInt(E.leaveInfo[u].el_days_taken)!=parseInt(E.leaveInfo[u].el_maximum_days)&&"5"==E.leaveInfo[u].cl_display_order){parseInt(E.leaveInfo[u].el_days_taken){}]/g,"_"),E.edt.employeeDocument=E.filename,$.extend(E.edt,E.edt),E.photo_filename=t.name,E.photo_filename.split(".")),o=(E.photo_filename.split(".")[a.length-1],E.photo_filename=t.type,e.files[0].name.split(".")[1],e.files);if(o.length){i=new FormData;for(var s=0;se)swal({title:"Alert",text:"Termly leaves cannot be more than "+e});else{e=parseFloat(s.temp.yearly_allowed/12);if(s.temp.monthly_allowed>e)swal({title:"Alert",text:"Monthly leaves cannot be more than "+e});else if("Please Select"!=s.temp.staff_code&&"Please Select"!=s.temp.le_leave_code){for(var t=[],a=0;ae)return void swal({title:"Alert",text:"Termly leaves cannot be more than "+e})}e=parseFloat(parseInt(s.temp.yearly_allowed/12));if(s.temp.monthly_allowed>e)swal({title:"Alert",text:"Monthly leaves cannot be more than "+e});else if("Please Select"!=s.temp.staff_code&&"Please Select"!=s.temp.le_leave_code){for(var a=[],t=0;tr.totalItems?r.pagersize=Math.round(r.totalItems/r.numPerPage):r.pagersize=Math.round(r.totalItems/r.numPerPage)+1;var e=(r.currentPage-1)*r.numPerPage,t=parseInt(e)+parseInt(r.numPerPage);r.filteredTodos=r.todos.slice(e,t),r.amount_total=0,r.total_paid=0;for(var a=r.balance=0;a=-parseInt(m.maxRoundOffValue)?(m.showR=!0,m.roundedValue=parseFloat(t+e),m.nas=m.roundedValue.toString().split(".")[0],m.roundedValue=parseFloat(m.nas)):(m.showR=!1,swal({text:"Enter value between -5 and +5",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:450})):m.showR=!1:(swal({text:"No value Selected for Rounding Off",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:450}),m.showR=!1,angular.element(document.querySelector("#roundOffValue")).controller("ngModel").$setViewValue(null),m.roundedValue=0,m.nas="",m.$apply())},m.roundAndDisplayValue=function(e){m.roundedValue=m.roundToNearest5(e,m.$$cre.totalFeeamut-m.$$cre.Damut)},m.propertyName=null,m.reverse=!1,m.sortBy=function(e){m.reverse=m.propertyName===e&&!m.reverse,m.propertyName=e},p.get(u.apiUrl+"api/common/ProjectChange/GetParameters?param_app_code=Sim43N¶m_app_parameter=CSFRem").then(function(e){m.paramData=e.data[0],m.paramData.param_desc="Y",m.isRemarksVisible=!0}),m.search=function(e){m.promoted_stud=!1,m.clicked=!1,m.pd=[],m.$$cre.totalFeeamut=0,m.$$cre.Damut=0,m.$$cre.GrandTotal=0,m.dis.showDis=!1,m.dis.dd=[],m.dis.sDcode=[],m.appliedDD=[],m.$$cre.totalamutPM=0,m.CHd.srNo="none",m.click=!1,m.receiptDate=(new Date).getDate()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getFullYear(),m.StudFeeDetails=[],m.SelectedFees=[],m.maxLength=0,m.currentClass=0,p.get(u.apiUrl+"api/Fee/StudentFee_New/GetStudentFee_VAT?data="+JSON.stringify(m.IP)).then(function(e){if(m.StudFeeDetails=e.data,console.log("Student Fee Details"),console.log(m.StudFeeDetails),m.studExpectedFeeAMTTotal=0,m.studTotalPaidAMTTotal=0,m.stud_vat_calc_amtTotal=0,m.TotalPayingTotal=0,m.studConcessionPaidAMTTotal=0,m.selectedstud=[],0e.valAMT)m.valcc=1;else if(m.valcc=0,null==e)document.getElementById("pm").focus();else{if("1"!=e.modeO.pmType){if(null==e.chequeNo||""==e.chequeNo)return swal({text:"Please Enter Cheque No.",imageUrl:"assets/img/close.png",showCloseButton:!0,width:300}),void document.getElementById("chno").focus();if(null==e.chqDate||""==e.chqDate)return void swal({text:"Please select date",imageUrl:"assets/img/close.png",showCloseButton:!0,width:300});if("5"!=e.modeO.pmType&&(null==e.chqBank||""==e.chqBank))return void swal({text:"Please select Bank Name",imageUrl:"assets/img/close.png",showCloseButton:!0,width:300})}if(null==e.FPamt||""==e.FPamt)document.getElementById("pm").focus();else if(null!=e.chequeNo&&""!=e.chequeNo||"1"==e.modeO.pmType){if(e.modeO==m.caPM)for(var a=0;aparseFloat(m.pd[s].FPamt)){var i=parseFloat(m.SelectedFees[n].FPamt)-parseFloat(i)-parseFloat(m.pd[s].FPamt),d=(m.SelectedFees[n].chqNo=m.pd[s].chequeNo,m.SelectedFees[n].chqDate=m.pd[s].chqDate,m.SelectedFees[n].chqBank=m.pd[s].chqBank,m.SelectedFees[n].mode=m.pd[s].modeO,m.SelectedFees[n].FPamt=parseFloat(m.pd[s].FPamt),m.SelectedFees[n].TXNNo=m.pd[s].trxID,m.pd[s].feeNumber=m.SelectedFees[n].feeNumber,m.pd[s].flag=!0,m.SelectedFees[n].flag=!0,{});d.ref=m.SelectedFees[n].$$hashKey,d.pno=m.SelectedFees[n].pno,d.feeNumber=m.SelectedFees[n].feeNumber,d.ID=m.SelectedFees[n].ID,d.flag=!1,d.FD=m.SelectedFees[n].FD,d.enroll=m.SelectedFees[n].enroll,d.studCurr=m.SelectedFees[n].studCurr,d.studAcademic=m.SelectedFees[n].studAcademic,d.studGrade=m.SelectedFees[n].studGrade,d.studSection=m.SelectedFees[n].studSection,d.mode={},d.chqNo="NA",d.isSplitted=!1,d.chqBank="NA",d.chqDate=null,d.trxID="NA",d.sr=m.SelectedFees.length+1,d.ExpAmt=parseFloat(m.SelectedFees[n].studBalanceAMT),d.FPamtORG=parseFloat(m.SelectedFees[n].studBalancePayingAMT),d.FPamt=parseFloat(i),d.FPamtINT=parseFloat(i),d.FeeCat=m.SelectedFees[n].FeeCat,d.FeeCode=m.SelectedFees[n].FeeCode,m.SelectedFees.push(d),s=a,n=o,t=!0;break}}if(t){e();break}}}();for(var s=m.SelectedFees.length,n=0;nt.top+22)return!1;t=window.getComputedStyle(e.target,null),e.dataTransfer.setData("text",parseInt(t.getPropertyValue("left"),10)-e.clientX+","+(parseInt(t.getPropertyValue("top"),10)-e.clientY))},!1),document.body.addEventListener("dragover",function(e){return e.preventDefault(),!1},!1),document.body.addEventListener("drop",function(e){var t=e.dataTransfer.getData("text").split(","),a=document.getElementById("pop-over");return a.style.left=100*(e.clientX+parseInt(t[0],10))/window.innerWidth+"%",a.style.top=e.clientY+parseInt(t[1],10)+"px",e.preventDefault(),!1},!1);t=document.getElementById("pop-content");t.addEventListener("mousedown",function(){document.getElementById("pop-over").setAttribute("draggable","false")},!1),t.addEventListener("mouseup",function(){document.getElementById("pop-over").setAttribute("draggable","true")},!1),m.student_name="",m.onFetchPFRData=function(){m.student_name=m.sib_enroll_no+"-"+m.studName,m.summery={dd_fee_amount_final:0,dd_fee_amount_discounted:0,doc_status_code:3},p.get(u.apiUrl+"api/Fee/SFS/GetPreviousReceipts_NEW?ay="+m.IP.StudAcademic+"&enroll="+m.sib_enroll_no).then(function(e){m.feesReceiptData=e.data[0],m.small_table=!0,m.paid_amt=0,m.vat_amt=0,m.discounted_amt=0;for(var t=m.total_amt=0;te.sims_rec_id-t.sims_rec_id),o.makeTodos(),o.sortBy("sims_rec_status")}),1==(c=document.getElementById("mainchk")).checked&&(c.checked=!1,o.row1=""),o.getgrid=function(){o.currentPage=1,n.get(i.apiUrl+"api/Recruitment/getAllRecruitmentecords").then(function(e){o.display=!1,o.grid=!0,o.recdet_data=e.data,o.totalItems=o.recdet_data.length;for(var t=0;te.sims_rec_id-t.sims_rec_id),o.makeTodos()}),1==(c=document.getElementById("mainchk")).checked&&(c.checked=!1,o.row1=""),o.myForm.$setPristine(),o.myForm.$setUntouched()},o.makeTodos=function(){var e=parseInt(o.totalItems%o.numPerPage),e=(o.pagersize="0"==e?parseInt(o.totalItems/o.numPerPage):parseInt(o.totalItems/o.numPerPage)+1,(o.currentPage-1)*o.numPerPage),t=parseInt(e)+parseInt(o.numPerPage);console.log("begin="+e),console.log("end="+t),o.filteredTodos=o.todos.slice(e,t)},o.hide=!1,"hr"==n.defaults.headers.common.schoolId&&(o.hide=!0),o.validateReturnDate=function(){var e,t;o.edt.sims_rec_start_date&&o.edt.sims_rec_end_date&&(t=o.edt.sims_rec_start_date.split("-"),e=o.edt.sims_rec_end_date.split("-"),3===t.length)&&3===e.length&&(t=new Date(t[2],t[1]-1,t[0]),new Date(e[2],e[1]-1,e[0])<=t)&&(o.edt.sims_rec_end_date=null,swal({title:"Alert",text:"End date should be greater than Start date",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:330}))},o.edit=function(e){o.display=!0,o.grid=!1,o.save1=!1,o.update1=!0,o.delete1=!1,console.log("Selected object is ",e),o.edt.sims_recruitment_Serial_number=e.sims_rec_Ser_number,o.edt.sims_recruitment_id=e.sims_rec_id,o.edt.sims_rec_desc=e.sims_rec_desc,o.edt.sims_rec_start_date=e.sims_rec_start_date,o.edt.sims_rec_end_date=e.sims_rec_end_date,o.edt.sims_rec_budget_desc=e.sims_rec_budget,o.edt.sims_person_incharge=e.sims_rec_personIncharge,o.edt.sims_rec_status=e.sims_rec_status,o.edit_code=!0},o.Save=function(e){var t=[];e&&(e={sims_rec_Ser_number:o.edt.sims_recruitment_Serial_number,sims_rec_id:o.edt.sims_recruitment_id,sims_rec_desc:o.edt.sims_rec_desc,sims_rec_start_date:o.edt.sims_rec_start_date,sims_rec_end_date:o.edt.sims_rec_end_date,sims_rec_budget:o.edt.sims_rec_budget_desc,sims_rec_personIncharge:o.edt.sims_person_incharge,sims_rec_status:!0,opr:"I"},t.push(e),n.post(i.apiUrl+"api/Recruitment/RecruitmentDriveDetailsInsert",t).then(function(e){o.display=!0,o.msg1=e.data,1==o.msg1?swal({text:"Recruitment details Added Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&o.getgrid()}):0==o.msg1&&swal({text:"Recruitment details Already Exists. ",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380}).then(function(e){e&&o.getgrid()})}))},o.Update=function(e){var t=[];e&&(e={sims_rec_Ser_number:o.edt.sims_recruitment_Serial_number,sims_rec_id:o.edt.sims_recruitment_id,sims_rec_desc:o.edt.sims_rec_desc,sims_rec_start_date:o.edt.sims_rec_start_date,sims_rec_end_date:o.edt.sims_rec_end_date,sims_rec_budget:o.edt.sims_rec_budget_desc,sims_rec_personIncharge:o.edt.sims_person_incharge,sims_rec_status:o.edt.sims_rec_status,opr:"U"},t.push(e),console.log("update",t),n.post(i.apiUrl+"api/Recruitment/RecruitmentDriveDetailsInsert",t).then(function(e){o.display=!0,o.msg1=e.data,1==o.msg1?swal({text:"Records Updated Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:380}).then(function(e){e&&o.getgrid()}):0==o.msg1?swal({text:"Records Already Exists. ",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380}).then(function(e){e&&o.getgrid()}):swal("Error-"+o.msg1)}))},o.New=function(){0==o.user_access.data_insert?swal({title:"Alert",text:"Login user does not have required privilege to perform this action.",width:350,height:200}):(o.display=!0,o.grid=!1,o.save1=!0,o.update1=!1,o.delete1=!1,o.edt={},o.edit_code=!1,o.edt={sims_rec_status:!0},n.get(i.apiUrl+"api/Recruitment/GetAutoGenerate_srNumber").then(function(e){o.autogendesg=e.data,o.edt={sims_recruitment_Serial_number:o.autogendesg[0].sims_recruitment_Serial_number,sims_recruitment_id:o.autogendesg[0].sims_recruitment_id},console.log(o.autogendesg)}))};let d=!(o.cancel=function(){o.grid=!0,o.display=!1,o.myForm.$setPristine(),o.myForm.$setUntouched()});o.CheckAllChecked=function(){for(var e=document.getElementById("mainchk"),t=0;t"+e+''+t+""),o.close(),a.focus(),s.getdetail()),s.getdetail()})},s.reset_data=function(){s.filteredTodos=[],s.pager=!1,s.searchText="",s.cur="",s.acad=""},s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.obj,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),main.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=50,s.maxSize=5,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.choiceReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;var t={location:obj.choice_report_location,parameter:{surveycode:obj.sims_survey_code,usertype:obj.sims_survey_user_group_code,cur:obj.sims_cur_code,acadmic:obj.sims_academic_year,operator:obj.choice_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(t);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var t="SimsReports."+s.location+",SimsReports",a=window.location.href,a=(a.substring(0,a.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:a,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:t,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),o(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)},s.textReport=function(e){$("#surmodal").modal("show"),s.report_show=!1;var t={location:obj.text_report_location,parameter:{cur:obj.sims_cur_code,acadmic:obj.sims_academic_year,surveycode:obj.sims_survey_code,usertype:obj.sims_survey_user_group_code,operator:obj.text_report_status},state:"main.SSQR01",ready:function(){this.refreshReport()}};window.localStorage.ReportDetails=JSON.stringify(t);try{s.rpt=JSON.parse(window.localStorage.ReportDetails),s.location=s.rpt.location,s.parameter=s.rpt.parameter,s.state=s.rpt.state}catch(e){}var t="SimsReports."+s.location+",SimsReports",a=window.location.href,a=(a.substring(0,a.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");s.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:a,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:t,parameters:s.parameter}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),o(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)}}])}(),function(){"use strict";var c;angular.module("sims.module.SchoolSetup").controller("StreamCreationMasterCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,o,t,a,n,i){s.sms=!0;s.edt=[],s.grades=[],s.pagesize="10",s.pageindex="0",s.edit_code=!1,s.filteredTodos=[],s.currentPage=1,s.numPerPage=25,s.maxSize=5,s.edt={},t(function(){$("#example_wrapper").scrollbar(),$("#fixtable").tableHeadFixer({top:1})},100),o.globals.currentUser.username;function d(){n.get(i.apiUrl+"api/ERP/Grade/getCuriculum?username="+o.globals.currentUser.username).then(function(e){s.curr=e.data,s.edt.grade_cur_code=s.curr[0].sims_cur_code,s.getAcdyr(s.curr[0].sims_cur_code)})}s.propertyName=null,s.reverse=!1,s.countData=[{val:25,data:25},{val:50,data:50},{val:"All",data:"All"}],s.sortBy=function(e){s.reverse=s.propertyName===e&&!s.reverse,s.propertyName=e},n.get(i.apiUrl+"api/ERP/Grade/getCompany").then(function(e){s.getCompanyCode=e.data,s.edt.comp_code=s.getCompanyCode[0].comp_code}),n.get(i.apiUrl+"api/ERP/Grade/getCuriculum?username="+o.globals.currentUser.username).then(function(e){s.curr=e.data,s.edt.grade_cur_code=s.curr[0].sims_cur_code,s.getAcdyr1(s.curr[0].sims_cur_code)}),s.getAcdyr=function(e){n.get(i.apiUrl+"api/ERP/Grade/getAcademicYear?curCode="+e).then(function(e){s.acyr=e.data,s.edt.grade_academic_year=s.acyr[0].grade_academic_year})},s.getAcdyr1=function(e){n.get(i.apiUrl+"api/ERP/Grade/getAcademicYear?curCode="+e).then(function(e){s.acyr=e.data,s.edt.sims_academic_year1=s.acyr[0].grade_academic_year,s.getstreams(s.edt.sims_academic_year1)})},s.getstreams=function(e){n.get(i.apiUrl+"api/ERP/Grade/getStream?acd_yr="+e).then(function(e){s.dis1=!0,s.dis2=!1,s.grades=e.data,0"+e+''+t+""),o.close(),a.focus(),s.colsvis=!1),s.colsvis=!1})},a(function(){$("#Table2").tableHeadFixer({top:1})},100)}])}(),function(){"use strict";var e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("CreateEditEmployee_APSCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter",function(a,e,t,o,s,n,i,d){a.temp={},a.temp1=[],a.searchText=!1,a.ImgLoaded=!1,a.roleText=!1,a.roleList=!0,a.uae=!1,a.qatar=!0,a.slisLabel=!1,a.india=!1,a.national_id_readnly=!1,a.iban_number_readnly=!1,a.bank_ac_no_readnly=!1,a.updateBtn=!1,a.saveBtn=!1,a.temp.em_date_of_join=d("date")(new Date,"dd-MM-yyyy"),a.temp.em_dept_effect_from=d("date")(new Date,"dd-MM-yyyy"),a.temp.em_grade_effect_from=d("date")(new Date,"dd-MM-yyyy"),n.get(i.apiUrl+"api/HRMS/getRole").then(function(e){a.roles_data=e.data}),n.get(i.apiUrl+"api/HRMS/getLicSchool").then(function(e){a.lic_school_data=e.data,console.log("lic_school_data",a.lic_school_data),"Qatar"==a.lic_school_data[0].lic_school_country?(a.uae=!1,a.qatar=!0,a.slisLabel=!1,a.india=!1):"Saudi Arabia"==a.lic_school_data[0].lic_school_country?(a.uae=!1,a.qatar=!1,a.slisLabel=!0,a.india=!1):"India"==a.lic_school_data[0].lic_school_country?(a.uae=!1,a.qatar=!1,a.slisLabel=!1,a.india=!0):(a.uae=!0,a.qatar=!1,a.slisLabel=!1,a.india=!1)}),n.get(i.apiUrl+"api/HRMS/getEmpData").then(function(e){a.obj=e.data,a.operation=!0,a.Save_btn=!0,a.display=!0,a.temp.em_Salutation_Code="1",a.temp.em_Grade_Code=a.obj[0].em_Grade_Code}),n.get(i.apiUrl+"api/HRMS/getCompany").then(function(e){a.company_data=e.data,a.temp.em_Company_Code=a.company_data[0].em_Company_Code}),n.get(i.apiUrl+"api/HRMS/getCountry").then(function(e){a.country_data=e.data}),a.getDestination=function(){n.get(i.apiUrl+"api/HRMS/getDestinationByNation?nation_code="+a.temp.em_Nation_Code).then(function(e){a.dest_data=e.data,a.temp.em_Dest_Code=a.dest_data[0].em_Dest_Code})},a.searchEmp=function(e,t){},a.saveBtnDisEn=!1,a.imageUrl=i.docUrl+n.defaults.headers.common.schoolId+"/Images/EmployeeImages/";var _=new FormData;a.getTheFiles=function(e){angular.forEach(e,function(e,t){_.append(t,e)})},a.file_changed=function(e){var t,e=e.files[0];a.photo_filename=e.type,null!=a.photo_filename||""!=a.photo_filename?"jpeg"==(t=a.photo_filename.split("/"))[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(e){a.$apply(function(){a.prev_img=e.target.result})},t.readAsDataURL(e)):(swal({text:"Only jpeg and png image format supported."}),$("#empimg").attr("src","")):(swal({text:"Image format not supported."}),$("#empimg").attr("src",""))},a.globalSearch=function(){t.visible_stud=!1,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!0,t.chkMulti=!1,a.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),a.temp.em_login_code="",a.temp.EmpName="",a.showBtn=!1},a.$on("global_cancel",function(e){console.log(a.SelectedUserLst),0=a.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),a.temp.em_date_of_join="")},a.checkPassport=function(){a.temp.em_passport_exp_date{}]/g,"_"),""==e.pays_doc_srno&&(d.showUpdateBtn=!(a=!0),o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t.push(o)),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,d.photo_filename_doc.split("/")[1]),o=(d.filename1=d.filename_doc+"."+e,[]),e=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc)swal({title:"Alert",text:"Please Select File",width:300,height:200});else{if(1==a)for(var s=0;s{}]/g,"_"),(""==e.pays_doc_srno?(d.showUpdateBtn=!!0,o={pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},[]):(d.showUpdateBtn=!!1,o={pays_doc_srno:e.pays_doc_srno,pays_doc_empl_id:e.pays_doc_empl_id,pays_doc_mod_code:e.pays_doc_mod_code,pays_doc_code:e.pays_doc_code,pays_doc_desc:e.pays_doc_desc,pays_doc_path:e.pays_doc_path,pays_doc_issue_date:e.pays_doc_issue_date,pays_doc_expiry_date:e.pays_doc_expiry_date,pays_doc_status:!0},t)).push(o),d.pays_doc_empl_id=e.pays_doc_empl_id,d.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==d.photo_filename_doc||""==d.photo_filename_doc||null==d.photo_filename_doc){for(var s=0;s=d.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),d.temp.em_date_of_join="")},d.checkPassport=function(){d.temp.em_passport_exp_dated.pageCount()-5?d.pageCount()-5+1:t;ac.pageCount()-5?c.pageCount()-5+1:t;a"+t+''+e+""),o.close(),a.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)},c.cancel=function(){if(c.temp={},c.temp1={},c.GetItems=[],c.itemList=[],c.rcbInternal=[],c.im_item_code1="",c.temp.paymentMode="CA",c.temp.provDate=c.current_date,c.cardpay=!1,c.bankShow=!1,c.chequeShow=!1,(c.doc_vat_total_amount=0)parseInt(e.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),e.dd_qty=e.invoice_qty,e.dd_sell_price=e.dd_qty*parseFloat(e.dd_sell_value_final),c.totalAmtClick()),""==e.dd_qty&&(e.dd_qty=1,0==e.sell_price_inclusiv_vat?(e.dd_sell_value_final=e.dd_qty*parseFloat(e.dd_sell_price),t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=parseFloat(t)*parseFloat(e.im_item_vat_percentage),o=parseFloat(o)/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2),e.dd_sell_value_final=parseFloat(t).toFixed(2),e.dd_sell_value_line_total=parseFloat(parseFloat(t)+parseFloat(o)).toFixed(2)),c.totalAmtClick()):(e.dd_sell_value_final=e.dd_qty*parseFloat(e.dd_sell_price),t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(a=parseFloat(e.im_item_vat_percentage)/100,e.dd_sell_value_final=(parseFloat(t)/(1+parseFloat(a))).toFixed(2),o=t-e.dd_sell_value_final,e.dd_item_vat_amount=parseFloat(o).toFixed(2),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(o)).toFixed(2))))},c.lineDiscountPer=function(e){var t,a,o=0;isNaN(parseFloat(e.dd_line_discount_pct))&&(e.dd_line_discount_pct=0),parseFloat(e.dd_line_discount_pct)<=100?null==e.dd_line_discount_pct||""==e.dd_line_discount_pct||0==e.dd_line_discount_pct?(e.dd_line_discount_pct=0,!isNaN(parseFloat(e.dd_line_discount_amount))&&""!=e.dd_line_discount_amount&&null!=e.dd_line_discount_amount||(e.dd_line_discount_amount=0),0==e.sell_price_inclusiv_vat?(null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-parseFloat(e.dd_line_discount_amount))*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2)):(null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),a=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(t)-parseFloat(e.dd_line_discount_amount))/(1+parseFloat(a))).toFixed(2),e.dd_item_vat_amount=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)-parseFloat(o)).toFixed(2)),e.dd_sell_value_line_total=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)).toFixed(2))):0==e.sell_price_inclusiv_vat?(e.dd_line_discount_amount=parseFloat(parseFloat(e.dd_sell_value_final)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_line_total)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_line_discount_amount=parseFloat(parseFloat(t)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(a=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(t)-parseFloat(e.dd_line_discount_amount))/(1+parseFloat(a))).toFixed(2),e.dd_item_vat_amount=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)-parseFloat(o)).toFixed(2)),e.dd_sell_value_line_total=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,e.sell_price_inclusiv_vat,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"})),c.totalAmtClick()},c.lineDiscountPerInclusiveVat=function(e){var t,a,o=0;isNaN(parseFloat(e.dd_line_discount_pct))&&(e.dd_line_discount_pct=0),parseFloat(e.dd_line_discount_pct)<=100?null==e.dd_line_discount_pct||""==e.dd_line_discount_pct||0==e.dd_line_discount_pct?(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(e.dd_sell_value_final)-e.dd_line_discount_amount)/(1+parseFloat(t))).toFixed(2),a=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_item_vat_amount=parseFloat(a)-o),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2)):(e.dd_line_discount_amount=parseFloat(parseFloat(e.dd_sell_value_final)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(e.dd_sell_value_final)-e.dd_line_discount_amount)/(1+parseFloat(t))).toFixed(2),a=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_item_vat_amount=parseFloat(a)-o),e.dd_sell_value_line_total=parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_line_total)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"})),c.totalAmtClick()},c.getitemCode=function(t){console.log("str",t),c.im_item_vat_percentage=t.im_item_vat_percentage,d.get(_.apiUrl+"api/Sales_Doc/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+c.temp.gcode).then(function(e){c.resitem=e.data[0],c.item_dept_code=t.dep_code,c.im_revenue_acno=c.resitem.im_revenue_acno,c.im_cost_acno=c.resitem.im_cost_acno,c.im_vat_sale_profile=c.resitem.im_vat_sale_profile,"02"==c.temp.doc_type?(c.temp.qty=1,c.temp.im_sell_price_including_vat=c.resitem.im_sell_price_including_vat,c.temp.im_sell_price=c.resitem.im_sell_price,c.temp.finalValue=0):(c.temp.qty=1,0==parseFloat(c.resitem.im_sell_price)?(c.sellPriceInclusiveVat=!1,c.temp.finalValue=+parseFloat(c.resitem.im_sell_price_including_vat),c.temp.im_sell_price=c.resitem.im_sell_price_including_vat):(c.temp.finalValue=+parseFloat(c.resitem.im_sell_price),c.temp.im_sell_price=c.resitem.im_sell_price,c.sellPriceInclusiveVat=!0)),c.temp.im_item_vat_percentage=c.resitem.im_item_vat_percentage,d.get(_.apiUrl+"api/Sales_Doc/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(e){c.resloc=e.data,0c.itemList[t].invoice_qty)return void swal({title:"Alert",text:"Return quantity is more than invoice quantity.",imageUrl:"assets/img/notification-alert.png"});if(0==c.itemList[t].dd_qty)return void swal({title:"Alert",text:"Return quantity is 0.",imageUrl:"assets/img/notification-alert.png"});var a=c.temp.payment_type,a={dep_code:c.salesmanDeptCode,doc_prov_no:c.doc_prov_no,dd_line_no:t,dd_status:"C",dd_payment_mode:a,im_inv_no:c.itemList[t].im_inv_no,loc_code:c.itemList[t].loc_code,dd_sell_price:c.itemList[t].dd_sell_value_final,dd_sell_price_discounted:c.itemList[t].dd_line_discount_amount,dd_sell_price_final:0,dd_sell_value_final:c.itemList[t].dd_sell_price,dd_sell_cost_total:0,dd_qty:c.itemList[t].dd_qty,dd_outstanding_qty:0,dd_line_discount_pct:c.itemList[t].dd_line_discount_pct,dd_line_discount_amount:c.itemList[t].dd_line_discount_amount,dd_line_total:c.itemList[t].dd_sell_value_line_total,dd_physical_qty:c.itemList[t].original_qty,doc_remark:c.itemList[t].doc_remark,vat_flag:!1,dd_item_vat_per:c.itemList[t].im_item_vat_percentage,dd_item_vat_amount:c.itemList[t].dd_item_vat_amount,dd_cheque_number:c.temp.chequeNo,dd_cheque_date:c.temp.chequeDate,dd_cheque_bank_code:c.temp.bankCode,dd_demand_draft_number:c.temp.ddNo,dd_demand_draft_date:c.temp.ddDate,dd_demand_draft_bank_code:c.temp.ddbankCode,dd_credit_card_number:c.temp.creditCardNo,dd_credit_card_date:c.temp.creditCardDate,dd_credit_card_bank_code:c.temp.creditCardbankCode,dd_bank_transfer_trans_number:c.temp.btTransactionNo,dd_bank_transfer_trans_date:c.temp.btTransactionDate,dd_bank_transfer_trans_bank_code:c.temp.btTransactionbankCode,dd_online_payemnt_trans_number:c.temp.cradPayTransactionNo,im_revenue_acno:c.itemList[t].im_revenue_acno,im_cost_acno:c.itemList[t].im_cost_acno,im_vat_sale_profile:c.itemList[t].im_vat_sale_profile,doc_reference_prov_no:c.itemList[t].req_no,doc_no_have_previous:c.itemList[t].req_no};c.salesDetails.push(a)}d.post(_.apiUrl+"api/Sales_Doc/Return_Sale_Documents_Details1_VAT_SMSM",c.salesDetails).then(function(e){if(1==e.data){for(var t=[],a=0;ao?c.store_issue_details[t].sublist1[a].issue_quantity=o:c.store_issue_details[t].sublist1[a].issue_quantity_dis=!0):(c.store_issue_details[t].sublist1[a].inner_disabled=!0,c.store_issue_details[t].sublist1[a].issue_quantity_dis=!0,c.store_issue_details[t].sublist1[a].remarks_dis=!0)}c.totalItems=c.store_issue_details.length,c.todos=c.store_issue_details;for(t=0;tc.pageCount()-5?c.pageCount()-5+1:t;a"+t+''+e+""),o.close(),a.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)},c.cancel=function(){if(c.temp={},c.temp1={},c.GetItems=[],c.itemList=[],c.itemList_new=[],c.rcbInternal=[],c.im_item_code1="",c.temp.paymentMode="CA",c.temp.provDate=o,c.cardpay=!1,c.bankShow=!1,c.chequeShow=!1,(c.doc_vat_total_amount=0)parseInt(e.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),e.dd_qty=e.invoice_qty),""==e.dd_qty&&(!(e.dd_qty=1)===e.sell_price_inclusiv_vat?(e.dd_sell_value_final=e.dd_qty*parseFloat(e.dd_sell_price),t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=parseFloat(t)*parseFloat(e.im_item_vat_percentage),o=parseFloat(o)/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2),e.dd_sell_value_final=parseFloat(t).toFixed(2),e.dd_sell_value_line_total=parseFloat(parseFloat(t)+parseFloat(o)).toFixed(2)),c.totalAmtClick()):(e.dd_sell_value_final=e.dd_qty*parseFloat(e.dd_sell_price),t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(a=parseFloat(e.im_item_vat_percentage)/100,e.dd_sell_value_final=(parseFloat(t)/(1+parseFloat(a))).toFixed(2),o=t-e.dd_sell_value_final,e.dd_item_vat_amount=parseFloat(o).toFixed(2),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(o)).toFixed(2))))},c.lineDiscountPer=function(e){var t,a,o=0;isNaN(parseFloat(e.dd_line_discount_pct))&&(e.dd_line_discount_pct=0),parseFloat(e.dd_line_discount_pct)<=100?null==e.dd_line_discount_pct||""==e.dd_line_discount_pct||0==e.dd_line_discount_pct?(e.dd_line_discount_pct=0,!isNaN(parseFloat(e.dd_line_discount_amount))&&""!=e.dd_line_discount_amount&&null!=e.dd_line_discount_amount||(e.dd_line_discount_amount=0),!1===e.sell_price_inclusiv_vat?(null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-parseFloat(e.dd_line_discount_amount))*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2)):(null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),a=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(t)-parseFloat(e.dd_line_discount_amount))/(1+parseFloat(a))).toFixed(2),e.dd_item_vat_amount=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)-parseFloat(o)).toFixed(2)),e.dd_sell_value_line_total=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)).toFixed(2))):!1===e.sell_price_inclusiv_vat?(e.dd_line_discount_amount=parseFloat(parseFloat(e.dd_sell_value_final)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_line_total)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(t=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_line_discount_amount=parseFloat(parseFloat(t)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(a=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(t)-parseFloat(e.dd_line_discount_amount))/(1+parseFloat(a))).toFixed(2),e.dd_item_vat_amount=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)-parseFloat(o)).toFixed(2)),e.dd_sell_value_line_total=(parseFloat(t)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,e.sell_price_inclusiv_vat,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"})),c.totalAmtClick()},c.lineDiscountPerInclusiveVat=function(e){var t,a,o=0;isNaN(parseFloat(e.dd_line_discount_pct))&&(e.dd_line_discount_pct=0),parseFloat(e.dd_line_discount_pct)<=100?null==e.dd_line_discount_pct||""==e.dd_line_discount_pct||0==e.dd_line_discount_pct?(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(e.dd_sell_value_final)-e.dd_line_discount_amount)/(1+parseFloat(t))).toFixed(2),a=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_item_vat_amount=parseFloat(a)-o),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2)):(e.dd_line_discount_amount=parseFloat(parseFloat(e.dd_sell_value_final)*parseFloat(e.dd_line_discount_pct)/100).toFixed(2),null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(t=parseFloat(e.im_item_vat_percentage)/100,o=((parseFloat(e.dd_sell_value_final)-e.dd_line_discount_amount)/(1+parseFloat(t))).toFixed(2),a=parseInt(e.dd_qty)*parseFloat(e.dd_sell_price),e.dd_item_vat_amount=parseFloat(a)-o),e.dd_sell_value_line_total=parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_line_total)-parseFloat(e.dd_line_discount_amount)).toFixed(2)):(e.dd_line_discount_amount=0,e.dd_line_discount_pct=0,null==e.im_item_vat_percentage&&""==e.im_item_vat_percentage&&null==e.im_item_vat_percentage||(o=(e.dd_sell_value_final-e.dd_line_discount_amount)*e.im_item_vat_percentage/100,e.dd_item_vat_amount=parseFloat(o).toFixed(2)),e.dd_sell_value_line_total=parseFloat(parseFloat(e.dd_sell_value_final)+parseFloat(e.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"})),c.totalAmtClick()},c.getitemCode=function(t){c.im_item_vat_percentage=t.im_item_vat_percentage,d.get(_.apiUrl+"api/Sales_Doc/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+c.temp.gcode).then(function(e){c.resitem=e.data[0],c.item_dept_code=t.dep_code,c.im_revenue_acno=c.resitem.im_revenue_acno,c.im_cost_acno=c.resitem.im_cost_acno,c.im_vat_sale_profile=c.resitem.im_vat_sale_profile,"02"==c.temp.doc_type?(c.temp.qty=1,c.temp.im_sell_price_including_vat=c.resitem.im_sell_price_including_vat,c.temp.im_sell_price=c.resitem.im_sell_price,c.temp.finalValue=0):(c.temp.qty=1,0==parseFloat(c.resitem.im_sell_price)?(c.sellPriceInclusiveVat=!1,c.temp.finalValue=+parseFloat(c.resitem.im_sell_price_including_vat),c.temp.im_sell_price=c.resitem.im_sell_price_including_vat):(c.temp.finalValue=+parseFloat(c.resitem.im_sell_price),c.temp.im_sell_price=c.resitem.im_sell_price,c.sellPriceInclusiveVat=!0)),c.temp.im_item_vat_percentage=c.resitem.im_item_vat_percentage,d.get(_.apiUrl+"api/Sales_Doc/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(e){c.resloc=e.data,0parseFloat(c.temp.totalFinal)?swal({title:"Alert",text:"Exchange Amt is more than Total Amt.",imageUrl:"assets/img/notification-alert.png"}):(setTimeout(function(){c.Scroll()},700),""!=c.im_item_code1.im_inv_no&&null!=c.im_item_code1.im_inv_no&&(c.totalFinal=0,c.totalFinal1=0,(c.flg=!1)===c.flg?(t=(!0===c.sellPriceInclusiveVat?(a=parseFloat(c.temp.im_item_vat_percentage)/100,e=(parseFloat(c.temp.finalValue)/(1+parseFloat(a))).toFixed(2),a=(parseFloat(c.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=t=parseFloat(c.temp.finalValue)-e,parseFloat(parseFloat(e)+parseFloat(t))):(o=parseFloat(c.temp.finalValue*c.temp.im_item_vat_percentage/100),e=parseFloat(c.temp.finalValue).toFixed(2),a=parseFloat(c.temp.finalValue).toFixed(2),parseFloat(parseFloat(c.temp.finalValue)+parseFloat(o)))).toFixed(2),a="02"==c.temp.doc_type?{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:c.temp.gcode,im_inv_no:c.im_item_code1.im_inv_no,im_item_code:c.im_item_code1.im_item_code,im_desc:$("#rcbItem").find("option:selected").text(),item_location_name:$("#rcbLocation").find("option:selected").text(),loc_name:$("#rcbLocation").find("option:selected").text(),loc_code:c.temp.loc_code,original_qty:c.resitem.original_qty,dd_qty:c.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:c.temp.doc_remark,im_item_vat_percentage:c.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(o).toFixed(2),dd_sell_value_line_total:t,im_sell_price_including_vat:parseFloat(c.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:c.sellPriceInclusiveVat,item_dept_code:c.item_dept_code,im_revenue_acno:c.im_revenue_acno,im_cost_acno:c.im_cost_acno,im_vat_sale_profile:c.im_vat_sale_profile}:{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:c.temp.gcode,im_inv_no:c.im_item_code1.im_inv_no,im_item_code:c.im_item_code1.im_item_code,im_desc:$("#rcbItem").find("option:selected").text(),item_location_name:$("#rcbLocation").find("option:selected").text(),loc_name:$("#rcbLocation").find("option:selected").text(),loc_code:c.temp.loc_code,original_qty:c.resitem.original_qty,dd_qty:c.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:c.temp.doc_remark,im_item_vat_percentage:c.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(o).toFixed(2),dd_sell_value_line_total:t,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(c.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:c.sellPriceInclusiveVat,item_dept_code:c.item_dept_code,im_revenue_acno:c.im_revenue_acno,im_cost_acno:c.im_cost_acno,im_vat_sale_profile:c.im_vat_sale_profile},c.itemList_new.push(a)):swal("Exchnage Item Amount is more then Total Amount")),c.totalAmtClick1(),c.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var e=0;ec.itemList_new[t].invoice_qty)return void swal({title:"Alert",text:"Return quantity is more than invoice quantity.",imageUrl:"assets/img/notification-alert.png"});if(0==c.itemList_new[t].dd_qty)return void swal({title:"Alert",text:"Return quantity is 0.",imageUrl:"assets/img/notification-alert.png"});var a=c.temp.payment_type,a={dep_code:c.salesmanDeptCode,doc_prov_no:c.doc_prov_no,dd_line_no:t,dd_status:"2",dd_payment_mode:a,im_inv_no:c.itemList_new[t].im_inv_no,loc_code:c.itemList_new[t].loc_code,dd_sell_price:c.itemList_new[t].dd_sell_price,dd_sell_price_discounted:c.itemList_new[t].dd_line_discount_amount,dd_sell_price_final:0,dd_sell_value_final:c.itemList_new[t].dd_sell_value_final,dd_sell_cost_total:0,dd_qty:c.itemList_new[t].dd_qty,dd_outstanding_qty:0,dd_line_discount_pct:c.itemList_new[t].dd_line_discount_pct,dd_line_discount_amount:c.itemList_new[t].dd_line_discount_amount,dd_line_total:c.itemList_new[t].dd_sell_value_line_total,dd_physical_qty:c.itemList_new[t].original_qty,doc_remark:c.itemList_new[t].doc_remark,vat_flag:!1,dd_item_vat_per:c.itemList_new[t].im_item_vat_percentage,dd_item_vat_amount:c.itemList_new[t].dd_item_vat_amount,dd_cheque_number:c.temp.chequeNo,dd_cheque_date:c.temp.chequeDate,dd_cheque_bank_code:c.temp.bankCode,dd_demand_draft_number:c.temp.ddNo,dd_demand_draft_date:c.temp.ddDate,dd_demand_draft_bank_code:c.temp.ddbankCode,dd_credit_card_number:c.temp.creditCardNo,dd_credit_card_date:c.temp.creditCardDate,dd_credit_card_bank_code:c.temp.creditCardbankCode,dd_bank_transfer_trans_number:c.temp.btTransactionNo,dd_bank_transfer_trans_date:c.temp.btTransactionDate,dd_bank_transfer_trans_bank_code:c.temp.btTransactionbankCode,dd_online_payemnt_trans_number:c.temp.cradPayTransactionNo,im_revenue_acno:c.itemList_new[t].im_revenue_acno,im_cost_acno:c.itemList_new[t].im_cost_acno,im_vat_sale_profile:c.itemList_new[t].im_vat_sale_profile,doc_reference_prov_no:c.itemList[t].req_no,doc_no_have_previous:c.itemList[t].req_no};c.salesDetails_new.push(a)}d.post(_.apiUrl+"api/ReturnSaleInvoice/Return_Sale_Documents_Details1_VAT_SMSM",c.salesDetails_new).then(function(e){if(!0===e.data){for(var t=[],a=0;ao?c.store_issue_details[t].sublist1[a].issue_quantity=o:c.store_issue_details[t].sublist1[a].issue_quantity_dis=!0):(c.store_issue_details[t].sublist1[a].inner_disabled=!0,c.store_issue_details[t].sublist1[a].issue_quantity_dis=!0,c.store_issue_details[t].sublist1[a].remarks_dis=!0)}c.totalItems=c.store_issue_details.length,c.todos=c.store_issue_details;for(t=0;t=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(var a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}}else if("Select Records"==n.edt.SelectOption){if(n.pdcSubmissionList.length>=n.edt.txt_filter_range)for(t=0;t=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}},n.Export=function(){swal({title:"",text:"Are you sure you want to Save PDC Chque Status Details Report.xls?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&alasql('SELECT * INTO XLS("PDC Chque Status Details Report.xls",{headers:true}) FROM HTML("#fixTable",{headers:true,skipdisplaynone:true})')})},n.showdate=function(e,t){var a=e.split("-")[0],o=e.split("-")[1],e=e.split("-")[2];n.temp[t]=a+"-"+o+"-"+e},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"})}])}(),function(){"use strict";var g,h,f,y,b,e=angular.module("sims.module.Finance");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("PDCchequeStatusDetails_NEWCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(n,t,e,a,o,i,d){n.save_btn=!0,n.tot_btn=!0,n.Maintabledata=!1,n.Update_btn=!1,n.display=!1,n.table=!0,n.records=!1,n.submit_date=!1,n.Realize_date=!1,n.cancel_date=!1,n.return_date=!1,n.bonus_data=!1,n.showError=!1,n.edt=[];e.globals.currentUser.username;n.finnDetail=JSON.parse(window.localStorage.Finn_comp);var s=new Date,_=s.getDate(),c=s.getMonth()+1,_=(s.getFullYear(),(s=new Date).getDate());e.globals.currentUser.username;_<10&&(_="0"+_);(c=s.getMonth()+1)<10&&(c="0"+c);var e=s.getFullYear(),r=(n.sdate=_+"-"+c+"-"+e,n.edate=_+"-"+c+"-"+e,n.from_date=_+"-"+c+"-"+e,n.mom_end_date=_+"-"+c+"-"+e,setTimeout(function(){$("#account_codes7").select2()},100),n.export_btn=!1,n.finnDetail.company),l=n.finnDetail.year,s=(n.block1={pc_submission_date:_+"-"+c+"-"+e,pdc_clearance_date:_+"-"+c+"-"+e,pdc_return_date:_+"-"+c+"-"+e},new Date);function m(e){e=e.split("-");return e[2]+"-"+e[1]+"-"+e[0]}n.block1={receipt_date:"receipt",cheque:"cheque",from_date:("0"+s.getDate()).slice(-2)+"-"+("0"+(s.getMonth()+1)).slice(-2)+"-"+s.getFullYear(),to_date:("0"+s.getDate()).slice(-2)+"-"+("0"+(s.getMonth()+1)).slice(-2)+"-"+s.getFullYear()},$(function(){$("#Select4").multipleSelect({width:"100%"})}),n.propertyName=null,n.reverse=!1,n.sortBy=function(e){n.reverse=n.propertyName===e&&!n.reverse,n.propertyName=e},i.get(d.apiUrl+"api/Financialyear/getDocumentStatus").then(function(e){n.docstatus_Data=e.data}),i.get(d.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data}),i.get(d.apiUrl+"api/PDCSubmission/getBankName?comp_code="+r).then(function(e){n.bank_name=e.data,setTimeout(function(){$("#Select4").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),i.get(d.apiUrl+"api/PDCSubmission/GetCreatedBy_user").then(function(e){n.user_list=e.data}),i.get(d.apiUrl+"api/PDCSubmission/Getchequestatus").then(function(e){n.cheque_statusnew=e.data,setTimeout(function(){$("#account_code").change(function(){}).multipleSelect({width:"100%"})},1e3)}),$(function(){$("#account_code").multipleSelect({width:"100%",filter:!0})}),i.get(d.apiUrl+"api/PDCSubmission/getDepartment?finance_year="+l+"&comp_code="+r).then(function(e){n.Department=e.data}),i.get(d.apiUrl+"api/BankPayment/GetLedgerNumber?financialyear="+l+"&comp_code="+r).then(function(e){n.LdgrCode=e.data}),i.get(d.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+r+"&fyear="+l).then(function(e){n.getAllAccNos=e.data}),i.get(d.apiUrl+"api/JVCreation/GetAllGLActNo_pdc_sub?glma_accountcode=&cmpnycode="+r+"&fyear="+l).then(function(e){n.submissionac=e.data}),n.onChange1=function(){"3"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")),"4"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"5"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("week").format("DD-MM-YYYY")),"6"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").endOf("week").format("DD-MM-YYYY")),"7"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"8"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")),"9"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")),"10"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").month("September").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").add("year",1).month("August").endOf("month").format("DD-MM-YYYY")),"11"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract("year",1).month("September").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").month("August").startOf("month").format("DD-MM-YYYY")),"12"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY")),"13"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.block1.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),n.block1.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"14"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.block1.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.current_Quatar_to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").endOf("quarter").format("DD-MM-YYYY"),n.block1.to_date=moment(n.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"15"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"16"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"17"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.block1.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"18"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"19"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"20"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.block1.from_date=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"21"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"22"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY")),"23"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY")),"24"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"week").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"week").endOf("week").format("DD-MM-YYYY")),"25"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").add(4,"week").startOf("week").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").add(4,"week").endOf("week").format("DD-MM-YYYY")),"26"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"month").startOf("month").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"month").endOf("month").format("DD-MM-YYYY")),"27"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").add(1,"year").startOf("year").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").add(1,"year").endOf("year").format("DD-MM-YYYY")),"28"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(30,"days").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"29"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(60,"days").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY")),"30"==n.block1.date_option&&(n.block1.from_date=moment(n.from_date,"DD-MM-YYYY").subtract(90,"days").format("DD-MM-YYYY"),n.block1.to_date=moment(n.from_date,"DD-MM-YYYY").format("DD-MM-YYYY"))},n.chequestatuschange=function(e){"S"===e?(n.submit_date=!1,n.Realize_date=!0,n.cancel_date=!1,n.return_date=!1,n.bonus_data=!1):"W"===e||"C"===e?(n.submit_date=!1,n.Realize_date=!1,n.cancel_date=!0,n.return_date=!1):"I"===e?(n.submit_date=!0,n.Realize_date=!1,n.cancel_date=!1,n.return_date=!1,n.bonus_data=!1):"R"===e?(n.submit_date=!1,n.Realize_date=!1,n.cancel_date=!1,n.return_date=!0,n.bonus_data=!1):"B"===e&&(n.submit_date=!1,n.Realize_date=!1,n.cancel_date=!1,n.return_date=!1,n.bonus_data=!1)},n.chequestatus=function(e){"Outstanding"===e?i.get(d.apiUrl+"api/PDCSubmission/GetchequestatusNEW").then(function(e){n.cheque_status=e.data}):"Realized"===e||"Cancelled"===e||"Withdrwan"===e?n.cheque_status="":"Submitted"===e?i.get(d.apiUrl+"api/PDCSubmission/Getchequestatusubmitted").then(function(e){n.cheque_status=e.data}):"Re-submitted"===e?i.get(d.apiUrl+"api/PDCSubmission/Getchequestaturesubmitted").then(function(e){n.cheque_status=e.data}):"Dishonored"===e&&i.get(d.apiUrl+"api/PDCSubmission/Getchequestatusreturn").then(function(e){n.cheque_status=e.data})},n.checkAcctCode=function(t){if(t&&isConfirm)for(let e=0;e=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(var a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}}else if("Select Records"==n.edt.SelectOption){if(n.pdcSubmissionList.length>=n.edt.txt_filter_range)for(t=0;t=e[0]&&n.pdcSubmissionList[t].ps_amount<=e[1]&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}else if("Cheque Series between"==n.edt.SelectOption&&2<=(e=null!=n.edt.txt_filter_range?n.edt.txt_filter_range.split("-"):e).length){n.minchkno=0;for(a=n.maxchkno=0;a=n.minchkno&&n.pdcSubmissionList[t].ps_cheque_no<=n.maxchkno&&(document.getElementById(t+t).checked=!0,n.pdcSubmissionList[t].row_color="#ffffcc")}},n.Export=function(){swal({title:"",text:"Are you sure you want to Save PDC Chque Status Details Report.xls?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No"}).then(function(e){e&&alasql('SELECT * INTO XLS("PDC Chque Status Details Report.xls",{headers:true}) FROM HTML("#fixTable",{headers:true,skipdisplaynone:true})')})},n.showdate=function(e,t){var a=e.split("-")[0],o=e.split("-")[1],e=e.split("-")[2];n.temp[t]=a+"-"+o+"-"+e},n.block1.pc_submission_date=_+"-"+c+"-"+e,n.block1.pdc_clearance_date=_+"-"+c+"-"+e,n.block1.pdc_return_date=_+"-"+c+"-"+e,n.current_date=new Date(n.current_date),$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"})}])}(),function(){"use strict";angular.module("sims.module.Scheduling").controller("LearntronCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(a,e,t,o,s,n,i){var d=t.globals.currentUser.username;a.data1=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_ClassSubject").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.data2=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_student_section_subject").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.data3=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_homeroom_batch_student").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.data4=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_TeacherMaster").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.data5=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_homeroom_teacher").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.data6=function(t){a.disable(),n.post(i.apiUrl+"api/bell/insertupdate_section_subject_teacher").then(function(e){a.msg1=e.data,""!=a.msg1?(swal({title:"Alert",text:a.msg1,width:300,height:200}),e={comn_audit_user_name:d,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(i.apiUrl+"api/bell/Insert_Learntron_user_audit_data",e).then(function(e){a.msg1=e.data})):swal({text:"No New Records To Update",imageUrl:"assets/img/notification-alert.png",width:300,height:200}),a.enable()})},a.disable=function(){$("#loader").modal({backdrop:"static",keyboard:!1}),a.dis_cls_subj=!0,a.dis_std_sec_subj=!0,a.dis_batch_std=!0,a.dis_teacher=!0,a.dis_hr_teacher=!0,a.dis_sec_subj_teacher=!0},a.enable=function(){a.dis_cls_subj=!1,a.dis_std_sec_subj=!1,a.dis_batch_std=!1,a.dis_teacher=!1,a.dis_hr_teacher=!1,a.dis_sec_subj_teacher=!1,$("#loader").modal("hide"),$(".modal-backdrop").removeClass("modal-backdrop")}}])}(),function(){"use strict";var e=angular.module("sims.module.Scheduling");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("teacherTimeTableCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(s,e,t,a,o,n,i,d){var c;s.display=!1,s.pagesize="10",s.pageindex="0",s.pager=!0,s.grid=!0,s.currentPage=0,s.items=[],s.url=d.apiUrl+"Content/"+n.defaults.headers.common.schoolId,s.edt={},s.countData=[{val:5,data:5},{val:10,data:10},{val:15,data:15}],a(function(){$("#fixTable").tableHeadFixer({top:1})},100),s.size=function(e){"All"===e?(s.currentPage="1",s.filteredTodos=s.items,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),r.checked=!1,s.row1=""},s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"===e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_timetable_cur_name.toLowerCase().indexOf(t.toLowerCase())||-1s.pageCount()-5?s.pageCount()-5+1:t;as.pageCount()-5?s.pageCount()-5+1:t;as.pageCount()-5?s.pageCount()-5+1:t;a"+t+''+a+""),n.close(),s.focus(),i.detailsField=!1):(t=document.head.outerHTML,a=document.getElementById("rpt_data1").outerHTML,o="location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=800, height=600, resizable=yes, screenX=250, screenY=10, personalbar=no, scrollbars=yes",(n=(s=window.open("","_blank",o)).document).open(),n.write(""+t+''+a+""),n.close(),s.focus()),i.colsvis=!1,i.getsubdetail())}),i.colsvis=!0},i.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}i.temp.sims_bell_code="",i.temp.sims_cur_code="",i.temp.sims_academic_year="",i.mom_start_date="",i.mom_end_date="",i.report_data_new=[]},i.viewsubtitution=function(t){$("#MyModal6").modal("show"),s.get(n.apiUrl+"api/lecturedetails/getSubstitutionfromDetails?bell_code="+t.sims_bell_code+"&cur_teacher="+t.current_teacher_code+"&sub_teacher="+t.sub_teacher_code+"&date="+t.sims_bell_substitution_date).then(function(e){i.subformdetails=e.data,i.current_teacher_name=i.subformdetails[0].current_teacher_name,i.day_date=i.subformdetails[0].day_date,i.sub_teacher_name=i.subformdetails[0].sub_teacher_name,i.approved_by=i.subformdetails[0].approved_by,i.remark=i.subformdetails[0].remark,i.time=t.time})},i.send_email=function(e){i.savedata=[];e={mom_start_date:i.mom_start_date,mom_end_date:i.mom_end_date,sims_bell_code:e.sims_bell_code,sims_teacher_code:e.sub_teacher_code,report_status:""};i.savedata.push(e),s.post(n.apiUrl+"api/lecturedetails/Insert_email",i.savedata).then(function(e){i.msg1=e.data,console.log("msg",e),1==i.msg1?($(document).ready(function(){i.datasend=[],i.savedata=[]}),swal({title:"Alert",text:"Email Sent successfully",imageUrl:"assets/img/check.png",width:300,height:200}),i.busy=!1,i.show_fail_students(i.fcommn.cur_code,i.fcommn.academic_year,i.fcommn.sims_grade_code,i.fcommn.sims_section_code,i.fcommn.sims_term_code)):(swal({title:"Alert",text:"Unable To Send Email. ",imageUrl:"assets/img/close.png",width:300,height:200}),i.busy=!1)})},i.printsubtitution=function(e){var t=document.head.outerHTML,a=document.getElementById("subform").outerHTML,o=window.open("","_blank","location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=800, height=600, resizable=yes, screenX=250, screenY=10, personalbar=no, scrollbars=yes"),s=o.document;s.open(),s.write(""+t+''+a+""),s.close(),o.focus()}}])}(),function(){"use strict";var e=angular.module("sims.module.Setup");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("TestsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(s,e,t,a,o,n,i,d){s.user_access=[],s.appcode=e.current.name.split(".");var c,r,l=t.globals.currentUser.username;s.display=!1,s.grid=!0,s.itemsPerPage="10",s.currentPage=0,s.items=[];s.getSelectedParam=function(e){n.get(d.apiUrl+"api/health/geteditParameter?test_code="+e.sims_health_test_code).then(function(e){if(s.paramList=e.data,0s.pageCount()-5?s.pageCount()-5+1:t;as&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.rt&&(n.s.r=t),n.s.c>e&&(n.s.c=e),n.e.rd.pageCount()-5?d.pageCount()-5+1:t;as&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r

BasicDetails:

HospitalDetails:

"),$(t.currentTarget).parents("tr").after(m),s.flag=!1;else{$("#innerRow").css({display:"none"});for(var a of s.filteredTodos)a.icon="fa fa-plus-circle";s.flag=!0}},s.CheckedReadonly=function(e){!0===document.getElementById(e).checked?s[e]=!1:s[e]=!0},$(document).ready(function(){s.getcur()})}])}(),function(){"use strict";var l,e=angular.module("sims.module.Health");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("StudentHealthCSDCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(s,e,t,a,o,n,i){s.pagesize="10",s.pageindex="0",s.pager=!0,s.save_btn=!0,s.search_btn=!0,s.clr_btn=!0,s.Update_btn=!1,s.newdisplay=!1,s.table=!0,s.hide_img=!1,s.imgurl=i.docUrl+n.defaults.headers.common.schoolId+"/Images/StudentImages/",n.get(i.apiUrl+"api/StudentHealth/getBloodGroup").then(function(e){s.empstat=!0,s.bloodGroup=e.data,console.log(s.bloodGroup),s.operation=!0,s.Save_btn=!0,s.Update_btn=!1,s.display=!0}),s.calculateBMI=function(e,t){var a=0,o=0,a=(t=e/((e=t/100)*e))-(o=Math.floor(t));a*=10,10===(a=Math.round(a))&&(o+=1,a=0),s.temp.sims_health_bmi=o+"."+a},s.getcur=function(){n.get(i.apiUrl+"api/common/getCuriculum").then(function(e){s.curriculum=e.data,s.edt={sims_cur_code:s.curriculum[0].sims_cur_code},s.getAccYear(s.edt.sims_cur_code)})},s.getcur(),s.getAccYear=function(e){n.get(i.apiUrl+"api/common/getAcademicYear?curCode="+e).then(function(e){s.Acc_year=e.data,s.temp={sims_academic_year:s.Acc_year[0].sims_academic_year},s.getGrade(s.edt.sims_cur_code,s.temp.sims_academic_year)})},s.getGrade=function(e,t){n.get(i.apiUrl+"api/common/getAllGrades?cur_code="+e+"&academic_year="+t).then(function(e){s.Grade_code=e.data,console.log(s.Grade_code)})},s.getSection=function(e,t,a){n.get(i.apiUrl+"api/common/getSectionFromGrade?cur_code="+e+"&grade_code="+t+"&academic_year="+a).then(function(e){s.Section_code=e.data,console.log(s.Section_code)})},s.stud_Details_fun=function(e,t,a,o){s.filteredTodos=[],s.Stud_Health_Details=[],s.edt.sims_cur_code,s.temp.sims_academic_year,s.temp.sims_grade_code,s.temp.sims_section_code,n.get(i.apiUrl+"api/StudentHealthSCD/getStudHealthSearch?sims_cur_code="+e+"&sims_academic_year="+t+"&sims_grade_code="+a+"&sims_section_code="+o).then(function(e){s.Stud_Health_Details=e.data,s.totalItems=s.Stud_Health_Details.length,s.todos=s.Stud_Health_Details,s.makeTodos()})},t.visible_stud=!0,t.visible_parent=!1,t.visible_search_parent=!1,t.visible_teacher=!1,t.visible_User=!1,t.visible_Employee=!1,t.chkMulti=!1,s.SearchStudentWindow=function(){s.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},s.$on("global_cancel",function(){0
Issuing Authority Teeth Medication StatusMedication DescDisability Status Disability Desc Restriction StatusRestriction Desc
"+e.sims_health_card_issuing_authority1+" "+e.sims_teeth+" "+e.sims_medication_status+""+e.sims_medication_desc+""+e.sims_disability_status+" "+e.sims_disability_desc+" "+e.sims_health_restriction_status+""+e.sims_health_restriction_desc+"
Hearing Status Hearing Desc Vision StatusVision DescOther Status Other Desc Hospital NameHospital Phone No
"+e.sims_health_hearing_status+" "+e.sims_health_hearing_desc+" "+e.sims_health_vision_status+""+e.sims_health_vision_desc+""+e.sims_health_other_status+" "+e.sims_health_other_desc+" "+e.sims_regular_hospital_name+""+e.sims_regular_hospital_phone+"
Doctor Name Doctor Phone No
"+e.sims_regular_doctor_name+" "+e.sims_regular_doctor_phone+"
"),$(t.currentTarget).parents("tr").after(d),s.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a
Issuing Authority Teeth Medication StatusMedication DescDisability Status Disability Desc Restriction StatusRestriction Desc
"+e.sims_health_card_issuing_authority+" "+e.sims_teeth+" "+e.sims_medication_status+""+e.sims_medication_desc+""+e.sims_disability_status+" "+e.sims_disability_desc+" "+e.sims_health_restriction_status+""+e.sims_health_restriction_desc+"
Hearing Status Hearing Desc Vision StatusVision DescOther Status Other Desc Hospital NameHospital Phone No
"+e.sims_health_hearing_status+" "+e.sims_health_hearing_desc+" "+e.sims_health_vision_status+""+e.sims_health_vision_desc+""+e.sims_health_other_status+" "+e.sims_health_other_desc+" "+e.sims_regular_hospital_name+""+e.sims_regular_hospital_phone+"
Doctor Name Doctor Phone No
"+e.sims_regular_doctor_name+" "+e.sims_regular_doctor_phone+"
"),$(t.currentTarget).parents("tr").after(c),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"+t+''+a+""),s.close(),o.focus()},s.calculateBMI=function(e,t){var a=0,o=0,a=(t=e/((e=t/100)*e))-(o=Math.floor(t));a*=10,10==(a=Math.round(a))&&(o+=1,a=0),s.edt.sims_health_bmi=o+"."+a},s.GetSusceptibilityDesc=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getSusceptibilityDesc").then(function(e){s.suscept=e.data})},s.GetSusceptibilityDetails=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getSusceptibilityDetails?sims_enroll_number="+s.edt.sims_enroll_number).then(function(e){s.Suscept_Details=e.data,s.edt.sims_susceptibility_code=s.Suscept_Details[0].sims_susceptibility_code,s.edt.sims_susceptibility_desc=s.Suscept_Details[0].sims_susceptibility_desc})},s.GetHealthDetails=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getHealthDetails?sims_enroll_number="+s.edt.sims_enroll_number).then(function(e){s.Health_Details=e.data,s.edt.sims_height=s.Health_Details[0].sims_height,s.edt.sims_wieght=s.Health_Details[0].sims_wieght,s.edt.sims_health_bmi=s.Health_Details[0].sims_health_bmi})}}])}(),function(){"use strict";var u,e=angular.module("sims.module.Health");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("MedicalVisitHRCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(s,e,t,a,o,n,d,c){s.pagesize="10",s.pageindex="0",s.pager=!0,s.display=!1,s.save1=!1,s.update1=!1,s.cancel1=!1,s.table1=!0,s.fee_no=!0,s.table=!0,s.visit_no=!0;var r=null,l=(s.chku=!1,s.stud_info=!1,s.Emp_info=!1,s.emp_pre=!1,s.stud_pre=!1,s.Emp_number=!1,s.Stud_number=!1,s.ref_user=!1,s.hideStudentEnroll=!0,s.edt={},s.imgurl=c.docUrl+d.defaults.headers.common.schoolId+"/Images/StudentImages/",s.imgurle=c.docUrl+d.defaults.headers.common.schoolId+"/Images/employeeImages/",s.user=t.globals.currentUser.username,document.getElementById("chk_User")),m=document.getElementById("chk_Employee"),l=(l.checked=!1,m.checked=!1,document.getElementById("drug_User")),m=document.getElementById("drug_Employee"),l=(l.checked=!1,m.checked=!1,s.edt12={},s.edte={},s.temp={},s.edt12.sims_drug_allergy="f",s.ShowSusceptibilityDetails=!1,n("date")(new Date,"yyyy-MM-dd"));s.dt={sims_from_date:l},a(function(){$("#fixTable").tableHeadFixer({top:1})},100),s.size=function(e){"All"===e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),u.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);s.filteredTodos=s.todos.slice(e,t)},s.showdata=function(){s.display=!1,s.table=!0,s.table1=!0;var e=document.getElementById("chk_User"),t=document.getElementById("chk_Employee"),e=(e.checked=!1,t.checked=!1,document.getElementById("drug_User")),t=document.getElementById("drug_Employee");e.checked=!1,t.checked=!1,d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getMedicalVisit").then(function(e){s.obj=e.data,s.totalItems=s.obj.length,s.todos=s.obj,s.makeTodos(),0==s.obj.length?(swal({title:"Alert",text:"No Record Found...",showCloseButton:!0,width:450,height:200}),s.display=!1,s.table=!1):(s.display=!1,s.table=!0),s.table1=!0})},s.searched=function(e,a){return _.filter(e,function(e){return t=a,-1<(e=e).sims_medical_visit_number.toLowerCase().indexOf(t.toLowerCase())||-1"+t+''+a+""),s.close(),o.focus()},s.calculateBMI=function(e,t){var a=0,o=0,a=(t=e/((e=t/100)*e))-(o=Math.floor(t));a*=10,10==(a=Math.round(a))&&(o+=1,a=0),s.edt.sims_health_bmi=o+"."+a},s.GetSusceptibilityDesc=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getSusceptibilityDesc").then(function(e){s.suscept=e.data})},s.GetSusceptibilityDetails=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getSusceptibilityDetails?sims_enroll_number="+s.edt.sims_enroll_number).then(function(e){s.Suscept_Details=e.data,s.edt.sims_susceptibility_code=s.Suscept_Details[0].sims_susceptibility_code,s.edt.sims_susceptibility_desc=s.Suscept_Details[0].sims_susceptibility_desc})},s.GetHealthDetails=function(){d.get(c.apiUrl+"api/MedicalStudentSusceptibility/getHealthDetails?sims_enroll_number="+s.edt.sims_enroll_number).then(function(e){s.Health_Details=e.data,s.edt.sims_height=s.Health_Details[0].sims_height,s.edt.sims_wieght=s.Health_Details[0].sims_wieght,s.edt.sims_health_bmi=s.Health_Details[0].sims_health_bmi})}}])}(),function(){"use strict";var p,e=angular.module("sims.module.Health");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("MedicalVisitCSDCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(s,e,t,o,a,n,i,d){s.pagesize="10",s.pageindex="0",s.edt13={},s.edt13.sims_pain_complaint="2",s.pager=!0,s.onlywhentrue=!1,s.display=!1,s.save1=!1,s.update1=!1,s.cancel1=!1,s.table1=!0,s.date=!0,s.fee_no=!0,s.table=!0,s.count=!0,s.visit_no=!0;var c=null,r=(s.chku=!1,s.stud_info=!1,s.stud_info_class=!1,s.Emp_info=!1,s.emp_pre=!1,s.stud_pre=!1,s.Emp_number=!1,s.Stud_number=!1,s.ref_user=!1,s.edt={},s.imgurl=d.docUrl+i.defaults.headers.common.schoolId+"/Images/StudentImages/",s.imgurle=d.docUrl+i.defaults.headers.common.schoolId+"/Images/employeeImages/",s.user=t.globals.currentUser.username,document.getElementById("chk_User")),l=document.getElementById("chk_Employee"),r=(r.checked=!1,l.checked=!1,document.getElementById("drug_User")),l=document.getElementById("drug_Employee"),r=(r.checked=!1,l.checked=!1,s.edt12={},s.edt13={},s.edte={},s.temp={},s.Home=!1,s.HealthCenter=!1,n("date")(new Date,"yyyy-MM-dd"));s.dt={sims_from_date:r},s.edt={sims_action_date:r},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),s.size=function(e){"All"==e?(s.currentPage="1",s.filteredTodos=s.todos,s.pager=!1):(s.pager=!0,s.pagesize=e,s.currentPage=1,s.numPerPage=e,s.makeTodos())},s.index=function(e){s.pageindex=e,s.currentPage=e,console.log("currentPage="+s.currentPage),s.makeTodos(),p.checked=!1,s.CheckAllChecked()},s.filteredTodos=[],s.currentPage=1,s.numPerPage=10,s.maxSize=10,s.makeTodos=function(){var e=parseInt(s.totalItems%s.numPerPage),e=(s.pagersize="0"==e?parseInt(s.totalItems/s.numPerPage):parseInt(s.totalItems/s.numPerPage)+1,(s.currentPage-1)*s.numPerPage),t=parseInt(e)+parseInt(s.numPerPage);console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t)},i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/Getcomplaintdesc").then(function(e){s.complaint_desc=e.data,console.log("Desc",s.complaint_desc)}),s.showStudStatus=function(){i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/GetStudentRound").then(function(e){s.stud_status=e.data})},s.showPrimaryAction=function(){i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/GetPrimaryAction").then(function(e){s.primary_action=e.data})},s.showSecondaryAction=function(e){"T"==e&&(s.HealthCenter=!0,s.Home=!1,s.HealthDropdown=!1),"H"==e&&(s.Home=!0,s.HealthCenter=!1,s.HealthDropdown=!1),"O"!=e&&"S"!=e||(i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/GetSecondaryAction").then(function(e){s.secondary_action=e.data}),s.HealthDropdown=!0,s.HealthCenter=!1,s.Home=!1)},s.showdata=function(){s.display=!1,s.table=!0,s.date=!0,s.table1=!0;var e=document.getElementById("chk_User"),t=document.getElementById("chk_Employee"),e=(e.checked=!1,t.checked=!1,document.getElementById("drug_User")),t=document.getElementById("drug_Employee");e.checked=!1,t.checked=!1,i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/getMedicalVisit").then(function(e){s.obj=e.data,s.totalItems=s.obj.length,s.todos=s.obj,s.makeTodos(),0==s.obj.length?(swal({title:"Alert",text:"No Record Found...",showCloseButton:!0,width:450,height:200}),s.display=!1,s.table=!1,s.date=!1):(s.display=!1,s.table=!0,s.date=!0),s.table1=!0}),i.get(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/getvisitcount?opr=O").then(function(e){s.countdata=[],s.countdata=e.data,0e&&void 0!==e).join(","),s.res.sims_pain_radiating_to=s.edt13.sims_pain_radiating_to,s.res.sims_pain_frequency=[s.edt13.sims_pain_frequency_persistent,s.edt13.sims_pain_frequency_recurrent].filter(e=>e&&void 0!==e).join(","),s.res.sims_pain_type=[s.edt13.sims_pain_type_chronic,s.edt13.sims_pain_type_acute].filter(e=>e&&void 0!==e).join(","),s.res.sims_pain_location_generalized=s.edt13.sims_pain_location_generalized,s.res.sims_pain_location_to=s.edt13.sims_pain_location_to,s.res.sims_pain_duration=s.edt13.sims_pain_duration,s.res.sims_pain_onset=[s.edt13.sims_pain_onset_sudden,s.edt13.sims_pain_onset_gradual].filter(e=>e&&void 0!==e).join(","),s.res.sims_pain_aggravated=s.edt13.sims_pain_aggravated,s.res.sims_pain_alleviated=s.edt13.sims_pain_alleviated,s.res.sims_vision_red_eyes_right=s.edt13.sims_vision_red_eyes_right,s.res.sims_vision_red_eyes_left=s.edt13.sims_vision_red_eyes_left,s.res.sims_vision_eye_discharge_right=s.edt13.sims_vision_eye_discharge_right,s.res.sims_vision_eye_discharge_left=s.edt13.sims_vision_eye_discharge_left,s.res.sims_vision_squint_eye_right=s.edt13.sims_vision_squint_eye_right,s.res.sims_vision_squint_eye_left=s.edt13.sims_vision_squint_eye_left,s.res.sims_vision_nystagmus_eye_right=s.edt13.sims_vision_nystagmus_eye_right,s.res.sims_vision_nystagmus_eye_left=s.edt13.sims_vision_nystagmus_eye_left,s.res.sims_vision_other=s.edt13.sims_vision_other,s.res.sims_normal_vision=[s.edt13.sims_normal_vision1,s.edt13.sims_normal_vision2,s.edt13.sims_normal_vision3,s.edt13.sims_normal_vision4].filter(e=>e&&void 0!==e).join(",");for(var a=0;ae&&void 0!==e).join(","),sims_pain_radiating_to:s.edt13.sims_pain_radiating_to,sims_pain_frequency:[s.edt13.sims_pain_frequency_persistent,s.edt13.sims_pain_frequency_recurrent].filter(e=>e&&void 0!==e).join(","),sims_pain_type:[s.edt13.sims_pain_type_chronic,s.edt13.sims_pain_type_acute].filter(e=>e&&void 0!==e).join(","),sims_pain_location_generalized:s.edt13.sims_pain_location_generalized,sims_pain_location_to:s.edt13.sims_pain_location_to,sims_pain_duration:s.edt13.sims_pain_duration,sims_pain_onset:[s.edt13.sims_pain_onset_sudden,s.edt13.sims_pain_onset_gradual].filter(e=>e&&void 0!==e).join(","),sims_pain_aggravated:s.edt13.sims_pain_aggravated,sims_pain_alleviated:s.edt13.sims_pain_alleviated,sims_vision_red_eyes_right:s.edt13.sims_vision_red_eyes_right,sims_vision_red_eyes_left:s.edt13.sims_vision_red_eyes_left,sims_vision_eye_discharge_right:s.edt13.sims_vision_eye_discharge_right,sims_vision_eye_discharge_left:s.edt13.sims_vision_eye_discharge_left,sims_vision_squint_eye_right:s.edt13.sims_vision_squint_eye_right,sims_vision_squint_eye_left:s.edt13.sims_vision_squint_eye_left,sims_vision_nystagmus_eye_right:s.edt13.sims_vision_nystagmus_eye_right,sims_vision_nystagmus_eye_left:s.edt13.sims_vision_nystagmus_eye_left,sims_vision_other:s.edt13.sims_vision_other,sims_normal_vision:[s.edt13.sims_normal_vision1,s.edt13.sims_normal_vision2,s.edt13.sims_normal_vision3,s.edt13.sims_normal_vision4].filter(e=>e&&void 0!==e).join(","),opr:"U"};e.push(t)}else{for(var a=0;ae&&void 0!==e).join(","),sims_pain_radiating_to:s.edt13.sims_pain_radiating_to,sims_pain_frequency:[s.edt13.sims_pain_frequency_persistent,s.edt13.sims_pain_frequency_recurrent].filter(e=>e&&void 0!==e).join(","),sims_pain_type:[s.edt13.sims_pain_type_chronic,s.edt13.sims_pain_type_acute].filter(e=>e&&void 0!==e).join(","),sims_pain_location_generalized:s.edt13.sims_pain_location_generalized,sims_pain_location_to:s.edt13.sims_pain_location_to,sims_pain_duration:s.edt13.sims_pain_duration,sims_pain_onset:[s.edt13.sims_pain_onset_sudden,s.edt13.sims_pain_onset_gradual].filter(e=>e&&void 0!==e).join(","),sims_pain_aggravated:s.edt13.sims_pain_aggravated,sims_pain_alleviated:s.edt13.sims_pain_alleviated,sims_vision_red_eyes_right:s.edt13.sims_vision_red_eyes_right,sims_vision_red_eyes_left:s.edt13.sims_vision_red_eyes_left,sims_vision_eye_discharge_right:s.edt13.sims_vision_eye_discharge_right,sims_vision_eye_discharge_left:s.edt13.sims_vision_eye_discharge_left,sims_vision_squint_eye_right:s.edt13.sims_vision_squint_eye_right,sims_vision_squint_eye_left:s.edt13.sims_vision_squint_eye_left,sims_vision_nystagmus_eye_right:s.edt13.sims_vision_nystagmus_eye_right,sims_vision_nystagmus_eye_left:s.edt13.sims_vision_nystagmus_eye_left,sims_vision_other:s.edt13.sims_vision_other,sims_normal_vision:[s.edt13.sims_normal_vision1,s.edt13.sims_normal_vision2,s.edt13.sims_normal_vision3,s.edt13.sims_normal_vision4].filter(e=>e&&void 0!==e).join(",")},e.push(t),s.flag=!0;if(0==s.flag)return void swal("","Please select the records to Insert")}i.post(d.apiUrl+"api/MedicalStudentSusceptibilityCSDController/CUDMedicalVisit",e).then(function(e){s.msg1=e.data,1==s.msg1?swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",showCloseButton:!0,width:300,height:200}):swal({text:"Record Not Updated",imageUrl:"assets/img/check.png",showCloseButton:!0,width:300,height:200}),s.clearvalue(),o(function(){s.showdata()},0)}),s.count=!0},s.OkDelete=function(){s.employee_no=!1,s.enroll_no=!1,s.stud_pre=!1,s.emp_pre=!1;s.flag=!1;for(var e,o=[],t=0;t_.sectionlst1.section_strength?swal({title:"Alert",text:"Section Strength is Full.If You still want to Continue?",showCloseButton:!0,width:380}).then(function(e){e?_.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):_.adm_update())},_.adm_update=function(){null==_.edt.home_country_isdcode&&(_.edt.home_country_isdcode=""),null==_.edt.home_phone&&(_.edt.home_phone="");var e={admission_number:r,appl_num:_.edt.appl_num,pros_num:_.edt.pros_num,pros_appl_num:_.edt.pros_appl_num,admission_date:_.edt.admission_date,school_code:_.edt.school_code,curr_code:_.edt.curr_code,academic_year:_.edt.academic_year,grade_code:_.edt.grade_code,section_code:_.edt.section_code,term_code:_.edt.term_code,tent_join_date:_.edt.tent_join_date,sims_student_emergency_contact_number1:_.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:_.edt.sims_student_emergency_contact_name1,first_name:_.edt.first_name,middle_name:_.edt.middle_name,last_name:_.edt.last_name,family_name:_.edt.family_name,first_name_ot:_.edt.first_name_ot,midd_name_ot:_.edt.midd_name_ot,last_name_ot:_.edt.last_name_ot,family_name_ot:_.edt.family_name_ot,nicke_name:_.edt.nicke_name,birth_date:_.edt.birth_date,comm_date:_.edt.comm_date,birth_country_code:_.edt.birth_country_code,nationality_code:_.edt.nationality_code,ethinicity_code:_.edt.ethinicity_code,gender_code:_.edt.gender_code,religion_code:_.edt.religion_code,passport_num:_.edt.passport_num,passport_issue_date:_.edt.passport_issue_date,passport_expiry:_.edt.passport_expiry,passport_issue_auth:_.edt.passport_issue_auth,passport_issue_place:_.edt.passport_issue_place,visa_number:_.edt.visa_number,visa_type:_.edt.visa_type,visa_issuing_authority:_.edt.visa_issuing_authority,visa_issue_date:_.edt.visa_issue_date,visa_expiry_date:_.edt.visa_expiry_date,visa_issuing_place:_.edt.visa_issuing_place,national_id:_.edt.national_id,national_id_issue_date:_.edt.national_id_issue_date,national_id_expiry_date:_.edt.national_id_expiry_date,sibling_status:_.edt.sibling_status,parent_id:_.edt.parent_id,sibling_enroll:_.edt.sibling_enroll,sibling_name:_.edt.sibling_name,sibling_dob:_.edt.sibling_dob,sibling_school_code:_.edt.sibling_school_code,employee_type:_.edt.employee_type,employee_code:_.edt.employee_code,employee_school_code:_.edt.employee_school_code,motherTounge_language_code:_.edt.motherTounge_language_code,main_language_code:_.edt.main_language_code,main_language_r_code:_.edt.main_language_r_code,main_language_w_code:_.edt.main_language_w_code,main_language_s_code:_.edt.main_language_s_code,primary_contact_code:_.edt.primary_contact_code,primary_contact_pref_code:_.edt.primary_contact_pref_code,fee_payment_contact_pref_code:_.edt.fee_payment_contact_pref_code,transport_status:_.edt.transport_status,transport_desc:_.edt.transport_desc,father_salutation_code:_.edt.father_salutation_code,father_first_name:_.edt.father_first_name,father_middle_name:_.edt.father_middle_name,father_last_name:_.edt.father_last_name,father_family_name:_.edt.father_family_name,father_family_name_ot:_.edt.father_family_name_ot,father_nationality1_code:_.edt.father_nationality1_code,father_nationality2_code:_.edt.father_nationality2_code,father_appartment_number:_.edt.father_appartment_number,father_building_number:_.edt.father_building_number,father_street_number:_.edt.father_street_number,father_area_number:_.edt.father_area_number,father_city:_.edt.father_city,father_state:_.edt.father_state,father_country_code:_.edt.father_country_code,father_summary_address:_.edt.father_summary_address,father_po_box:_.edt.father_po_box,father_phone:_.edt.father_phone,father_email:_.edt.father_email,father_mobile:_.edt.father_mobile,father_fax:_.edt.father_fax,father_occupation:_.edt.father_occupation,father_company:_.edt.father_company,father_company_address:_.edt.father_company_address,father_company_phone:_.edt.father_company_phone,mother_company_address:_.edt.mother_company_address,mother_company_phone:_.edt.mother_company_phone,father_passport_number:_.edt.father_passport_number,sims_admission_father_national_id:_.edt.sims_admission_father_national_id,guardian_salutation_code:_.edt.guardian_salutation_code,guardian_first_name:_.edt.guardian_first_name,guardian_middle_name:_.edt.guardian_middle_name,guardian_last_name:_.edt.guardian_last_name,guardian_family_name:_.edt.guardian_family_name,guardian_nationality1_code:_.edt.guardian_nationality1_code,guardian_nationality2_code:_.edt.guardian_nationality2_code,guardian_appartment_number:_.edt.guardian_appartment_number,guardian_building_number:_.edt.guardian_building_number,guardian_street_number:_.edt.guardian_street_number,guardian_area_number:_.edt.guardian_area_number,guardian_city:_.edt.guardian_city,guardian_state:_.edt.guardian_state,guardian_country_code:_.edt.guardian_country_code,guardian_summary_address:_.edt.guardian_summary_address,guardian_po_box:_.edt.guardian_po_box,guardian_phone:_.edt.guardian_phone,guardian_mobile:_.edt.guardian_mobile,guardian_fax:_.edt.guardian_fax,guardian_email:_.edt.guardian_email,guardian_occupation:_.edt.guardian_occupation,guardian_company:_.edt.guardian_company,guardian_passport_number:_.edt.guardian_passport_number,guardian_relationship_code:_.edt.guardian_relationship_code,mother_salutation_code:_.edt.mother_salutation_code,mother_first_name:_.edt.mother_first_name,mother_middle_name:_.edt.mother_middle_name,mother_last_name:_.edt.mother_last_name,mother_family_name:_.edt.mother_family_name,mother_name_ot:_.edt.mother_name_ot,mother_nationality1_code:_.edt.mother_nationality1_code,mother_nationality2_code:_.edt.mother_nationality2_code,mother_appartment_number:_.edt.mother_appartment_number,mother_building_number:_.edt.mother_building_number,mother_street_number:_.edt.mother_street_number,mother_area_number:_.edt.mother_area_number,mother_city:_.edt.mother_city,mother_state:_.edt.mother_state,mother_country_code:_.edt.mother_country_code,mother_summary_address:_.edt.mother_summary_address,mother_po_box:_.edt.mother_po_box,mother_phone:_.edt.mother_phone,mother_mobile:_.edt.mother_mobile,mother_fax:_.edt.mother_fax,mother_email:_.edt.mother_email,mother_occupation:_.edt.mother_occupation,mother_passport_number:_.edt.mother_passport_number,current_school_status:_.edt.current_school_status,current_school_name:_.edt.current_school_name,current_school_enroll_number:_.edt.current_school_enroll_number,current_school_grade:_.edt.current_school_grade,current_school_cur:_.edt.current_school_cur,current_school_from_date:_.edt.current_school_from_date,current_school_to_date:_.edt.current_school_to_date,current_school_language:_.edt.current_school_language,current_school_head_teacher:_.edt.current_school_head_teacher,current_school_phone:_.edt.current_school_phone,current_school_fax:_.edt.current_school_fax,current_school_city:_.edt.current_school_city,current_school_country_code:_.edt.current_school_country_code,current_school_address:_.edt.current_school_address,marketing_code:_.edt.marketing_code,marketing_description:_.edt.marketing_description,parent_status_code:_.edt.parent_status_code,legal_custody_code:_.edt.legal_custody_code,health_card_number:_.edt.health_card_number,health_card_issue_date:_.edt.health_card_issue_date,health_card_issuing_authority:_.edt.health_card_issuing_authority,blood_group_code:_.edt.blood_group_code,medication_status:_.edt.medication_status,medication_desc:_.edt.medication_desc,disability_status:_.edt.disability_status,disability_desc:_.edt.disability_desc,behaviour_status:_.edt.behaviour_status,behaviour_desc:_.edt.behaviour_desc,health_restriction_status:_.edt.health_restriction_status,health_restriction_desc:_.edt.health_restriction_desc,health_hearing_status:_.edt.health_hearing_status,health_hearing_desc:_.edt.health_hearing_desc,health_vision_status:_.edt.health_vision_status,health_vision_desc:_.edt.health_vision_desc,health_other_status:_.edt.health_other_status,health_other_desc:_.edt.health_other_desc,gifted_status:_.edt.gifted_status,gifted_desc:_.edt.gifted_desc,music_status:_.edt.music_status,music_desc:_.edt.music_desc,sports_status:_.edt.sports_status,sports_desc:_.edt.sports_desc,language_support_status:_.edt.language_support_status,language_support_desc:_.edt.language_support_desc,declaration_status:_.edt.declaration_status,fees_paid_status:_.edt.fees_paid_status,fee_category_code:_.edt.fee_category_code,ip:_.edt.ip,dns:_.edt.dns,user_code:_.edt.user_code,status:_.edt.status,sims_student_attribute1:_.edt.sims_student_attribute1,sims_student_attribute2:_.edt.sims_student_attribute2,sims_student_attribute3:_.edt.sims_student_attribute3,sims_student_attribute4:_.edt.sims_student_attribute4,sims_student_health_respiratory_status:_.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:_.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:_.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:_.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:_.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:_.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:_.edt.sims_student_health_skin_status,sims_student_health_skin_desc:_.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:_.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:_.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:_.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:_.edt.sims_student_health_surgery_desc,sims_admission_recommendation:_.edt.sims_admission_recommendation,sims_admission_mother_national_id:_.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:_.edt.sims_admission_guardian_national_id,sims_fee_month_code:_.edt.sims_fee_month_code,sims_student_attribute5:_.edt.sims_student_attribute5,sims_student_attribute6:_.edt.sims_student_attribute6,sims_student_attribute7:_.edt.sims_student_attribute7,sims_student_attribute8:_.edt.sims_student_attribute8,sims_student_attribute9:_.edt.sims_student_attribute9,sims_student_attribute10:_.edt.sims_student_attribute10,sims_student_attribute11:_.edt.sims_student_attribute11,sims_student_attribute12:_.edt.sims_student_attribute12,sims_admission_second_lang_code:_.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:_.edt.sims_admission_third_lang_code,sims_admission_subject_code:_.edt.sims_admission_second_lang_code+","+_.edt.sims_admission_third_lang_code};c.push(e),n.post(d.apiUrl+"api/common/Admission_dpsd/ApproveStudent",c).then(function(e){_.display=!0,_.msg1=e.data,console.log(_.msg1)}),_.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},_.modal_cancel=function(){$("#myModal1").modal("hide"),console.log(t.Class),o(function(){"tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId?e.go("main.dashL",{Class:t.Class}):e.go("main.dash",{Class:t.Class})},300)},_.get_studentfee=function(){e.go("main.Sim043")},_.back=function(){_.dd=!0,window.localStorage.Admflag=_.dd,_.modal_cancel()},_.schoolcheck=function(){1==_.edt.current_school_status?_.school_edit=!1:_.school_edit=!0},_.chk_desc=function(){1==_.edt.marketing_code?_.desc_edit=!1:_.desc_edit=!0},_.chk_cicumstances=function(){1==_.edt.parent_status_code?_.circum_edit=!1:_.circum_edit=!0},_.chk_disab_status=function(){1==_.edt.disability_status?_.disab_edit=!1:_.disab_edit=!0},_.chk_health_res=function(){1==_.edt.health_restriction_status?_.healthres_edit=!1:_.healthres_edit=!0},_.chk_medic_status=function(){1==_.edt.medication_status?_.med_edit=!1:_.med_edit=!0},_.chk_other=function(){1==_.edt.health_other_status?_.other_edit=!1:_.other_edit=!0},_.chk_hearing=function(){1==_.edt.health_hearing_status?_.hearing_edit=!1:_.hearing_edit=!0},_.chk_vision=function(){1==_.edt.health_vision_status?_.health_vision_edit=!1:_.health_vision_edit=!0},_.chk_behaviour=function(){1==_.edt.behaviour_status?_.behaviour_edit=!1:_.behaviour_edit=!0},_.chk_gifted_status=function(){1==_.edt.gifted_status?_.gifted_edit=!1:_.gifted_edit=!0},_.chk_music_pro=function(){1==_.edt.music_status?_.music_edit=!1:_.music_edit=!0},_.chk_sport_pro=function(){1==_.edt.sports_status?_.sport_edit=!1:_.sport_edit=!0},_.chk_lang_sup=function(){1==_.edt.language_support_status?_.lang_sup_edit=!1:_.lang_sup_edit=!0},_.chk_Pri_contact=function(){1==_.edt.primary_contact_code?_.pricont_edit=!1:_.pricont_edit=!0},_.chk_transport_requin=function(){1==_.edt.transport_status?_.transreq_edit=!1:_.transreq_edit=!0},_.chk_Sibling_attend=function(){1==_.edt.sibling_status?_.disableparent=!1:_.disableparent=!0},_.chk_employee=function(){1==_.edt.sims_empchk?(_.disableemployee=!1,_.edt.sims_empchk):_.disableemployee=!0},_.chk_learn_ther=function(){1==_.edt.sims_admission_learning_therapy_status?_.learnther_edit=!1:_.learnther_edit=!0},_.chk_spec_edu=function(){1==_.edt.sims_admission_special_education_status?_.spec_edu_edit=!1:_.spec_edu_edit=!0},_.chk_falled_grade=function(){1==_.edt.sims_admission_falled_grade_status?_.falledgrade_edit=!1:_.falledgrade_edit=!0},_.chk_commun=function(){1==_.edt.sims_admission_communication_status?_.commun_edit=!1:_.commun_edit=!0},_.chk_spec_activies=function(){1==_.edt.sims_admission_specialAct_status?_.specActiv_edit=!1:_.specActiv_edit=!0},_.chk_studyingin=function(){1==_.edt.sibling_status?(_.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!1):(_.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!0)},_.chk_ticking=function(){1==_.edt.declaration_status?(_.tick_edit=!1,_.confirm_edit=!1):(_.tick_edit=!0,_.confirm_edit=!0)},_.chk_copy_mother_add=function(){1==_.edt.copy_add?(_.edt.mother_appartment_number=_.edt.father_appartment_number,_.edt.mother_area_number=_.edt.father_area_number,_.edt.mother_building_number=_.edt.father_building_number,_.edt.mother_street_number=_.edt.father_street_number,_.edt.mother_city=_.edt.father_city,_.edt.mother_state=_.edt.father_state,_.edt.mother_country_code=_.edt.father_country_code,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_nationality1_code=_.edt.father_nationality1_code,_.edt.mother_nationality2_code=_.edt.father_nationality2_code,_.edt.mother_summary_address=_.edt.father_summary_address,_.edt.mother_phone=_.edt.father_phone,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_mobile=_.edt.father_mobile,_.edt.mother_occupation=_.edt.father_occupation,_.edt.mother_email=_.edt.father_email,_.edt.mother_company=_.edt.father_company):(_.edt.mother_appartment_number="",_.edt.mother_area_number="",_.edt.mother_building_number="",_.edt.mother_street_number="",_.edt.mother_city="",_.edt.mother_state="",_.edt.mother_country_code="",_.edt.mother_po_box="",_.edt.mother_nationality1_code="",_.edt.mother_nationality2_code="",_.edt.mother_summary_address="",_.edt.mother_phone="",_.edt.mother_po_box="",_.edt.mother_mobile="",_.edt.mother_occupation="",_.edt.mother_email="",_.edt.mother_company="")},_.chk_copy_guar_add1=function(){1==_.edt.copy_add1?(_.edt.guardian_appartment_number=_.edt.father_appartment_number,_.edt.guardian_area_number=_.edt.father_area_number,_.edt.guardian_building_number=_.edt.father_building_number,_.edt.guardian_street_number=_.edt.father_street_number,_.edt.guardian_city=_.edt.father_city,_.edt.guardian_state=_.edt.father_state,_.edt.guardian_country_code=_.edt.father_country_code,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_nationality1_code=_.edt.father_nationality1_code,_.edt.guardian_nationality2_code=_.edt.father_nationality2_code,_.edt.guardian_summary_address=_.edt.father_summary_address,_.edt.guardian_phone=_.edt.father_phone,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_mobile=_.edt.father_mobile,_.edt.guardian_occupation=_.edt.father_occupation,_.edt.guardian_email=_.edt.father_email,_.edt.guardian_company=_.edt.father_company):(_.edt.guardian_appartment_number="",_.edt.guardian_area_number="",_.edt.guardian_building_number="",_.edt.guardian_street_number="",_.edt.guardian_city="",_.edt.guardian_state="",_.edt.guardian_country_code="",_.edt.guardian_po_box="",_.edt.guardian_nationality1_code="",_.edt.guardian_nationality2_code="",_.edt.guardian_summary_address="",_.edt.guardian_phone="",_.edt.guardian_po_box="",_.edt.guardian_mobile="",_.edt.guardian_occupation="",_.edt.guardian_email="",_.edt.guardian_company="")},_.GetFatherSumAddr=function(){var e=document.getElementById("cmb_father_country").options[document.getElementById("cmb_father_country").selectedIndex].text,t=($("#txt_father_aprt").val().length,$("#txt_father_build").val().length,$("#txt_father_Street").val().length,$("#txt_father_area").val().length),a=$("#txt_father_city").val().length,o=$("#txt_father_state").val().length,s=$("#cmb_father_country").val().length,n=$("#txt_father_pobox").val().length;document.getElementById("txt_father_summary_add").value=0<$("#txt_father_aprt").val().length?document.getElementById("txt_father_aprt").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_build").val().length?document.getElementById("txt_father_build").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_Street").val().length?document.getElementById("txt_father_Street").value+",":"",document.getElementById("txt_father_summary_add").value+=0_.sectionlst1.section_strength?swal({title:"Alert",text:"Section Strength is Full.If You still want to Continue?",showCloseButton:!0,width:380}).then(function(e){e?_.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):_.adm_update())},_.adm_update=function(){null==_.edt.home_country_isdcode&&(_.edt.home_country_isdcode=""),null==_.edt.home_phone&&(_.edt.home_phone="");var e={admission_number:r,appl_num:_.edt.appl_num,pros_num:_.edt.pros_num,pros_appl_num:_.edt.pros_appl_num,admission_date:_.edt.admission_date,school_code:_.edt.school_code,curr_code:_.edt.curr_code,academic_year:_.edt.academic_year,grade_code:_.edt.grade_code,section_code:_.edt.section_code,term_code:_.edt.term_code,tent_join_date:_.edt.tent_join_date,sims_student_emergency_contact_number1:_.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:_.edt.sims_student_emergency_contact_name1,first_name:_.edt.first_name,middle_name:_.edt.middle_name,last_name:_.edt.last_name,family_name:_.edt.family_name,first_name_ot:_.edt.first_name_ot,midd_name_ot:_.edt.midd_name_ot,last_name_ot:_.edt.last_name_ot,family_name_ot:_.edt.family_name_ot,nicke_name:_.edt.nicke_name,birth_date:_.edt.birth_date,comm_date:_.edt.comm_date,birth_country_code:_.edt.birth_country_code,nationality_code:_.edt.nationality_code,ethinicity_code:_.edt.ethinicity_code,gender_code:_.edt.gender_code,religion_code:_.edt.religion_code,passport_num:_.edt.passport_num,passport_issue_date:_.edt.passport_issue_date,passport_expiry:_.edt.passport_expiry,passport_issue_auth:_.edt.passport_issue_auth,passport_issue_place:_.edt.passport_issue_place,visa_number:_.edt.visa_number,visa_type:_.edt.visa_type,visa_issuing_authority:_.edt.visa_issuing_authority,visa_issue_date:_.edt.visa_issue_date,visa_expiry_date:_.edt.visa_expiry_date,visa_issuing_place:_.edt.visa_issuing_place,national_id:_.edt.national_id,national_id_issue_date:_.edt.national_id_issue_date,national_id_expiry_date:_.edt.national_id_expiry_date,sibling_status:_.edt.sibling_status,parent_id:_.edt.parent_id,sibling_enroll:_.edt.sibling_enroll,sibling_name:_.edt.sibling_name,sibling_dob:_.edt.sibling_dob,sibling_school_code:_.edt.sibling_school_code,employee_type:_.edt.employee_type,employee_code:_.edt.employee_code,employee_school_code:_.edt.employee_school_code,motherTounge_language_code:_.edt.motherTounge_language_code,main_language_code:_.edt.main_language_code,main_language_r_code:_.edt.main_language_r_code,main_language_w_code:_.edt.main_language_w_code,main_language_s_code:_.edt.main_language_s_code,primary_contact_code:_.edt.primary_contact_code,primary_contact_pref_code:_.edt.primary_contact_pref_code,fee_payment_contact_pref_code:_.edt.fee_payment_contact_pref_code,transport_status:_.edt.transport_status,transport_desc:_.edt.transport_desc,father_salutation_code:_.edt.father_salutation_code,father_first_name:_.edt.father_first_name,father_middle_name:_.edt.father_middle_name,father_last_name:_.edt.father_last_name,father_family_name:_.edt.father_family_name,father_family_name_ot:_.edt.father_family_name_ot,father_nationality1_code:_.edt.father_nationality1_code,father_nationality2_code:_.edt.father_nationality2_code,father_appartment_number:_.edt.father_appartment_number,father_building_number:_.edt.father_building_number,father_street_number:_.edt.father_street_number,father_area_number:_.edt.father_area_number,father_city:_.edt.father_city,father_state:_.edt.father_state,father_country_code:_.edt.father_country_code,father_summary_address:_.edt.father_summary_address,father_po_box:_.edt.father_po_box,father_phone:_.edt.father_phone,father_email:_.edt.father_email,father_mobile:_.edt.father_mobile,father_fax:_.edt.father_fax,father_occupation:_.edt.father_occupation,father_company:_.edt.father_company,father_company_address:_.edt.father_company_address,father_company_phone:_.edt.father_company_phone,mother_company_address:_.edt.mother_company_address,mother_company_phone:_.edt.mother_company_phone,father_passport_number:_.edt.father_passport_number,sims_admission_father_national_id:_.edt.sims_admission_father_national_id,guardian_salutation_code:_.edt.guardian_salutation_code,guardian_first_name:_.edt.guardian_first_name,guardian_middle_name:_.edt.guardian_middle_name,guardian_last_name:_.edt.guardian_last_name,guardian_family_name:_.edt.guardian_family_name,guardian_nationality1_code:_.edt.guardian_nationality1_code,guardian_nationality2_code:_.edt.guardian_nationality2_code,guardian_appartment_number:_.edt.guardian_appartment_number,guardian_building_number:_.edt.guardian_building_number,guardian_street_number:_.edt.guardian_street_number,guardian_area_number:_.edt.guardian_area_number,guardian_city:_.edt.guardian_city,guardian_state:_.edt.guardian_state,guardian_country_code:_.edt.guardian_country_code,guardian_summary_address:_.edt.guardian_summary_address,guardian_po_box:_.edt.guardian_po_box,guardian_phone:_.edt.guardian_phone,guardian_mobile:_.edt.guardian_mobile,guardian_fax:_.edt.guardian_fax,guardian_email:_.edt.guardian_email,guardian_occupation:_.edt.guardian_occupation,guardian_company:_.edt.guardian_company,guardian_passport_number:_.edt.guardian_passport_number,guardian_relationship_code:_.edt.guardian_relationship_code,mother_salutation_code:_.edt.mother_salutation_code,mother_first_name:_.edt.mother_first_name,mother_middle_name:_.edt.mother_middle_name,mother_last_name:_.edt.mother_last_name,mother_family_name:_.edt.mother_family_name,mother_name_ot:_.edt.mother_name_ot,mother_nationality1_code:_.edt.mother_nationality1_code,mother_nationality2_code:_.edt.mother_nationality2_code,mother_appartment_number:_.edt.mother_appartment_number,mother_building_number:_.edt.mother_building_number,mother_street_number:_.edt.mother_street_number,mother_area_number:_.edt.mother_area_number,mother_city:_.edt.mother_city,mother_state:_.edt.mother_state,mother_country_code:_.edt.mother_country_code,mother_summary_address:_.edt.mother_summary_address,mother_po_box:_.edt.mother_po_box,mother_phone:_.edt.mother_phone,mother_mobile:_.edt.mother_mobile,mother_fax:_.edt.mother_fax,mother_email:_.edt.mother_email,mother_occupation:_.edt.mother_occupation,mother_passport_number:_.edt.mother_passport_number,current_school_status:_.edt.current_school_status,current_school_name:_.edt.current_school_name,current_school_enroll_number:_.edt.current_school_enroll_number,current_school_grade:_.edt.current_school_grade,current_school_cur:_.edt.current_school_cur,current_school_from_date:_.edt.current_school_from_date,current_school_to_date:_.edt.current_school_to_date,current_school_language:_.edt.current_school_language,current_school_head_teacher:_.edt.current_school_head_teacher,current_school_phone:_.edt.current_school_phone,current_school_fax:_.edt.current_school_fax,current_school_city:_.edt.current_school_city,current_school_country_code:_.edt.current_school_country_code,current_school_address:_.edt.current_school_address,marketing_code:_.edt.marketing_code,marketing_description:_.edt.marketing_description,parent_status_code:_.edt.parent_status_code,legal_custody_code:_.edt.legal_custody_code,health_card_number:_.edt.health_card_number,health_card_issue_date:_.edt.health_card_issue_date,health_card_issuing_authority:_.edt.health_card_issuing_authority,blood_group_code:_.edt.blood_group_code,medication_status:_.edt.medication_status,medication_desc:_.edt.medication_desc,disability_status:_.edt.disability_status,disability_desc:_.edt.disability_desc,behaviour_status:_.edt.behaviour_status,behaviour_desc:_.edt.behaviour_desc,health_restriction_status:_.edt.health_restriction_status,health_restriction_desc:_.edt.health_restriction_desc,health_hearing_status:_.edt.health_hearing_status,health_hearing_desc:_.edt.health_hearing_desc,health_vision_status:_.edt.health_vision_status,health_vision_desc:_.edt.health_vision_desc,health_other_status:_.edt.health_other_status,health_other_desc:_.edt.health_other_desc,gifted_status:_.edt.gifted_status,gifted_desc:_.edt.gifted_desc,music_status:_.edt.music_status,music_desc:_.edt.music_desc,sports_status:_.edt.sports_status,sports_desc:_.edt.sports_desc,language_support_status:_.edt.language_support_status,language_support_desc:_.edt.language_support_desc,declaration_status:_.edt.declaration_status,fees_paid_status:_.edt.fees_paid_status,fee_category_code:_.edt.fee_category_code,ip:_.edt.ip,dns:_.edt.dns,user_code:_.edt.user_code,status:_.edt.status,sims_student_attribute1:_.edt.sims_student_attribute1,sims_student_attribute2:_.edt.sims_student_attribute2,sims_student_attribute3:_.edt.sims_student_attribute3,sims_student_attribute4:_.edt.sims_student_attribute4,sims_student_health_respiratory_status:_.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:_.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:_.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:_.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:_.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:_.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:_.edt.sims_student_health_skin_status,sims_student_health_skin_desc:_.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:_.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:_.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:_.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:_.edt.sims_student_health_surgery_desc,sims_admission_recommendation:_.edt.sims_admission_recommendation,sims_admission_mother_national_id:_.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:_.edt.sims_admission_guardian_national_id,sims_fee_month_code:_.edt.sims_fee_month_code,sims_student_attribute5:_.edt.sims_student_attribute5,sims_student_attribute6:_.edt.sims_student_attribute6,sims_student_attribute7:_.edt.sims_student_attribute7,sims_student_attribute8:_.edt.sims_student_attribute8,sims_student_attribute9:_.edt.sims_student_attribute9,sims_student_attribute10:_.edt.sims_student_attribute10,sims_student_attribute11:_.edt.sims_student_attribute11,sims_student_attribute12:_.edt.sims_student_attribute12,sims_admission_second_lang_code:_.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:_.edt.sims_admission_third_lang_code,sims_admission_subject_code:_.edt.sims_admission_second_lang_code+","+_.edt.sims_admission_third_lang_code};c.push(e),n.post(d.apiUrl+"api/common/Admission_dpsd/ApproveStudentnew",c).then(function(e){_.display=!0,_.msg1=e.data,console.log(_.msg1)}),_.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},_.modal_cancel=function(){$("#myModal1").modal("hide"),console.log(t.Class),o(function(){"tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId?e.go("main.dashL",{Class:t.Class}):e.go("main.dashSS",{Class:t.Class})},300)},_.get_studentfee=function(){e.go("main.Sim043")},_.back=function(){_.dd=!0,window.localStorage.Admflag=_.dd,_.modal_cancel()},_.schoolcheck=function(){1==_.edt.current_school_status?_.school_edit=!1:_.school_edit=!0},_.chk_desc=function(){1==_.edt.marketing_code?_.desc_edit=!1:_.desc_edit=!0},_.chk_cicumstances=function(){1==_.edt.parent_status_code?_.circum_edit=!1:_.circum_edit=!0},_.chk_disab_status=function(){1==_.edt.disability_status?_.disab_edit=!1:_.disab_edit=!0},_.chk_health_res=function(){1==_.edt.health_restriction_status?_.healthres_edit=!1:_.healthres_edit=!0},_.chk_medic_status=function(){1==_.edt.medication_status?_.med_edit=!1:_.med_edit=!0},_.chk_other=function(){1==_.edt.health_other_status?_.other_edit=!1:_.other_edit=!0},_.chk_hearing=function(){1==_.edt.health_hearing_status?_.hearing_edit=!1:_.hearing_edit=!0},_.chk_vision=function(){1==_.edt.health_vision_status?_.health_vision_edit=!1:_.health_vision_edit=!0},_.chk_behaviour=function(){1==_.edt.behaviour_status?_.behaviour_edit=!1:_.behaviour_edit=!0},_.chk_gifted_status=function(){1==_.edt.gifted_status?_.gifted_edit=!1:_.gifted_edit=!0},_.chk_music_pro=function(){1==_.edt.music_status?_.music_edit=!1:_.music_edit=!0},_.chk_sport_pro=function(){1==_.edt.sports_status?_.sport_edit=!1:_.sport_edit=!0},_.chk_lang_sup=function(){1==_.edt.language_support_status?_.lang_sup_edit=!1:_.lang_sup_edit=!0},_.chk_Pri_contact=function(){1==_.edt.primary_contact_code?_.pricont_edit=!1:_.pricont_edit=!0},_.chk_transport_requin=function(){1==_.edt.transport_status?_.transreq_edit=!1:_.transreq_edit=!0},_.chk_Sibling_attend=function(){1==_.edt.sibling_status?_.disableparent=!1:_.disableparent=!0},_.chk_employee=function(){1==_.edt.sims_empchk?(_.disableemployee=!1,_.edt.sims_empchk):_.disableemployee=!0},_.chk_learn_ther=function(){1==_.edt.sims_admission_learning_therapy_status?_.learnther_edit=!1:_.learnther_edit=!0},_.chk_spec_edu=function(){1==_.edt.sims_admission_special_education_status?_.spec_edu_edit=!1:_.spec_edu_edit=!0},_.chk_falled_grade=function(){1==_.edt.sims_admission_falled_grade_status?_.falledgrade_edit=!1:_.falledgrade_edit=!0},_.chk_commun=function(){1==_.edt.sims_admission_communication_status?_.commun_edit=!1:_.commun_edit=!0},_.chk_spec_activies=function(){1==_.edt.sims_admission_specialAct_status?_.specActiv_edit=!1:_.specActiv_edit=!0},_.chk_studyingin=function(){1==_.edt.sibling_status?(_.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!1):(_.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!0)},_.chk_ticking=function(){1==_.edt.declaration_status?(_.tick_edit=!1,_.confirm_edit=!1):(_.tick_edit=!0,_.confirm_edit=!0)},_.chk_copy_mother_add=function(){1==_.edt.copy_add?(_.edt.mother_appartment_number=_.edt.father_appartment_number,_.edt.mother_area_number=_.edt.father_area_number,_.edt.mother_building_number=_.edt.father_building_number,_.edt.mother_street_number=_.edt.father_street_number,_.edt.mother_city=_.edt.father_city,_.edt.mother_state=_.edt.father_state,_.edt.mother_country_code=_.edt.father_country_code,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_nationality1_code=_.edt.father_nationality1_code,_.edt.mother_nationality2_code=_.edt.father_nationality2_code,_.edt.mother_summary_address=_.edt.father_summary_address,_.edt.mother_phone=_.edt.father_phone,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_mobile=_.edt.father_mobile,_.edt.mother_occupation=_.edt.father_occupation,_.edt.mother_email=_.edt.father_email,_.edt.mother_company=_.edt.father_company):(_.edt.mother_appartment_number="",_.edt.mother_area_number="",_.edt.mother_building_number="",_.edt.mother_street_number="",_.edt.mother_city="",_.edt.mother_state="",_.edt.mother_country_code="",_.edt.mother_po_box="",_.edt.mother_nationality1_code="",_.edt.mother_nationality2_code="",_.edt.mother_summary_address="",_.edt.mother_phone="",_.edt.mother_po_box="",_.edt.mother_mobile="",_.edt.mother_occupation="",_.edt.mother_email="",_.edt.mother_company="")},_.chk_copy_guar_add1=function(){1==_.edt.copy_add1?(_.edt.guardian_appartment_number=_.edt.father_appartment_number,_.edt.guardian_area_number=_.edt.father_area_number,_.edt.guardian_building_number=_.edt.father_building_number,_.edt.guardian_street_number=_.edt.father_street_number,_.edt.guardian_city=_.edt.father_city,_.edt.guardian_state=_.edt.father_state,_.edt.guardian_country_code=_.edt.father_country_code,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_nationality1_code=_.edt.father_nationality1_code,_.edt.guardian_nationality2_code=_.edt.father_nationality2_code,_.edt.guardian_summary_address=_.edt.father_summary_address,_.edt.guardian_phone=_.edt.father_phone,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_mobile=_.edt.father_mobile,_.edt.guardian_occupation=_.edt.father_occupation,_.edt.guardian_email=_.edt.father_email,_.edt.guardian_company=_.edt.father_company):(_.edt.guardian_appartment_number="",_.edt.guardian_area_number="",_.edt.guardian_building_number="",_.edt.guardian_street_number="",_.edt.guardian_city="",_.edt.guardian_state="",_.edt.guardian_country_code="",_.edt.guardian_po_box="",_.edt.guardian_nationality1_code="",_.edt.guardian_nationality2_code="",_.edt.guardian_summary_address="",_.edt.guardian_phone="",_.edt.guardian_po_box="",_.edt.guardian_mobile="",_.edt.guardian_occupation="",_.edt.guardian_email="",_.edt.guardian_company="")},_.GetFatherSumAddr=function(){var e=document.getElementById("cmb_father_country").options[document.getElementById("cmb_father_country").selectedIndex].text,t=($("#txt_father_aprt").val().length,$("#txt_father_build").val().length,$("#txt_father_Street").val().length,$("#txt_father_area").val().length),a=$("#txt_father_city").val().length,o=$("#txt_father_state").val().length,s=$("#cmb_father_country").val().length,n=$("#txt_father_pobox").val().length;document.getElementById("txt_father_summary_add").value=0<$("#txt_father_aprt").val().length?document.getElementById("txt_father_aprt").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_build").val().length?document.getElementById("txt_father_build").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_Street").val().length?document.getElementById("txt_father_Street").value+",":"",document.getElementById("txt_father_summary_add").value+=0_.sectionlst1.section_strength?swal({title:"Alert",text:"Section Strength is Full.If You still want to Continue?",showCloseButton:!0,width:380}).then(function(e){e?_.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):_.adm_update())},_.adm_update=function(){null==_.edt.home_country_isdcode&&(_.edt.home_country_isdcode=""),null==_.edt.home_phone&&(_.edt.home_phone="");var e={admission_number:r,appl_num:_.edt.appl_num,pros_num:_.edt.pros_num,pros_appl_num:_.edt.pros_appl_num,admission_date:_.edt.admission_date,school_code:_.edt.school_code,curr_code:_.edt.curr_code,academic_year:_.edt.academic_year,grade_code:_.edt.grade_code,section_code:_.edt.section_code,term_code:_.edt.term_code,tent_join_date:_.edt.tent_join_date,sims_student_emergency_contact_number1:_.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:_.edt.sims_student_emergency_contact_name1,first_name:_.edt.first_name,middle_name:_.edt.middle_name,last_name:_.edt.last_name,family_name:_.edt.family_name,first_name_ot:_.edt.first_name_ot,midd_name_ot:_.edt.midd_name_ot,last_name_ot:_.edt.last_name_ot,family_name_ot:_.edt.family_name_ot,nicke_name:_.edt.nicke_name,birth_date:_.edt.birth_date,comm_date:_.edt.comm_date,birth_country_code:_.edt.birth_country_code,nationality_code:_.edt.nationality_code,ethinicity_code:_.edt.ethinicity_code,gender_code:_.edt.gender_code,religion_code:_.edt.religion_code,passport_num:_.edt.passport_num,passport_issue_date:_.edt.passport_issue_date,passport_expiry:_.edt.passport_expiry,passport_issue_auth:_.edt.passport_issue_auth,passport_issue_place:_.edt.passport_issue_place,visa_number:_.edt.visa_number,visa_type:_.edt.visa_type,visa_issuing_authority:_.edt.visa_issuing_authority,visa_issue_date:_.edt.visa_issue_date,visa_expiry_date:_.edt.visa_expiry_date,visa_issuing_place:_.edt.visa_issuing_place,national_id:_.edt.national_id,national_id_issue_date:_.edt.national_id_issue_date,national_id_expiry_date:_.edt.national_id_expiry_date,sibling_status:_.edt.sibling_status,parent_id:_.edt.parent_id,sibling_enroll:_.edt.sibling_enroll,sibling_name:_.edt.sibling_name,sibling_dob:_.edt.sibling_dob,sibling_school_code:_.edt.sibling_school_code,employee_type:_.edt.employee_type,employee_code:_.edt.employee_code,employee_school_code:_.edt.employee_school_code,motherTounge_language_code:_.edt.motherTounge_language_code,main_language_code:_.edt.main_language_code,main_language_r_code:_.edt.main_language_r_code,main_language_w_code:_.edt.main_language_w_code,main_language_s_code:_.edt.main_language_s_code,primary_contact_code:_.edt.primary_contact_code,primary_contact_pref_code:_.edt.primary_contact_pref_code,fee_payment_contact_pref_code:_.edt.fee_payment_contact_pref_code,transport_status:_.edt.transport_status,transport_desc:_.edt.transport_desc,father_salutation_code:_.edt.father_salutation_code,father_first_name:_.edt.father_first_name,father_middle_name:_.edt.father_middle_name,father_last_name:_.edt.father_last_name,father_family_name:_.edt.father_family_name,father_family_name_ot:_.edt.father_family_name_ot,father_nationality1_code:_.edt.father_nationality1_code,father_nationality2_code:_.edt.father_nationality2_code,father_appartment_number:_.edt.father_appartment_number,father_building_number:_.edt.father_building_number,father_street_number:_.edt.father_street_number,father_area_number:_.edt.father_area_number,father_city:_.edt.father_city,father_state:_.edt.father_state,father_country_code:_.edt.father_country_code,father_summary_address:_.edt.father_summary_address,father_po_box:_.edt.father_po_box,father_phone:_.edt.father_phone,father_email:_.edt.father_email,father_mobile:_.edt.father_mobile,father_fax:_.edt.father_fax,father_occupation:_.edt.father_occupation,father_company:_.edt.father_company,father_company_address:_.edt.father_company_address,father_company_phone:_.edt.father_company_phone,mother_company_address:_.edt.mother_company_address,mother_company_phone:_.edt.mother_company_phone,father_passport_number:_.edt.father_passport_number,sims_admission_father_national_id:_.edt.sims_admission_father_national_id,guardian_salutation_code:_.edt.guardian_salutation_code,guardian_first_name:_.edt.guardian_first_name,guardian_middle_name:_.edt.guardian_middle_name,guardian_last_name:_.edt.guardian_last_name,guardian_family_name:_.edt.guardian_family_name,guardian_nationality1_code:_.edt.guardian_nationality1_code,guardian_nationality2_code:_.edt.guardian_nationality2_code,guardian_appartment_number:_.edt.guardian_appartment_number,guardian_building_number:_.edt.guardian_building_number,guardian_street_number:_.edt.guardian_street_number,guardian_area_number:_.edt.guardian_area_number,guardian_city:_.edt.guardian_city,guardian_state:_.edt.guardian_state,guardian_country_code:_.edt.guardian_country_code,guardian_summary_address:_.edt.guardian_summary_address,guardian_po_box:_.edt.guardian_po_box,guardian_phone:_.edt.guardian_phone,guardian_mobile:_.edt.guardian_mobile,guardian_fax:_.edt.guardian_fax,guardian_email:_.edt.guardian_email,guardian_occupation:_.edt.guardian_occupation,guardian_company:_.edt.guardian_company,guardian_passport_number:_.edt.guardian_passport_number,guardian_relationship_code:_.edt.guardian_relationship_code,mother_salutation_code:_.edt.mother_salutation_code,mother_first_name:_.edt.mother_first_name,mother_middle_name:_.edt.mother_middle_name,mother_last_name:_.edt.mother_last_name,mother_family_name:_.edt.mother_family_name,mother_name_ot:_.edt.mother_name_ot,mother_nationality1_code:_.edt.mother_nationality1_code,mother_nationality2_code:_.edt.mother_nationality2_code,mother_appartment_number:_.edt.mother_appartment_number,mother_building_number:_.edt.mother_building_number,mother_street_number:_.edt.mother_street_number,mother_area_number:_.edt.mother_area_number,mother_city:_.edt.mother_city,mother_state:_.edt.mother_state,mother_country_code:_.edt.mother_country_code,mother_summary_address:_.edt.mother_summary_address,mother_po_box:_.edt.mother_po_box,mother_phone:_.edt.mother_phone,mother_mobile:_.edt.mother_mobile,mother_fax:_.edt.mother_fax,mother_email:_.edt.mother_email,mother_occupation:_.edt.mother_occupation,mother_passport_number:_.edt.mother_passport_number,current_school_status:_.edt.current_school_status,current_school_name:_.edt.current_school_name,current_school_enroll_number:_.edt.current_school_enroll_number,current_school_grade:_.edt.current_school_grade,current_school_cur:_.edt.current_school_cur,current_school_from_date:_.edt.current_school_from_date,current_school_to_date:_.edt.current_school_to_date,current_school_language:_.edt.current_school_language,current_school_head_teacher:_.edt.current_school_head_teacher,current_school_phone:_.edt.current_school_phone,current_school_fax:_.edt.current_school_fax,current_school_city:_.edt.current_school_city,current_school_country_code:_.edt.current_school_country_code,current_school_address:_.edt.current_school_address,marketing_code:_.edt.marketing_code,marketing_description:_.edt.marketing_description,parent_status_code:_.edt.parent_status_code,legal_custody_code:_.edt.legal_custody_code,health_card_number:_.edt.health_card_number,health_card_issue_date:_.edt.health_card_issue_date,health_card_issuing_authority:_.edt.health_card_issuing_authority,blood_group_code:_.edt.blood_group_code,medication_status:_.edt.medication_status,medication_desc:_.edt.medication_desc,disability_status:_.edt.disability_status,disability_desc:_.edt.disability_desc,behaviour_status:_.edt.behaviour_status,behaviour_desc:_.edt.behaviour_desc,health_restriction_status:_.edt.health_restriction_status,health_restriction_desc:_.edt.health_restriction_desc,health_hearing_status:_.edt.health_hearing_status,health_hearing_desc:_.edt.health_hearing_desc,health_vision_status:_.edt.health_vision_status,health_vision_desc:_.edt.health_vision_desc,health_other_status:_.edt.health_other_status,health_other_desc:_.edt.health_other_desc,gifted_status:_.edt.gifted_status,gifted_desc:_.edt.gifted_desc,music_status:_.edt.music_status,music_desc:_.edt.music_desc,sports_status:_.edt.sports_status,sports_desc:_.edt.sports_desc,language_support_status:_.edt.language_support_status,language_support_desc:_.edt.language_support_desc,declaration_status:_.edt.declaration_status,fees_paid_status:_.edt.fees_paid_status,fee_category_code:_.edt.fee_category_code,ip:_.edt.ip,dns:_.edt.dns,user_code:_.edt.user_code,status:_.edt.status,sims_student_attribute1:_.edt.sims_student_attribute1,sims_student_attribute2:_.edt.sims_student_attribute2,sims_student_attribute3:_.edt.sims_student_attribute3,sims_student_attribute4:_.edt.sims_student_attribute4,sims_student_health_respiratory_status:_.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:_.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:_.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:_.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:_.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:_.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:_.edt.sims_student_health_skin_status,sims_student_health_skin_desc:_.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:_.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:_.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:_.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:_.edt.sims_student_health_surgery_desc,sims_admission_recommendation:_.edt.sims_admission_recommendation,sims_admission_mother_national_id:_.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:_.edt.sims_admission_guardian_national_id,sims_fee_month_code:_.edt.sims_fee_month_code,sims_student_attribute5:_.edt.sims_student_attribute5,sims_student_attribute6:_.edt.sims_student_attribute6,sims_student_attribute7:_.edt.sims_student_attribute7,sims_student_attribute8:_.edt.sims_student_attribute8,sims_student_attribute9:_.edt.sims_student_attribute9,sims_student_attribute10:_.edt.sims_student_attribute10,sims_student_attribute11:_.edt.sims_student_attribute11,sims_student_attribute12:_.edt.sims_student_attribute12,sims_admission_second_lang_code:_.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:_.edt.sims_admission_third_lang_code,sims_admission_subject_code:_.edt.sims_admission_second_lang_code+","+_.edt.sims_admission_third_lang_code};c.push(e),n.post(d.apiUrl+"api/common/Admission_dpsd/ApproveStudent",c).then(function(e){_.display=!0,_.msg1=e.data,console.log(_.msg1)}),_.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},_.modal_cancel=function(){$("#myModal1").modal("hide"),console.log(t.Class),o(function(){"tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId?e.go("main.dashL",{Class:t.Class}):e.go("main.dash",{Class:t.Class})},300)},_.get_studentfee=function(){e.go("main.Sim043")},_.back=function(){_.dd=!0,window.localStorage.Admflag=_.dd,_.modal_cancel()},_.schoolcheck=function(){1==_.edt.current_school_status?_.school_edit=!1:_.school_edit=!0},_.chk_desc=function(){1==_.edt.marketing_code?_.desc_edit=!1:_.desc_edit=!0},_.chk_cicumstances=function(){1==_.edt.parent_status_code?_.circum_edit=!1:_.circum_edit=!0},_.chk_disab_status=function(){1==_.edt.disability_status?_.disab_edit=!1:_.disab_edit=!0},_.chk_health_res=function(){1==_.edt.health_restriction_status?_.healthres_edit=!1:_.healthres_edit=!0},_.chk_medic_status=function(){1==_.edt.medication_status?_.med_edit=!1:_.med_edit=!0},_.chk_other=function(){1==_.edt.health_other_status?_.other_edit=!1:_.other_edit=!0},_.chk_hearing=function(){1==_.edt.health_hearing_status?_.hearing_edit=!1:_.hearing_edit=!0},_.chk_vision=function(){1==_.edt.health_vision_status?_.health_vision_edit=!1:_.health_vision_edit=!0},_.chk_behaviour=function(){1==_.edt.behaviour_status?_.behaviour_edit=!1:_.behaviour_edit=!0},_.chk_gifted_status=function(){1==_.edt.gifted_status?_.gifted_edit=!1:_.gifted_edit=!0},_.chk_music_pro=function(){1==_.edt.music_status?_.music_edit=!1:_.music_edit=!0},_.chk_sport_pro=function(){1==_.edt.sports_status?_.sport_edit=!1:_.sport_edit=!0},_.chk_lang_sup=function(){1==_.edt.language_support_status?_.lang_sup_edit=!1:_.lang_sup_edit=!0},_.chk_Pri_contact=function(){1==_.edt.primary_contact_code?_.pricont_edit=!1:_.pricont_edit=!0},_.chk_transport_requin=function(){1==_.edt.transport_status?_.transreq_edit=!1:_.transreq_edit=!0},_.chk_Sibling_attend=function(){1==_.edt.sibling_status?_.disableparent=!1:_.disableparent=!0},_.chk_employee=function(){1==_.edt.sims_empchk?(_.disableemployee=!1,_.edt.sims_empchk):_.disableemployee=!0},_.chk_learn_ther=function(){1==_.edt.sims_admission_learning_therapy_status?_.learnther_edit=!1:_.learnther_edit=!0},_.chk_spec_edu=function(){1==_.edt.sims_admission_special_education_status?_.spec_edu_edit=!1:_.spec_edu_edit=!0},_.chk_falled_grade=function(){1==_.edt.sims_admission_falled_grade_status?_.falledgrade_edit=!1:_.falledgrade_edit=!0},_.chk_commun=function(){1==_.edt.sims_admission_communication_status?_.commun_edit=!1:_.commun_edit=!0},_.chk_spec_activies=function(){1==_.edt.sims_admission_specialAct_status?_.specActiv_edit=!1:_.specActiv_edit=!0},_.chk_studyingin=function(){1==_.edt.sibling_status?(_.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!1):(_.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),_.t=!0)},_.chk_ticking=function(){1==_.edt.declaration_status?(_.tick_edit=!1,_.confirm_edit=!1):(_.tick_edit=!0,_.confirm_edit=!0)},_.chk_copy_mother_add=function(){1==_.edt.copy_add?(_.edt.mother_appartment_number=_.edt.father_appartment_number,_.edt.mother_area_number=_.edt.father_area_number,_.edt.mother_building_number=_.edt.father_building_number,_.edt.mother_street_number=_.edt.father_street_number,_.edt.mother_city=_.edt.father_city,_.edt.mother_state=_.edt.father_state,_.edt.mother_country_code=_.edt.father_country_code,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_nationality1_code=_.edt.father_nationality1_code,_.edt.mother_nationality2_code=_.edt.father_nationality2_code,_.edt.mother_summary_address=_.edt.father_summary_address,_.edt.mother_phone=_.edt.father_phone,_.edt.mother_po_box=_.edt.father_po_box,_.edt.mother_mobile=_.edt.father_mobile,_.edt.mother_occupation=_.edt.father_occupation,_.edt.mother_email=_.edt.father_email,_.edt.mother_company=_.edt.father_company):(_.edt.mother_appartment_number="",_.edt.mother_area_number="",_.edt.mother_building_number="",_.edt.mother_street_number="",_.edt.mother_city="",_.edt.mother_state="",_.edt.mother_country_code="",_.edt.mother_po_box="",_.edt.mother_nationality1_code="",_.edt.mother_nationality2_code="",_.edt.mother_summary_address="",_.edt.mother_phone="",_.edt.mother_po_box="",_.edt.mother_mobile="",_.edt.mother_occupation="",_.edt.mother_email="",_.edt.mother_company="")},_.chk_copy_guar_add1=function(){1==_.edt.copy_add1?(_.edt.guardian_appartment_number=_.edt.father_appartment_number,_.edt.guardian_area_number=_.edt.father_area_number,_.edt.guardian_building_number=_.edt.father_building_number,_.edt.guardian_street_number=_.edt.father_street_number,_.edt.guardian_city=_.edt.father_city,_.edt.guardian_state=_.edt.father_state,_.edt.guardian_country_code=_.edt.father_country_code,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_nationality1_code=_.edt.father_nationality1_code,_.edt.guardian_nationality2_code=_.edt.father_nationality2_code,_.edt.guardian_summary_address=_.edt.father_summary_address,_.edt.guardian_phone=_.edt.father_phone,_.edt.guardian_po_box=_.edt.father_po_box,_.edt.guardian_mobile=_.edt.father_mobile,_.edt.guardian_occupation=_.edt.father_occupation,_.edt.guardian_email=_.edt.father_email,_.edt.guardian_company=_.edt.father_company):(_.edt.guardian_appartment_number="",_.edt.guardian_area_number="",_.edt.guardian_building_number="",_.edt.guardian_street_number="",_.edt.guardian_city="",_.edt.guardian_state="",_.edt.guardian_country_code="",_.edt.guardian_po_box="",_.edt.guardian_nationality1_code="",_.edt.guardian_nationality2_code="",_.edt.guardian_summary_address="",_.edt.guardian_phone="",_.edt.guardian_po_box="",_.edt.guardian_mobile="",_.edt.guardian_occupation="",_.edt.guardian_email="",_.edt.guardian_company="")},_.GetFatherSumAddr=function(){var e=document.getElementById("cmb_father_country").options[document.getElementById("cmb_father_country").selectedIndex].text,t=($("#txt_father_aprt").val().length,$("#txt_father_build").val().length,$("#txt_father_Street").val().length,$("#txt_father_area").val().length),a=$("#txt_father_city").val().length,o=$("#txt_father_state").val().length,s=$("#cmb_father_country").val().length,n=$("#txt_father_pobox").val().length;document.getElementById("txt_father_summary_add").value=0<$("#txt_father_aprt").val().length?document.getElementById("txt_father_aprt").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_build").val().length?document.getElementById("txt_father_build").value+",":"",document.getElementById("txt_father_summary_add").value+=0<$("#txt_father_Street").val().length?document.getElementById("txt_father_Street").value+",":"",document.getElementById("txt_father_summary_add").value+=0"+e+''+t+""),o.close(),a.focus(),i.detailsField=!1,i.colsvis=!1,i.getsubdetail())})},i.reset_data=function(){i.filteredTodos=[]},i.ischeck=function(){i.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),function(){"use strict";var e=angular.module("sims.module.HRMS");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("ImportStudentDataCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","XLSXReaderService","$filter",function(d,e,t,a,o,s,n,i,_){d.rgvtbl=!1,a(function(){$("#fixTable").tableHeadFixer({top:1}),$("#Table1").tableHeadFixer({top:1})},100);var c=t.globals.currentUser.username,r="",l="",m=(d.selectedappl="Student Import",d.bkcolor="#6dabaf",d.importCode="V",jQuery.isEmptyObject(window.localStorage.Finn_comp)||(d.finnDetail=JSON.parse(window.localStorage.Finn_comp),r=d.finnDetail.company,l=d.finnDetail.year),s.get(n.apiUrl+"api/common/Empdashboard/GetDashboardData").then(function(e){d.portal_data=e.data,0s&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r{var a=e.sltr_slmast_acno,o=e.sims_fee_type;n.add(o),s[a]||(s[a]={"Sr No":t+1,"Student Id":a,"Student Name":e.student_name,Grade:e.grade_name,Section:e.section_name,OB:0,CB:0,Fees:{}}),s[a].Fees[o]={Amount:(parseFloat(e.student_invoice_amount)-parseFloat(e.student_paid_amount)).toFixed(2)},s[a].OB=(parseFloat(s[a].OB)+parseFloat(e.student_opening_balance_amount)).toFixed(2),s[a].CB=(parseFloat(s[a].CB)+parseFloat(e.student_closing_balance_amount)).toFixed(2)}),{students:Object.values(s),feeTypes:Array.from(n)}},i.makeTodos=function(){var e,t;"All"==i.pagesize?(i.currentPage=1,i.showPager=!1,i.filteredTodos=i.students):(e=parseInt(i.totalItems%i.numPerPage),i.pagersize="0"==e?parseInt(i.totalItems/i.numPerPage):parseInt(i.totalItems/i.numPerPage)+1,e=(i.currentPage-1)*i.numPerPage,t=parseInt(e)+parseInt(i.numPerPage),console.log("begin="+e),console.log("end="+t),i.filteredTodos=i.todos.slice(e,t))},s.get(n.apiUrl+"api/common/getCuriculum").then(function(e){i.cur_data=e.data,i.temp.sims_cur_code=i.cur_data[0].sims_cur_code,i.getAcademic_year(i.cur_data[0].sims_cur_code)}),i.getAcademic_year=function(e){s.get(n.apiUrl+"api/common/getAcademicYear?curCode="+i.temp.sims_cur_code).then(function(e){i.acad_data=e.data,i.temp.sims_academic_year=i.acad_data[0].sims_academic_year})},s.get(n.apiUrl+"api/family_statement/getParent_student_status").then(function(e){i.satus=e.data,i.temp.parent_flag=i.satus[0].code}),i.calculateTotalFee=function(t){let a=0;return i.students.forEach(e=>{e.Fees[t]&&(a+=parseFloat(e.Fees[t].Amount))}),a.toFixed(2)},i.showTable=!1,i.getdetail1=function(){i.OB_total=0,i.CB_total=0,i.inv_total=0,i.tran_total=0,i.colsvis=!1,i.date=i.from_date,i.acad=$("#acad_box option:selected").text(),i.cur=$("#cur_box option:selected").text(),i.user=$("#user_box option:selected").text(),i.showTable=!1,i.pager=!1,i.detailsField=!0,i.busy=!0,s.get(n.apiUrl+"api/GLSLQuery/GetStudentReceivableLedgerReport?from_date="+i.from_date+"&to_date="+i.to_date+"&sumView="+i.isSummaryChecked).then(function(e){0{i.OB_total=(parseFloat(i.OB_total)+parseFloat(e.student_opening_balance_amount)).toFixed(2),i.CB_total=(parseFloat(i.CB_total)+parseFloat(e.student_closing_balance_amount)).toFixed(2),i.inv_total=(parseFloat(i.inv_total)+parseFloat(e.student_invoice_amount)).toFixed(2),i.tran_total=(parseFloat(i.tran_total)+parseFloat(e.student_paid_amount)).toFixed(2)})):(e=i.processData(i.report_data_new),i.students=e.students,i.feeTypes=e.feeTypes,i.students.forEach((e,t)=>{i.OB_total=(parseFloat(i.OB_total)+parseFloat(e.OB)).toFixed(2),i.CB_total=(parseFloat(i.CB_total)+parseFloat(e.CB)).toFixed(2)})),i.total_length=angular.copy(i.students.length),i.totalItems=i.students.length,i.todos=i.students,i.makeTodos(),i.busy=!1,console.log("$scope.pagesize",i.pagesize),e=$("#Select1").val(),i.size(e)):(i.busy=!1,i.filteredTodos=[],swal({title:"Alert",text:"Data is not Found",showCloseButton:!0,width:300,height:200}))})},i.searched=function(e,o){return _.filter(e,function(e){return i.isSummaryChecked?(a=o,-1<(t=e).sltr_slmast_acno.toLowerCase().indexOf(a.toLowerCase())||-1_.invoiceAmt?(swal({text:"Amount should be less than "+_.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),_.Bankdetails[e].gldd_doc_amount=parseFloat(_.Bankdetails[e].invoice).toFixed(3),_.total=parseFloat(_.Bankdetails[e].invoice).toFixed(3)):_.total=parseFloat(parseFloat(_.total)+parseFloat(_.Bankdetails[e].gldd_doc_amount)+parseFloat(_.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},_.Update=function(){for(var e=0;e<_.Bankdetails.length;e++)if(""!=_.Bankdetails.slma_acno){var t=document.getElementById("cmb_acc_Code3"),t=t.options[t.selectedIndex].text;_.Bankdetails.pop({gldd_comp_code:c,sllc_ldgr_code:_.edt.sllc_ldgr_code,slma_acno:_.edt1.gldd_acct_code,gldd_party_ref_no:_.edt1.gldd_party_ref_no,coad_pty_full_name:t,coad_dept_no:_.edt1.coad_dept_no,gldd_party_ref_date:_.edt.gldd_party_ref_date,gldd_doc_narr:_.edt.gldd_doc_narr,gldd_doc_amount:_.edt.gldd_doc_amount,gldd_fc_amount:0}),_.Bankdetails.push({gldd_comp_code:c,sllc_ldgr_code:_.edt.sllc_ldgr_code,slma_acno:_.edt1.gldd_acct_code,gldd_party_ref_no:_.edt1.gldd_party_ref_no,coad_pty_full_name:t,coad_dept_no:_.edt1.coad_dept_no,gldd_party_ref_date:_.edt.gldd_party_ref_date,gldd_doc_narr:_.edt.gldd_doc_narr,gldd_doc_amount:_.edt.gldd_doc_amount,gldd_fc_amount:0}),swal({text:"Record Updated",width:300,height:200});for(e=_.total=0;e<_.Bankdetails.length;e++)_.total=parseFloat(parseFloat(_.total)+parseFloat(_.Bankdetails[e].gldd_doc_amount)).toFixed(3);for(e=_.fctotal=0;e<_.Bankdetails.length;e++)_.fctotal=_.fctotal+parseInt(_.Bankdetails[e].gldd_fc_amount);_.edt="",_.edt1="",_.edt2="",_.updatebtn=!1,$("#cmb_acc_Code3").select2("val",""),_.myForm.$setPristine(),_.myForm.$setUntouched(),0}},_.coad_pty_full_name=_.selectedText,_.Delete=function(e){if(1!=_.Bankdetails.length)for(var t=0;t<_.Bankdetails.length;t++)if(_.Bankdetails[t].gldd_acct_code==e.gldd_acct_code&&_.Bankdetails[t].gldd_doc_amount==e.gldd_doc_amount&&_.Bankdetails[t].gldd_doc_narr==e.gldd_doc_narr){_.total=parseFloat(parseFloat(_.total)-parseFloat(_.Bankdetails[t].gldd_doc_amount)).toFixed(3),_.Bankdetails.splice(t,1);break}},_.getAccountName=function(e){u=e.master_acno,i.get(d.apiUrl+"api/BankPayment/getCostCenter?aacno="+u+"&comp_cd="+c+"&fyear="+r).then(function(e){_.costcenter_account=e.data,0<_.costcenter_account.length?_.chkcost_Ac=!0:(_.chkcost_Ac=!1,_.temp.cost_chk_ac=!1,_.cost_combo_AC=!1)});for(var t=0;t<_.bankname.length;t++)_.bankname[t].master_acno==e.master_acno&&(f=_.bankname[t].master_acno,_.edt3={master_ac_cdname:_.bankname[t].master_ac_cdname})},i.get(d.apiUrl+"api/BankPayment/GetVerifyAuthorizeUsers?comp_code="+c+"&fyear="+r).then(function(e){_.users=e.data,0!=_.users.length&&(_.users[0]==n&&_.users[1]==n?(_.preparebtn=!1,_.verifybtn=!1,_.authorizebtn=!1):(_.users[0]!=n||""!=_.users[1]&&_.users[1]==n?(_.preparebtn=!1,_.verifybtn=!0):(_.verifybtn=!1,_.preparebtn=!1),_.authorizebtn=!0))}),_.Authorizeuser=function(){i.get(d.apiUrl+"api/BankPayment/GetVerifyAuthorizeUsers?comp_code="+c+"&fyear="+r).then(function(e){_.users=e.data,0!=_.users.length&&(_.users[0]==n&&_.users[1]==n?(_.preparebtn=!1,_.verifybtn=!1,_.authorizebtn=!1):_.users[0]==n&&_.users[0]!=n?(_.verifybtn=!1,_.preparebtn=!0,_.authorizebtn=!0):_.users[0]!=n&&_.users[0]!=n&&(_.verifybtn=!0,_.preparebtn=!1,_.authorizebtn=!0))})},_.Insert_temp_docs=function(){var e,t,a,o=[],s=("Verify"==g?(s=n,e=_.edt4.DocDate):a=t="Authorize"==g?(s=n,e=_.edt4.DocDate,""):e=s="",null==_.temp&&(_.temp=""),{gltd_comp_code:c,gltd_prepare_user:n,gltd_doc_code:_.temp3.gltd_doc_code,gltd_doc_date:_.edt4.DocDate,gltd_cur_status:g,gltd_post_date:_.edt4.PostDate,gltd_doc_narr:_.temp.gltd_doc_narr1,gltd_remarks:_.temp.gltd_doc_remark,gltd_prepare_date:_.edt4.DocDate,gltd_app_name:"Finnm2",gltd_final_doc_no:"0",gltd_verify_user:s,gltd_verify_date:e,gltd_authorize_user:t,gltd_authorize_date:a,gltd_paid_to:_.temp.gltd_paid_to,gltd_cheque_no:_.temp.gltd_cheque_No,gltd_payment_date:_.edt4.gltd_payment_date});o.push(s),i.post(d.apiUrl+"api/BankPayment/Insert_Fins_temp_docs",o).then(function(e){_.prvno=e.data,""!=_.prvno&&null!=_.prvno?_.Insert_Fins_temp_doc_details():swal({text:"Record Not inserted. "+_.prvno,imageUrl:"assets/img/close.png",width:300,height:200})})},_.Insert_Fins_temp_doc_details=function(){for(var e=[],o=[],t=1,s=1,a=0;a<_.Bankdetails.length;a++){var n={gldd_doc_narr:_.Bankdetails[a].gldd_doc_narr,gldd_dept_code:_.Bankdetails[a].gldd_dept_code,gldd_ledger_code:_.Bankdetails[a].sllc_ldgr_code,gldd_acct_code:_.Bankdetails[a].gldd_acct_code,gldd_party_ref_no:_.Bankdetails[a].gldd_party_ref_no,gldd_party_ref_date:_.Bankdetails[a].gldd_party_ref_date,gldd_doc_amount_debit:parseFloat(_.Bankdetails[a].gldd_doc_amount),gldd_doc_amount_credit:0,gldd_cost_center_code:_.Bankdetails[a].glco_cost_centre_code,gldd_comp_code:c,gldd_doc_code:_.temp3.gltd_doc_code,gldd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gldd_line_no:t,gltd_remarks:_.Bankdetails[a].gldd_doc_code+"/"+_.Bankdetails[a].gldd_final_doc_no+"#"+_.Bankdetails[a].gldd_line_no+"$"+_.Bankdetails[a].gldd_doc_amount,gldd_vat_enable:_.Bankdetails[a].gldd_vat_enable,gldd_include_vat:_.Bankdetails[a].gldd_include_vat,gldd_vat_amt:_.Bankdetails[a].gldd_doc_vat_amt,gldd_tax_code:_.Bankdetails[a].gldd_tax_code,gldd_tax_acct_code:_.Bankdetails[a].gldd_tax_acct_code,gldd_tax_percentage:_.Bankdetails[a].gldd_tax_percentage,gldd_tax_amount:_.Bankdetails[a].gldd_tax_amount,finance_year:r,gltd_post_date:_.edt4.PostDate};t++,e.push(n)}n={gldd_comp_code:c,gldd_doc_code:_.temp3.gltd_doc_code,gldd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gldd_line_no:t,gldd_ledger_code:"00",gldd_acct_code:_.edt5.master_acno.master_acno,gldd_cost_center_code:_.edt5.glco_cost_centre_code,gldd_doc_amount_debit:0,gldd_doc_amount_credit:parseFloat(_.total),gldd_fc_amount_debit:0,gldd_fc_code:"",gldd_fc_rate:0,gldd_doc_narr:_.temp.gltd_doc_narr1,gldd_dept_code:_.edt5.master_acno.gldd_dept_code,gldd_vat_enable:m,gldd_include_vat:"N",gldd_vat_amt:0,finance_year:r,gltd_post_date:_.edt4.PostDate};e.push(n),i.post(d.apiUrl+"api/BankPayment/Insert_JV_Fins_temp_doc_details_vat",e).then(function(e){if(_.msg1=e.data,_.Bankdetails.push({}),"Authorize"==g?(h=!0,_.Authorize_Insert_temp_doc_details(_.msg1)):"Save"!=g&&"Verify"!=g||(h=!1,_.Authorize_Insert_temp_doc_details(_.msg1)),1==_.msg1){if(0<_.doc_detail_data.length){for(var t=0;t<_.doc_detail_data.length;t++){var a={gltd_remarks:_.doc_detail_data[t].gltd_remarks,gltd_doc_type:_.doc_detail_data[t].gltd_doc_type,gltd_doc_no:_.doc_detail_data[t].gltd_doc_no,gldd_doc_amount_debit:_.doc_detail_data[t].gldd_doc_amount_debit,gldd_doc_amount_credit:_.doc_detail_data[t].gldd_doc_amount_credit,gltd_comp_code:_.doc_detail_data[t].gltd_comp_code,gltd_doc_code:_.temp3.gltd_doc_code,gltd_prov_doc_no:_.prvno,gldd_final_doc_no:"0",gltd_attribute1:_.doc_detail_data[t].gltd_attribute1,gltd_doc_line_no:s};s++,o.push(a)}i.post(d.apiUrl+"api/JVCreation/Insert_JV_document_details",o).then(function(e){_.chk_msg=e.data})}}else swal({text:"Record Not inserted. "+_.msg1,imageUrl:"assets/img/close.png",width:300,height:200})})},_.Authorize_Insert_temp_doc_details=function(e){var t;h?(h=!1,t=_.edt4.DocDate,i.post(d.apiUrl+"api/BankPayment/Authorize_Posting?comp_code="+c+"&doc_code="+_.temp3.gltd_doc_code+"&prv_no="+_.prvno+"&auth_user="+n+"&auth_date="+t).then(function(e){_.Docno=e.data,""!=_.Docno?(swal({text:"Posted Successfully\nFinal Doc No is="+_.Docno,imageUrl:"assets/img/check.png",width:300,height:200}),_.checkprintbtn=!0,_.ClearInsert(),_.Authorizeuser(),_.cancel()):swal({text:"Posting Failed",width:300,height:200})})):0==h&&"Save"==g?(h=!1,e?(swal({text:"Record Inserted Successfully\nProvision No:-"+_.temp3.gltd_doc_code+"--"+_.prvno,imageUrl:"assets/img/check.png",width:300,height:200}),_.ClearInsert(),_.Authorizeuser(),_.cancel()):swal({text:"Record Not inserted",imageUrl:"assets/img/close.png",width:300,height:200})):0==h&&"Verify"==g&&(h=!1,e?(swal({text:"Record Verified Successfully\nProvision No:-"+_.temp3.gltd_doc_code+"--"+_.prvno,imageUrl:"assets/img/check.png",width:300,height:200}),_.ClearInsert(),_.Authorizeuser(),_.cancel()):swal({text:"Verification Failed",width:300,height:200})),_.ClearInsert(),_.Authorizeuser()},_.calcVAT=function(e,t){var a;""!=t.gldd_doc_amount||null!=t.gldd_doc_amount?0t&&(t=_.dep_data[a].glma_dept_no,_.edt5.sims_dep=t)}),_.DocNarr=[],d.get(c.apiUrl+"api/JVCreation/getDoc_Remarks?&cmp_cd="+l+"&fyear="+m+"&doc_code="+_.temp3.gltd_doc_code+"&remark_type=Bank_Payment").then(function(e){if(_.DocNarration=e.data,0<_.DocNarration.length)for(var t=0;t<_.DocNarration.length;t++)_.DocNarr.push(_.DocNarration[t].gdn_doc_narration)}),d.get(c.apiUrl+"api/BankPayment/getVATProfileDetails?comp_code="+l).then(function(e){_.vatProfile=e.data})}),_.show_master_ac=function(e){d.get(c.apiUrl+"api/BankPayment/GetAllCashBankGLMasterAccountNo?cmp_cd="+l+"&financialyear="+m+"&doc_cd="+e).then(function(e){_.bankname=e.data,_.edt5.master_acno=e.data[0],_.getAccountName(e.data[0])}),d.get(c.apiUrl+"api/JVCreation/GetDocReportUrl?opr=J&sub_opr=Doc_URL&comp_code="+l+"&fyear="+m+"&condition="+e+"&condition1=&condition2=&condition3=&condition4=&condition5=").then(function(e){_.final_doc_url=e.data})},_.onKeyPress=function(e){var t=String.fromCharCode(e.which);/^[a-zA-Z0-9]*$/.test(t)||e.preventDefault()},_.GetDocCode=function(e,t){""!==e[0].gldd_doc_narr&&void 0!==e[0].gldd_doc_narr||(e[0].gldd_doc_narr=_.temp.gltd_doc_narr1)},_.CheckPrintReport=function(){var e={location:_.final_doc_url,parameter:{comp_detail:l,doc_code:_.temp3.gltd_doc_code,doc_no:_.Docno},state:"main.Fin141"};window.localStorage.ReportDetails=JSON.stringify(e),n.go("main.ReportCardParameter")},_.cancel=function(){_.addbtn=!0,_.updatebtn=!1,_.chkcost=!1,_.cost_combo=!1,_.edt="",_.edt1="",_.myForm.$setPristine(),_.myForm.$setUntouched()},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,format:"dd-mm-yyyy",todayHighlight:!0}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),new Date),u=e.getDate(),g=e.getMonth()+1,h=(g<10&&(g="0"+g),e.getFullYear()),f=(_.sdate=u+"-"+g+"-"+h,_.edate=u+"-"+g+"-"+h,_.edt4={DocDate:u+"-"+g+"-"+h,PostDate:u+"-"+g+"-"+h,ChequeDate:u+"-"+g+"-"+h,gltd_payment_date:u+"-"+g+"-"+h},_.getDepartcode=function(e){d.get(c.apiUrl+"api/BankPayment/getCostCenter?aacno="+e+"&comp_cd="+l+"&fyear="+m).then(function(e){_.costcenter=e.data,0<_.costcenter.length?_.chkcost=!0:(_.chkcost=!1,_.temp.cost_chk=!1,_.cost_combo=!1)});for(var t=0;t<_.getAllAccNos.length;t++)_.getAllAccNos[t].gldd_acct_code==e&&(_.edt1={coad_dept_no:_.getAllAccNos[t].gldd_dept_code+"-"+_.getAllAccNos[t].gldd_dept_name,dept_no:_.getAllAccNos[t].gldd_dept_code,gldd_acct_code:_.getAllAccNos[t].gldd_acct_code,gldd_party_ref_no:_.getAllAccNos[t].supplier_trn_number,codp_dept_name:_.getAllAccNos[t].gldd_dept_name,gldd_acct_name:_.getAllAccNos[t].gldd_acct_name},_.temp.gltd_paid_to=_.getAllAccNos[t].coad_pty_short_name);console.log("bank",_.Bankdetails)},_.getDepartcode=function(e,t){d.get(c.apiUrl+"api/BankPayment/getCostCenter?aacno="+e+"&comp_cd="+l+"&fyear="+m).then(function(e){_.costcenter=e.data,0<_.costcenter.length?_.chkcost=!0:(_.chkcost=!1,_.temp.cost_chk=!1,_.cost_combo=!1)});for(var a=0;a_.invoiceAmt?(swal({text:"Amount should be less than "+_.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),_.Bankdetails[e].gldd_doc_amount=parseFloat(_.Bankdetails[e].invoice).toFixed(3),_.total=parseFloat(_.Bankdetails[e].invoice).toFixed(3)):_.total=parseFloat(parseFloat(_.total)+parseFloat(_.Bankdetails[e].gldd_doc_amount)+parseFloat(_.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},_.voucherdisable=!1,_.UPDATE_temp_docs=function(){_.voucherdisable=!0;var e,t=[];if(""!=_.temp3.gltd_doc_code&&null!=_.temp3.gltd_doc_code){for(let e=0;e<_.Bankdetails.length;e++)if(""==_.Bankdetails[e].gldd_acct_code||null==_.Bankdetails[e].gldd_acct_code||null==_.Bankdetails[e].gldd_acct_code)return void swal({text:" please select account name ",width:380});""==_.edt4.PostDate||null==_.edt4.PostDate?swal({text:" please select Post Date ",width:380}):_.prdocdata.length<=0?swal({text:" Please Add Transaction Details ",width:380}):void 0===_.totalfinal||"NaN"===_.totalfinal||"0.000"===_.totalfinal||0===_.totalfinal||""===_.totalfinal?(swal({text:"Please Enter Amount",showCloseButton:!0,width:380,height:300}),_.voucherdisable=!1):(e={gltd_comp_code:l,gltd_doc_code:_.temp3.gltd_doc_code,gltd_prov_doc_no:i.Class.prov_code,gltd_final_doc_no:i.Class.final_doc_no,gltd_doc_date:_.docdata[0].gltd_doc_date,gltd_doc_narr:_.temp.gltd_doc_narr1,gltd_remarks:_.docdata[0].gltd_remarks,gltd_doc_flag:_.docdata[0].gltd_doc_flag,gltd_cur_status:_.docdata[0].gltd_cur_status,gltd_prepare_date:_.docdata[0].gltd_prepare_date,gltd_verify_user:_.docdata[0].gltd_verify_user,gltd_verify_date:_.docdata[0].gltd_verify_date,gltd_authorize_user:_.docdata[0].gltd_authorize_user,gltd_authorize_date:_.docdata[0].gltd_authorize_date,gltd_payment_user:_.docdata[0].gltd_payment_user,gltd_payment_date:_.edt4.gltd_payment_date,gltd_post_date:_.edt4.PostDate,gltd_post_no:_.docdata[0].gltd_post_no,gltd_save_srl:_.edt5.sims_dep,gltd_batch_source:_.docdata[0].gltd_batch_source,gltd_paid_to:_.temp.gltd_paid_to,gltd_cheque_no:_.temp.gltd_cheque_No,gltd_reference_doc_code:_.docdata[0].gltd_reference_doc_code,gltd_reference_final_doc_no:_.docdata[0].gltd_reference_final_doc_no,gltd_cheque_due_date:_.edt4.gltd_payment_date,gltd_doc_path:_.docdata[0].gltd_doc_path,gltd_app_name:"Finnm2"},t.push(e),d.post(c.apiUrl+"api/BankPayment/UPDATE_Fins_temp_docsFin",t).then(function(e){_.prvno=e.data,""!=_.prvno&&null!=_.prvno?_.UPDATE_Fins_temp_doc_details():swal({title:"Alert",text:"Record Not Updated. "+_.prvno,width:300,height:200}).then(function(){n.go(i.Class.redir_from)})}))}else swal({text:" please select Doc Code ",width:380})},_.backVVN=function(){n.go(i.Class.redir_from)},_.UPDATE_Fins_temp_doc_details=function(){let t=[],e=1;for(var a=0;a<_.Bankdetails.length;a++){var o={gldd_prov_doc_no:i.Class.prov_code,gldd_final_doc_no:i.Class.final_doc_no,gldd_doc_narr:_.Bankdetails[a].gldd_doc_narr,gldd_dept_code:_.Bankdetails[a].gldd_dept_code,gldd_ledger_code:_.Bankdetails[a].sllc_ldgr_code,gldd_acct_code:_.Bankdetails[a].gldd_acct_code,gldd_party_ref_no:_.Bankdetails[a].gldd_party_ref_no,gldd_party_ref_date:_.Bankdetails[a].gldd_party_ref_date,gldd_doc_amount_debit:parseFloat(_.Bankdetails[a].gldd_doc_amount.toString().replace(/,/g,"")),gldd_doc_amount_credit:0,gldd_fc_code:"PRM",gldd_cost_center_code:_.Bankdetails[a].glco_cost_centre_code,gldd_comp_code:l,gldd_doc_code:_.temp3.gltd_doc_code,gldd_line_no:e,gldd_remarks:_.temp3.gltd_doc_code+"/"+e+"$"+_.Bankdetails[a].gldd_doc_amount,gldd_vat_enable:_.Bankdetails[a].gldd_vat_enable,gldd_include_vat:_.Bankdetails[a].gldd_include_vat,gldd_vat_amt:_.Bankdetails[a].gldd_doc_vat_amt,gldd_tax_code:_.Bankdetails[a].gldd_tax_code,gldd_tax_acct_code:_.Bankdetails[a].gldd_tax_acct_code,gldd_tax_percentage:0,gldd_tax_amount:_.Bankdetails[a].gldd_tax_amount,finance_year:m,gldd_post_date:_.edt4.PostDate};e++,t.push(o)}o={gldd_comp_code:l,gldd_doc_code:_.temp3.gltd_doc_code,gldd_prov_doc_no:i.Class.prov_code,gldd_final_doc_no:i.Class.final_doc_no,gldd_line_no:e,gldd_ledger_code:"00",gldd_acct_code:_.edt5.master_acno.master_acno,gldd_cost_center_code:_.edt5.glco_cost_centre_code,gldd_doc_amount_debit:0,gldd_doc_amount_credit:parseFloat(_.totalfinal.toString().replace(/,/g,"")),gldd_fc_amount_debit:0,gldd_fc_code:"PRM",gldd_fc_rate:0,gldd_doc_narr:_.temp.gltd_doc_narr1,gldd_dept_code:_.edt5.master_acno.gldd_dept_code,gldd_vat_enable:p,gldd_include_vat:"N",gldd_vat_amt:0,finance_year:m,gldd_post_date:_.edt4.PostDate,gldd_remarks:_.temp3.gltd_doc_code+"/"+e+"$"+parseFloat(_.total)};t.push(o);let s=0;for(let e=0;ee.gldd_acct_name),!1===_.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===_.chk_condition&&(void 0===_.totalfinal||"NaN"===_.totalfinal||"0.000"===_.totalfinal||0===_.totalfinal||""===_.totalfinal))return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300})}_.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0,x="Save",_.Insert_temp_docs()}}else _.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0,x="Save",_.Insert_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},_.Verify=function(){try{if(0<_.Bankdetails.length){if(_.flag1=!1,null==_.edt4.PostDate||""==_.edt4.PostDate)_.flag1=!0,swal({text:"Please Select Posting Date",showCloseButton:!0,width:380,height:200});else if(null==_.edt5.sims_dep||""==_.edt5.sims_dep)_.flag1=!0,swal({text:"Please Select Department",showCloseButton:!0,width:380,height:200});else if(0<_.Bankdetails.length){for(let e=0;e<_.Bankdetails.length;e++){if(_.chk_condition=_.Bankdetails.every(e=>e.gldd_acct_name),!1===_.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===_.chk_condition&&(void 0===_.totalfinal||"NaN"===_.totalfinal||"0.000"===_.totalfinal||0===_.totalfinal||""===_.totalfinal))return void swal({text:"Please Enter Amount",showCloseButton:!0,width:380,height:300})}_.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0,x="Verify",_.Insert_temp_docs()}}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},_.Authorize=function(){_.chkcost_Ac=!1,_.cost_combo_Ac=!1;try{if(0<_.Bankdetails.length)if(_.flag1=!1,null==_.edt4.PostDate||""==_.edt4.PostDate)_.flag1=!0,swal({text:"Please Select Posting Date",showCloseButton:!0,width:380,height:200});else if(null==_.edt5.sims_dep||""==_.edt5.sims_dep)_.flag1=!0,swal({text:"Please Select Department",showCloseButton:!0,width:380,height:200});else if(0<_.Bankdetails.length){for(let e=0;e<_.Bankdetails.length;e++){if(_.chk_condition=_.Bankdetails.every(e=>e.gldd_acct_name),!1===_.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===_.chk_condition&&(void 0===_.totalfinal||"NaN"===_.totalfinal||"0.000"===_.totalfinal||0===_.totalfinal||""===_.totalfinal))return void swal({text:"Please enter amount",showCloseButton:!0,width:380,height:300})}!0!==_.chk_condition||void 0===_.totalfinal&&"NaN"===_.totalfinal&&"0.000"===_.totalfinal&&0===_.totalfinal&&""===_.totalfinal||(_.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0,x="Authorize",_.Insert_temp_docs())}else _.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0,x="Authorize",_.Insert_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},_.ClearInsert=function(){_.vis.updaten=!1,_.showButtons=!0,_.temp3.gltd_prov_doc_no="",_.temp3.gltd_doc_code1="",_.totalfinal=0,_.Bankdetails=[],_.doc_detail_data=[],_.Bankdetails.push({gldd_vat_enable:"Y"==p,gldd_include_vat:!1,sllc_ldgr_code:"00",vat_details:!1,gldd_doc_amount:0,gldd_doc_vat_amt:0}),setTimeout(function(){$("#0_code").select2()},100),setTimeout(function(){$("#pty_ref_date0").kendoDatePicker({format:"dd-MM-yyyy"})},500),_.total=0,_.temp={gltd_cheque_No:"",gltd_paid_to:"",gltd_doc_narr1:"",gltd_doc_remark:""},_.block4="",_.doc_data=!1,_.Doc_table=!1,_.getSLAccNo(_.Bankdetails[_.Bankdetails.length-1],_.Bankdetails.length-1)},_.onlyNumbers=function(e){var t,a={escape:27,backspace:8,tab:9,enter:13,del:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57};for(t in a)if(a.hasOwnProperty(t)&&(e.charCode==a[t]||e.keyCode==a[t]))return;e.preventDefault()},_.check_post_date=function(){null==_.edt4.PostDate&&""==_.edt4.PostDate||d.get(c.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+_.edt4.PostDate+"&comp_cd="+l+"&fyear="+m).then(function(e){_.msg=e.data,""!=_.msg?(swal({text:_.msg,width:300,height:200}),_.preparebtn=!0,_.verifybtn=!0,_.authorizebtn=!0):0!=_.users.length&&(_.users[0]==r&&_.users[1]==r?(_.preparebtn=!1,_.verifybtn=!1,_.authorizebtn=!1):(_.users[0]!=r||""!=_.users[1]&&_.users[1]==r?(_.preparebtn=!1,_.verifybtn=!0):(_.verifybtn=!1,_.preparebtn=!1),_.authorizebtn=!0))})},_.show_bills=function(){document.getElementById("mainchk").checked=!1;var e={gldd_comp_code:l,finance_year:m,gldd_doc_code:_.temp3.gltd_doc_code,gldd_ledger_code:_.edt.sllc_ldgr_code,gldd_acct_code:_.edt.gldd_acct_code,gldd_party_ref_no:_.edt1.gldd_acct_code};"00"==_.edt.sllc_ldgr_code||null==_.edt.sllc_ldgr_code||""==_.edt.sllc_ldgr_code?swal({text:"Please Select Except General Ledger",imageUrl:"assets/img/close.png",width:300,height:200}):_.edt.gldd_acct_code?(_.Billdetailsdata=[],$("#Billdetails").modal("show"),d.post(c.apiUrl+"api/BankPayment/BillDetails",e).then(function(e){if(_.billdata=e.data,_.billdata)for(var t=0;t<_.billdata.length;t++)_.Billdetailsdata.push(_.billdata[t]);else _.Billdetailsdata=[]})):swal({text:"Please Select Account Name",imageUrl:"assets/img/close.png",width:300,height:200})},_.CheckAllChecked=function(){var e=document.getElementById("mainchk");if(_.Bankdetails=[],1==e.checked)for(var t=0;t<_.Billdetailsdata.length;t++)_.Billdetailsdata[t].voucher_check=!0,_.row1="row_selected",$("tr").addClass("row_selected"),_.voucherdata.push(_.Billdetailsdata[t]);else for(t=0;t<_.Billdetailsdata.length;t++)_.Billdetailsdata[t].voucher_check=!1,e.checked=!1,_.row1="",$("tr").removeClass("row_selected")},_.voucherdata=[],_.selectonebyone=function(e,t){_.Bankdetails=[],1==t.voucher_check&&_.voucherdata.push(t)},_.btn_Add=function(){$("#Billdetails").modal("hide");for(var e=document.getElementById("mainchk"),t=0;t<_.voucherdata.length;t++)1==_.voucherdata[t].voucher_check&&_.Bankdetails.push(_.voucherdata[t]);for(var a=_.total=0;a<_.Bankdetails.length;a++)_.total=parseFloat(parseFloat(_.total)+parseFloat(_.Bankdetails[a].gldd_doc_amount)).toFixed(3),_.totalfinal=_.total;e.checked=!1},_.ShowAmountDetails=function(e){_.supplierdetails=!1,_.othersupplierdetails=!1,e.doc_code=_.temp3.gltd_doc_code,e.finance_year=m,d.post(c.apiUrl+"api/BankPayment/ShowAmountDetails",e).then(function(e){_.Amountdetails=e.data,console.log(_.Amountdetails)})},_.ShowPendingAmountDetails=function(e){_.supplierdetails=!1,_.pendingsupplierdetails=!1,e.doc_code=_.temp3.gltd_doc_code,e.finance_year=m,d.post(c.apiUrl+"api/BankPayment/ShowPendingAmountDetails",e).then(function(e){_.PendingAmountdetails=e.data})},_.complete=function(){$("#DocNarration").autocomplete({source:_.DocNarr})},_.back=function(){_.supplierdetails=!0,_.pendingsupplierdetails=!0,_.othersupplierdetails=!0},d.get(c.apiUrl+"api/JVCreation/Getdocument_type").then(function(e){_.document_type=e.data}),_.getDoc_type_name=function(e){for(var t=0;t<_.document_type.length;t++)_.document_type[t].gltd_doc_type==_.block4.gltd_doc_type&&(_.block4.gltd_doc_type_name=_.document_type[t].gltd_doc_type_name)},_.AddDocumenDetailtGrid=function(){_.Doc_table=!0,""!=_.block4.gltd_doc_type&&null!=_.block4.gltd_doc_type&&""!=_.block4.gltd_doc_no&&null!=_.block4.gltd_doc_no?(_.disableUpdate=!1,_.url=c.docUrl+"sis/Images/UploadedFiles/",_.gltd_attribute1=_.url+_.gltd_attr1,_.doc_detail_data.push({gltd_comp_code:l,gltd_doc_type:_.block4.gltd_doc_type,gltd_doc_type_name:_.block4.gltd_doc_type_name,gltd_doc_no:_.block4.gltd_doc_no,gltd_remarks:_.block4.gltd_remarks,gldd_doc_amount_debit:_.block4.gldd_doc_amount_debit,gltd_attribute1:_.gltd_attr1}),_.block4=""):swal({title:"Alert",text:"Doc type & Doc no was not entered, please re-attach the document",showCloseButton:!0,width:400}),_.doc_data=!1},_.viewDoc=function(e){_.url=c.docUrl+d.defaults.headers.common.schoolId+"/Images/UploadedFiles/",window.open(_.url+e)},_.downPdf=function(e){e=c.docUrl+_.mainurl.replace(/\/[^/]+$/,"/")+e;window.open(e,"_new")},_.Doc_detailCancel=function(){_.doc_data=!1,_.block4=""},_.DOC_update_grid=function(e){_.block4=JSON.parse(JSON.stringify(e)),_.temp1obj=e,_.Doc_add=!1,_.Doc_update=!0},_.Delete_doc_Grid=function(e,t,a,o){_.enable_update(),e.splice(a,1)},_.chk_doc_details=function(){var e=_.temp.temp_chk_doc_details;_.block4="",_.gltd_attribute1="",_.sims_invoice_image1="",1==e?(_.doc_data=!0,_.Doc_table=!0,_.doc_type_combo=!0,_.doc_type_input=!0,_.Doc_add=!0,_.Doc_update=!1):(_.doc_data=!1,_.Doc_table=!1,_.doc_type_combo=!1,_.doc_type_input=!1)},$("#fileLabel").html());function y(){$("input[type=file]").change(function(){var e=this.files,t=$(this).parent();1type: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}$(document).ready(function(){function e(){$("input[type=file]").change(function(){var e=this.files,t=$(this).parent();1type: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}e(),$("input[type=file]").on("focus",function(){$(this).parent().addClass("focus")}),$("input[type=file]").on("blur",function(){$(this).parent().removeClass("focus")}),$("#clearButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#cancelButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#prepareButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#verifyButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#authorizeButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#clearQbtn").on("click",function(){$("#file").val(""),$("#fileLabel").html(f),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)})}),_.reset=function(){_.Docno="0",_.budgetdesc=!1,_.temp.gltd_doc_narr1=null,_.edt5.master_acno=null,_.edt5.sims_dep=null,_.edt5.sims_dep="",_.temp.gltd_cheque_No=null,_.temp.gltd_cheque_No="",_.temp.gltd_paid_to=null,_.temp.gltd_paid_to="",_.totalfinal=0,_.edt5.sims_dep=null,_.edt5.sims_dep=""},_.isValidKey=function(e){var t=e.which||e.keyCode,a=String.fromCharCode(t);return/[\d,\.]/.test(a)||8===t?"."!==a||!e.target.value.includes(".")||(e.preventDefault(),!1):/[\d,\.-]/.test(a)||8===t?"-"!==a||!e.target.value.includes("-")||(e.preventDefault(),!1):(/[\d,\.-]/.test(a)||8===t)&&("-"!==a||!e.target.value.includes("-"))||(e.preventDefault(),!1)},_.ddt={},_.file_changed=function(e,t){if(10485760e.gldd_acct_name),!1===d.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===d.chk_condition){if(0==d.totalfinal||void 0===d.totalfinal||"NaN"===d.totalfinal||"0.000"===d.totalfinal||0===d.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0,D="Save",d.Update_temp_docs()}}else D="Save",d.Update_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},d.Update_temp_docs=function(){var e=[];null==d.temp1&&(d.temp1="");for(let e=0;et&&(t=d.dep_data[a].glma_dept_no,d.edt5.sims_dep=t)}),d.DocNarr=[],_.get(c.apiUrl+"api/JVCreation/getDoc_Remarks?&cmp_cd="+r+"&fyear="+l+"&doc_code="+d.temp.gltd_doc_code+"&remark_type=Bank_Receipt").then(function(e){if(d.DocNarration=e.data,0d.invoiceAmt?(swal({text:"Amount should be less than "+d.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),d.Bankdetails[e].gldd_doc_amount=parseFloat(d.Bankdetails[e].invoice).toFixed(3),d.total=parseFloat(d.Bankdetails[e].invoice).toFixed(3)):d.total=parseFloat(parseFloat(d.total)+parseFloat(d.Bankdetails[e].gldd_doc_amount)+parseFloat(d.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},d.up=function(e){d.Add_btn=!1,d.updatebtn=!0,d.readonly=!0,d.edt={coad_dept_no:e.coad_dept_no,sllc_ldgr_code:e.sllc_ldgr_code,gldd_party_ref_date:e.gldd_party_ref_date,gldd_doc_amount:e.gldd_doc_amount,gldd_doc_narr:e.gldd_doc_narr,coad_pty_full_name:e.slma_acno,gldd_acct_code:e.slma_acno},e.slma_acno,d.getSLAccNo(d.edt.sllc_ldgr_code),d.edt1={coad_dept_no:e.coad_dept_no,gldd_acct_code:e.slma_acno,gldd_acct_name:e.gldd_acct_name,gldd_party_ref_no:e.gldd_party_ref_no}},d.Update=function(){for(var e=0;ee.gldd_acct_name),!1===d.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===d.chk_condition&&(void 0===d.totalfinal||"NaN"===d.totalfinal||"0.000"===d.totalfinal||0===d.totalfinal))return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300})}d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0}D="Save",d.Insert_temp_docs()}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},d.Verify=function(){try{if(0e.gldd_acct_name),!1===d.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===d.chk_condition){if(void 0===d.totalfinal||"NaN"===d.totalfinal||"0.000"===d.totalfinal||0===d.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});continue}d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0,D="Verify",d.Insert_temp_docs()}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380});else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},d.Authorize=function(){try{if(0e.gldd_acct_name),!1===d.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===d.chk_condition){if(void 0===d.totalfinal||"NaN"===d.totalfinal||"0.000"===d.totalfinal||0===d.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});continue}d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0,D="Authorize",d.Insert_temp_docs()}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},d.ClearInsert=function(){d.temp1.gltd_doc_narr1="",d.temp1.gltd_paid_to="",d.vis.updaten=!1,d.showButtons=!0,d.totalfinal="",d.temp.gltd_prov_doc_no="",d.temp.gltd_doc_code1="",d.Bankdetails=[],d.doc_detail_data=[],d.doc_data=!1,d.Bankdetails=[],d.Bankdetails.push({gldd_vat_enable:"Y"==m,gldd_include_vat:!1,sllc_ldgr_code:"00",vat_details:!1,gldd_doc_amount:0,gldd_doc_vat_amt:0}),setTimeout(function(){$("#0_account_code").select2()},100),setTimeout(function(){$("#pty_ref_date0").kendoDatePicker({format:"dd-MM-yyyy"})},500),d.total=0,d.temp.gltd_cheque_No="",d.temp1={gltd_doc_narr1:"",gltd_doc_remark:"",gltd_paid_to:""},d.getSLAccNo(d.Bankdetails[d.Bankdetails.length-1],d.Bankdetails.length-1)},d.onlyNumbers=function(e){var t,a={escape:27,backspace:8,tab:9,enter:13,del:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57};for(t in a)if(a.hasOwnProperty(t)&&(e.charCode==a[t]||e.keyCode==a[t]))return;e.preventDefault()},d.check_post_date=function(){null==d.edt4.PostDate&&""==d.edt4.PostDate||_.get(c.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+d.edt4.PostDate+"&comp_cd="+r+"&fyear="+l).then(function(e){d.msg=e.data,""!=d.msg?(swal({text:d.msg,width:300,height:200}),d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0):0!=d.users.length&&(d.users[0]==n&&d.users[1]==n?(d.preparebtn=!1,d.verifybtn=!1,d.authorizebtn=!1):(d.users[0]!=n||""!=d.users[1]&&d.users[1]==n?(d.preparebtn=!1,d.verifybtn=!0):(d.verifybtn=!1,d.preparebtn=!1),d.authorizebtn=!0))})},_.get(c.apiUrl+"api/JVCreation/Getdocument_type").then(function(e){d.document_type=e.data}),d.getDoc_type_name=function(e){for(var t=0;ttype: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}$(document).ready(function(){function e(){$("input[type=file]").change(function(){var e=this.files,t=$(this).parent();1type: '+e[0].type+", "+Math.round(e[0].size/1024)+" KB")})}e(),$("input[type=file]").on("focus",function(){$(this).parent().addClass("focus")}),$("input[type=file]").on("blur",function(){$(this).parent().removeClass("focus")}),$("#clearButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#cancelButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#clearQbutton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#prepareButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#verifyButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)}),$("#authorizeButton").on("click",function(){$("#file").val(""),$("#fileLabel").html(h),$("input[type=file]").trigger("blur"),setTimeout(function(){e(),$("input[type=file]").trigger("focus")},100)})}),d.reset=function(){d.temp1.gltd_doc_narr1="",d.edt5.master_acno=null,d.edt5.sims_dep=null,d.edt5.sims_dep="",d.temp.gltd_cheque_No=null,d.temp.gltd_cheque_No="",d.temp.gltd_paid_to=null,d.Bankdetails=[],d.totalfinal="",d.Bankdetails.push({gldd_vat_enable:"Y"==m,gldd_include_vat:!1,sllc_ldgr_code:"00",vat_details:!1,gldd_doc_amount:0,gldd_doc_vat_amt:0}),setTimeout(function(){$("#0_account_code").select2()},100),d.doc_detail_data=[],d.temp1.gltd_paid_to="",d.edt5.sims_dep=null,d.edt5.sims_dep="",d.getSLAccNo(d.Bankdetails[d.Bankdetails.length-1],d.Bankdetails.length-1)},d.isValidKey=function(e){var t=e.which||e.keyCode,a=String.fromCharCode(t);return/[\d,\.]/.test(a)||8===t?"."!==a||!e.target.value.includes(".")||(e.preventDefault(),!1):/[\d,\.-]/.test(a)||8===t?"-"!==a||!e.target.value.includes("-")||(e.preventDefault(),!1):(/[\d,\.-]/.test(a)||8===t)&&("-"!==a||!e.target.value.includes("-"))||(e.preventDefault(),!1)},d.validatedeciamals=function(e,t,a){var o,s=a.gldd_doc_amount_credit.indexOf(".");-1!==s&&(o=a.gldd_doc_amount_credit.slice(0,s),a=a.gldd_doc_amount_credit.slice(s+1,s+3),d.prdocdata[t].gldd_doc_amount_credit=o+"."+a)},d.Docno="0",d.insertDocuments=function(){var e=[],t=1;if(1==d.msg1&&0
Country Code Currency Code Currency Decimal Dept. Max.Dept. Min.Address Line1
"+e.comp_cntry_name+" "+e.comp_curcy_name+""+e.comp_curcy_dec+" "+e.comp_max_dept+""+e.comp_min_dept+""+e.comp_addr_line1+"
Address Line2 Address Line3 Telephone No.Fax No. EmailWeb Site
"+e.comp_addr_line2+" "+e.comp_addr_line3+""+e.comp_tel_no+""+e.comp_fax_no+""+e.comp_email+""+e.comp_web_site+"
Incorporation No. Incorporation Reg Date Incorporation Renewal DatePF No. PF Reg. Date PF Posting A/c
"+e.comp_incorporation_number+" "+e.comp_incorporation_reg_date+""+e.comp_incorporation_renewal_date+""+e.comp_incorporation_renewal_remind_days+""+e.comp_pf_number+""+e.comp_pf_reg_date+" "+e.comp_pf_posting_account_code+"
Sales TAX No Sales TAX Reg. DateSales TAX Posting A/C VAT No.VAT Reg. Date VAT Posting A/c
"+e.comp_sales_tax_number+""+e.comp_sales_tax_reg_date+""+e.comp_sales_tax_posting_account_code+""+e.comp_vat_number+""+e.comp_vat_reg_date+" "+e.comp_vat_posting_account_code+"
Input VAT Posting A/c VAT Enable VAT Roundup Calculation VAT Posting Account Code
"+e.comp_input_vat_posting_account_code+" "+e.include_vat_enable_status+" "+e.comp_vat_roundup_calculation+""+e.comp_vat_roundup_posting_account_code+"
Field Value 1 Field Value 2 Field Value 3Field Value 4
"+e.fins_appl_form_field_value1+" "+e.fins_appl_form_field_value2+" "+e.fins_appl_form_field_value3+""+e.fins_appl_form_field_value4+"
Quantity Invoice Amount Book ValueCum DepreciationYearly Depr Monthly Depr Sales ValueReplacement CostDepr Percent Used Item StatusStatus Name
"+e.gam_quantity+" "+e.gam_invoice_amount+" "+e.gam_book_value+""+e.gam_cum_deprn+""+e.gam_ytd_deprn+" "+e.gam_mth_deprn+" "+e.gam_sale_value+""+e.gam_repl_cost+""+e.gam_deprn_percent+" "+e.gam_used_on_item+" "+e.gam_status+""+e.gam_status_name+"
Quantity Invoice Amount Book ValueCum DepreciationYearly Depr Monthly Depr Sales ValueReplacement CostDepr Percent Used Item StatusStatus Name
"+e.gam_quantity+" "+e.gam_invoice_amount+" "+e.gam_book_value+""+e.gam_cum_deprn+""+e.gam_ytd_deprn+" "+e.gam_mth_deprn+" "+e.gam_sale_value+""+e.gam_repl_cost+""+e.gam_deprn_percent+" "+e.gam_used_on_item+" "+e.gam_status+""+e.gam_status_name+"
MTH.DPERYRLY.DEPRVAL.ASST.CUM VAL.ASST.MTH + VAL.ASST.YR.+ SALE VALUEREPLACEMENT COSTACCOUNT CODE
"+e.gam_mth_deprn+" "+e.gam_ytd_deprn+" "+e.gam_val_add_cum+""+e.gam_val_add_mtd+""+e.gam_val_add_ytd+""+e.gam_sale_value+""+e.gam_repl_cost+""+e.gam_acct_code+"
ORDER NOINV.NO.RECEIPT DATE SALE DATE ENTRY DATE AMEND DATENEW SECTIONPAGE NO
"+e.gam_order_no+" "+e.gam_invoice_no+" "+e.gam_receipt_date+""+e.gam_sale_date+""+e.gam_entry_date+""+e.gam_amend_date+""+e.gam_new_sec+""+e.gam_page_no+"
LINE NODEPR.%USED ON ITEM LOCATION DESCRIPTION 2 SUPPLIER NAME  
"+e.gam_line_no+" "+e.gam_deprn_percent+" "+e.gam_used_on_item+""+e.gam_location_name+""+e.gam_desc_2+""+e.gam_supl_name+"  
Ledger CodeAccount NoAddress IdYear Opening BalanceOutstanding DR AmtOutstanding CR Amt Forign Currency Balance AmtToday DR AmtToday CR AmtCredit LimitLoan Installment AmtOrigin Loan AmtOverride AmtBank Closing AmtBank Statement DateDocument DateLoan Installment TypeCredit PeriodOverride PeriodStatement PeriodSchedule Codelast Payment DateInterest RateInterest PeriodTerm NameInitial outstanding DR AmtInitial outstanding CR AmtInitial Year Opening BalanceRevaluation DateOrigional Party ClassCredit RemarkBranch NameAcct NameIBAN NoSwift CodeTransaction CodeCharge CodeRoute Code
"+e.slma_ldgrctl_code+" "+e.slma_acno+""+e.slma_addr_id+""+e.slma_yob_amt+""+e.slma_outstg_dr_amt+""+e.slma_outstg_cr_amt+""+e.slma_for_curcy_bal_amt+""+e.slma_tdy_dr_amt+""+e.slma_tdy_cr_amt+""+e.slma_cr_limit+""+e.slma_loan_inst_amt+""+e.slma_orig_loan_amt+""+e.slma_ovrid_amt+""+e.slma_bank_clos_bal_amt+""+e.slma_bank_stmt_date+" "+e.slma_doc_date+" "+e.slma_loan_inst_type+" "+e.slma_credit_prd+""+e.slma_ovrid_prd+""+e.slma_stmt_prd+""+e.slma_sched_code+""+e.slma_last_pmt_date+""+e.slma_int_rate+""+e.slma_int_prd+""+e.slma_term_name+""+e.slma_outstg_dr_amt_orig+""+e.slma_outstg_cr_amt_orig+""+e.slma_yob_amt_orig+""+e.slma_reval_date+""+e.slma_cntrl_class_org+""+e.slma_credit_remark+""+e.coad_branch_name+""+e.coad_acct_name+""+e.coad_iban_no+""+e.coad_swift_code+""+e.coad_transaction_code+""+e.coad_charge_code+""+e.coad_route_code+"