!function(){"use strict";var i,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,d){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(d.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),d.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",d.flag=!0)},d.ex=function(e){console.log("hello")},d.Add=function(){d.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(i),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(i),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,d){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(d.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+=""},d=document.createElement("a"),e=(d.href="data:application/vnd.ms-excel;base64,"+r.base64(r.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',e)),new Date);d.download=t.replace(/ /g,"_")+"_"+r.getFormatedDate(e,"dd./.mm./.yyyy. .hh.:.mn.:.ss").replace(/ /g,"_")+".xls",d.click()},r.exportExcelBtn=function(){r.sectionwisesub.forEach(function(e,t){e.RowNumber=t+1}),r.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"}],r.sectionwisesub,"SubjectHeadMapping")},r.search=function(){if(r.todos=r.searched(r.sectionwisesub,r.searchText),r.totalItems=r.todos.length,r.currentPage="1",""==r.searchText&&(r.todos=r.sectionwisesub),1==(c=document.getElementById("mainchk")).checked){c.checked=!1;for(var e=0;es&&(o.s.r=s),o.s.c>n&&(o.s.c=n),o.e.r=d.current_year.sims_academic_year?(d.curiculum=!0,d.ac_year=!0,d.grade_nm=!0,d.temp=angular.copy(e),d.promote_code(e.sims_cur_code,e.sims_academic_year),d.update_btn=!0,d.dis1=!1,d.dis2=!0,d.select_list=!1,d.update_flag=!0,1==(l=document.getElementById("mainchk")).checked&&(l.checked=!1),d.check()):swal({title:"Alert",text:"Records from Previous Years Cannot Be Updated",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380})},d.getPromoteCode=function(e){d.grd_name=$("#Select5 option:selected").text(),i.get(c.apiUrl+"api/Section/Master/getPromoteCode?grd_code="+e+"&grd_name="+d.grd_name).then(function(e){d.PromoteCode=e.data})},i.get(c.apiUrl+"api/Section/Master/getschooltype").then(function(e){d.schooltype=e.data}),d.save=function(e){e&&((e=d.temp).opr="I",r.push(e),"modern"==i.defaults.headers.common.schoolId?i.post(c.apiUrl+"api/Section/Master/CUDSection1",r).then(function(e){d.sectionsobj=e.data,r=[],1==d.sectionsobj?(r=[],d.dis1=!0,d.dis2=!1,swal({text:"section Inserted Successfully",imageUrl:"assets/img/check.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):(d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code),swal({text:"Section Not Inserted",imageUrl:"assets/img/close.png",width:380}))}):i.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){d.sectionsobj=e.data,r=[],1==d.sectionsobj?(r=[],d.dis1=!0,d.dis2=!1,swal({text:"section Inserted Successfully",imageUrl:"assets/img/check.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):(d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code),swal({text:"Section Not Inserted",imageUrl:"assets/img/close.png",width:380}))}))},d.select_promocode=function(e){d.temp.sims_section_boys_promote_code="",d.temp.sims_section_girls_promote_code="",d.temp.sims_academic_year>d.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})},d.select_boy_girl=function(){d.temp.sims_section_promote_code="",d.temp.sims_academic_year>d.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})},d.Update_data=function(){var e=d.temp;e.opr="U",e.sims_cur_code=d.edt.sims_cur_code,e.sims_academic_year=d.edt.sims_academic_year,e.grade_code=d.edt.sims_grade_code,e.sims_section_shift=d.temp.sims_section_shift,r.push(e),"modern"==i.defaults.headers.common.schoolId||"modernjr"==i.defaults.headers.common.schoolId?i.post(c.apiUrl+"api/Section/Master/CUDSection1",r).then(function(e){d.sectionsobj=e.data,r=[],1==d.sectionsobj?(d.dis1=!0,d.dis2=!1,swal({text:"Section Updated Successfully",imageUrl:"assets/img/check.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):0==d.sectionsobj?(swal({text:"Section Not Updated",imageUrl:"assets/img/close.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):swal("Error-"+d.sectionsobj)}):i.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){d.sectionsobj=e.data,r=[],1==d.sectionsobj?(d.dis1=!0,d.dis2=!1,swal({text:"Section Updated Successfully",imageUrl:"assets/img/check.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):0==d.sectionsobj?(swal({text:"Section Not Updated",imageUrl:"assets/img/close.png",width:380}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):swal("Error-"+d.sectionsobj)})},d.Delete_Records=function(){if(0==d.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=(d.nodelete=!1,d.sims_statusfordelete=!1),o=0,s=(new Date).getFullYear().toString(),n=0;n=d.current_year.sims_academic_year?(d.flag2=a=!0,e={sims_cur_code:d.edt.sims_cur_code,sims_academic_year:d.edt.sims_academic_year,grade_code:d.edt.sims_grade_code,sims_section_code:d.filteredTodos[n].sims_section_code,opr:"D"},r.push(e)):d.filteredTodos[n].sims_academic_year<=s&&"0"==d.filteredTodos[n].count?a=d.flag2=!1:(d.flag2=!(a=!1),o=parseInt(o)+1,t=t+d.filteredTodos[n]._sims_section_name+" ,",d.nodelete=!0));1==d.nodelete&&(d.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,d.check()),1==a&&d.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?i.post(c.apiUrl+"api/Section/Master/CUDSection",r).then(function(e){d.sectionsobj=e.data,r=[],1==d.sectionsobj?(d.dis1=!0,d.dis2=!1,swal({text:"Section Deleted Successfully",imageUrl:"assets/img/check.png",width:350,showCancelButton:!0}),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code)):0==d.sectionsobj?(d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code),swal({text:"Section Not Deleted. ",imageUrl:"assets/img/close.png",width:350,showCancelButton:!0})):swal("Error-"+d.sectionsobj)}):(1==(l=document.getElementById("mainchk")).checked&&(l.checked=!1),d.check())}):d.flag2?1!=d.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})}},d.Reset=function(){d.edt.sims_grade_code="",d.edt.sims_academic_year="",d.filteredTodos=[],d.pager=!1,d.pagesize="10"},d.can=function(){d.dis1=!0,d.dis2=!1,d.temp="",d.promote_code(str.sims_cur_code,str.sims_academic_year)},i.get(c.apiUrl+"api/Section/Master/getSectionLocation").then(function(e){d.SectionLocation=e.data,console.log(d.SectionLocation)}),i.get(c.apiUrl+"api/Section/Master/getFundingStatus").then(function(e){d.FundingStatus=e.data,console.log(d.FundingStatus)}),i.get(c.apiUrl+"api/Section/Master/getMediumOfInstruction").then(function(e){d.MediumOfInstructionData=e.data,console.log(d.MediumOfInstructionData)}),d.New=function(){0==d.user_access.data_insert?swal({title:"Alert",text:"Login user does not have required privilege to perform this action.",width:350,height:200}):(d.curiculum=!1,d.ac_year=!1,d.grade_nm=!1,d.temp="",d.update_flag=!1,d.new_funs=!0,d.dis1=!1,d.dis2=!0,d.select_list=!0,d.update_btn=!1,d.temp={sims_cur_code:d.edt.sims_cur_code,sims_academic_year:d.edt.sims_academic_year,grade_code:d.edt.sims_grade_code,sims_status:!0,sims_allow_extra_status:!0},d.promote_code())},d.flag=!0,d.expand=function(e,t){if(1==d.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),d.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a"C"===e.sims_academic_year_status),d.getsections(d.temp.sims_cur_code,d.temp.sims_academic_year)})},d.getsections=function(e,t){i.get(c.apiUrl+"api/common/getAllGrades?cur_code="+e+"&academic_year="+t).then(function(e){d.grade=e.data,console.log(d.grade),console.log("$scope.edt.sims_cur_code,$scope.edt.sims_academic_year,$scope.edt.sims_grade_code in getsections: ",d.edt.sims_cur_code,d.edt.sims_academic_year,d.edt.sims_grade_code),d.showSections(d.edt.sims_cur_code,d.edt.sims_academic_year,d.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,d,i,c){a.display=!1,a.pagesize="10",a.pageindex="0",a.pager=!0,a.levelcodeRonly=!1,d.get(i.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;d.get(i.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(d.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==(i=document.getElementById("mainchk")).checked&&(i.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==(i=document.getElementById("mainchk")).checked&&(i.checked=!1,s.row1=""),s.currentPage=!0)}):swal("Error-"+s.msg1)});else{1==(i=document.getElementById("mainchk")).checked&&(i.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(i),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(i),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(i),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(i)}}])}(),function(){"use strict";angular.module("sims.module.Setup").controller("LessonObservationSchedulingCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(a,e,t,o,s,n,d){a.pagesize="10",a.pageindex="0";t.globals.currentUser.username;var i=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(d.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(d.apiUrl+"api/LessonObservationSchedulibg/GetAll_lessonSuperSechedule?user_name="+i+"&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(d.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(d.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(d.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="+i).then(function(e){a.subjectlst=e.data})},a.acdm_yr_change=function(){n.get(d.apiUrl+"api/LearningAsd/getgrade?cur_code="+a.temp.sims_cur_code+"&academic_year="+a.temp.sims_academic_year+"&userName="+i).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(d.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="+i).then(function(e){a.attSlot1=e.data})},a.grade_change=function(){n.get(d.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="+i).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(d.apiUrl+"api/LessonObservationSchedulibg/lessionData",{opr:"K",user_name:i}).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(i),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 i,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,d){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(d.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(i),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,d){s.Allusers=[],s.busy=!1,s.table=!1,s.newmode=!1,s.editonly=!1,s.edt={comn_user_date_created:new Date},n.get(d.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(d.apiUrl+"api/common/UserApplicationsController/GetRoles").then(function(e){s.role=e.data}),s.Submit_click=function(){n.get(d.apiUrl+"api/common/UserApplicationsFinsController/GetCompanyStatusWithAppl?userName="+s.userName).then(function(e){0s.pageCount()-5?s.pageCount()-5+1:t;aDescription');for(let e=0;e ${o.description}

`)}}},toolbar:!1,views:[{type:"day",visible:!1},{type:"week",visible:!1},{type:"month",visible:!1}]}),s.link=function(e){if(s.a_url="",!angular.isUndefined(n.pp_url_lst)&&0o.pageCount()-5?o.pageCount()-5+1:t;as&&(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,d,i){n.studentimagee=!1,n.parentimage=!1,n.employeeimage=!1,n.defaultImage="default.jpg",n.imageUrl=i.docUrl+d.defaults.headers.common.schoolId+"/Images/EmployeeImages/",n.Allusers=[],n.studimg=i.docUrl+d.defaults.headers.common.schoolId+"/Images/StudentImages/",n.parentimg=i.docUrl+d.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"}),d.get(i.apiUrl+"api/common/UserApplicationsController/GetRoles").then(function(e){n.role=e.data}),n.$on("global_cancel",function(e){c=[],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,d,i,c){a.display=!1,a.grid=!0,a.pagesize="10",a.pageindex="1";a.busy=!1,a.table=!1,n.get(i.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(i.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(c),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(c),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(c),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(c),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(c),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(c),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(c),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(c),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="",d.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,d,i){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 c="SimsReports."+e.location+",SimsReports",i=i.GetRpt_url();console.log(i),e.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:i,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:c,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,d,i){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"==d.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,d.get(i.apiUrl+"api/common/AcademicYear/getAcademicStatus").then(function(e){a.obj3=e.data,console.log(a.obj3)}),d.get(i.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()}),d.get(i.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),d.post(i.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),d.post(i.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,d.get(i.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,d.get(i.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,d,i){s.pagesize="5",s.pageindex="1",s.acadyr_data=[],s.edit_code=!1,s.dis_no=!0,s.grid=!0,s.display=!1;"asd"==d.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,d.get(i.apiUrl+"api/common/AcademicYear/getAcademicStatus").then(function(e){s.obj3=e.data,console.log(s.obj3)}),d.get(i.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),d.post(i.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,d.get(i.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),d.post(i.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,d.get(i.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(){d.get(i.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){d.post(i.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"):(d.get(i.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,d.get(i.apiUrl+"api/StudentReport/Get_doc_details?enroll_No="+t).then(function(e){o.Studentdata=e.data}),d.get(i.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){d.post(i.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"):(d.get(i.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,d.get(i.apiUrl+"api/StudentReport/Get_doc_details?enroll_No="+t).then(function(e){n.Studentdata=e.data}),d.get(i.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(i)},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,d,t,a,i,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,i.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(){i.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(){i.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(){i.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(){i.get(c.apiUrl+"api/DeliveryMode/getBadgeOptions").then(function(e){n.Badge_code=e.data})},n.getBadge(),i.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(i),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&&(c.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)),c.pays_doc_empl_id=e.pays_doc_empl_id,c.pays_doc_desc1=e.pays_doc_desc1,c.photo_filename_doc.split("/")[1]),o=(c.filename1=c.filename_doc+"."+e,[]),e=[];if(null==c.photo_filename_doc||""==c.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?(c.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},[]):(c.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),c.pays_doc_empl_id=e.pays_doc_empl_id,c.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==c.photo_filename_doc||""==c.photo_filename_doc||null==c.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(i),o.flag=!1;else{$("#innerRow").css({display:"none"});for(var a=0;a=c.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),c.temp.em_date_of_join="")},c.checkPassport=function(){c.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+=""},d=document.createElement("a"),e=(d.href="data:application/vnd.ms-excel;base64,"+i.base64(i.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',e)),new Date);d.download=t.replace(/ /g,"_")+"_"+i.getFormatedDate(e,"dd./.mm./.yyyy. .hh.:.mn.:.ss").replace(/ /g,"_")+".xls",d.click()}}])}(),function(){"use strict";var l,m=[],u=[],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,d,i,s){function c(e,t){e?d.get(i.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)}):d.get(i.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"==d.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){d.get(i.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){d.get(i.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){d.get(i.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)})},d.get(i.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=[],d.get(i.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,0{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(d.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(d.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(d.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(i),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){i+=''+e+""});for(var i=i+('')+'',c=0;c'+o[c].title+"";i+="",s.forEach(function(e){i+="";for(var t=0;t'+e[o[t].dataKey]+"";i+=""}),!1!==n&&void 0!==n&&(i+=n);a={worksheet:e||"Worksheet",table:i+="
"},s=document.createElement("a"),s.href="data:application/vnd.ms-excel;base64,"+r.base64(r.format('\x3c!--[if gte mso 9]>{worksheet}{table}
',a)),n=new Date;s.download=e.replace(/ /g,"_")+"_"+r.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,d,i,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),d.get(c.apiUrl+"api/ERP/Grade/getCuriculum?username="+t.globals.currentUser.username).then(function(e){n.curmn=e.data,n.edt.sims_cur_code=n.curmn[0].sims_cur_code,n.GetData()}),n.GetData=function(e){d.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,d.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]?d.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,d,i){n.eventsList=[],n.display=!0,n.btn_delete=!1,n.check_time_flag=!1,s.get(i.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(i),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){d.get(i.apiUrl+"api/SchoolLicense/GetAllCountries?region_code="+e).then(function(e){s.country1=e.data})},d.get(i.apiUrl+"api/SchoolLicense/GetAllRegions").then(function(e){s.display=!0,s.region=e.data}),d.get(i.apiUrl+"api/SchoolLicense/GetAllCurr").then(function(e){s.display=!0,s.curri=e.data}),d.get(i.apiUrl+"api/SchoolLicense/GetproductName").then(function(e){s.productcode=e.data}),d.get(i.apiUrl+"api/SchoolLicense/GetExpTime").then(function(e){s.ExTime=e.data[0]}),d.get(i.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(){d.get(i.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),d.post(i.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")}},d.get(i.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){c.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:i.apiUrl+"api/AssignmentUpload/upload1?filename="+s.obj[t]+"&location=Images/SchoolLogo/",data:c,headers:{"Content-Type":void 0}});d(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(d.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,d,i){var s,c=t.globals.currentUser.username,t=(n.School_Logo=n.obj1.lic_school_logo,n.School_Name=n.obj1.lic_school_name,n.schoolLogoImg=i.docUrl+d.defaults.headers.common.schoolId+"/Images/SchoolLogo/"+n.School_Logo,new Date),_=t.getMonth()+1,r=t.getDate(),r=(n.doc_date=(r=r<10?"0"+r:r)+"-"+(_=_<10?"0"+_:_)+"-"+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=c,n.sub_topic.sims_syllabus_unit_sub_topic_created_by=c,n.unit.sims_syllabus_unit_created_by=c,n.topic.sims_syllabus_unit_topic_created_by=c,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,d.defaults.headers.common.schoolId);n.path1=i.docUrl+r+"/Images/Syllabus/",d.get(i.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,d.get(i.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:c};d.post(i.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:c};d.post(i.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:c};d.post(i.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(i),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(d.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:d.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:c,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(d.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(d.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(d.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(){c=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,d){n.get(d.apiUrl+"api/TimeLineAlert/getprojectName").then(function(e){a.projectName=e.data}),n.get(d.apiUrl+"api/TimeLineAlert/getModuleName").then(function(e){a.ModuleName=e.data}),a.getApplications=function(e){n.get(d.apiUrl+"api/TimeLineAlert/getProjectApplications?mod_code="+e).then(function(e){a.appication_Name=e.data})},a.temp={},a.searchdata=function(){n.get(d.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:"+i.filteredTodos[e].sims_enroll_number+" Student Name:"+i.filteredTodos[e].student_name+"Fee TypeFee Amount";for(var t=0;t"+i.defaulterdata[0][t].sims_fee_type_desc+""+i.defaulterdata[0][t].sims_balance_amount+"");i.message_details=i.message_details+="Grand Total :"+i.filteredTodos[e].sims_balance_amount_total+"",i.message_details=i.message_details+"";document.getElementById("text-editor").value;var a=document.getElementById("text-editor1").value.replace("{details}",i.message_details);i.filteredTodos[e].email_message=a+"

",i.data.push(i.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(d.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,d){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(d.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(d.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,d,i){n.url=d.docUrl+s.defaults.headers.common.schoolId,n.itemsPerPage="5",n.currentPage=0,n.view=!0,n.create=!1,n.edt=[];var c=t.globals.currentUser.username,_=($('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0}),new Date),r=_.getMonth()+1,l=_.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(d.apiUrl+"api/common/Alert/getModule?username="+t.globals.currentUser.username).then(function(e){n.getModule=e.data,"ALL"==i.flag&&(e={fromdate:"",todate:n.endDate,usercode:c,alert_status:"U",module_code:null},n.buzy=!0,s.post(d.apiUrl+"api/common/Alert/AlertDetails",e).then(function(e){n.AlertDetails=e.data,0i.pageCount()-5?i.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,d){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(d.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(d.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(d.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(d.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(d.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,d){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(d.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(d.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(d.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(d.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(d.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,d){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(d.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(d.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(d.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,d){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(d.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(d.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(d.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(d.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,d){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 i=new Date,c=i.getDate(),_=(c<10&&(c="0"+c),i.getMonth()+1),r=(_<10&&(_="0"+_),i.getFullYear()),i=($(".clockpicker").clockpicker({autoclose:!0}),new Date),l=i.getHours(),m=i.getMinutes(),u=(m<10&&(m="0"+m),i.getSeconds()),i=(u<10&&(u="0"+u),a.temp.comn_log_visitor_visit_intime=l+":"+m+":"+u,a.temp.comn_log_visitor_visit_date=c+"-"+_+"-"+r,t.globals.currentUser.username),p=(a.temp.comn_log_created_by_user_code=i,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(d.apiUrl+"api/CallVisitorLogController/getLogType").then(function(e){a.LogTypeData=e.data}),n.get(d.apiUrl+"api/CallVisitorLogController/getLogLocation").then(function(e){a.LogLocationData=e.data}),n.get(d.apiUrl+"api/CallVisitorLogController/getVisitorLocation").then(function(e){a.VisitorLocationData=e.data}),n.get(d.apiUrl+"api/CallVisitorLogController/getPersonToMeet").then(function(e){a.PersonToMeetData=e.data,console.log("PersonToMeetData",a.PersonToMeetData)}),a.CallPurpose=function(e){n.get(d.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":"",p=[],(t=a.temp).opr="I",p.push(t),n.post(d.apiUrl+"api/CallVisitorLogController/InsertVisitor_Log",p).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+":"+u,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,d){t.showdisabled=!1,t.showdisabled1=!1,o(function(){$("#example").tableHeadFixer({top:1})},100),t.busyindicator=!1,t.ShowCheckBoxes=!0;var o=new Date,i=o.getDate(),c=(i<10&&(i="0"+i),o.getMonth()+1),_=(c<10&&(c="0"+c),o.getFullYear());t.from_date=i+"-"+c+"-"+_,t.to_date=i+"-"+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(d.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(d.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=i+"-"+c+"-"+_,t.to_date=i+"-"+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,d){o.display=!0,o.Financial=!0,n.get(d.apiUrl+"api/common/ViewPayslip/GetReportName").then(function(e){o.Report_Name=e.data}),n.get(d.apiUrl+"api/attendance/getAttendanceyear?cur_code=01").then(function(e){o.academicyears_obj=e.data,0=c.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),c.temp.em_date_of_join="")},c.checkPassport=function(){c.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{c.sims_photo_compressed=new File([e],"compressed_photo",{type:"image/jpeg"})}),console.log("comopressed image ",c.sims_photo_compressed),c.photo_filename=e.type,null!=c.photo_filename||""!=c.photo_filename?(t=c.photo_filename.split("/"),console.log("imageType",t[1]),"jpeg"==t[1]||"jpg"==t[1]||"png"==t[1]?((t=new FileReader).onload=function(t){c.$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","")))},c.uploadImgClickF=function(){c.uploadImgClickFShow=!0},c.uploadImgCancel=function(){c.uploadImgClickFShow=!1},c.image_click=function(){c.ImgLoaded=!0},c.globalSearch=function(){$("#MyModal").modal("show"),c.showBtn=!1},c.EmployeeDetails=function(){c.NodataEmployee=!1,n.post(d.apiUrl+"api/common/SearchEmployee?data="+JSON.stringify(c.temp)).then(function(e){c.Employee_Details=e.data,c.EmployeeTable=!0,0{}]/g,"_"),console.log("space",c.filename_doc),""==e.pays_doc_srno&&(c.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)),c.pays_doc_empl_id=e.pays_doc_empl_id,c.pays_doc_desc1=e.pays_doc_desc1,c.photo_filename_doc.split("/")[1]),o=(c.filename1=c.filename_doc+"."+e,[]),e=[];if(null==c.photo_filename_doc||""==c.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",c.filename_doc),(""==e.pays_doc_srno?(c.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},[]):(c.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),c.pays_doc_empl_id=e.pays_doc_empl_id,c.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==c.photo_filename_doc||""==c.photo_filename_doc||null==c.photo_filename_doc){for(var s=0;s"+t+''+e+""),o.close(),a.focus()},n.get(d.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(c.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(c.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,d){t.globals.currentUser.username,s.CurrentDate=new Date,new Date;s.records=!0,s.tabledata=!1,n.get(d.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(d.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(i),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,d){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(d.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(i),s.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",s.flag=!0)}}])}(),function(){"use strict";var c,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,d,i){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,d.get(i.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){d.get(i.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}):(d.get(i.apiUrl+"api/common/ShiftTemplate/GetAllShift").then(function(e){n.shift_data=e.data}),d.get(i.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,d.get(i.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}):(d.post(i.apiUrl+"api/LoanCodeRegister/LoanCodeRegisterCUD",t).then(function(t){s.msg1=t.data,s.operation=!1,d.get(i.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"};d.post(i.apiUrl+"api/LoanCodeRegister/LoanCodeRegisterCUD",e).then(function(t){s.msg1=t.data,s.operation=!1,d.get(i.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(d.apiUrl+"api/LoanCodeConfirmation/LoanCodeConfirmationCUD",t).then(function(t){o.msg1=t.data,o.operation=!1,n.get(d.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(d.apiUrl+"api/LoanCodeConfirmation/LoanCodeConfirmationCUD",e).then(function(e){o.msg1=e.data,o.operation=!1,n.get(d.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==(i=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(i),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(d.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(d.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(d.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(d.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);i.post(c.apiUrl+"api/EmpAttendanceController/EDA355_Get_attednce_deatils?sdate="+a+"&edate="+o+"&dept="+e+"&desg="+t).then(function(e){var t=[];if(d.Pers326_Get_attednce_deatils1=e.data,1==document.getElementById("Checkbox8").checked)for(var a=0;aa;a++)d.subData={},d.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,d.subData.att_date=e.sheets.Sheet1[a].Date,d.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,d.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,d.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,d.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,d.sheetsData.push(d.subData);i.post(c.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",d.sheetsData).then(function(e){d.em_numbers=e.data,d.datasend=[];for(var t=0;d.em_numbers.length>t;t++)d.em_numbers[t].emp_id_flag?(d.em_numbers[t].fcolor="black",d.modalbusy=!1):(d.em_numbers[t].fcolor="red",d.modalbusy=!1,d.errorlabel=!0);console.log(d.em_numbers)}),d.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else d.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),d.busy=!1,d.modalbusy=!1}),t={method:"POST",url:c.apiUrl+"/api/file/uploadDocument?filename="+d.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}},i(t).success(function(e){e={sims_admission_user_code:o.globals.currentUser.username,sims_admission_doc_path:e};i.post(c.apiUrl+"api/document/insertdoc",e).then(function(e){d.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)}),d.CheckMultiple())},d.CheckAllChecked=function(){if(1==document.getElementById("allchk").checked)for(var e=0;e"+e+''+t+""),o.close(),a.focus(),d.btn_Submit()),d.btn_Submit()})},d.printclick=!1,d.downloadFormat=function(){d.url=c.docUrl+"format/attendance/attendance.xls",window.open(d.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,d,i){var e=e.globals.currentUser.username,c=(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(d.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(d.apiUrl+"api/HRMS/getCompany").then(function(e){o.company_data=e.data}),n.get(d.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(d.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,u.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)),u.pays_doc_empl_id=e.pays_doc_empl_id,u.pays_doc_desc1=e.pays_doc_desc1,u.photo_filename.split("/")[1]),a=(u.filename1=u.filename+"."+t,[]),e=[];if(null==u.photo_filename||""==u.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,u.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,u.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),u.pays_doc_empl_id=e.pays_doc_empl_id,u.pays_doc_desc1=e.pays_doc_desc1,[]),t=[];if(null==u.photo_filename||""==u.photo_filename||null==u.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,}))$/,c.operation=!0,c.Update_btn=!1,c.display=!0,c.roleList=!0}),$("a#fee").click(function(){return!1}),c.updateBtn=!1,c.saveBtn=!1,c.diableAirFareField=!0,c.temp.afe_finalize_status=!0,$("#dob").kendoDatePicker({format:"dd-MM-yyyy",min:new Date(1900,1,1),max:new Date}),c.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,c.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"}),c.temp.em_login_code="",c.temp.EmpName="",c.showBtn=!1,c.diableAirFareField=!0,c.temp.afe_finalize_status=!0},c.$on("global_cancel",function(e){console.log(c.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")+""+"";for(var s=0;s"+e.paycodeList[s].pay_discription+"";_=_+"Total"+"";for(s=0;s"+e.paycodeList[s].pa_amount+"";_=(_=_+""+o+"")+""+"";var n=$(""+_+"");$(t.currentTarget).parents("tr").after(n),d.flag=!1}else $(".innerRow").css("display","none"),$("#"+a).removeClass("fa fa-minus-circle"),$("#"+a).addClass("fa fa-plus-circle"),d.flag=!0},d.submit=function(){d.submitBtnDisabled=!0,d.busyindicator=!1,d.postData=[],d.postData=d.all_EmpGrt_Data,d.opr={username:t.globals.currentUser.username,yearmonth:d.temp.sims_academic_year+d.temp.sims_academic_month,grtyearmonth:d.temp.yearCode},console.log("postData",d.postData),console.log("opr",d.opr),i.post(c.apiUrl+"api/EmpGrtview/SaveAllGratuityData?data1="+JSON.stringify(d.opr),d.postData).then(function(e){d.msg=e.data,1==d.msg?(console.log("emp_id",d.emp_id),i.post(c.apiUrl+"api/EmpGrtview/PostingGratuity?year_month="+d.temp.sims_academic_year+d.temp.sims_academic_month+"&emp_id="+d.emp_id+"&company_code="+d.temp.company_code+"&username="+t.globals.currentUser.username).then(function(e){d.postingStatus=e.data,d.emp_id="",1==d.postingStatus?(swal({title:"Alert",text:"Gratuity Posted Successfully"}),d.Myform.$setPristine(),d.Myform.$setUntouched(),d.clear(),d.busyindicator=!0):swal({title:"Alert",text:"Gratuity calculated-Posting failed"}),$("#myModal").modal("hide")})):0==d.msg?swal({text:"Gratuity not updated. ",width:380}):swal("Error-"+d.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,d,i){var e=e.globals.currentUser.username,c=(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(d.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(d.apiUrl+"api/HRMS/getCompany").then(function(e){a.company_data=e.data}),n.get(d.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(d.apiUrl+"api/HRMS/Adisw/getCurLevel").then(function(e){a.curlevel_data=e.data}),n.get(d.apiUrl+"api/HRMS/Adisw/getQualification").then(function(e){a.qualification_data=e.data}),n.get(d.apiUrl+"api/HRMS/Adisw/getDesignation").then(function(e){a.designation_data=e.data}),n.get(d.apiUrl+"api/HRMS/Adisw/getSubjects").then(function(e){a.subjects_data=e.data}),a.EmployeeDetails=function(){a.NodataEmployee=!1,n.post(d.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(i),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:i,em_img:i+t+".png",em_img_lowres:i+t+"_lowres.png",opr:"K"};n.post(d.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:d.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:d.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),d.post(i.apiUrl+"api/OtherLoan/OtherLoanCUD",a).then(function(t){s.msg1=t.data,s.OtherLoanOperation=!1,a=[],d.get(i.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}):(d.post(i.apiUrl+"api/OtherLoan/OtherLoanCUD",e).then(function(t){s.msg1=t.data,s.OtherLoanOperation=!1,e=[],d.get(i.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++)d.subData={},d.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,d.subData.att_date=e.sheets.Sheet1[a].Date,d.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,d.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,d.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,d.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,d.sheetsData.push(d.subData);n.post(i.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",d.sheetsData).then(function(e){d.em_numbers=e.data,d.datasend=[];for(var t=0;d.em_numbers.length>t;t++)d.em_numbers[t].emp_id_flag?(d.em_numbers[t].fcolor="black",d.modalbusy=!1):(d.em_numbers[t].fcolor="red",d.modalbusy=!1,d.errorlabel=!0)}),d.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else d.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),d.busy=!1,d.modalbusy=!1}),t={method:"POST",url:i.apiUrl+"/api/file/uploadDocument?filename="+d.filename.name+c("date")(new Date,"dd-MM-yyyy")+"-"+c("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(i.apiUrl+"api/document/insertdoc",e).then(function(e){d.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)}),d.CheckMultiple())},d.RemarkKeyUp=function(e,t,a){0a;a++)d.subData={},d.subData.att_emp_id=e.sheets.Sheet1[a].Emp_No,d.subData.att_date=e.sheets.Sheet1[a].Date,d.subData.att_shift1_in=e.sheets.Sheet1[a].Shift1_In,d.subData.att_shift1_out=e.sheets.Sheet1[a].Shift1_Out,d.subData.att_shift2_in=e.sheets.Sheet1[a].Shift2_In,d.subData.att_shift2_out=e.sheets.Sheet1[a].Shift2_Out,d.sheetsData.push(d.subData);n.post(i.apiUrl+"api/EmpAttendanceDailyController/PersEmnumber",d.sheetsData).then(function(e){d.em_numbers=e.data,d.datasend=[];for(var t=0;d.em_numbers.length>t;t++)d.em_numbers[t].emp_id_flag?(d.em_numbers[t].fcolor="black",d.modalbusy=!1):(d.em_numbers[t].fcolor="red",d.modalbusy=!1,d.errorlabel=!0)}),d.sheetName={sheet:"Sheet1"};$("#sheet_name").val("a")}else d.sheets="",swal({title:"Document Upload Failed,Does not match Column"}),d.busy=!1,d.modalbusy=!1}),t={method:"POST",url:i.apiUrl+"/api/file/uploadDocument?filename="+d.filename.name+c("date")(new Date,"dd-MM-yyyy")+"-"+c("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(i.apiUrl+"api/document/insertdoc",e).then(function(e){d.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)}),d.CheckMultiple())},d.RemarkKeyUp=function(e,t,a){0d.pageCount()-5?d.pageCount()-5+1:t;a"),$(t.currentTarget).parents("tr").after(i)}}])}(),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,d,i){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,d.get(i.apiUrl+"api/OverTimeRate/getformuladesc").then(function(e){n.formuladesc=e.data}),d.get(i.apiUrl+"api/PDCSubmission/GetComp_Name?username="+t.globals.currentUser.username).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,d.get(i.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),d.post(i.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),d.post(i.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(d.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(d.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")?d.get(i.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)):d.get(i.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=[],d.get(i.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="",d.get(i.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)}d.post(i.apiUrl+"api/Qualification/CUDQualification?year=",t).then(function(e){s.msg1=e.data,swal({text:s.msg1.strMessage,timer:5e3}),s.display=!1,d.get(i.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?d.post(i.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};d.get(i.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}):d.get(i.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(i),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),d.get(o.apiUrl+"api/JVCreation/GetReportUrl?opr=J&sub_opr=SRI").then(function(e){s.final_doc_url=e.data}),d.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"+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){e&&(e=new Blob([document.getElementById("printdata3").innerHTML],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"}),saveAs(e,n.obj1.lic_school_name+n.acct_name+"_SLQueryDetails.xls"))})},n.back=function(){n.report_show=!0},n.report_show=!0,n.Report=function(){n.report_show=!1,d.get(i.apiUrl+"api/JVCreation/GetDocReportUrl?opr=J&sub_opr=Doc_URL&comp_code="+c+"&fyear="+_+"&condition="+n.docCode1+"&condition1=&condition2=&condition3=&condition4=&condition5=").then(function(e){n.final_doc_urlNew=e.data;e={location:n.final_doc_urlNew,parameter:{comp_detail:c,doc_code:n.docCode1,doc_no:n.provNo1},state:"main.Fin123"};window.localStorage.ReportDetails=JSON.stringify(e);try{n.rpt=JSON.parse(window.localStorage.ReportDetails),n.location=n.rpt.location,n.parameter=n.rpt.parameter,n.state=n.rpt.state}catch(e){}var e="SimsReports."+n.location+",SimsReports",t=s.GetRpt_url();console.log(t),n.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:n.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)})},n.data_option=function(){n.block1.date_option="1"},n.onChange1=function(){"3"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")),"4"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"5"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").endOf("week").format("DD-MM-YYYY")),"6"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"week").endOf("week").format("DD-MM-YYYY")),"7"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"8"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")),"9"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")),"10"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").month("September").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").add("year",1).month("August").endOf("month").format("DD-MM-YYYY")),"11"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract("year",1).month("September").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").month("August").startOf("month").format("DD-MM-YYYY")),"12"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY")),"13"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.FromDate=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.FromDate,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),n.edt.ToDate=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.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.edt.FromDate=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.FromDate,"DD-MM-YYYY").subtract(1,"quarter").endOf("quarter").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"15"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"16"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"17"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),n.edt.FromDate=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"18"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"19"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"20"==n.block1.date_option&&(n.current_Quatar_from_date=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),n.edt.FromDate=moment(n.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"21"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"22"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY")),"23"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY")),"24"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"week").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"week").endOf("week").format("DD-MM-YYYY")),"25"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").add(4,"week").startOf("week").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").add(4,"week").endOf("week").format("DD-MM-YYYY")),"26"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"month").startOf("month").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"month").endOf("month").format("DD-MM-YYYY")),"27"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"year").startOf("year").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").add(1,"year").endOf("year").format("DD-MM-YYYY")),"28"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(30,"days").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"29"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(60,"days").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"30"==n.block1.date_option&&(n.edt.FromDate=moment(n.FromDate,"DD-MM-YYYY").subtract(90,"days").format("DD-MM-YYYY"),n.edt.ToDate=moment(n.FromDate,"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.block1.from_date,"DD-MM-YYYY").format("YYYY-MM-DD");moment(t)"),$(t.currentTarget).parents("tr").after(i),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}),d.temp.PostDate="")},d.AddintoGrid=function(t){if(t)if(null!=d.edt.gldd_tax_amount&&""!=d.edt.gldd_tax_amount&&null!=d.edt.gldd_tax_amount||(d.edt.gldd_tax_amount=0),d.flag1=!1,null==d.edt.gldd_acct_code||""==d.edt.gldd_acct_code)d.flag1=!0,swal({title:"Alert",text:"Please select Account name",showCloseButton:!0,width:380});else if(null==d.edt.gldd_doc_amount||""==d.edt.gldd_doc_amount)d.flag1=!0,swal({title:"Alert",text:"Please Enter Amount",showCloseButton:!0,width:380});else if(null==d.edt.slma_pty_bank_id||""==d.edt.slma_pty_bank_id)d.flag1=!0,swal({title:"Alert",text:"Please select bank name",showCloseButton:!0,width:380});else if(null==d.edt2||""==d.edt2.chequeno1||null==d.edt2.chequeno1)d.flag1=!0,swal({title:"Alert",text:"Please Enter Cheque Number",showCloseButton:!0,width:380});else if(null==d.temp1.ChequeDate||""==d.temp1.ChequeDate)d.flag1=!0,swal({title:"Alert",text:"Please Enter Cheque Date",showCloseButton:!0,width:380});else if(d.flag1=!1,!d.flag1){let e="";var t=document.getElementById("bankName"),t=t.options[t.selectedIndex].text,a=document.getElementById("cmb_acc_Code"),a=(d.selectedText=a.options[a.selectedIndex].text,document.getElementById("cmb_vat_Code"));d.selectedText_vat=a.options[a.selectedIndex].text,null==d.edt.gldd_doc_narr&&(d.edt.gldd_doc_narr=""),d.gldd_doc_narr1=d.edt.gldd_doc_narr,e=null==d.edt.sllc_ldgr_code||""==d.edt.sllc_ldgr_code?"00":d.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(d.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+s.block1.pdc_clearance_date+"&comp_cd="+c+"&fyear="+r).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 p=[],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,d,i){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,c=(n.finnDetail=JSON.parse(window.localStorage.Finn_comp),setTimeout(function(){$("#account_codes7").select2()},100),n.finnDetail.company),_=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},d.get(i.apiUrl+"api/Financialyear/getDocumentStatus").then(function(e){n.docstatus_Data=e.data}),d.get(i.apiUrl+"api/PDCSubmission/getBankName?comp_code="+c).then(function(e){n.bank_name=e.data,setTimeout(function(){$("#Select4").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),d.get(i.apiUrl+"api/PDCSubmission/GetCreatedBy_user").then(function(e){n.user_list=e.data}),d.get(i.apiUrl+"api/PDCSubmission/getDepartment?finance_year="+_+"&comp_code="+c).then(function(e){n.Department=e.data}),d.get(i.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+_+"&comp_code="+c).then(function(e){n.LdgrCode=e.data}),d.get(i.apiUrl+"api/JVCreation/GetAllGLActNo_pdc_sub?glma_accountcode=&cmpnycode="+c+"&fyear="+_+"&user="+s).then(function(e){n.getAllAccNos=e.data}),n.getSLAccNo=function(){var e=n.getAllAccNos.gldd_acct_code;"00"!==n.block1.gldd_ledger_code?d.get(i.apiUrl+"api/JVCreation/GetSLAccNumber?ldgr_code="+n.block1.gldd_ledger_code+"&cmp_cd="+c+"&year="+_).then(function(e){n.getAllAccNos=e.data}):d.get(i.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+c+"&fyear="+_+"&user="+s).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:c,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};d.post(i.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,d){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,i=a.getDate(),c=a.getMonth()+1,r=a.getFullYear();o.temp={enddate1:i+"-"+c+"-"+r},o.finnDetail=JSON.parse(window.localStorage.Finn_comp);var i=(a=new Date).getDate(),c=a.getMonth()+1,i=(a.getFullYear(),(a=new Date).getDate()),l=t.globals.currentUser.username;i<10&&(i="0"+i);(c=a.getMonth()+1)<10&&(c="0"+c);r=a.getFullYear(),o.sdate=i+"-"+c+"-"+r,o.edate=i+"-"+c+"-"+r,o.startdate=i+"-"+c+"-"+r,o.mom_end_date=i+"-"+c+"-"+r,o.finnDetail.company,a=o.finnDetail.year,i=new Date,c=i.getMonth()+1,r=i.getDate(),o.currentDate=(r=r<10?"0"+r:r)+"-"+(c=c<10?"0"+c:c)+"-"+i.getFullYear(),o.Prepare=function(e,t,a){$("#loader").modal({backdrop:"static",keyboard:!1});n.get(d.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(c,e,t,a,o,s,_,r){t.globals.currentUser.username;c.finnDetail=JSON.parse(window.localStorage.Finn_comp);var l=c.finnDetail.company,n=c.finnDetail.year,d=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),m=t.getDate(),u=t.getMonth()+1,p=(u<10&&(u="0"+u),t.getFullYear());c.sdate=m+"-"+u+"-"+p,c.edate=m+"-"+u+"-"+p,c.temp1={startdate:m+"-"+u+"-"+p,enddate:m+"-"+u+"-"+p},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),c.total=0,_.get(r.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+l).then(function(e){c.Departments=e.data}),c.temp={chk_previous_clear:!0},c.ClearPreviousChange=function(e){},c.ShowFilterText=function(e){c.filterVisible=""!==e},$(function(){$("#app_on1").multipleSelect({width:"100%"})}),_.get(r.apiUrl+"api/AdmissionFees/getBankDeatails").then(function(e){c.AllBankNames=e.data,setTimeout(function(){$("#app_on1").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),setTimeout(function(){$("#cmb_acc_Code").select2()},100),c.myFunct=function(e){13===e.which&&(c.temp.startdate=m+"-"+u+"-"+p)},c.myFunct1=function(e){13===e.which&&(c.temp.enddate=m+"-"+u+"-"+p)},c.PooData=function(){var e,t;c.flag1=!1,null===c.temp1.startdate||""===c.temp1.startdate?(c.flag1=!0,swal({title:"Alert",text:"Please Select Start Date",showCloseButton:!0,width:380})):null!==c.temp1.enddate&&""!==c.temp1.enddate||(c.flag1=!0,swal({title:"Alert",text:"Please Select End Date",showCloseButton:!0,width:380})),c.flag||(e=c.temp1.startdate,t=c.temp1.enddate,_.get(r.apiUrl+"api/PDCBillOtherProcess/getPDC_Bills_Pool_data?compcode="+l+"&from_date="+e+"&to_date="+t).then(function(e){c.PoolData=e.data,swal({title:"Alert",text:c.PoolData,showCloseButton:!0,width:380})}))},_.get(r.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+n+"&comp_code="+l).then(function(e){c.LdgrCode=e.data}),_.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+l+"&fyear="+n+"&user="+d).then(function(e){c.getAllAccNos=e.data}),c.getSLAccNo=function(e){c.getAllAccNos=[],"00"===e||void 0===e?_.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+c.temp.payable_acc_code+"&cmpnycode="+l+"&fyear="+n+"&user="+d).then(function(e){c.getAllAccNos=e.data}):_.get(r.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+l+"&fyear="+n).then(function(e){c.getAllAccNos=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=void 0!==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=void 0!==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")}}}])}(),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,c,r){t.globals.currentUser.username;l.finnDetail=JSON.parse(window.localStorage.Finn_comp);var m=l.finnDetail.company,n=l.finnDetail.company,d=l.finnDetail.year,u=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),p=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());l.sdate=p+"-"+g+"-"+h,l.edate=p+"-"+g+"-"+h,l.temp1={startdate:p+"-"+g+"-"+h,enddate:p+"-"+g+"-"+h},o(function(){$("#fixTable").tableHeadFixer({top:1})},100),l.total=0,c.get(r.apiUrl+"api/PDCBillOtherProcess/GetDepartment?comp_code="+m).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,c.get(r.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=p+"-"+g+"-"+h)},l.myFunct1=function(e){13===e.which&&(l.temp.enddate=p+"-"+g+"-"+h)},c.get(r.apiUrl+"api/BankPayment/GetLedgerCodes?financialyear="+d+"&comp_code="+n).then(function(e){l.LdgrCode=e.data}),c.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+n+"&fyear="+d+"&user="+u).then(function(e){l.getAllAccNos=e.data}),l.GetAllGLAcc=function(e,t){c.get(r.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode="+e+"&cmpnycode="+n+"&fyear="+d+"&user="+u).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,m):c.get(r.apiUrl+"api/BankPayment/GetSLAccNumber?pbslcode="+e+"&cmp_cd="+n+"&fyear="+d).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(){c.get(r.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[c].pb_amount<=e[1]&&(document.getElementById(c).checked=!0,l.GetAllPDCBillsData[c].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 _=l.maxchkno=0;_=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,u=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),p=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());c.sdate=p+"-"+g+"-"+h,c.edate=p+"-"+g+"-"+h,c.temp1={startdate:p+"-"+g+"-"+h,enddate:p+"-"+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=p+"-"+g+"-"+h)},c.myFunct1=function(e){13===e.which&&(c.temp.enddate=p+"-"+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+"&user="+u).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+"&user="+u).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(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,u=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),p=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),t.getFullYear());c.sdate=p+"-"+g+"-"+h,c.edate=p+"-"+g+"-"+h,c.temp1={startdate:p+"-"+g+"-"+h,enddate:p+"-"+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.index=function(e){c.pageindex=e,c.currentPage=e,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=p+"-"+g+"-"+h)},c.myFunct1=function(e){13==e.which&&(c.temp.enddate=p+"-"+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+"&user="+u).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+"&user="+u).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]=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=null!=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=null!=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("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,u=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),p=t.getDate(),g=t.getMonth()+1,h=(g<10&&(g="0"+g),p<10&&(p="0"+p),t.getFullYear());c.sdate=p+"-"+g+"-"+h,c.edate=p+"-"+g+"-"+h,c.temp1={startdate:p+"-"+g+"-"+h,enddate:p+"-"+g+"-"+h,ps_approv_date:p+"-"+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=p+"-"+g+"-"+h)},c.myFunct1=function(e){13==e.which&&(c.temp.enddate=p+"-"+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+"&user="+u).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+"&user="+u).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{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(d.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(d.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(d.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)&&(c.edt.FromDate="",swal({title:"Alert",text:"Please select date between "+c.sDate+" to "+c.eDate+" in financial year",showCloseButton:!0,width:380}))},c.onChange=function(){var e=moment(c.sDate,"DD-MM-YYYY").format("YYYY-MM-DD"),t=moment(c.edt.FromDate,"DD-MM-YYYY").format("YYYY-MM-DD");moment(t)"+t+''+a+""),s.close(),o.focus()},c.exportStaffResigned=function(){swal({title:"",text:"Are you sure you want to Save "+c.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,c.obj1.lic_school_name+c.acct_name+"_SLQueryDetails.xls"))})},c.back=function(){c.report_show=!0},_.get(r.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){c.Date_option=e.data}),c.data_option=function(){c.block1.date_option="1"},c.onChange1=function(){"3"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").endOf("month").format("DD-MM-YYYY")),"4"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"month").endOf("month").format("DD-MM-YYYY")),"5"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").endOf("week").format("DD-MM-YYYY")),"6"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"week").endOf("week").format("DD-MM-YYYY")),"7"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"8"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").endOf("year").format("DD-MM-YYYY")),"9"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"year").endOf("year").format("DD-MM-YYYY")),"10"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").month("September").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").add("year",1).month("August").endOf("month").format("DD-MM-YYYY")),"11"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract("year",1).month("September").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").month("August").startOf("month").format("DD-MM-YYYY")),"12"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"days").format("DD-MM-YYYY")),"13"==c.block1.date_option&&(c.current_Quatar_from_date=moment(c.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),c.edt.FromDate=moment(c.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),c.current_Quatar_to_date=moment(c.FromDate,"DD-MM-YYYY").endOf("quarter").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"14"==c.block1.date_option&&(c.current_Quatar_from_date=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),c.edt.FromDate=moment(c.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),c.current_Quatar_to_date=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"quarter").endOf("quarter").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.current_Quatar_to_date,"DD-MM-YYYY").add(2,"month").endOf("month").format("DD-MM-YYYY")),"15"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"16"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"17"==c.block1.date_option&&(c.current_Quatar_from_date=moment(c.FromDate,"DD-MM-YYYY").startOf("quarter").format("DD-MM-YYYY"),c.edt.FromDate=moment(c.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"18"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"19"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"year").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"20"==c.block1.date_option&&(c.current_Quatar_from_date=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"quarter").startOf("quarter").format("DD-MM-YYYY"),c.edt.FromDate=moment(c.current_Quatar_from_date,"DD-MM-YYYY").add(2,"month").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"21"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"week").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"22"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").subtract(1,"month").startOf("month").format("DD-MM-YYYY")),"23"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").startOf("month").format("DD-MM-YYYY")),"24"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"week").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"week").endOf("week").format("DD-MM-YYYY")),"25"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").add(4,"week").startOf("week").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").add(4,"week").endOf("week").format("DD-MM-YYYY")),"26"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"month").startOf("month").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"month").endOf("month").format("DD-MM-YYYY")),"27"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"year").startOf("year").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").add(1,"year").endOf("year").format("DD-MM-YYYY")),"28"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(30,"days").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"29"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(60,"days").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY")),"30"==c.block1.date_option&&(c.edt.FromDate=moment(c.FromDate,"DD-MM-YYYY").subtract(90,"days").format("DD-MM-YYYY"),c.edt.ToDate=moment(c.FromDate,"DD-MM-YYYY").format("DD-MM-YYYY"))},c.report_show=!0,c.Report=function(){c.report_show=!1,_.get(r.apiUrl+"api/JVCreation/GetDocReportUrl?opr=J&sub_opr=Doc_URL&comp_code="+l+"&fyear="+m+"&condition="+c.docCode1+"&condition1=&condition2=&condition3=&condition4=&condition5=").then(function(e){c.final_doc_urlNew=e.data;e={location:c.final_doc_urlNew,parameter:{comp_detail:l,doc_code:c.docCode1,doc_no:c.provNo1},state:"main.Fin123"};window.localStorage.ReportDetails=JSON.stringify(e);try{c.rpt=JSON.parse(window.localStorage.ReportDetails),c.location=c.rpt.location,c.parameter=c.rpt.parameter,c.state=c.rpt.state}catch(e){}var e="SimsReports."+c.location+",SimsReports",t=s.GetRpt_url();console.log(t),c.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:c.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(d,e,t,n,a,i,c,_){d.pagesize="5",d.edt="",d.amount_difference=0,d.operation=!0,d.chkcost=!0,d.cost_combo=!0,d.doc_cd_prov_no="",d.doc_cd_final_doc_no="",d.block1=[],d.block2=[],d.block3=[],d.temp_doc=[],d.vis=[],d.vis.main=!0,d.vis.onchangedoccodeshow=!1,d.dramount=!1,d.cramount=!1,d.vis.doc_detail_grid=!0,d.vis.main_acct_grid=!0,d.save1=!0,d.vis.add_grid=!0,d.checkprintbtn=!1,d.vis.Add_show_hide=!0,d.prdocdata=[],d.cmb_doc_cd=[],d.vis.update=!1,d.doc_detail_data=[],d.chkcost=!1,d.block3.gldd_vat_enable=!1,d.block3.gldd_include_vat=!1,d.block3.gldd_doc_vat_amt=0,d.cost_combo=!1,d.readonly=!0,d.vis.ok=!0,d.vis.is_recur=!0,d.preparebtn=!0,d.verifybtn=!0,d.authorizebtn=!0,d.vis.cmb_acct=!0,d.vis.txt_acct=!1,d.dis_recur_date=!0,d.revdelete=!1,d.edt2=[],d.edt=[],d.voucher_report_show=!0;var r=(r=t.globals.currentUser.username).toLowerCase(),o=new FormData,l=(d.finnDetail=JSON.parse(window.localStorage.Finn_comp),d.finnDetail.company),m=d.finnDetail.year,u=d.finnDetail.comp_vat_per,p=d.finnDetail.comp_vat_status,g=d.finnDetail.input_vat_acct,h="",t=new Date,f=t.getDate(),y=t.getMonth()+1,b=(y<10&&(y="0"+y),t.getFullYear());d.block1={gltd_payment_date:f+"-"+y+"-"+b},setTimeout(function(){$("#cmb_acc_Code3").select2()},100),d.deleteReverted=function(){d.data=[];var e={gltd_doc_code:d.block1.gltd_doc_code,gltd_prov_doc_no:d.block1.gltd_prov_doc_no,gltd_comp_code:l};d.data.push(e),i.post(c.apiUrl+"api/JVCreation/revertedDelete",d.data).then(function(e){d.msg1=e.data,!0===d.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})})},i.get(c.apiUrl+"api/JVCreation/getLoggedUser").then(function(e){d.data=[],d.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){c.email_data=e.data,c.listColl[0].forEach(t=>{var e=c.email_data.find(e=>e.em_login_code===t.gldu_user_name_data);t.email=e?e.em_email:""})})})}),c.backCPN=function(){_.go("main.FINS19")},c.testData(),c.testDatadocs(),c.Bankdetails=[],c.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}),c.Update_temp_docs=function(){var e=[],t=(null==c.temp1&&(c.temp1=""),{gltd_comp_code:f,gltd_doc_code:c.temp_doc.gltd_doc_code,gltd_prov_doc_no:s.Class.prov_code,gltd_final_doc_no:c.final_doc_no,gltd_doc_date:c.docdata[0].gltd_doc_date,gltd_doc_narr:c.temp_doc.gltd_doc_narr,gltd_remarks:c.docdata[0].gltd_remarks,gltd_doc_flag:c.docdata[0].gltd_doc_flag,gltd_cur_status:c.docdata[0].gltd_cur_status,gltd_prepare_user:h,gltd_prepare_date:c.docdata[0].gltd_prepare_date,gltd_verify_user:c.docdata[0].gltd_verify_user,gltd_verify_date:c.docdata[0].gltd_verify_date,gltd_authorize_user:c.docdata[0].gltd_authorize_user,gltd_authorize_date:c.docdata[0].gltd_authorize_date,gltd_payment_user:c.docdata[0].gltd_payment_user,gltd_payment_date:c.docdata[0].gltd_payment_date,gltd_post_date:c.temp_doc.gltd_post_date,gltd_post_no:c.docdata[0].gltd_post_no,gltd_save_srl:c.temp.sims_dep,gltd_batch_source:c.docdata[0].gltd_batch_source,gltd_paid_to:c.temp_doc.gltd_paid_to,gltd_cheque_no:c.temp_doc.gltd_cheque_No,gltd_reference_doc_code:c.docdata[0].gltd_reference_doc_code,gltd_reference_final_doc_no:c.docdata[0].gltd_reference_final_doc_no,gltd_cheque_due_date:c.docdata[0].gltd_cheque_due_date,gltd_doc_path:c.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){c.prvno=e.data,""!=c.prvno&&null!=c.prvno?c.Update_Fins_temp_doc_details():swal({text:"Record Not inserted. "+c.prvno,imageUrl:"assets/img/close.png",width:300,height:200})})},c.Update_Fins_temp_doc_details=function(){for(var e,t=[],a=1,o=0;ot&&(t=c.dep_data[a].glma_dept_no,c.temp.sims_dep=t)}),c.vatFiledData=function(){r.get(l.apiUrl+"api/VATFiling/getAllVATFiledData1?from_date="+c.temp_doc.gltd_post_date+"&to_date="+c.temp_doc.gltd_post_date+"&search=null&comp_code="+f+"&financial_year="+y+"&vat_profile="+c.vat_code).then(function(e){c.filedData=e.data,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{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{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{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{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;oc.main5?(c.debiterrorBEW=!0,c.debiterrorBES=!1,c.crediterrorBES=!1,c.crediterrorBEW=!1,c.dvalue=!0,c.cvalue=!0):(c.debiterrorBEW=!1,c.debiterrorBES=!1,c.crediterrorBES=!1,c.crediterrorBEW=!1,c.dvalue=!1,c.cvalue=!1)):0c.main5?(c.crediterrorBEW=!0,c.debiterrorBEW=!1,c.debiterrorBES=!1,c.crediterrorBES=!1,c.dvalue=!0,c.cvalue=!0):(c.crediterrorBEW=!1,c.debiterrorBEW=!1,c.debiterrorBES=!1,c.crediterrorBES=!1,c.dvalue=!1,c.cvalue=!1)):"BES"==c.comp_enable_budget&&0c.main5?(c.debiterrorBES=!0,c.debiterrorBEW=!1,c.crediterrorBES=!1,c.crediterrorBEW=!1,c.dvalue=!0,c.cvalue=!0):(c.debiterrorBES=!1,c.crediterrorBES=!1,c.debiterrorBEW=!1,c.crediterrorBEW=!1,c.dvalue=!1,c.cvalue=!1)):0c.main5?(c.crediterrorBES=!0,c.debiterrorBES=!1,c.debiterrorBEW=!1,c.crediterrorBEW=!1,c.dvalue=!0,c.cvalue=!0):(c.crediterrorBES=!1,c.debiterrorBES=!1,c.debiterrorBEW=!1,c.crediterrorBEW=!1,c.dvalue=!1,c.cvalue=!1)))},c.Add_inner_grid=function(){c.chkcost=!1,c.cost_combo=!1,c.temp={cost_chk_ac:!1};let e="";if(null!=c.block3.gldd_acct_code){if(e=null==c.block3.gldd_ledger_code?"00":c.block3.gldd_ledger_code,""!=c.block3.gldd_doc_amount_debit&&null!=c.block3.gldd_doc_amount_debit&&"0.00"!=c.block3.gldd_doc_amount_debit||(c.block3.gldd_doc_amount_debit="0.00"),""!=c.block3.gldd_doc_amount_credit&&null!=c.block3.gldd_doc_amount_credit&&"0.00"!=c.block3.gldd_doc_amount_credit||(c.block3.gldd_doc_amount_credit="0.00"),parseFloat(c.block3.gldd_doc_amount_debit)<=0&&parseFloat(c.block3.gldd_doc_amount_credit)<=0)return void swal({text:"Please Enter Debit/Credit Amount",width:380});var a=document.getElementById("cmb_acc_Code3");c.selectedText=a.options[a.selectedIndex].text;let t=!1;for(let e=0;eAn item has been assigned to you

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

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

Created by: ${h}

Narration: ${c.temp_doc.gltd_doc_narr}

School code: ${c.schoolId}

Total Debit: ${c.totalDebit}

Total Credit: ${c.totalcredit}

`,c.email_subject="Voucher Approval",c.p_email=c.listColl[0][e].email,c.email_cc="",a={email_message:c.email_msg,email_subject:c.email_subject,p_email:c.p_email,email_cc:c.email_cc,fin_year:y},(t=[]).push(a),r.post(l.apiUrl+"api/JVCreation/VoucherSendEmail",t).then(function(e){}))},c.Insert_temp_docs=function(){if(""!=c.temp_doc.gltd_doc_code&&null!=c.temp_doc.gltd_doc_code)if(""==c.temp_doc.gltd_post_date||null==c.temp_doc.gltd_post_date)swal({text:" please select Post Date ",width:380});else if(c.prdocdata.length<=0)swal({text:" Please Add Transaction Details ",width:380});else if(c.totalDebit!=c.totalcredit)swal({text:"Debit Amount: "+c.totalDebit+" Is Not Equal To Credit Amount: "+c.totalcredit,width:380});else if(!0!==c.temp_doc.chk_recur||"0"!=c.temp_doc.gltd_recur_period&&""!=c.temp_doc.gltd_recur_period&&null!=c.temp_doc.gltd_recur_period){var e=[];A=!0===E?"Aut":!0===B?"Verify":"Save",null==c.temp&&(c.temp=""),!0===c.temp_doc.chk_recur&&(c.chk_rcur="R");for(var t=0;te.gldd_acct_code),!1===c.chk_conditions)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===c.chk_conditions&&(c.totalcredit<=0||c.totalcredit<="0")&&(c.totalDebit<=0||c.totalDebit<="0"))return void swal({text:"Please Enter Amount",width:380})}var a={gltd_comp_code:f,gltd_prepare_user:h,gltd_doc_code:c.temp_doc.gltd_doc_code,gltd_doc_date:c.temp_doc.gltd_doc_date,gltd_cur_status:A,gltd_save_srl:c.temp.sims_dep,gltd_app_name:"JCN160",gltd_post_date:c.temp_doc.gltd_post_date,gltd_doc_narr:c.temp_doc.gltd_doc_narr,gltd_remarks:c.temp_doc.gltd_remarks,gltd_prepare_date:c.temp_doc.gltd_doc_date,gltd_final_doc_no:"0",gltd_verify_user:h,gltd_verify_date:!0===B?c.temp_doc.gltd_doc_date:null,gltd_authorize_user:!0===E?h:null,gltd_authorize_date:!0===E?c.temp_doc.gltd_doc_date:null,gltd_paid_to:c.block1.gltd_paid_to,gltd_cheque_no:c.block1.gltd_cheque_No,gltd_batch_source:c.chk_rcur,gltd_payment_date:c.block1.gltd_payment_date};e.push(a),r.post(l.apiUrl+"api/BankPayment/Insert_Fins_temp_docsFin2",e).then(function(e){c.prvno=e.data,""!=c.prvno&&null!=c.prvno?(c.Insert_Fins_temp_doc_details(),c.Docno="0"):swal({title:"Alert",text:"Record Not inserted. "+c.prvno,width:300,height:200})})}else swal({text:"Please Enter Recurring Period",width:380});else swal({text:" please select Doc Code ",width:380})},c.Docno="0",c.Insert_Fins_temp_doc_details=function(){let t=[],a=[],o=1,s=1;if("CN"!=c.cmb_doc_cd.gldc_doc_code_type)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)})}),c.showStatisticalData=function(){c.showStatistics=!0},c.handleTabKey=function(e,t,a,o){9===t.which&&a===e.length-1&&c.add_Grid(e,t,a,o)},c.doc_data=!1,c.ddt={},c.file_changed=function(e,t){if(10485760
"),$(t.currentTarget).parents("tr").after(u),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(d.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(d.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,d,i){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(i.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(i.apiUrl+"api/AssetDepreciation/getItemName?item_name="+e).then(function(e){o.getAsset_type=e.data})},n.get(i.apiUrl+"api/AssetDepreciation/getAssetType").then(function(e){o.asset_type_data=e.data}),n.get(i.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(i.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(i.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(d.apiUrl+"api/BankMaster/GetGLAccountNumber").then(function(e){s.GlACNO=e.data}),s.size=function(e){s.pagesize=e,s.currentPage=1,s.numPerPage=e,p.checked=!1,s.makeTodos()},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),p.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(d.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()),u.checked=!1},s.index=function(e){s.pageindex=e,s.currentPage=e,s.makeTodos(),u.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.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,d=[],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(i,e,t,a,o,c,r){i.pagesize="5",i.pageindex=0,i.save_btn=!0;i.Update_btn=!1,i.display=!1,i.table=!0,i.obj=[],i.autorise=[],i.finnDetail=JSON.parse(window.localStorage.Finn_comp);var l=i.finnDetail.company,s=i.finnDetail.year;c.get(r.apiUrl+"api/DocumentUser_PC/getDocumentUserDetails_PC?comp_code="+l+"&fyear="+s).then(function(e){i.docuser=e.data,i.totalItems=i.docuser.length,i.todos=i.docuser,i.makeTodos()}),c.get(r.apiUrl+"api/DocumentUser_PC/GetDepartment_PC?comp_code="+l+"&fyear="+s).then(function(e){i.dept=e.data}),c.get(r.apiUrl+"api/JVCreation/getDocCodeJV_DPS?comp_code="+l+"&finance_year="+s).then(function(e){i.geDocCode_jv=e.data}),i.size=function(e){i.pagesize=e,i.currentPage=1,i.numPerPage=e},i.index=function(e){i.pageindex=e,i.currentPage=e,i.makeTodos()},i.filteredTodos=[],i.currentPage=1,i.numPerPage=5,i.maxSize=5,i.makeTodos=function(){var e=parseInt(i.totalItems%i.numPerPage),e=(i.pagersize="0"==e?parseInt(i.totalItems/i.numPerPage):parseInt(i.totalItems/i.numPerPage)+1,(i.currentPage-1)*i.numPerPage),t=parseInt(e)+parseInt(i.numPerPage);i.filteredTodos=i.todos.slice(e,t)},i.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),d.flag=!1):($("#innerRow").css({display:"none"}),e.icon="fa fa-plus-circle",d.flag=!0)},d.getpartyclass=function(e){null!=e&&i.get(c.apiUrl+"api/common/SubLedgerMaster/GetAllPartyControlClass?comp_code="+l+"&fin_yr="+m+"&ledger_code="+e).then(function(e){d.partyclass_data=e.data})},d.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"))})},d.searchd=function(e,t){return _.filter(e,function(e){return u(e,t)})},d.search=function(){d.todos=d.searchd(d.subledger_data,d.searchText),d.totalItems=d.todos.length,d.currentPage="1",""==d.searchText&&(d.todos=d.subledger_data),d.makeTodos()},d.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,d){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 i=new Date,c=i.getDate(),r=i.getMonth()+1,c=(i.getFullYear(),(i=new Date).getDate());t.globals.currentUser.username;c<10&&(c="0"+c);(r=i.getMonth()+1)<10&&(r="0"+r);var l,m,u,p,g,i=i.getFullYear(),h=(n.sdate=c+"-"+r+"-"+i,n.edate=c+"-"+r+"-"+i,n.from_date=c+"-"+r+"-"+i,n.mom_end_date=c+"-"+r+"-"+i,n.finnDetail.company),f=n.finnDetail.year;function y(e){(e=e||window.event).preventDefault(),p=e.clientX,g=e.clientY,document.onmouseup=v,document.onmousemove=b}function b(e){(e=e||window.event).preventDefault(),m=p-e.clientX,u=g-e.clientY,p=e.clientX,g=e.clientY,l.style.top=l.offsetTop-u+"px",l.style.left=l.offsetLeft-m+"px"}function v(){document.onmouseup=null,document.onmousemove=null}s.get(d.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(d.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data}),s.get(d.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(d.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(d.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(d.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(d.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=p=u=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,d){c.edt={};var i=new Date,r=(c.get_date=i).getDate(),l=(r<10&&(r="0"+r),i.getMonth()+1),i=(l<10&&(l="0"+l),i.getFullYear()),m=(c.check_today=r+"-"+l+"-"+i,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,d,i){n.edt={},n.groupedData={};var c=new Date,_=(n.get_date=c).getDate(),r=(_<10&&(_="0"+_),c.getMonth()+1),c=(r<10&&(r="0"+r),c.getFullYear()),l=(n.from_date=_+"-"+r+"-"+c,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(d.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(d.apiUrl+"api/TrialBalanceVer3/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data,s.get(d.apiUrl+"api/Trialbalv/Getgetdate?opr=C").then(function(e){n.date_range=e.data.table,n.edt.date_option="10",n.onChange1()}),s.get(d.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 p,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,d){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(d.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(d.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(d.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(),p.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(d.apiUrl+"api/GoalTarget/getGoalName").then(function(e){s.goal_Name=e.data,console.log(s.goal_Name)}),n.get(d.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(d.apiUrl+"api/Goal/Get_revision_type").then(function(e){s.Revision_type=e.data,console.log(s.Revision_type)}),n.get(d.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(),u.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:d.dt.sims_from_date};console.log("obj",s),i.post(c.apiUrl+"api/StudentReport/CUDEmployeeAbsentStudentList?data1="+JSON.stringify(s),t).then(function(e){d.msg1=e.data,null==d.msg1.strMessage||null==d.msg1.strMessage&&""==d.msg1.strMessage&&null==d.msg1.strMessage||(swal({title:"Alert",text:d.msg1.strMessage,width:380,height:200}),d.Reset(),d.currentPage=!0)})}if(1==d.edt1.sims_send_alert&&null!=d.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[p].el_maximum_days)?(T=$-parseInt(E.leaveInfo[p].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].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[p].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[p].el_maximum_days)?(I=parseInt(T)-parseInt(E.leaveInfo[p].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(I)-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[p].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(I)>parseInt(E.leaveInfo[p].el_maximum_days)?(A=parseInt(I)-parseInt(E.leaveInfo[p].el_maximum_days),h=moment(v,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].el_maximum_days)-1,"days").format("DD-MM-YYYY"),f=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(A)-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[p].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:u,lt_days:A,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(I),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:_,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[p].el_days_taken)!=parseInt(E.leaveInfo[p].el_maximum_days)&&"2"==E.leaveInfo[p].cl_display_order){parseInt(E.leaveInfo[p].el_days_taken)parseInt(E.leaveInfo[p].el_maximum_days)?(T=$-parseInt(E.leaveInfo[p].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].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[p].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[p].el_maximum_days)?(I=parseInt(T)-parseInt(E.leaveInfo[p].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=moment(E.edt.lt_end_date,"DD-MM-YYYY").subtract(parseInt(I)-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[p].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(I)>parseInt(E.leaveInfo[p].el_maximum_days)?(A=parseInt(I)-parseInt(E.leaveInfo[p].el_maximum_days),h=moment(v,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].el_maximum_days)-1,"days").format("DD-MM-YYYY"),f=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:u,lt_days:parseInt(E.leaveInfo[p].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:u,lt_days:parseInt(I),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[p].el_days_taken)!=parseInt(E.leaveInfo[p].el_maximum_days)&&"3"==E.leaveInfo[p].cl_display_order){parseInt(E.leaveInfo[p].el_days_taken)parseInt(E.leaveInfo[p].el_maximum_days)?(T=$-parseInt(E.leaveInfo[p].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].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[p].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[p].el_maximum_days)?(I=parseInt(T)-parseInt(E.leaveInfo[p].el_maximum_days),b=moment(C,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].el_maximum_days)-1,"days").format("DD-MM-YYYY"),v=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:u,lt_days:parseInt(E.leaveInfo[p].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:u,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[p].el_days_taken)!=parseInt(E.leaveInfo[p].el_maximum_days)&&"4"==E.leaveInfo[p].cl_display_order){parseInt(E.leaveInfo[p].el_days_taken)parseInt(E.leaveInfo[p].el_maximum_days)?(T=$-parseInt(E.leaveInfo[p].el_maximum_days),k=moment(S,"DD-MM-YYYY").add(parseInt(E.leaveInfo[p].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:u,lt_days:parseInt(E.leaveInfo[p].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:u,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[p].el_days_taken)!=parseInt(E.leaveInfo[p].el_maximum_days)&&"5"==E.leaveInfo[p].cl_display_order){parseInt(E.leaveInfo[p].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){d=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},u.get(p.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,u.get(p.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 d=parseFloat(m.SelectedFees[n].FPamt)-parseFloat(d)-parseFloat(m.pd[s].FPamt),i=(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,{});i.ref=m.SelectedFees[n].$$hashKey,i.pno=m.SelectedFees[n].pno,i.feeNumber=m.SelectedFees[n].feeNumber,i.ID=m.SelectedFees[n].ID,i.flag=!1,i.FD=m.SelectedFees[n].FD,i.enroll=m.SelectedFees[n].enroll,i.studCurr=m.SelectedFees[n].studCurr,i.studAcademic=m.SelectedFees[n].studAcademic,i.studGrade=m.SelectedFees[n].studGrade,i.studSection=m.SelectedFees[n].studSection,i.mode={},i.chqNo="NA",i.isSplitted=!1,i.chqBank="NA",i.chqDate=null,i.trxID="NA",i.sr=m.SelectedFees.length+1,i.ExpAmt=parseFloat(m.SelectedFees[n].studBalanceAMT),i.FPamtORG=parseFloat(m.SelectedFees[n].studBalancePayingAMT),i.FPamt=parseFloat(d),i.FPamtINT=parseFloat(d),i.FeeCat=m.SelectedFees[n].FeeCat,i.FeeCode=m.SelectedFees[n].FeeCode,m.SelectedFees.push(i),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},u.get(p.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(d.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(d.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(d.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(d.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 i=!(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,d){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 i(){n.get(d.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(d.apiUrl+"api/ERP/Grade/getCompany").then(function(e){s.getCompanyCode=e.data,s.edt.comp_code=s.getCompanyCode[0].comp_code}),n.get(d.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(d.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(d.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(d.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,d,i){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=i("date")(new Date,"dd-MM-yyyy"),a.temp.em_dept_effect_from=i("date")(new Date,"dd-MM-yyyy"),a.temp.em_grade_effect_from=i("date")(new Date,"dd-MM-yyyy"),n.get(d.apiUrl+"api/HRMS/getRole").then(function(e){a.roles_data=e.data}),n.get(d.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(d.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(d.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(d.apiUrl+"api/HRMS/getCountry").then(function(e){a.country_data=e.data}),a.getDestination=function(){n.get(d.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=d.docUrl+n.defaults.headers.common.schoolId+"/Images/EmployeeImages/";var c=new FormData;a.getTheFiles=function(e){angular.forEach(e,function(e,t){c.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&&(i.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)),i.pays_doc_empl_id=e.pays_doc_empl_id,i.pays_doc_desc1=e.pays_doc_desc1,i.photo_filename_doc.split("/")[1]),o=(i.filename1=i.filename_doc+"."+e,[]),e=[];if(null==i.photo_filename_doc||""==i.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?(i.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},[]):(i.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),i.pays_doc_empl_id=e.pays_doc_empl_id,i.pays_doc_desc1=e.pays_doc_desc1,[]),a=[];if(null==i.photo_filename_doc||""==i.photo_filename_doc||null==i.photo_filename_doc){for(var s=0;s=i.temp.em_date_of_join&&(swal({title:"Alert",text:"Date Of Join Should greater than Date of Birth",width:300,height:200}),i.temp.em_date_of_join="")},i.checkPassport=function(){i.temp.em_passport_exp_datei.pageCount()-5?i.pageCount()-5+1:t;a_.pageCount()-5?_.pageCount()-5+1:t;a"+t+''+e+""),o.close(),a.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)},_.cancel=function(){if(_.temp={},_.temp1={},_.GetItems=[],_.itemList=[],_.rcbInternal=[],_.im_item_code1="",_.temp.paymentMode="CA",_.temp.provDate=_.current_date,_.cardpay=!1,_.bankShow=!1,_.chequeShow=!1,(_.doc_vat_total_amount=0)<_.rcbSalesType.length&&(_.temp.sal_type=_.rcbSalesType[2].sal_type),0<_.rcbDocType.length&&(_.temp.doc_type="02"),_.disableOnInvoiceReturn=!1,_.showPickInvoice=!1,_.showBtnOnInvoiceReturn=!1,_.disableReturnBtn=!1,_.disableSaveReturnBtn=!1,_.old_doc_prov_no_show=!1,(_.totalPMAmount=0)<_.paymodeList.length)for(var e=0;e<_.paymodeList.length;e++)_.paymodeList[e].payment_amount=""},_.getCategories=function(e){null==_.temp.subcategory_code&&(_.rcbItems=[]),""==_.temp.subcategory_code&&(_.rcbItems=[]),i.get(c.apiUrl+"api/Sales_Doc/get_SubCategories?pc_parentcode="+e).then(function(e){_.rcbSubCategories=e.data})},_.getSubCategories=function(e){null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10"),i.get(c.apiUrl+"api/Sales_Doc/GetAllItemsInSubCategoryByDepartment?pc_code="+e+"&dept_code="+_.dept_code_mutiple).then(function(e){_.rcbItems=e.data})},_.qtychange=function(e){0parseInt(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),_.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)),_.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))))},_.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"})),_.totalAmtClick()},_.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"})),_.totalAmtClick()},_.getitemCode=function(t){console.log("str",t),_.im_item_vat_percentage=t.im_item_vat_percentage,i.get(c.apiUrl+"api/Sales_Doc/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+_.temp.gcode).then(function(e){_.resitem=e.data[0],_.item_dept_code=t.dep_code,_.im_revenue_acno=_.resitem.im_revenue_acno,_.im_cost_acno=_.resitem.im_cost_acno,_.im_vat_sale_profile=_.resitem.im_vat_sale_profile,"02"==_.temp.doc_type?(_.temp.qty=1,_.temp.im_sell_price_including_vat=_.resitem.im_sell_price_including_vat,_.temp.im_sell_price=_.resitem.im_sell_price,_.temp.finalValue=0):(_.temp.qty=1,0==parseFloat(_.resitem.im_sell_price)?(_.sellPriceInclusiveVat=!1,_.temp.finalValue=+parseFloat(_.resitem.im_sell_price_including_vat),_.temp.im_sell_price=_.resitem.im_sell_price_including_vat):(_.temp.finalValue=+parseFloat(_.resitem.im_sell_price),_.temp.im_sell_price=_.resitem.im_sell_price,_.sellPriceInclusiveVat=!0)),_.temp.im_item_vat_percentage=_.resitem.im_item_vat_percentage,i.get(c.apiUrl+"api/Sales_Doc/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(e){_.resloc=e.data,0<_.resloc.length&&(_.temp.loc_code=_.resloc[0].loc_code),_.temp.gcode=t.sg_name,null!=_.temp.enroll&&(_.disable_btn1=!1)})})},_.add=function(){var e,t,a,o=0;setTimeout(function(){_.Scroll()},700),""!=_.im_item_code1.im_inv_no&&null!=_.im_item_code1.im_inv_no&&(_.totalFinal=0,_.flg=!1,0==_.flg)&&(t=(1==_.sellPriceInclusiveVat?(a=parseFloat(_.temp.im_item_vat_percentage)/100,e=(parseFloat(_.temp.finalValue)/(1+parseFloat(a))).toFixed(2),a=(parseFloat(_.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=t=parseFloat(_.temp.finalValue)-e,parseFloat(parseFloat(e)+parseFloat(t))):(o=parseFloat(_.temp.finalValue*_.temp.im_item_vat_percentage/100),e=parseFloat(_.temp.finalValue).toFixed(2),a=parseFloat(_.temp.finalValue).toFixed(2),parseFloat(parseFloat(_.temp.finalValue)+parseFloat(o)))).toFixed(2),a="02"==_.temp.doc_type?{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:_.temp.gcode,im_inv_no:_.im_item_code1.im_inv_no,im_item_code:_.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:_.temp.loc_code,original_qty:_.resitem.original_qty,dd_qty:_.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:_.temp.doc_remark,im_item_vat_percentage:_.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(_.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:_.sellPriceInclusiveVat,item_dept_code:_.item_dept_code,im_revenue_acno:_.im_revenue_acno,im_cost_acno:_.im_cost_acno,im_vat_sale_profile:_.im_vat_sale_profile}:{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:_.temp.gcode,im_inv_no:_.im_item_code1.im_inv_no,im_item_code:_.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:_.temp.loc_code,original_qty:_.resitem.original_qty,dd_qty:_.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:_.temp.doc_remark,im_item_vat_percentage:_.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(_.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:_.sellPriceInclusiveVat,item_dept_code:_.item_dept_code,im_revenue_acno:_.im_revenue_acno,im_cost_acno:_.im_cost_acno,im_vat_sale_profile:_.im_vat_sale_profile},_.itemList.push(a)),_.totalAmtClick(),_.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var e=0;e<_.itemList.length;e++)$("#cmb_accno-"+e).select2(),$("#cmb_costaccno-"+e).select2(),$("#vat_profile-"+e).select2()},500),setTimeout(function(){for(var e=0;e<_.itemList.length;e++)$("#cmb_accno-"+e).select2("val",_.itemList[e].im_revenue_acno),$("#cmb_costaccno-"+e).select2("val",_.itemList[e].im_cost_acno),$("#vat_profile-"+e).select2("val",_.itemList[e].im_vat_sale_profile)},500)},_.finalize=function(t){if(_.count=0,_.totalRequests=_.itemList.length,_.completedRequests=0,t)for(var e=0;e<_.itemList.length;e++){var a=_.itemList[e].im_inv_no;i.get(c.apiUrl+"api/Sales_Doc/getdatacheck?im_inv_no="+a+"&imo_period_code="+parseInt(r,10)+"&imo_year="+l).then(function(e){0==e.data?(_.completedRequests++,_.count++,swal({title:"Alert",text:"Monthly Stock processing not done",width:300,height:200})):1==e.data&&(_.completedRequests++,_.finalize1(t))})}},_.finalize1=function(e){if(_.disable_btn=!0,_.disable_btn1=!0,_.completedRequests===_.totalRequests&&e&&0===_.count){for(var t=_.paymentAmountTotal=0;t<_.paymodeList.length;t++)""!=_.paymodeList[t].payment_amount&&null!=_.paymodeList[t].payment_amount&&(_.paymentAmountTotal+=parseFloat(_.paymodeList[t].payment_amount));if(console.log("paymentAmountTotal",_.paymentAmountTotal),"CA"==_.temp.payment_type&&_.paymentAmountTotal!=parseFloat(_.temp.totalFinal))swal({title:"Alert",text:"Payment amount should be same as total amount !",imageUrl:"assets/img/notification-alert.png"});else{console.log(_.temp.enroll),null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10");for(t=0;t<_.paymodeList.length;t++)"ca"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.cashAmount=_.paymodeList[t].payment_amount),"ch"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.checkAmount=_.paymodeList[t].payment_amount),"cc"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.creditCardAmount=_.paymodeList[t].payment_amount),"dd"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.demandDraftAmount=_.paymodeList[t].payment_amount),"bt"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.bankTransferAmount=_.paymodeList[t].payment_amount),"cp"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.cardPaymentAmount=_.paymodeList[t].payment_amount);for(t=0;t<1;t++){var a=_.itemList[t].req_no;_.itemList[t].im_inv_no}e={dep_code:_.salesmanDeptCode,doc_prov_no:"",doc_prov_date:_.temp.provDate,dt_code:"IR",sm_code:_.salesman.sm_code,up_name:d.globals.currentUser.username,creation_user:d.globals.currentUser.username,sal_type:_.temp.sal_type,doc_total_amount:_.temp.totalFinal,doc_status:"2",cus_account_no:_.temp.enroll,doc_special_name:_.temp.special_nm,dep_code_caused_by:_.salesmanDeptCode,doc_order_ref_no:_.temp.oderRefNo,doc_other_charge_amount:_.temp.otherCharges,doc_discount_pct:_.temp.overalldis,doc_discount_amount:_.temp.disamt,creation_date:_.current_date,doc_date:_.temp.provDate,doc_narration:_.temp.doc_narration,doc_vat_total_amount:_.doc_vat_total_amount,doc_round_value:0,payment_type:_.temp.payment_type,doc_cash_amount:_.cashAmount,doc_check_amount:_.checkAmount,doc_credit_card_amount:_.creditCardAmount,doc_dd_amount:_.demandDraftAmount,doc_bank_transfer_amount:_.bankTransferAmount,doc_online_payment_amount:_.cardPaymentAmount,doc_reference_prov_no:a};console.log("data",e),i.post(c.apiUrl+"api/Sales_Doc/Insert_Sale_Documents_VAT_Leams",e).then(function(e){e.data;_.doc_prov_no=e.data,_.salesDetails=[];for(var t=0;t<_.itemList.length;t++){if(_.itemList[t].dd_qty>_.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==_.itemList[t].dd_qty)return void swal({title:"Alert",text:"Return quantity is 0.",imageUrl:"assets/img/notification-alert.png"});var a=_.temp.payment_type,a={dep_code:_.salesmanDeptCode,doc_prov_no:_.doc_prov_no,dd_line_no:t,dd_status:"C",dd_payment_mode:a,im_inv_no:_.itemList[t].im_inv_no,loc_code:_.itemList[t].loc_code,dd_sell_price:_.itemList[t].dd_sell_value_final,dd_sell_price_discounted:_.itemList[t].dd_line_discount_amount,dd_sell_price_final:0,dd_sell_value_final:_.itemList[t].dd_sell_price,dd_sell_cost_total:0,dd_qty:_.itemList[t].dd_qty,dd_outstanding_qty:0,dd_line_discount_pct:_.itemList[t].dd_line_discount_pct,dd_line_discount_amount:_.itemList[t].dd_line_discount_amount,dd_line_total:_.itemList[t].dd_sell_value_line_total,dd_physical_qty:_.itemList[t].original_qty,doc_remark:_.itemList[t].doc_remark,vat_flag:!1,dd_item_vat_per:_.itemList[t].im_item_vat_percentage,dd_item_vat_amount:_.itemList[t].dd_item_vat_amount,dd_cheque_number:_.temp.chequeNo,dd_cheque_date:_.temp.chequeDate,dd_cheque_bank_code:_.temp.bankCode,dd_demand_draft_number:_.temp.ddNo,dd_demand_draft_date:_.temp.ddDate,dd_demand_draft_bank_code:_.temp.ddbankCode,dd_credit_card_number:_.temp.creditCardNo,dd_credit_card_date:_.temp.creditCardDate,dd_credit_card_bank_code:_.temp.creditCardbankCode,dd_bank_transfer_trans_number:_.temp.btTransactionNo,dd_bank_transfer_trans_date:_.temp.btTransactionDate,dd_bank_transfer_trans_bank_code:_.temp.btTransactionbankCode,dd_online_payemnt_trans_number:_.temp.cradPayTransactionNo,im_revenue_acno:_.itemList[t].im_revenue_acno,im_cost_acno:_.itemList[t].im_cost_acno,im_vat_sale_profile:_.itemList[t].im_vat_sale_profile,doc_reference_prov_no:_.itemList[t].req_no,doc_no_have_previous:_.itemList[t].req_no};_.salesDetails.push(a)}i.post(c.apiUrl+"api/Sales_Doc/Return_Sale_Documents_Details1_VAT_SMSM",_.salesDetails).then(function(e){if(1==e.data){for(var t=[],a=0;a<_.pd.length;a++){var o={sds_comp_code:"1",sds_dep_code:_.itemList[0].item_dept_code,sds_doc_no:_.itemList[0].req_no,sds_line_no:a+1,sds_sm_code:_.salesman.sm_code,sds_dt_code:_.temp.doc_type,sds_payment_mode:_.pd[a].pmDescShort,sds_pay_mode_amount:_.pd[a].FPamt,sds_pay_mode_cheque_no:_.pd[a].chequeNo,sds_pay_mode_cheque_date:_.pd[a].chqDate,sds_pay_mode_cheque_bank_code:_.pd[a].chqBank};t.push(o)}i.post(c.apiUrl+"api/Sales_Doc/SalesDocumentsettlementEntry",t).then(function(e){_.pd=[];for(var t=_.total_amount_settle=0;t<_.paymodeList.length;t++)_.paymodeList[t].check=!1,_.paymodeList[t].count=""}),i.post(c.apiUrl+"api/Sales_Doc / SalesDocumentCreditEntry ? doc_prov_no = "+_.doc_prov_no).then(function(e){}),i.get(c.apiUrl+"api/Sales_Doc/get_status_parameter1").then(function(e){_.getparameter=e.data,"Y"==e.data[0].cp_value?i.post(c.apiUrl+"api/Sales_Doc/RetSalesDocumentFeesEntry?doc_prov_no="+_.doc_prov_no).then(function(e){}):swal({title:"Alert",text:" Book Fees Not Allowed To Update.",imageUrl:"assets/img/notification-alert.png"})}),swal({title:"Alert",text:" Record Inserted Successfully.",imageUrl:"assets/img/check.png"}),_.cancel()}else 0==e.data?(swal({title:"Alert",text:"Record Not Inserted .",imageUrl:"assets/img/notification-alert.png"}),_.disable_btn=!1,_.disable_btn1=!1):swal("Error-"+e.data);_.doc_vat_total_amount=0})})}}},_.pd=[],_.payment_check=function(e){if(e.check)"1"==e.pmType&&_.pd.push(e);else{e.count="",_.pd1=angular.copy(_.pd),_.pd=[];for(var t=0;t<_.pd1.length;t++)_.pd1[t].pmType!=e.pmType&&(_.pd1[t].i=t,_.pd.push(_.pd1[t]));_.$apply()}},_.blur_count=function(e){_.pd1=angular.copy(_.pd),_.pd=[];for(var t=0;t<_.pd1.length;t++)_.pd1[t].pmType!=e.pmType&&(_.pd1[t].i=t,_.pd.push(_.pd1[t]));for(var a=0;ao?_.store_issue_details[t].sublist1[a].issue_quantity=o:_.store_issue_details[t].sublist1[a].issue_quantity_dis=!0):(_.store_issue_details[t].sublist1[a].inner_disabled=!0,_.store_issue_details[t].sublist1[a].issue_quantity_dis=!0,_.store_issue_details[t].sublist1[a].remarks_dis=!0)}_.totalItems=_.store_issue_details.length,_.todos=_.store_issue_details;for(t=0;t<_.totalItems;t++)_.store_issue_details[t].icon="fa fa-plus-circle"}else swal({text:"Record not found. ",imageUrl:"assets/img/close.png",width:300,height:200})})},_.ItemSetSearch=function(){_.GetItems=[],_.temp1={},$("#itemSearch").modal("show"),_.itemsetflg=!0,_.temp1.im_assembly_ind=!0,_.temp1.category_code=_.rcbCategories[3].category_code,null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10"),_.temp1.invs021_dep_code=_.salesmanDeptCode,0<_.rcbCategories.length&&i.get(c.apiUrl+"api/Sales_Doc/get_SubCategories?pc_parentcode="+_.rcbCategories[3].category_code).then(function(e){if(_.rcbSubCategories=e.data,"04"==_.temp.sal_type)for(var t=0;t<_.rcbSubCategories.length;t++)_.rcbSubCategories[t].pc_grade_code==_.grade_code&&(_.temp1.subcategory_code=_.rcbSubCategories[t].subcategory_code);else _.temp1.subcategory_code="";i.get(c.apiUrl+"api/Sales_Doc/get_SubCategoriesnew?pc_parentcode="+_.rcbCategories[3].category_code+"&grade_code="+_.grade_code).then(function(e){_.rcbbSubCategories=e.data,_.temp1.subcategory_code=_.rcbbSubCategories[0].subcategory_code,i.post(c.apiUrl+"api/Sales_Doc/postgetItemSerch",_.temp1).then(function(e){0_.pageCount()-5?_.pageCount()-5+1:t;a"+t+''+e+""),o.close(),a.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)},_.cancel=function(){if(_.temp={},_.temp1={},_.GetItems=[],_.itemList=[],_.itemList_new=[],_.rcbInternal=[],_.im_item_code1="",_.temp.paymentMode="CA",_.temp.provDate=o,_.cardpay=!1,_.bankShow=!1,_.chequeShow=!1,(_.doc_vat_total_amount=0)<_.rcbSalesType.length&&(_.temp.sal_type=_.rcbSalesType[2].sal_type),0<_.rcbDocType.length&&(_.temp.doc_type="02"),_.disableOnInvoiceReturn=!1,_.showPickInvoice=!1,_.showBtnOnInvoiceReturn=!1,_.disableReturnBtn=!1,_.disableSaveReturnBtn=!1,_.old_doc_prov_no_show=!1,(_.totalPMAmount=0)<_.paymodeList.length)for(var e=0;e<_.paymodeList.length;e++)_.paymodeList[e].payment_amount=""},_.getCategories=function(e){null==_.temp.subcategory_code&&(_.rcbItems=[]),""==_.temp.subcategory_code&&(_.rcbItems=[]),i.get(c.apiUrl+"api/Sales_Doc/get_SubCategories?pc_parentcode="+e).then(function(e){_.rcbSubCategories=e.data})},_.getSubCategories=function(e){null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10"),i.get(c.apiUrl+"api/Sales_Doc/GetAllItemsInSubCategoryByDepartment?pc_code="+e+"&dept_code="+_.dept_code_mutiple).then(function(e){_.rcbItems=e.data})},_.qtychange=function(e){0parseInt(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)),_.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))))},_.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"})),_.totalAmtClick()},_.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"})),_.totalAmtClick()},_.getitemCode=function(t){_.im_item_vat_percentage=t.im_item_vat_percentage,i.get(c.apiUrl+"api/Sales_Doc/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+_.temp.gcode).then(function(e){_.resitem=e.data[0],_.item_dept_code=t.dep_code,_.im_revenue_acno=_.resitem.im_revenue_acno,_.im_cost_acno=_.resitem.im_cost_acno,_.im_vat_sale_profile=_.resitem.im_vat_sale_profile,"02"==_.temp.doc_type?(_.temp.qty=1,_.temp.im_sell_price_including_vat=_.resitem.im_sell_price_including_vat,_.temp.im_sell_price=_.resitem.im_sell_price,_.temp.finalValue=0):(_.temp.qty=1,0==parseFloat(_.resitem.im_sell_price)?(_.sellPriceInclusiveVat=!1,_.temp.finalValue=+parseFloat(_.resitem.im_sell_price_including_vat),_.temp.im_sell_price=_.resitem.im_sell_price_including_vat):(_.temp.finalValue=+parseFloat(_.resitem.im_sell_price),_.temp.im_sell_price=_.resitem.im_sell_price,_.sellPriceInclusiveVat=!0)),_.temp.im_item_vat_percentage=_.resitem.im_item_vat_percentage,i.get(c.apiUrl+"api/Sales_Doc/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(e){_.resloc=e.data,0<_.resloc.length&&(_.temp.loc_code=_.resloc[0].loc_code),_.temp.gcode=t.sg_name,null!=_.temp.enroll&&(_.disable_btn1=!1)})})},_.add=function(){for(var e,t,a,o=0,s=0,n=0;n<_.itemList_new.length;n++)s=parseFloat(s)+parseFloat(_.itemList_new[n].dd_sell_value_line_total);parseFloat(s)+parseFloat(_.temp.finalValue)>parseFloat(_.temp.totalFinal)?swal({title:"Alert",text:"Exchange Amt is more than Total Amt.",imageUrl:"assets/img/notification-alert.png"}):(setTimeout(function(){_.Scroll()},700),""!=_.im_item_code1.im_inv_no&&null!=_.im_item_code1.im_inv_no&&(_.totalFinal=0,_.totalFinal1=0,(_.flg=!1)===_.flg?(t=(!0===_.sellPriceInclusiveVat?(a=parseFloat(_.temp.im_item_vat_percentage)/100,e=(parseFloat(_.temp.finalValue)/(1+parseFloat(a))).toFixed(2),a=(parseFloat(_.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=t=parseFloat(_.temp.finalValue)-e,parseFloat(parseFloat(e)+parseFloat(t))):(o=parseFloat(_.temp.finalValue*_.temp.im_item_vat_percentage/100),e=parseFloat(_.temp.finalValue).toFixed(2),a=parseFloat(_.temp.finalValue).toFixed(2),parseFloat(parseFloat(_.temp.finalValue)+parseFloat(o)))).toFixed(2),a="02"==_.temp.doc_type?{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:_.temp.gcode,im_inv_no:_.im_item_code1.im_inv_no,im_item_code:_.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:_.temp.loc_code,original_qty:_.resitem.original_qty,dd_qty:_.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:_.temp.doc_remark,im_item_vat_percentage:_.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(_.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:_.sellPriceInclusiveVat,item_dept_code:_.item_dept_code,im_revenue_acno:_.im_revenue_acno,im_cost_acno:_.im_cost_acno,im_vat_sale_profile:_.im_vat_sale_profile}:{sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:_.temp.gcode,im_inv_no:_.im_item_code1.im_inv_no,im_item_code:_.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:_.temp.loc_code,original_qty:_.resitem.original_qty,dd_qty:_.temp.qty,dd_sell_price:a,dd_sell_value_final:e,doc_remark:_.temp.doc_remark,im_item_vat_percentage:_.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(_.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:_.sellPriceInclusiveVat,item_dept_code:_.item_dept_code,im_revenue_acno:_.im_revenue_acno,im_cost_acno:_.im_cost_acno,im_vat_sale_profile:_.im_vat_sale_profile},_.itemList_new.push(a)):swal("Exchnage Item Amount is more then Total Amount")),_.totalAmtClick1(),_.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var e=0;e<_.itemList.length;e++)$("#cmb_accno-"+e).select2(),$("#cmb_costaccno-"+e).select2(),$("#vat_profile-"+e).select2()},500),setTimeout(function(){for(var e=0;e<_.itemList.length;e++)$("#cmb_accno-"+e).select2("val",_.itemList[e].im_revenue_acno),$("#cmb_costaccno-"+e).select2("val",_.itemList[e].im_cost_acno),$("#vat_profile-"+e).select2("val",_.itemList[e].im_vat_sale_profile)},500))},_.finalize=function(e){if(_.disable_btn=!0,_.disable_btn1=!0,e){for(var t=_.paymentAmountTotal=0;t<_.paymodeList.length;t++)""!=_.paymodeList[t].payment_amount&&null!=_.paymodeList[t].payment_amount&&(_.paymentAmountTotal+=parseFloat(_.paymodeList[t].payment_amount));if("CA"==_.temp.payment_type&&_.paymentAmountTotal!=parseFloat(_.temp.totalFinal))swal({title:"Alert",text:"Payment amount should be same as total amount !",imageUrl:"assets/img/notification-alert.png"});else{null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10");for(t=0;t<_.paymodeList.length;t++)"ca"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.cashAmount=_.paymodeList[t].payment_amount),"ch"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.checkAmount=_.paymodeList[t].payment_amount),"cc"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.creditCardAmount=_.paymodeList[t].payment_amount),"dd"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.demandDraftAmount=_.paymodeList[t].payment_amount),"bt"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.bankTransferAmount=_.paymodeList[t].payment_amount),"cp"!=_.paymodeList[t].pmDescShort.toLowerCase()||null==_.paymodeList[t].payment_amount&&""==_.paymodeList[t].payment_amount&&0==_.paymodeList[t].payment_amount||(_.cardPaymentAmount=_.paymodeList[t].payment_amount);for(t=0;t<1;t++)var n=_.itemList[t].req_no;e={dep_code:_.salesmanDeptCode,doc_prov_no:"",doc_prov_date:_.temp.provDate,dt_code:"EX",sm_code:_.salesman.sm_code,up_name:d.globals.currentUser.username,creation_user:d.globals.currentUser.username,sal_type:_.temp.sal_type,doc_total_amount:_.temp.totalFinal,doc_status:"6",cus_account_no:_.temp.enroll,doc_special_name:_.temp.special_nm,dep_code_caused_by:_.salesmanDeptCode,doc_order_ref_no:_.temp.oderRefNo,doc_other_charge_amount:_.temp.otherCharges,doc_discount_pct:_.temp.overalldis,doc_discount_amount:_.temp.disamt,creation_date:o,doc_date:_.temp.provDate,doc_narration:_.temp.doc_narration,doc_vat_total_amount:_.doc_vat_total_amount,doc_round_value:0,payment_type:_.temp.payment_type,doc_cash_amount:_.cashAmount,doc_check_amount:_.checkAmount,doc_credit_card_amount:_.creditCardAmount,doc_dd_amount:_.demandDraftAmount,doc_bank_transfer_amount:_.bankTransferAmount,doc_online_payment_amount:_.cardPaymentAmount,doc_reference_prov_no:n};i.post(c.apiUrl+"api/ReturnSaleInvoice/Insert_Sale_Documents_VAT_Leams",e).then(function(e){e.data;_.doc_prov_no=e.data,_.salesDetails_new=[];for(var t=0;t<_.itemList_new.length;t++){if(_.itemList_new[t].dd_qty>_.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==_.itemList_new[t].dd_qty)return void swal({title:"Alert",text:"Return quantity is 0.",imageUrl:"assets/img/notification-alert.png"});var a=_.temp.payment_type,a={dep_code:_.salesmanDeptCode,doc_prov_no:_.doc_prov_no,dd_line_no:t,dd_status:"2",dd_payment_mode:a,im_inv_no:_.itemList_new[t].im_inv_no,loc_code:_.itemList_new[t].loc_code,dd_sell_price:_.itemList_new[t].dd_sell_price,dd_sell_price_discounted:_.itemList_new[t].dd_line_discount_amount,dd_sell_price_final:0,dd_sell_value_final:_.itemList_new[t].dd_sell_value_final,dd_sell_cost_total:0,dd_qty:_.itemList_new[t].dd_qty,dd_outstanding_qty:0,dd_line_discount_pct:_.itemList_new[t].dd_line_discount_pct,dd_line_discount_amount:_.itemList_new[t].dd_line_discount_amount,dd_line_total:_.itemList_new[t].dd_sell_value_line_total,dd_physical_qty:_.itemList_new[t].original_qty,doc_remark:_.itemList_new[t].doc_remark,vat_flag:!1,dd_item_vat_per:_.itemList_new[t].im_item_vat_percentage,dd_item_vat_amount:_.itemList_new[t].dd_item_vat_amount,dd_cheque_number:_.temp.chequeNo,dd_cheque_date:_.temp.chequeDate,dd_cheque_bank_code:_.temp.bankCode,dd_demand_draft_number:_.temp.ddNo,dd_demand_draft_date:_.temp.ddDate,dd_demand_draft_bank_code:_.temp.ddbankCode,dd_credit_card_number:_.temp.creditCardNo,dd_credit_card_date:_.temp.creditCardDate,dd_credit_card_bank_code:_.temp.creditCardbankCode,dd_bank_transfer_trans_number:_.temp.btTransactionNo,dd_bank_transfer_trans_date:_.temp.btTransactionDate,dd_bank_transfer_trans_bank_code:_.temp.btTransactionbankCode,dd_online_payemnt_trans_number:_.temp.cradPayTransactionNo,im_revenue_acno:_.itemList_new[t].im_revenue_acno,im_cost_acno:_.itemList_new[t].im_cost_acno,im_vat_sale_profile:_.itemList_new[t].im_vat_sale_profile,doc_reference_prov_no:_.itemList[t].req_no,doc_no_have_previous:_.itemList[t].req_no};_.salesDetails_new.push(a)}i.post(c.apiUrl+"api/ReturnSaleInvoice/Return_Sale_Documents_Details1_VAT_SMSM",_.salesDetails_new).then(function(e){if(!0===e.data){for(var t=[],a=0;a<_.itemList.length;a++){var o={doc_reference_prov_no:n,im_inv_no:_.itemList[a].im_inv_no};t.push(o)}i.post(c.apiUrl+"api/ReturnSaleInvoice/Update_Sale_Documents_Details",t).then(function(e){});for(var s=[],a=0;a<_.pd.length;a++){o={sds_comp_code:"1",sds_dep_code:_.itemList_new[0].item_dept_code,sds_doc_no:_.itemList_new[0].req_no,sds_line_no:a+1,sds_sm_code:_.salesman.sm_code,sds_dt_code:_.temp.doc_type,sds_payment_mode:_.pd[a].pmDescShort,sds_pay_mode_amount:_.pd[a].FPamt,sds_pay_mode_cheque_no:_.pd[a].chequeNo,sds_pay_mode_cheque_date:_.pd[a].chqDate,sds_pay_mode_cheque_bank_code:_.pd[a].chqBank};s.push(o)}i.post(c.apiUrl+"api/Sales_Doc/SalesDocumentsettlementEntry",s).then(function(e){_.pd=[];for(var t=_.total_amount_settle=0;t<_.paymodeList.length;t++)_.paymodeList[t].check=!1,_.paymodeList[t].count=""}),i.post(c.apiUrl+"api/Sales_Doc / SalesDocumentCreditEntry ? doc_prov_no = "+_.doc_prov_no).then(function(e){}),i.post(c.apiUrl+"api/ReturnSaleInvoice/update_saledocument?doc_prov_no="+_.doc_prov_no).then(function(e){}),i.get(c.apiUrl+"api/Sales_Doc/get_status_parameter1").then(function(e){_.getparameter=e.data,"Y"==e.data[0].cp_value?i.post(c.apiUrl+"api/Sales_Doc/RetSalesDocumentFeesEntry?doc_prov_no="+_.doc_prov_no).then(function(e){}):swal({title:"Alert",text:" Book Fees Not Allowed To Update.",imageUrl:"assets/img/notification-alert.png"})}),swal({title:"Alert",text:" Record Inserted Successfully.",imageUrl:"assets/img/notification-alert.png"}),_.cancel()}else!1===e.data?(swal({title:"Alert",text:"Record Not Inserted .",imageUrl:"assets/img/notification-alert.png"}),_.disable_btn=!1,_.disable_btn1=!1):swal("Error-"+e.data);_.doc_vat_total_amount=0})})}}},_.pd=[],_.payment_check=function(e){if(e.check)"1"==e.pmType&&_.pd.push(e);else{e.count="",_.pd1=angular.copy(_.pd),_.pd=[];for(var t=0;t<_.pd1.length;t++)_.pd1[t].pmType!=e.pmType&&(_.pd1[t].i=t,_.pd.push(_.pd1[t]));_.$apply()}},_.blur_count=function(e){_.pd1=angular.copy(_.pd),_.pd=[];for(var t=0;t<_.pd1.length;t++)_.pd1[t].pmType!=e.pmType&&(_.pd1[t].i=t,_.pd.push(_.pd1[t]));for(var a=0;ao?_.store_issue_details[t].sublist1[a].issue_quantity=o:_.store_issue_details[t].sublist1[a].issue_quantity_dis=!0):(_.store_issue_details[t].sublist1[a].inner_disabled=!0,_.store_issue_details[t].sublist1[a].issue_quantity_dis=!0,_.store_issue_details[t].sublist1[a].remarks_dis=!0)}_.totalItems=_.store_issue_details.length,_.todos=_.store_issue_details;for(t=0;t<_.totalItems;t++)_.store_issue_details[t].icon="fa fa-plus-circle"}else swal({text:"Record not found. ",imageUrl:"assets/img/close.png",width:300,height:200})})},_.ItemSetSearch=function(){_.GetItems=[],_.temp1={},$("#itemSearch").modal("show"),_.itemsetflg=!0,_.temp1.im_assembly_ind=!0,_.temp1.category_code=_.rcbCategories[3].category_code,null!=_.salesmanDeptCode&&""!=_.salesmanDeptCode||(_.salesmanDeptCode="10"),_.temp1.invs021_dep_code=_.salesmanDeptCode,0<_.rcbCategories.length&&i.get(c.apiUrl+"api/Sales_Doc/get_SubCategories?pc_parentcode="+_.rcbCategories[3].category_code).then(function(e){if(_.rcbSubCategories=e.data,"04"==_.temp.sal_type)for(var t=0;t<_.rcbSubCategories.length;t++)_.rcbSubCategories[t].pc_grade_code==_.grade_code&&(_.temp1.subcategory_code=_.rcbSubCategories[t].subcategory_code);else _.temp1.subcategory_code="";i.get(c.apiUrl+"api/Sales_Doc/get_SubCategoriesnew?pc_parentcode="+_.rcbCategories[3].category_code+"&grade_code="+_.grade_code).then(function(e){_.rcbbSubCategories=e.data,_.temp1.subcategory_code=_.rcbbSubCategories[0].subcategory_code,i.post(c.apiUrl+"api/Sales_Doc/postgetItemSerch",_.temp1).then(function(e){0=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 h,f,y,b,v,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,d,i){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,c=s.getDate(),_=s.getMonth()+1,c=(s.getFullYear(),(s=new Date).getDate()),r=e.globals.currentUser.username;c<10&&(c="0"+c);(_=s.getMonth()+1)<10&&(_="0"+_);var e=s.getFullYear(),l=(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),m=n.finnDetail.year,s=(n.block1={pc_submission_date:c+"-"+_+"-"+e,pdc_clearance_date:c+"-"+_+"-"+e,pdc_return_date:c+"-"+_+"-"+e},new Date);function u(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},d.get(i.apiUrl+"api/Financialyear/getDocumentStatus").then(function(e){n.docstatus_Data=e.data}),d.get(i.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){n.Date_option=e.data}),d.get(i.apiUrl+"api/PDCSubmission/getBankName?comp_code="+l).then(function(e){n.bank_name=e.data,setTimeout(function(){$("#Select4").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),d.get(i.apiUrl+"api/PDCSubmission/GetCreatedBy_user").then(function(e){n.user_list=e.data}),d.get(i.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})}),d.get(i.apiUrl+"api/PDCSubmission/getDepartment?finance_year="+m+"&comp_code="+l).then(function(e){n.Department=e.data}),d.get(i.apiUrl+"api/BankPayment/GetLedgerNumber?financialyear="+m+"&comp_code="+l).then(function(e){n.LdgrCode=e.data}),d.get(i.apiUrl+"api/JVCreation/GetAllGLAccountNos?glma_accountcode=&cmpnycode="+l+"&fyear="+m+"&user="+r).then(function(e){n.getAllAccNos=e.data}),d.get(i.apiUrl+"api/JVCreation/GetAllGLActNo_pdc_sub?glma_accountcode=&cmpnycode="+l+"&fyear="+m+"&user="+r).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?d.get(i.apiUrl+"api/PDCSubmission/GetchequestatusNEW").then(function(e){n.cheque_status=e.data}):"Realized"===e||"Cancelled"===e||"Withdrwan"===e?n.cheque_status="":"Submitted"===e?d.get(i.apiUrl+"api/PDCSubmission/Getchequestatusubmitted").then(function(e){n.cheque_status=e.data}):"Re-submitted"===e?d.get(i.apiUrl+"api/PDCSubmission/Getchequestaturesubmitted").then(function(e){n.cheque_status=e.data}):"Dishonored"===e&&d.get(i.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,d){var i=t.globals.currentUser.username;a.data1=function(t){a.disable(),n.post(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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(d.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:i,comn_audit_user_appl_code:"Lrnton",comn_audit_ip:t,comn_audit_dns:null,comn_audit_remark:a.msg1},n.post(d.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,d,i){var c;s.display=!1,s.pagesize="10",s.pageindex="0",s.pager=!0,s.grid=!0,s.currentPage=0,s.items=[],s.url=i.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(),d.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()),d.colsvis=!1,d.getsubdetail())}),d.colsvis=!0},d.reset_data=function(){try{$("#bell_box").multipleSelect("uncheckAll")}catch(e){}try{$("#teacher_box").multipleSelect("uncheckAll")}catch(e){}d.temp.sims_bell_code="",d.temp.sims_cur_code="",d.temp.sims_academic_year="",d.mom_start_date="",d.mom_end_date="",d.report_data_new=[]},d.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){d.subformdetails=e.data,d.current_teacher_name=d.subformdetails[0].current_teacher_name,d.day_date=d.subformdetails[0].day_date,d.sub_teacher_name=d.subformdetails[0].sub_teacher_name,d.approved_by=d.subformdetails[0].approved_by,d.remark=d.subformdetails[0].remark,d.time=t.time})},d.send_email=function(e){d.savedata=[];e={mom_start_date:d.mom_start_date,mom_end_date:d.mom_end_date,sims_bell_code:e.sims_bell_code,sims_teacher_code:e.sub_teacher_code,report_status:""};d.savedata.push(e),s.post(n.apiUrl+"api/lecturedetails/Insert_email",d.savedata).then(function(e){d.msg1=e.data,console.log("msg",e),1==d.msg1?($(document).ready(function(){d.datasend=[],d.savedata=[]}),swal({title:"Alert",text:"Email Sent successfully",imageUrl:"assets/img/check.png",width:300,height:200}),d.busy=!1,d.show_fail_students(d.fcommn.cur_code,d.fcommn.academic_year,d.fcommn.sims_grade_code,d.fcommn.sims_section_code,d.fcommn.sims_term_code)):(swal({title:"Alert",text:"Unable To Send Email. ",imageUrl:"assets/img/close.png",width:300,height:200}),d.busy=!1)})},d.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,d,i){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(i.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.ri.pageCount()-5?i.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,d){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=d.docUrl+n.defaults.headers.common.schoolId+"/Images/StudentImages/",n.get(d.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(d.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(d.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(d.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(d.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(d.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(i),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 p,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(),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);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 u,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,a,o,n,d,i){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=i.docUrl+d.defaults.headers.common.schoolId+"/Images/StudentImages/",s.imgurle=i.docUrl+d.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},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,console.log("currentPage="+s.currentPage),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);console.log("begin="+e),console.log("end="+t),s.filteredTodos=s.todos.slice(e,t)},d.get(i.apiUrl+"api/MedicalStudentSusceptibilityCSDController/Getcomplaintdesc").then(function(e){s.complaint_desc=e.data,console.log("Desc",s.complaint_desc)}),s.showStudStatus=function(){d.get(i.apiUrl+"api/MedicalStudentSusceptibilityCSDController/GetStudentRound").then(function(e){s.stud_status=e.data})},s.showPrimaryAction=function(){d.get(i.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||(d.get(i.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,d.get(i.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}),d.get(i.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")}d.post(i.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}),s.showdata()):swal({text:"Record Not Updated",imageUrl:"assets/img/check.png",showCloseButton:!0,width:300,height:200}),s.clearvalue()}),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;tc.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?c.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):c.adm_update())},c.adm_update=function(){null==c.edt.home_country_isdcode&&(c.edt.home_country_isdcode=""),null==c.edt.home_phone&&(c.edt.home_phone="");var e={admission_number:r,appl_num:c.edt.appl_num,pros_num:c.edt.pros_num,pros_appl_num:c.edt.pros_appl_num,admission_date:c.edt.admission_date,school_code:c.edt.school_code,curr_code:c.edt.curr_code,academic_year:c.edt.academic_year,grade_code:c.edt.grade_code,section_code:c.edt.section_code,term_code:c.edt.term_code,tent_join_date:c.edt.tent_join_date,sims_student_emergency_contact_number1:c.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:c.edt.sims_student_emergency_contact_name1,first_name:c.edt.first_name,middle_name:c.edt.middle_name,last_name:c.edt.last_name,family_name:c.edt.family_name,first_name_ot:c.edt.first_name_ot,midd_name_ot:c.edt.midd_name_ot,last_name_ot:c.edt.last_name_ot,family_name_ot:c.edt.family_name_ot,nicke_name:c.edt.nicke_name,birth_date:c.edt.birth_date,comm_date:c.edt.comm_date,birth_country_code:c.edt.birth_country_code,nationality_code:c.edt.nationality_code,ethinicity_code:c.edt.ethinicity_code,gender_code:c.edt.gender_code,religion_code:c.edt.religion_code,passport_num:c.edt.passport_num,passport_issue_date:c.edt.passport_issue_date,passport_expiry:c.edt.passport_expiry,passport_issue_auth:c.edt.passport_issue_auth,passport_issue_place:c.edt.passport_issue_place,visa_number:c.edt.visa_number,visa_type:c.edt.visa_type,visa_issuing_authority:c.edt.visa_issuing_authority,visa_issue_date:c.edt.visa_issue_date,visa_expiry_date:c.edt.visa_expiry_date,visa_issuing_place:c.edt.visa_issuing_place,national_id:c.edt.national_id,national_id_issue_date:c.edt.national_id_issue_date,national_id_expiry_date:c.edt.national_id_expiry_date,sibling_status:c.edt.sibling_status,parent_id:c.edt.parent_id,sibling_enroll:c.edt.sibling_enroll,sibling_name:c.edt.sibling_name,sibling_dob:c.edt.sibling_dob,sibling_school_code:c.edt.sibling_school_code,employee_type:c.edt.employee_type,employee_code:c.edt.employee_code,employee_school_code:c.edt.employee_school_code,motherTounge_language_code:c.edt.motherTounge_language_code,main_language_code:c.edt.main_language_code,main_language_r_code:c.edt.main_language_r_code,main_language_w_code:c.edt.main_language_w_code,main_language_s_code:c.edt.main_language_s_code,primary_contact_code:c.edt.primary_contact_code,primary_contact_pref_code:c.edt.primary_contact_pref_code,fee_payment_contact_pref_code:c.edt.fee_payment_contact_pref_code,transport_status:c.edt.transport_status,transport_desc:c.edt.transport_desc,father_salutation_code:c.edt.father_salutation_code,father_first_name:c.edt.father_first_name,father_middle_name:c.edt.father_middle_name,father_last_name:c.edt.father_last_name,father_family_name:c.edt.father_family_name,father_family_name_ot:c.edt.father_family_name_ot,father_nationality1_code:c.edt.father_nationality1_code,father_nationality2_code:c.edt.father_nationality2_code,father_appartment_number:c.edt.father_appartment_number,father_building_number:c.edt.father_building_number,father_street_number:c.edt.father_street_number,father_area_number:c.edt.father_area_number,father_city:c.edt.father_city,father_state:c.edt.father_state,father_country_code:c.edt.father_country_code,father_summary_address:c.edt.father_summary_address,father_po_box:c.edt.father_po_box,father_phone:c.edt.father_phone,father_email:c.edt.father_email,father_mobile:c.edt.father_mobile,father_fax:c.edt.father_fax,father_occupation:c.edt.father_occupation,father_company:c.edt.father_company,father_company_address:c.edt.father_company_address,father_company_phone:c.edt.father_company_phone,mother_company_address:c.edt.mother_company_address,mother_company_phone:c.edt.mother_company_phone,father_passport_number:c.edt.father_passport_number,sims_admission_father_national_id:c.edt.sims_admission_father_national_id,guardian_salutation_code:c.edt.guardian_salutation_code,guardian_first_name:c.edt.guardian_first_name,guardian_middle_name:c.edt.guardian_middle_name,guardian_last_name:c.edt.guardian_last_name,guardian_family_name:c.edt.guardian_family_name,guardian_nationality1_code:c.edt.guardian_nationality1_code,guardian_nationality2_code:c.edt.guardian_nationality2_code,guardian_appartment_number:c.edt.guardian_appartment_number,guardian_building_number:c.edt.guardian_building_number,guardian_street_number:c.edt.guardian_street_number,guardian_area_number:c.edt.guardian_area_number,guardian_city:c.edt.guardian_city,guardian_state:c.edt.guardian_state,guardian_country_code:c.edt.guardian_country_code,guardian_summary_address:c.edt.guardian_summary_address,guardian_po_box:c.edt.guardian_po_box,guardian_phone:c.edt.guardian_phone,guardian_mobile:c.edt.guardian_mobile,guardian_fax:c.edt.guardian_fax,guardian_email:c.edt.guardian_email,guardian_occupation:c.edt.guardian_occupation,guardian_company:c.edt.guardian_company,guardian_passport_number:c.edt.guardian_passport_number,guardian_relationship_code:c.edt.guardian_relationship_code,mother_salutation_code:c.edt.mother_salutation_code,mother_first_name:c.edt.mother_first_name,mother_middle_name:c.edt.mother_middle_name,mother_last_name:c.edt.mother_last_name,mother_family_name:c.edt.mother_family_name,mother_name_ot:c.edt.mother_name_ot,mother_nationality1_code:c.edt.mother_nationality1_code,mother_nationality2_code:c.edt.mother_nationality2_code,mother_appartment_number:c.edt.mother_appartment_number,mother_building_number:c.edt.mother_building_number,mother_street_number:c.edt.mother_street_number,mother_area_number:c.edt.mother_area_number,mother_city:c.edt.mother_city,mother_state:c.edt.mother_state,mother_country_code:c.edt.mother_country_code,mother_summary_address:c.edt.mother_summary_address,mother_po_box:c.edt.mother_po_box,mother_phone:c.edt.mother_phone,mother_mobile:c.edt.mother_mobile,mother_fax:c.edt.mother_fax,mother_email:c.edt.mother_email,mother_occupation:c.edt.mother_occupation,mother_passport_number:c.edt.mother_passport_number,current_school_status:c.edt.current_school_status,current_school_name:c.edt.current_school_name,current_school_enroll_number:c.edt.current_school_enroll_number,current_school_grade:c.edt.current_school_grade,current_school_cur:c.edt.current_school_cur,current_school_from_date:c.edt.current_school_from_date,current_school_to_date:c.edt.current_school_to_date,current_school_language:c.edt.current_school_language,current_school_head_teacher:c.edt.current_school_head_teacher,current_school_phone:c.edt.current_school_phone,current_school_fax:c.edt.current_school_fax,current_school_city:c.edt.current_school_city,current_school_country_code:c.edt.current_school_country_code,current_school_address:c.edt.current_school_address,marketing_code:c.edt.marketing_code,marketing_description:c.edt.marketing_description,parent_status_code:c.edt.parent_status_code,legal_custody_code:c.edt.legal_custody_code,health_card_number:c.edt.health_card_number,health_card_issue_date:c.edt.health_card_issue_date,health_card_issuing_authority:c.edt.health_card_issuing_authority,blood_group_code:c.edt.blood_group_code,medication_status:c.edt.medication_status,medication_desc:c.edt.medication_desc,disability_status:c.edt.disability_status,disability_desc:c.edt.disability_desc,behaviour_status:c.edt.behaviour_status,behaviour_desc:c.edt.behaviour_desc,health_restriction_status:c.edt.health_restriction_status,health_restriction_desc:c.edt.health_restriction_desc,health_hearing_status:c.edt.health_hearing_status,health_hearing_desc:c.edt.health_hearing_desc,health_vision_status:c.edt.health_vision_status,health_vision_desc:c.edt.health_vision_desc,health_other_status:c.edt.health_other_status,health_other_desc:c.edt.health_other_desc,gifted_status:c.edt.gifted_status,gifted_desc:c.edt.gifted_desc,music_status:c.edt.music_status,music_desc:c.edt.music_desc,sports_status:c.edt.sports_status,sports_desc:c.edt.sports_desc,language_support_status:c.edt.language_support_status,language_support_desc:c.edt.language_support_desc,declaration_status:c.edt.declaration_status,fees_paid_status:c.edt.fees_paid_status,fee_category_code:c.edt.fee_category_code,ip:c.edt.ip,dns:c.edt.dns,user_code:c.edt.user_code,status:c.edt.status,sims_student_attribute1:c.edt.sims_student_attribute1,sims_student_attribute2:c.edt.sims_student_attribute2,sims_student_attribute3:c.edt.sims_student_attribute3,sims_student_attribute4:c.edt.sims_student_attribute4,sims_student_health_respiratory_status:c.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:c.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:c.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:c.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:c.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:c.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:c.edt.sims_student_health_skin_status,sims_student_health_skin_desc:c.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:c.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:c.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:c.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:c.edt.sims_student_health_surgery_desc,sims_admission_recommendation:c.edt.sims_admission_recommendation,sims_admission_mother_national_id:c.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:c.edt.sims_admission_guardian_national_id,sims_fee_month_code:c.edt.sims_fee_month_code,sims_student_attribute5:c.edt.sims_student_attribute5,sims_student_attribute6:c.edt.sims_student_attribute6,sims_student_attribute7:c.edt.sims_student_attribute7,sims_student_attribute8:c.edt.sims_student_attribute8,sims_student_attribute9:c.edt.sims_student_attribute9,sims_student_attribute10:c.edt.sims_student_attribute10,sims_student_attribute11:c.edt.sims_student_attribute11,sims_student_attribute12:c.edt.sims_student_attribute12,sims_admission_second_lang_code:c.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:c.edt.sims_admission_third_lang_code,sims_admission_subject_code:c.edt.sims_admission_second_lang_code+","+c.edt.sims_admission_third_lang_code};_.push(e),n.post(i.apiUrl+"api/common/Admission_dpsd/ApproveStudent",_).then(function(e){c.display=!0,c.msg1=e.data,console.log(c.msg1)}),c.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},c.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)},c.get_studentfee=function(){e.go("main.Sim043")},c.back=function(){c.dd=!0,window.localStorage.Admflag=c.dd,c.modal_cancel()},c.schoolcheck=function(){1==c.edt.current_school_status?c.school_edit=!1:c.school_edit=!0},c.chk_desc=function(){1==c.edt.marketing_code?c.desc_edit=!1:c.desc_edit=!0},c.chk_cicumstances=function(){1==c.edt.parent_status_code?c.circum_edit=!1:c.circum_edit=!0},c.chk_disab_status=function(){1==c.edt.disability_status?c.disab_edit=!1:c.disab_edit=!0},c.chk_health_res=function(){1==c.edt.health_restriction_status?c.healthres_edit=!1:c.healthres_edit=!0},c.chk_medic_status=function(){1==c.edt.medication_status?c.med_edit=!1:c.med_edit=!0},c.chk_other=function(){1==c.edt.health_other_status?c.other_edit=!1:c.other_edit=!0},c.chk_hearing=function(){1==c.edt.health_hearing_status?c.hearing_edit=!1:c.hearing_edit=!0},c.chk_vision=function(){1==c.edt.health_vision_status?c.health_vision_edit=!1:c.health_vision_edit=!0},c.chk_behaviour=function(){1==c.edt.behaviour_status?c.behaviour_edit=!1:c.behaviour_edit=!0},c.chk_gifted_status=function(){1==c.edt.gifted_status?c.gifted_edit=!1:c.gifted_edit=!0},c.chk_music_pro=function(){1==c.edt.music_status?c.music_edit=!1:c.music_edit=!0},c.chk_sport_pro=function(){1==c.edt.sports_status?c.sport_edit=!1:c.sport_edit=!0},c.chk_lang_sup=function(){1==c.edt.language_support_status?c.lang_sup_edit=!1:c.lang_sup_edit=!0},c.chk_Pri_contact=function(){1==c.edt.primary_contact_code?c.pricont_edit=!1:c.pricont_edit=!0},c.chk_transport_requin=function(){1==c.edt.transport_status?c.transreq_edit=!1:c.transreq_edit=!0},c.chk_Sibling_attend=function(){1==c.edt.sibling_status?c.disableparent=!1:c.disableparent=!0},c.chk_employee=function(){1==c.edt.sims_empchk?(c.disableemployee=!1,c.edt.sims_empchk):c.disableemployee=!0},c.chk_learn_ther=function(){1==c.edt.sims_admission_learning_therapy_status?c.learnther_edit=!1:c.learnther_edit=!0},c.chk_spec_edu=function(){1==c.edt.sims_admission_special_education_status?c.spec_edu_edit=!1:c.spec_edu_edit=!0},c.chk_falled_grade=function(){1==c.edt.sims_admission_falled_grade_status?c.falledgrade_edit=!1:c.falledgrade_edit=!0},c.chk_commun=function(){1==c.edt.sims_admission_communication_status?c.commun_edit=!1:c.commun_edit=!0},c.chk_spec_activies=function(){1==c.edt.sims_admission_specialAct_status?c.specActiv_edit=!1:c.specActiv_edit=!0},c.chk_studyingin=function(){1==c.edt.sibling_status?(c.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!1):(c.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!0)},c.chk_ticking=function(){1==c.edt.declaration_status?(c.tick_edit=!1,c.confirm_edit=!1):(c.tick_edit=!0,c.confirm_edit=!0)},c.chk_copy_mother_add=function(){1==c.edt.copy_add?(c.edt.mother_appartment_number=c.edt.father_appartment_number,c.edt.mother_area_number=c.edt.father_area_number,c.edt.mother_building_number=c.edt.father_building_number,c.edt.mother_street_number=c.edt.father_street_number,c.edt.mother_city=c.edt.father_city,c.edt.mother_state=c.edt.father_state,c.edt.mother_country_code=c.edt.father_country_code,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_nationality1_code=c.edt.father_nationality1_code,c.edt.mother_nationality2_code=c.edt.father_nationality2_code,c.edt.mother_summary_address=c.edt.father_summary_address,c.edt.mother_phone=c.edt.father_phone,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_mobile=c.edt.father_mobile,c.edt.mother_occupation=c.edt.father_occupation,c.edt.mother_email=c.edt.father_email,c.edt.mother_company=c.edt.father_company):(c.edt.mother_appartment_number="",c.edt.mother_area_number="",c.edt.mother_building_number="",c.edt.mother_street_number="",c.edt.mother_city="",c.edt.mother_state="",c.edt.mother_country_code="",c.edt.mother_po_box="",c.edt.mother_nationality1_code="",c.edt.mother_nationality2_code="",c.edt.mother_summary_address="",c.edt.mother_phone="",c.edt.mother_po_box="",c.edt.mother_mobile="",c.edt.mother_occupation="",c.edt.mother_email="",c.edt.mother_company="")},c.chk_copy_guar_add1=function(){1==c.edt.copy_add1?(c.edt.guardian_appartment_number=c.edt.father_appartment_number,c.edt.guardian_area_number=c.edt.father_area_number,c.edt.guardian_building_number=c.edt.father_building_number,c.edt.guardian_street_number=c.edt.father_street_number,c.edt.guardian_city=c.edt.father_city,c.edt.guardian_state=c.edt.father_state,c.edt.guardian_country_code=c.edt.father_country_code,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_nationality1_code=c.edt.father_nationality1_code,c.edt.guardian_nationality2_code=c.edt.father_nationality2_code,c.edt.guardian_summary_address=c.edt.father_summary_address,c.edt.guardian_phone=c.edt.father_phone,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_mobile=c.edt.father_mobile,c.edt.guardian_occupation=c.edt.father_occupation,c.edt.guardian_email=c.edt.father_email,c.edt.guardian_company=c.edt.father_company):(c.edt.guardian_appartment_number="",c.edt.guardian_area_number="",c.edt.guardian_building_number="",c.edt.guardian_street_number="",c.edt.guardian_city="",c.edt.guardian_state="",c.edt.guardian_country_code="",c.edt.guardian_po_box="",c.edt.guardian_nationality1_code="",c.edt.guardian_nationality2_code="",c.edt.guardian_summary_address="",c.edt.guardian_phone="",c.edt.guardian_po_box="",c.edt.guardian_mobile="",c.edt.guardian_occupation="",c.edt.guardian_email="",c.edt.guardian_company="")},c.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+=0c.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?c.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):c.adm_update())},c.adm_update=function(){null==c.edt.home_country_isdcode&&(c.edt.home_country_isdcode=""),null==c.edt.home_phone&&(c.edt.home_phone="");var e={admission_number:r,appl_num:c.edt.appl_num,pros_num:c.edt.pros_num,pros_appl_num:c.edt.pros_appl_num,admission_date:c.edt.admission_date,school_code:c.edt.school_code,curr_code:c.edt.curr_code,academic_year:c.edt.academic_year,grade_code:c.edt.grade_code,section_code:c.edt.section_code,term_code:c.edt.term_code,tent_join_date:c.edt.tent_join_date,sims_student_emergency_contact_number1:c.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:c.edt.sims_student_emergency_contact_name1,first_name:c.edt.first_name,middle_name:c.edt.middle_name,last_name:c.edt.last_name,family_name:c.edt.family_name,first_name_ot:c.edt.first_name_ot,midd_name_ot:c.edt.midd_name_ot,last_name_ot:c.edt.last_name_ot,family_name_ot:c.edt.family_name_ot,nicke_name:c.edt.nicke_name,birth_date:c.edt.birth_date,comm_date:c.edt.comm_date,birth_country_code:c.edt.birth_country_code,nationality_code:c.edt.nationality_code,ethinicity_code:c.edt.ethinicity_code,gender_code:c.edt.gender_code,religion_code:c.edt.religion_code,passport_num:c.edt.passport_num,passport_issue_date:c.edt.passport_issue_date,passport_expiry:c.edt.passport_expiry,passport_issue_auth:c.edt.passport_issue_auth,passport_issue_place:c.edt.passport_issue_place,visa_number:c.edt.visa_number,visa_type:c.edt.visa_type,visa_issuing_authority:c.edt.visa_issuing_authority,visa_issue_date:c.edt.visa_issue_date,visa_expiry_date:c.edt.visa_expiry_date,visa_issuing_place:c.edt.visa_issuing_place,national_id:c.edt.national_id,national_id_issue_date:c.edt.national_id_issue_date,national_id_expiry_date:c.edt.national_id_expiry_date,sibling_status:c.edt.sibling_status,parent_id:c.edt.parent_id,sibling_enroll:c.edt.sibling_enroll,sibling_name:c.edt.sibling_name,sibling_dob:c.edt.sibling_dob,sibling_school_code:c.edt.sibling_school_code,employee_type:c.edt.employee_type,employee_code:c.edt.employee_code,employee_school_code:c.edt.employee_school_code,motherTounge_language_code:c.edt.motherTounge_language_code,main_language_code:c.edt.main_language_code,main_language_r_code:c.edt.main_language_r_code,main_language_w_code:c.edt.main_language_w_code,main_language_s_code:c.edt.main_language_s_code,primary_contact_code:c.edt.primary_contact_code,primary_contact_pref_code:c.edt.primary_contact_pref_code,fee_payment_contact_pref_code:c.edt.fee_payment_contact_pref_code,transport_status:c.edt.transport_status,transport_desc:c.edt.transport_desc,father_salutation_code:c.edt.father_salutation_code,father_first_name:c.edt.father_first_name,father_middle_name:c.edt.father_middle_name,father_last_name:c.edt.father_last_name,father_family_name:c.edt.father_family_name,father_family_name_ot:c.edt.father_family_name_ot,father_nationality1_code:c.edt.father_nationality1_code,father_nationality2_code:c.edt.father_nationality2_code,father_appartment_number:c.edt.father_appartment_number,father_building_number:c.edt.father_building_number,father_street_number:c.edt.father_street_number,father_area_number:c.edt.father_area_number,father_city:c.edt.father_city,father_state:c.edt.father_state,father_country_code:c.edt.father_country_code,father_summary_address:c.edt.father_summary_address,father_po_box:c.edt.father_po_box,father_phone:c.edt.father_phone,father_email:c.edt.father_email,father_mobile:c.edt.father_mobile,father_fax:c.edt.father_fax,father_occupation:c.edt.father_occupation,father_company:c.edt.father_company,father_company_address:c.edt.father_company_address,father_company_phone:c.edt.father_company_phone,mother_company_address:c.edt.mother_company_address,mother_company_phone:c.edt.mother_company_phone,father_passport_number:c.edt.father_passport_number,sims_admission_father_national_id:c.edt.sims_admission_father_national_id,guardian_salutation_code:c.edt.guardian_salutation_code,guardian_first_name:c.edt.guardian_first_name,guardian_middle_name:c.edt.guardian_middle_name,guardian_last_name:c.edt.guardian_last_name,guardian_family_name:c.edt.guardian_family_name,guardian_nationality1_code:c.edt.guardian_nationality1_code,guardian_nationality2_code:c.edt.guardian_nationality2_code,guardian_appartment_number:c.edt.guardian_appartment_number,guardian_building_number:c.edt.guardian_building_number,guardian_street_number:c.edt.guardian_street_number,guardian_area_number:c.edt.guardian_area_number,guardian_city:c.edt.guardian_city,guardian_state:c.edt.guardian_state,guardian_country_code:c.edt.guardian_country_code,guardian_summary_address:c.edt.guardian_summary_address,guardian_po_box:c.edt.guardian_po_box,guardian_phone:c.edt.guardian_phone,guardian_mobile:c.edt.guardian_mobile,guardian_fax:c.edt.guardian_fax,guardian_email:c.edt.guardian_email,guardian_occupation:c.edt.guardian_occupation,guardian_company:c.edt.guardian_company,guardian_passport_number:c.edt.guardian_passport_number,guardian_relationship_code:c.edt.guardian_relationship_code,mother_salutation_code:c.edt.mother_salutation_code,mother_first_name:c.edt.mother_first_name,mother_middle_name:c.edt.mother_middle_name,mother_last_name:c.edt.mother_last_name,mother_family_name:c.edt.mother_family_name,mother_name_ot:c.edt.mother_name_ot,mother_nationality1_code:c.edt.mother_nationality1_code,mother_nationality2_code:c.edt.mother_nationality2_code,mother_appartment_number:c.edt.mother_appartment_number,mother_building_number:c.edt.mother_building_number,mother_street_number:c.edt.mother_street_number,mother_area_number:c.edt.mother_area_number,mother_city:c.edt.mother_city,mother_state:c.edt.mother_state,mother_country_code:c.edt.mother_country_code,mother_summary_address:c.edt.mother_summary_address,mother_po_box:c.edt.mother_po_box,mother_phone:c.edt.mother_phone,mother_mobile:c.edt.mother_mobile,mother_fax:c.edt.mother_fax,mother_email:c.edt.mother_email,mother_occupation:c.edt.mother_occupation,mother_passport_number:c.edt.mother_passport_number,current_school_status:c.edt.current_school_status,current_school_name:c.edt.current_school_name,current_school_enroll_number:c.edt.current_school_enroll_number,current_school_grade:c.edt.current_school_grade,current_school_cur:c.edt.current_school_cur,current_school_from_date:c.edt.current_school_from_date,current_school_to_date:c.edt.current_school_to_date,current_school_language:c.edt.current_school_language,current_school_head_teacher:c.edt.current_school_head_teacher,current_school_phone:c.edt.current_school_phone,current_school_fax:c.edt.current_school_fax,current_school_city:c.edt.current_school_city,current_school_country_code:c.edt.current_school_country_code,current_school_address:c.edt.current_school_address,marketing_code:c.edt.marketing_code,marketing_description:c.edt.marketing_description,parent_status_code:c.edt.parent_status_code,legal_custody_code:c.edt.legal_custody_code,health_card_number:c.edt.health_card_number,health_card_issue_date:c.edt.health_card_issue_date,health_card_issuing_authority:c.edt.health_card_issuing_authority,blood_group_code:c.edt.blood_group_code,medication_status:c.edt.medication_status,medication_desc:c.edt.medication_desc,disability_status:c.edt.disability_status,disability_desc:c.edt.disability_desc,behaviour_status:c.edt.behaviour_status,behaviour_desc:c.edt.behaviour_desc,health_restriction_status:c.edt.health_restriction_status,health_restriction_desc:c.edt.health_restriction_desc,health_hearing_status:c.edt.health_hearing_status,health_hearing_desc:c.edt.health_hearing_desc,health_vision_status:c.edt.health_vision_status,health_vision_desc:c.edt.health_vision_desc,health_other_status:c.edt.health_other_status,health_other_desc:c.edt.health_other_desc,gifted_status:c.edt.gifted_status,gifted_desc:c.edt.gifted_desc,music_status:c.edt.music_status,music_desc:c.edt.music_desc,sports_status:c.edt.sports_status,sports_desc:c.edt.sports_desc,language_support_status:c.edt.language_support_status,language_support_desc:c.edt.language_support_desc,declaration_status:c.edt.declaration_status,fees_paid_status:c.edt.fees_paid_status,fee_category_code:c.edt.fee_category_code,ip:c.edt.ip,dns:c.edt.dns,user_code:c.edt.user_code,status:c.edt.status,sims_student_attribute1:c.edt.sims_student_attribute1,sims_student_attribute2:c.edt.sims_student_attribute2,sims_student_attribute3:c.edt.sims_student_attribute3,sims_student_attribute4:c.edt.sims_student_attribute4,sims_student_health_respiratory_status:c.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:c.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:c.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:c.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:c.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:c.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:c.edt.sims_student_health_skin_status,sims_student_health_skin_desc:c.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:c.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:c.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:c.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:c.edt.sims_student_health_surgery_desc,sims_admission_recommendation:c.edt.sims_admission_recommendation,sims_admission_mother_national_id:c.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:c.edt.sims_admission_guardian_national_id,sims_fee_month_code:c.edt.sims_fee_month_code,sims_student_attribute5:c.edt.sims_student_attribute5,sims_student_attribute6:c.edt.sims_student_attribute6,sims_student_attribute7:c.edt.sims_student_attribute7,sims_student_attribute8:c.edt.sims_student_attribute8,sims_student_attribute9:c.edt.sims_student_attribute9,sims_student_attribute10:c.edt.sims_student_attribute10,sims_student_attribute11:c.edt.sims_student_attribute11,sims_student_attribute12:c.edt.sims_student_attribute12,sims_admission_second_lang_code:c.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:c.edt.sims_admission_third_lang_code,sims_admission_subject_code:c.edt.sims_admission_second_lang_code+","+c.edt.sims_admission_third_lang_code};_.push(e),n.post(i.apiUrl+"api/common/Admission_dpsd/ApproveStudentnew",_).then(function(e){c.display=!0,c.msg1=e.data,console.log(c.msg1)}),c.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},c.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)},c.get_studentfee=function(){e.go("main.Sim043")},c.back=function(){c.dd=!0,window.localStorage.Admflag=c.dd,c.modal_cancel()},c.schoolcheck=function(){1==c.edt.current_school_status?c.school_edit=!1:c.school_edit=!0},c.chk_desc=function(){1==c.edt.marketing_code?c.desc_edit=!1:c.desc_edit=!0},c.chk_cicumstances=function(){1==c.edt.parent_status_code?c.circum_edit=!1:c.circum_edit=!0},c.chk_disab_status=function(){1==c.edt.disability_status?c.disab_edit=!1:c.disab_edit=!0},c.chk_health_res=function(){1==c.edt.health_restriction_status?c.healthres_edit=!1:c.healthres_edit=!0},c.chk_medic_status=function(){1==c.edt.medication_status?c.med_edit=!1:c.med_edit=!0},c.chk_other=function(){1==c.edt.health_other_status?c.other_edit=!1:c.other_edit=!0},c.chk_hearing=function(){1==c.edt.health_hearing_status?c.hearing_edit=!1:c.hearing_edit=!0},c.chk_vision=function(){1==c.edt.health_vision_status?c.health_vision_edit=!1:c.health_vision_edit=!0},c.chk_behaviour=function(){1==c.edt.behaviour_status?c.behaviour_edit=!1:c.behaviour_edit=!0},c.chk_gifted_status=function(){1==c.edt.gifted_status?c.gifted_edit=!1:c.gifted_edit=!0},c.chk_music_pro=function(){1==c.edt.music_status?c.music_edit=!1:c.music_edit=!0},c.chk_sport_pro=function(){1==c.edt.sports_status?c.sport_edit=!1:c.sport_edit=!0},c.chk_lang_sup=function(){1==c.edt.language_support_status?c.lang_sup_edit=!1:c.lang_sup_edit=!0},c.chk_Pri_contact=function(){1==c.edt.primary_contact_code?c.pricont_edit=!1:c.pricont_edit=!0},c.chk_transport_requin=function(){1==c.edt.transport_status?c.transreq_edit=!1:c.transreq_edit=!0},c.chk_Sibling_attend=function(){1==c.edt.sibling_status?c.disableparent=!1:c.disableparent=!0},c.chk_employee=function(){1==c.edt.sims_empchk?(c.disableemployee=!1,c.edt.sims_empchk):c.disableemployee=!0},c.chk_learn_ther=function(){1==c.edt.sims_admission_learning_therapy_status?c.learnther_edit=!1:c.learnther_edit=!0},c.chk_spec_edu=function(){1==c.edt.sims_admission_special_education_status?c.spec_edu_edit=!1:c.spec_edu_edit=!0},c.chk_falled_grade=function(){1==c.edt.sims_admission_falled_grade_status?c.falledgrade_edit=!1:c.falledgrade_edit=!0},c.chk_commun=function(){1==c.edt.sims_admission_communication_status?c.commun_edit=!1:c.commun_edit=!0},c.chk_spec_activies=function(){1==c.edt.sims_admission_specialAct_status?c.specActiv_edit=!1:c.specActiv_edit=!0},c.chk_studyingin=function(){1==c.edt.sibling_status?(c.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!1):(c.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!0)},c.chk_ticking=function(){1==c.edt.declaration_status?(c.tick_edit=!1,c.confirm_edit=!1):(c.tick_edit=!0,c.confirm_edit=!0)},c.chk_copy_mother_add=function(){1==c.edt.copy_add?(c.edt.mother_appartment_number=c.edt.father_appartment_number,c.edt.mother_area_number=c.edt.father_area_number,c.edt.mother_building_number=c.edt.father_building_number,c.edt.mother_street_number=c.edt.father_street_number,c.edt.mother_city=c.edt.father_city,c.edt.mother_state=c.edt.father_state,c.edt.mother_country_code=c.edt.father_country_code,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_nationality1_code=c.edt.father_nationality1_code,c.edt.mother_nationality2_code=c.edt.father_nationality2_code,c.edt.mother_summary_address=c.edt.father_summary_address,c.edt.mother_phone=c.edt.father_phone,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_mobile=c.edt.father_mobile,c.edt.mother_occupation=c.edt.father_occupation,c.edt.mother_email=c.edt.father_email,c.edt.mother_company=c.edt.father_company):(c.edt.mother_appartment_number="",c.edt.mother_area_number="",c.edt.mother_building_number="",c.edt.mother_street_number="",c.edt.mother_city="",c.edt.mother_state="",c.edt.mother_country_code="",c.edt.mother_po_box="",c.edt.mother_nationality1_code="",c.edt.mother_nationality2_code="",c.edt.mother_summary_address="",c.edt.mother_phone="",c.edt.mother_po_box="",c.edt.mother_mobile="",c.edt.mother_occupation="",c.edt.mother_email="",c.edt.mother_company="")},c.chk_copy_guar_add1=function(){1==c.edt.copy_add1?(c.edt.guardian_appartment_number=c.edt.father_appartment_number,c.edt.guardian_area_number=c.edt.father_area_number,c.edt.guardian_building_number=c.edt.father_building_number,c.edt.guardian_street_number=c.edt.father_street_number,c.edt.guardian_city=c.edt.father_city,c.edt.guardian_state=c.edt.father_state,c.edt.guardian_country_code=c.edt.father_country_code,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_nationality1_code=c.edt.father_nationality1_code,c.edt.guardian_nationality2_code=c.edt.father_nationality2_code,c.edt.guardian_summary_address=c.edt.father_summary_address,c.edt.guardian_phone=c.edt.father_phone,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_mobile=c.edt.father_mobile,c.edt.guardian_occupation=c.edt.father_occupation,c.edt.guardian_email=c.edt.father_email,c.edt.guardian_company=c.edt.father_company):(c.edt.guardian_appartment_number="",c.edt.guardian_area_number="",c.edt.guardian_building_number="",c.edt.guardian_street_number="",c.edt.guardian_city="",c.edt.guardian_state="",c.edt.guardian_country_code="",c.edt.guardian_po_box="",c.edt.guardian_nationality1_code="",c.edt.guardian_nationality2_code="",c.edt.guardian_summary_address="",c.edt.guardian_phone="",c.edt.guardian_po_box="",c.edt.guardian_mobile="",c.edt.guardian_occupation="",c.edt.guardian_email="",c.edt.guardian_company="")},c.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+=0c.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?c.adm_update():($("#cmb_section").css("background-color","#E5E9EC"),$('.nav-tabs a[href="#admtab1"]').tab("show"))}):c.adm_update())},c.adm_update=function(){null==c.edt.home_country_isdcode&&(c.edt.home_country_isdcode=""),null==c.edt.home_phone&&(c.edt.home_phone="");var e={admission_number:r,appl_num:c.edt.appl_num,pros_num:c.edt.pros_num,pros_appl_num:c.edt.pros_appl_num,admission_date:c.edt.admission_date,school_code:c.edt.school_code,curr_code:c.edt.curr_code,academic_year:c.edt.academic_year,grade_code:c.edt.grade_code,section_code:c.edt.section_code,term_code:c.edt.term_code,tent_join_date:c.edt.tent_join_date,sims_student_emergency_contact_number1:c.edt.sims_student_emergency_contact_number1,sims_student_emergency_contact_name1:c.edt.sims_student_emergency_contact_name1,first_name:c.edt.first_name,middle_name:c.edt.middle_name,last_name:c.edt.last_name,family_name:c.edt.family_name,first_name_ot:c.edt.first_name_ot,midd_name_ot:c.edt.midd_name_ot,last_name_ot:c.edt.last_name_ot,family_name_ot:c.edt.family_name_ot,nicke_name:c.edt.nicke_name,birth_date:c.edt.birth_date,comm_date:c.edt.comm_date,birth_country_code:c.edt.birth_country_code,nationality_code:c.edt.nationality_code,ethinicity_code:c.edt.ethinicity_code,gender_code:c.edt.gender_code,religion_code:c.edt.religion_code,passport_num:c.edt.passport_num,passport_issue_date:c.edt.passport_issue_date,passport_expiry:c.edt.passport_expiry,passport_issue_auth:c.edt.passport_issue_auth,passport_issue_place:c.edt.passport_issue_place,visa_number:c.edt.visa_number,visa_type:c.edt.visa_type,visa_issuing_authority:c.edt.visa_issuing_authority,visa_issue_date:c.edt.visa_issue_date,visa_expiry_date:c.edt.visa_expiry_date,visa_issuing_place:c.edt.visa_issuing_place,national_id:c.edt.national_id,national_id_issue_date:c.edt.national_id_issue_date,national_id_expiry_date:c.edt.national_id_expiry_date,sibling_status:c.edt.sibling_status,parent_id:c.edt.parent_id,sibling_enroll:c.edt.sibling_enroll,sibling_name:c.edt.sibling_name,sibling_dob:c.edt.sibling_dob,sibling_school_code:c.edt.sibling_school_code,employee_type:c.edt.employee_type,employee_code:c.edt.employee_code,employee_school_code:c.edt.employee_school_code,motherTounge_language_code:c.edt.motherTounge_language_code,main_language_code:c.edt.main_language_code,main_language_r_code:c.edt.main_language_r_code,main_language_w_code:c.edt.main_language_w_code,main_language_s_code:c.edt.main_language_s_code,primary_contact_code:c.edt.primary_contact_code,primary_contact_pref_code:c.edt.primary_contact_pref_code,fee_payment_contact_pref_code:c.edt.fee_payment_contact_pref_code,transport_status:c.edt.transport_status,transport_desc:c.edt.transport_desc,father_salutation_code:c.edt.father_salutation_code,father_first_name:c.edt.father_first_name,father_middle_name:c.edt.father_middle_name,father_last_name:c.edt.father_last_name,father_family_name:c.edt.father_family_name,father_family_name_ot:c.edt.father_family_name_ot,father_nationality1_code:c.edt.father_nationality1_code,father_nationality2_code:c.edt.father_nationality2_code,father_appartment_number:c.edt.father_appartment_number,father_building_number:c.edt.father_building_number,father_street_number:c.edt.father_street_number,father_area_number:c.edt.father_area_number,father_city:c.edt.father_city,father_state:c.edt.father_state,father_country_code:c.edt.father_country_code,father_summary_address:c.edt.father_summary_address,father_po_box:c.edt.father_po_box,father_phone:c.edt.father_phone,father_email:c.edt.father_email,father_mobile:c.edt.father_mobile,father_fax:c.edt.father_fax,father_occupation:c.edt.father_occupation,father_company:c.edt.father_company,father_company_address:c.edt.father_company_address,father_company_phone:c.edt.father_company_phone,mother_company_address:c.edt.mother_company_address,mother_company_phone:c.edt.mother_company_phone,father_passport_number:c.edt.father_passport_number,sims_admission_father_national_id:c.edt.sims_admission_father_national_id,guardian_salutation_code:c.edt.guardian_salutation_code,guardian_first_name:c.edt.guardian_first_name,guardian_middle_name:c.edt.guardian_middle_name,guardian_last_name:c.edt.guardian_last_name,guardian_family_name:c.edt.guardian_family_name,guardian_nationality1_code:c.edt.guardian_nationality1_code,guardian_nationality2_code:c.edt.guardian_nationality2_code,guardian_appartment_number:c.edt.guardian_appartment_number,guardian_building_number:c.edt.guardian_building_number,guardian_street_number:c.edt.guardian_street_number,guardian_area_number:c.edt.guardian_area_number,guardian_city:c.edt.guardian_city,guardian_state:c.edt.guardian_state,guardian_country_code:c.edt.guardian_country_code,guardian_summary_address:c.edt.guardian_summary_address,guardian_po_box:c.edt.guardian_po_box,guardian_phone:c.edt.guardian_phone,guardian_mobile:c.edt.guardian_mobile,guardian_fax:c.edt.guardian_fax,guardian_email:c.edt.guardian_email,guardian_occupation:c.edt.guardian_occupation,guardian_company:c.edt.guardian_company,guardian_passport_number:c.edt.guardian_passport_number,guardian_relationship_code:c.edt.guardian_relationship_code,mother_salutation_code:c.edt.mother_salutation_code,mother_first_name:c.edt.mother_first_name,mother_middle_name:c.edt.mother_middle_name,mother_last_name:c.edt.mother_last_name,mother_family_name:c.edt.mother_family_name,mother_name_ot:c.edt.mother_name_ot,mother_nationality1_code:c.edt.mother_nationality1_code,mother_nationality2_code:c.edt.mother_nationality2_code,mother_appartment_number:c.edt.mother_appartment_number,mother_building_number:c.edt.mother_building_number,mother_street_number:c.edt.mother_street_number,mother_area_number:c.edt.mother_area_number,mother_city:c.edt.mother_city,mother_state:c.edt.mother_state,mother_country_code:c.edt.mother_country_code,mother_summary_address:c.edt.mother_summary_address,mother_po_box:c.edt.mother_po_box,mother_phone:c.edt.mother_phone,mother_mobile:c.edt.mother_mobile,mother_fax:c.edt.mother_fax,mother_email:c.edt.mother_email,mother_occupation:c.edt.mother_occupation,mother_passport_number:c.edt.mother_passport_number,current_school_status:c.edt.current_school_status,current_school_name:c.edt.current_school_name,current_school_enroll_number:c.edt.current_school_enroll_number,current_school_grade:c.edt.current_school_grade,current_school_cur:c.edt.current_school_cur,current_school_from_date:c.edt.current_school_from_date,current_school_to_date:c.edt.current_school_to_date,current_school_language:c.edt.current_school_language,current_school_head_teacher:c.edt.current_school_head_teacher,current_school_phone:c.edt.current_school_phone,current_school_fax:c.edt.current_school_fax,current_school_city:c.edt.current_school_city,current_school_country_code:c.edt.current_school_country_code,current_school_address:c.edt.current_school_address,marketing_code:c.edt.marketing_code,marketing_description:c.edt.marketing_description,parent_status_code:c.edt.parent_status_code,legal_custody_code:c.edt.legal_custody_code,health_card_number:c.edt.health_card_number,health_card_issue_date:c.edt.health_card_issue_date,health_card_issuing_authority:c.edt.health_card_issuing_authority,blood_group_code:c.edt.blood_group_code,medication_status:c.edt.medication_status,medication_desc:c.edt.medication_desc,disability_status:c.edt.disability_status,disability_desc:c.edt.disability_desc,behaviour_status:c.edt.behaviour_status,behaviour_desc:c.edt.behaviour_desc,health_restriction_status:c.edt.health_restriction_status,health_restriction_desc:c.edt.health_restriction_desc,health_hearing_status:c.edt.health_hearing_status,health_hearing_desc:c.edt.health_hearing_desc,health_vision_status:c.edt.health_vision_status,health_vision_desc:c.edt.health_vision_desc,health_other_status:c.edt.health_other_status,health_other_desc:c.edt.health_other_desc,gifted_status:c.edt.gifted_status,gifted_desc:c.edt.gifted_desc,music_status:c.edt.music_status,music_desc:c.edt.music_desc,sports_status:c.edt.sports_status,sports_desc:c.edt.sports_desc,language_support_status:c.edt.language_support_status,language_support_desc:c.edt.language_support_desc,declaration_status:c.edt.declaration_status,fees_paid_status:c.edt.fees_paid_status,fee_category_code:c.edt.fee_category_code,ip:c.edt.ip,dns:c.edt.dns,user_code:c.edt.user_code,status:c.edt.status,sims_student_attribute1:c.edt.sims_student_attribute1,sims_student_attribute2:c.edt.sims_student_attribute2,sims_student_attribute3:c.edt.sims_student_attribute3,sims_student_attribute4:c.edt.sims_student_attribute4,sims_student_health_respiratory_status:c.edt.sims_student_health_respiratory_status,sims_student_health_respiratory_desc:c.edt.sims_student_health_respiratory_desc,sims_student_health_hay_fever_status:c.edt.sims_student_health_hay_fever_status,sims_student_health_hay_fever_desc:c.edt.sims_student_health_hay_fever_desc,sims_student_health_epilepsy_status:c.edt.sims_student_health_epilepsy_status,sims_student_health_epilepsy_desc:c.edt.sims_student_health_epilepsy_desc,sims_student_health_skin_status:c.edt.sims_student_health_skin_status,sims_student_health_skin_desc:c.edt.sims_student_health_skin_desc,sims_student_health_diabetes_status:c.edt.sims_student_health_diabetes_status,sims_student_health_diabetes_desc:c.edt.sims_student_health_diabetes_desc,sims_student_health_surgery_status:c.edt.sims_student_health_surgery_status,sims_student_health_surgery_desc:c.edt.sims_student_health_surgery_desc,sims_admission_recommendation:c.edt.sims_admission_recommendation,sims_admission_mother_national_id:c.edt.sims_admission_mother_national_id,sims_admission_guardian_national_id:c.edt.sims_admission_guardian_national_id,sims_fee_month_code:c.edt.sims_fee_month_code,sims_student_attribute5:c.edt.sims_student_attribute5,sims_student_attribute6:c.edt.sims_student_attribute6,sims_student_attribute7:c.edt.sims_student_attribute7,sims_student_attribute8:c.edt.sims_student_attribute8,sims_student_attribute9:c.edt.sims_student_attribute9,sims_student_attribute10:c.edt.sims_student_attribute10,sims_student_attribute11:c.edt.sims_student_attribute11,sims_student_attribute12:c.edt.sims_student_attribute12,sims_admission_second_lang_code:c.edt.sims_admission_second_lang_code,sims_admission_third_lang_code:c.edt.sims_admission_third_lang_code,sims_admission_subject_code:c.edt.sims_admission_second_lang_code+","+c.edt.sims_admission_third_lang_code};_.push(e),n.post(i.apiUrl+"api/common/Admission_dpsd/ApproveStudent",_).then(function(e){c.display=!0,c.msg1=e.data,console.log(c.msg1)}),c.grid1=!0,$("#myModal1").modal({backdrop:"static",keyboard:!0})},c.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)},c.get_studentfee=function(){e.go("main.Sim043")},c.back=function(){c.dd=!0,window.localStorage.Admflag=c.dd,c.modal_cancel()},c.schoolcheck=function(){1==c.edt.current_school_status?c.school_edit=!1:c.school_edit=!0},c.chk_desc=function(){1==c.edt.marketing_code?c.desc_edit=!1:c.desc_edit=!0},c.chk_cicumstances=function(){1==c.edt.parent_status_code?c.circum_edit=!1:c.circum_edit=!0},c.chk_disab_status=function(){1==c.edt.disability_status?c.disab_edit=!1:c.disab_edit=!0},c.chk_health_res=function(){1==c.edt.health_restriction_status?c.healthres_edit=!1:c.healthres_edit=!0},c.chk_medic_status=function(){1==c.edt.medication_status?c.med_edit=!1:c.med_edit=!0},c.chk_other=function(){1==c.edt.health_other_status?c.other_edit=!1:c.other_edit=!0},c.chk_hearing=function(){1==c.edt.health_hearing_status?c.hearing_edit=!1:c.hearing_edit=!0},c.chk_vision=function(){1==c.edt.health_vision_status?c.health_vision_edit=!1:c.health_vision_edit=!0},c.chk_behaviour=function(){1==c.edt.behaviour_status?c.behaviour_edit=!1:c.behaviour_edit=!0},c.chk_gifted_status=function(){1==c.edt.gifted_status?c.gifted_edit=!1:c.gifted_edit=!0},c.chk_music_pro=function(){1==c.edt.music_status?c.music_edit=!1:c.music_edit=!0},c.chk_sport_pro=function(){1==c.edt.sports_status?c.sport_edit=!1:c.sport_edit=!0},c.chk_lang_sup=function(){1==c.edt.language_support_status?c.lang_sup_edit=!1:c.lang_sup_edit=!0},c.chk_Pri_contact=function(){1==c.edt.primary_contact_code?c.pricont_edit=!1:c.pricont_edit=!0},c.chk_transport_requin=function(){1==c.edt.transport_status?c.transreq_edit=!1:c.transreq_edit=!0},c.chk_Sibling_attend=function(){1==c.edt.sibling_status?c.disableparent=!1:c.disableparent=!0},c.chk_employee=function(){1==c.edt.sims_empchk?(c.disableemployee=!1,c.edt.sims_empchk):c.disableemployee=!0},c.chk_learn_ther=function(){1==c.edt.sims_admission_learning_therapy_status?c.learnther_edit=!1:c.learnther_edit=!0},c.chk_spec_edu=function(){1==c.edt.sims_admission_special_education_status?c.spec_edu_edit=!1:c.spec_edu_edit=!0},c.chk_falled_grade=function(){1==c.edt.sims_admission_falled_grade_status?c.falledgrade_edit=!1:c.falledgrade_edit=!0},c.chk_commun=function(){1==c.edt.sims_admission_communication_status?c.commun_edit=!1:c.commun_edit=!0},c.chk_spec_activies=function(){1==c.edt.sims_admission_specialAct_status?c.specActiv_edit=!1:c.specActiv_edit=!0},c.chk_studyingin=function(){1==c.edt.sibling_status?(c.Study_edit=!1,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!1):(c.Study_edit=!0,document.getElementById("t3"),document.getElementById("t4"),document.getElementById("t5"),c.t=!0)},c.chk_ticking=function(){1==c.edt.declaration_status?(c.tick_edit=!1,c.confirm_edit=!1):(c.tick_edit=!0,c.confirm_edit=!0)},c.chk_copy_mother_add=function(){1==c.edt.copy_add?(c.edt.mother_appartment_number=c.edt.father_appartment_number,c.edt.mother_area_number=c.edt.father_area_number,c.edt.mother_building_number=c.edt.father_building_number,c.edt.mother_street_number=c.edt.father_street_number,c.edt.mother_city=c.edt.father_city,c.edt.mother_state=c.edt.father_state,c.edt.mother_country_code=c.edt.father_country_code,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_nationality1_code=c.edt.father_nationality1_code,c.edt.mother_nationality2_code=c.edt.father_nationality2_code,c.edt.mother_summary_address=c.edt.father_summary_address,c.edt.mother_phone=c.edt.father_phone,c.edt.mother_po_box=c.edt.father_po_box,c.edt.mother_mobile=c.edt.father_mobile,c.edt.mother_occupation=c.edt.father_occupation,c.edt.mother_email=c.edt.father_email,c.edt.mother_company=c.edt.father_company):(c.edt.mother_appartment_number="",c.edt.mother_area_number="",c.edt.mother_building_number="",c.edt.mother_street_number="",c.edt.mother_city="",c.edt.mother_state="",c.edt.mother_country_code="",c.edt.mother_po_box="",c.edt.mother_nationality1_code="",c.edt.mother_nationality2_code="",c.edt.mother_summary_address="",c.edt.mother_phone="",c.edt.mother_po_box="",c.edt.mother_mobile="",c.edt.mother_occupation="",c.edt.mother_email="",c.edt.mother_company="")},c.chk_copy_guar_add1=function(){1==c.edt.copy_add1?(c.edt.guardian_appartment_number=c.edt.father_appartment_number,c.edt.guardian_area_number=c.edt.father_area_number,c.edt.guardian_building_number=c.edt.father_building_number,c.edt.guardian_street_number=c.edt.father_street_number,c.edt.guardian_city=c.edt.father_city,c.edt.guardian_state=c.edt.father_state,c.edt.guardian_country_code=c.edt.father_country_code,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_nationality1_code=c.edt.father_nationality1_code,c.edt.guardian_nationality2_code=c.edt.father_nationality2_code,c.edt.guardian_summary_address=c.edt.father_summary_address,c.edt.guardian_phone=c.edt.father_phone,c.edt.guardian_po_box=c.edt.father_po_box,c.edt.guardian_mobile=c.edt.father_mobile,c.edt.guardian_occupation=c.edt.father_occupation,c.edt.guardian_email=c.edt.father_email,c.edt.guardian_company=c.edt.father_company):(c.edt.guardian_appartment_number="",c.edt.guardian_area_number="",c.edt.guardian_building_number="",c.edt.guardian_street_number="",c.edt.guardian_city="",c.edt.guardian_state="",c.edt.guardian_country_code="",c.edt.guardian_po_box="",c.edt.guardian_nationality1_code="",c.edt.guardian_nationality2_code="",c.edt.guardian_summary_address="",c.edt.guardian_phone="",c.edt.guardian_po_box="",c.edt.guardian_mobile="",c.edt.guardian_occupation="",c.edt.guardian_email="",c.edt.guardian_company="")},c.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(),d.detailsField=!1,d.colsvis=!1,d.getsubdetail())})},d.reset_data=function(){d.filteredTodos=[]},d.ischeck=function(){d.checklick=function(){var e=document.getElementById("expire");1==e.checked&&e.checked}}}])}(),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("StudentReceivableLedgerReportCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter",function(d,e,t,a,o,s,n,i){d.temp={},d.detailsField=!0,d.hideprintpdf=!1,d.student_analysis=!0,d.temp.other_fee_flag=!0,d.temp.cumfeeflag=!1,d.pagesize="50",d.pageindex="0",d.busy=!1,d.pager=!0,d.isSummaryChecked=!1,d.SchoolLogo=n.docUrl+s.defaults.headers.common.schoolId+"/Images/SchoolLogo/";s.defaults.headers.common.schoolId;var c=new Date,r=c.getDate(),l=c.getMonth()+1,r=(c.getFullYear(),(c=new Date).getDate());t.globals.currentUser.username;r<10&&(r="0"+r);(l=c.getMonth()+1)<10&&(l="0"+l);var m=c.getFullYear(),t=(d.sdate=r+"-"+l+"-"+m,d.edate=r+"-"+l+"-"+m,d.from_date1=r+"-"+l+"-"+m,d.from_date=r+"-"+l+"-"+m,d.to_date=r+"-"+l+"-"+m,d.finnDetail=JSON.parse(window.localStorage.Finn_comp),d.finnDetail.year);$(function(){$("#chkmarks").click(function(){$(this).is(":checked")?($("#fdate").attr("disabled","disabled"),d.from_date=""):($("#fdate").removeAttr("disabled"),$("#fdate").focus(),d.from_date=r+"-"+l+"-"+m)})}),$(function(){$("#chkmarks1").click(function(){$(this).is(":checked")?($("#fdate").attr("disabled","disabled"),d.mom_end_date=""):($("#fdate").removeAttr("disabled"),$("#fdate").focus(),d.mom_end_date=r+"-"+l+"-"+m)})}),$(document).ready(function(){$("#from_date_new").kendoDatePicker({format:"dd-MM-yyyy"})}),$(document).ready(function(){$("#to_date_new").kendoDatePicker({format:"dd-MM-yyyy"})}),s.get(n.apiUrl+"api/GLSLQuery/getdateoption_GL_Query?").then(function(e){d.Date_option=e.data,setTimeout(function(){$("#cmb_date_opt").select2()},100)}),s.get(n.apiUrl+"api/GLSLQuery/getDate_SL_Query?finance_year="+t).then(function(e){d.getDates=e.data,0{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)}},d.makeTodos=function(){var e,t;"All"==d.pagesize?(d.currentPage=1,d.showPager=!1,d.filteredTodos=d.students):(e=parseInt(d.totalItems%d.numPerPage),d.pagersize="0"==e?parseInt(d.totalItems/d.numPerPage):parseInt(d.totalItems/d.numPerPage)+1,e=(d.currentPage-1)*d.numPerPage,t=parseInt(e)+parseInt(d.numPerPage),console.log("begin="+e),console.log("end="+t),d.filteredTodos=d.todos.slice(e,t))},s.get(n.apiUrl+"api/common/getCuriculum").then(function(e){d.cur_data=e.data,d.temp.sims_cur_code=d.cur_data[0].sims_cur_code,d.getAcademic_year(d.cur_data[0].sims_cur_code)}),d.getAcademic_year=function(e){s.get(n.apiUrl+"api/common/getAcademicYear?curCode="+d.temp.sims_cur_code).then(function(e){d.acad_data=e.data,d.temp.sims_academic_year=d.acad_data[0].sims_academic_year})},s.get(n.apiUrl+"api/family_statement/getParent_student_status").then(function(e){d.satus=e.data,d.temp.parent_flag=d.satus[0].code}),d.calculateTotalFee=function(t){let a=0;return d.students.forEach(e=>{e.Fees[t]&&(a+=parseFloat(e.Fees[t].Amount))}),a.toFixed(2)},d.showTable=!1,d.getdetail1=function(){d.OB_total=0,d.CB_total=0,d.inv_total=0,d.tran_total=0,d.colsvis=!1,d.date=d.from_date,d.acad=$("#acad_box option:selected").text(),d.cur=$("#cur_box option:selected").text(),d.user=$("#user_box option:selected").text(),d.showTable=!1,d.pager=!1,d.detailsField=!0,d.busy=!0,s.get(n.apiUrl+"api/GLSLQuery/GetStudentReceivableLedgerReport?from_date="+d.from_date+"&to_date="+d.to_date+"&sumView="+d.isSummaryChecked).then(function(e){0{d.OB_total=(parseFloat(d.OB_total)+parseFloat(e.student_opening_balance_amount)).toFixed(2),d.CB_total=(parseFloat(d.CB_total)+parseFloat(e.student_closing_balance_amount)).toFixed(2),d.inv_total=(parseFloat(d.inv_total)+parseFloat(e.student_invoice_amount)).toFixed(2),d.tran_total=(parseFloat(d.tran_total)+parseFloat(e.student_paid_amount)).toFixed(2)})):(e=d.processData(d.report_data_new),d.students=e.students,d.feeTypes=e.feeTypes,d.students.forEach((e,t)=>{d.OB_total=(parseFloat(d.OB_total)+parseFloat(e.OB)).toFixed(2),d.CB_total=(parseFloat(d.CB_total)+parseFloat(e.CB)).toFixed(2)})),d.total_length=angular.copy(d.students.length),d.totalItems=d.students.length,d.todos=d.students,d.makeTodos(),d.busy=!1,console.log("$scope.pagesize",d.pagesize),e=$("#Select1").val(),d.size(e)):(d.busy=!1,d.filteredTodos=[],swal({title:"Alert",text:"Data is not Found",showCloseButton:!0,width:300,height:200}))})},d.searched=function(e,o){return _.filter(e,function(e){return d.isSummaryChecked?(a=o,-1<(t=e).sltr_slmast_acno.toLowerCase().indexOf(a.toLowerCase())||-1c.invoiceAmt?(swal({text:"Amount should be less than "+c.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),c.Bankdetails[e].gldd_doc_amount=parseFloat(c.Bankdetails[e].invoice).toFixed(3),c.total=parseFloat(c.Bankdetails[e].invoice).toFixed(3)):c.total=parseFloat(parseFloat(c.total)+parseFloat(c.Bankdetails[e].gldd_doc_amount)+parseFloat(c.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},c.Update=function(){for(var e=0;et&&(t=c.dep_data[a].glma_dept_no,c.edt5.sims_dep=t)}),c.DocNarr=[],i.get(_.apiUrl+"api/JVCreation/getDoc_Remarks?&cmp_cd="+l+"&fyear="+m+"&doc_code="+c.temp3.gltd_doc_code+"&remark_type=Bank_Payment").then(function(e){if(c.DocNarration=e.data,0c.invoiceAmt?(swal({text:"Amount should be less than "+c.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),c.Bankdetails[e].gldd_doc_amount=parseFloat(c.Bankdetails[e].invoice).toFixed(3),c.total=parseFloat(c.Bankdetails[e].invoice).toFixed(3)):c.total=parseFloat(parseFloat(c.total)+parseFloat(c.Bankdetails[e].gldd_doc_amount)+parseFloat(c.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},c.voucherdisable=!1,c.UPDATE_temp_docs=function(){c.voucherdisable=!0;var e,t=[];if(""!=c.temp3.gltd_doc_code&&null!=c.temp3.gltd_doc_code){for(let e=0;ee.gldd_acct_name),!1===c.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===c.chk_condition&&(void 0===c.totalfinal||"NaN"===c.totalfinal||"0.000"===c.totalfinal||0===c.totalfinal||""===c.totalfinal))return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300})}c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0,x="Save",c.Insert_temp_docs()}}else c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0,x="Save",c.Insert_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},c.Verify=function(){try{if(0e.gldd_acct_name),!1===c.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===c.chk_condition&&(void 0===c.totalfinal||"NaN"===c.totalfinal||"0.000"===c.totalfinal||0===c.totalfinal||""===c.totalfinal))return void swal({text:"Please Enter Amount",showCloseButton:!0,width:380,height:300})}c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0,x="Verify",c.Insert_temp_docs()}}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},c.Authorize=function(){c.chkcost_Ac=!1,c.cost_combo_Ac=!1;try{if(0e.gldd_acct_name),!1===c.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===c.chk_condition&&(void 0===c.totalfinal||"NaN"===c.totalfinal||"0.000"===c.totalfinal||0===c.totalfinal||""===c.totalfinal))return void swal({text:"Please enter amount",showCloseButton:!0,width:380,height:300})}!0!==c.chk_condition||void 0===c.totalfinal&&"NaN"===c.totalfinal&&"0.000"===c.totalfinal&&0===c.totalfinal&&""===c.totalfinal||(c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0,x="Authorize",c.Insert_temp_docs())}else c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0,x="Authorize",c.Insert_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},c.ClearInsert=function(){c.vis.updaten=!1,c.showButtons=!0,c.temp3.gltd_prov_doc_no="",c.temp3.gltd_doc_code1="",c.totalfinal=0,c.Bankdetails=[],c.doc_detail_data=[],c.Bankdetails.push({gldd_vat_enable:"Y"==u,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),c.total=0,c.temp={gltd_cheque_No:"",gltd_paid_to:"",gltd_doc_narr1:"",gltd_doc_remark:""},c.block4="",c.doc_data=!1,c.Doc_table=!1,c.getSLAccNo(c.Bankdetails[c.Bankdetails.length-1],c.Bankdetails.length-1)},c.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()},c.check_post_date=function(){null==c.edt4.PostDate&&""==c.edt4.PostDate||i.get(_.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+c.edt4.PostDate+"&comp_cd="+l+"&fyear="+m).then(function(e){c.msg=e.data,""!=c.msg?(swal({text:c.msg,width:300,height:200}),c.preparebtn=!0,c.verifybtn=!0,c.authorizebtn=!0):0!=c.users.length&&(c.users[0]==r&&c.users[1]==r?(c.preparebtn=!1,c.verifybtn=!1,c.authorizebtn=!1):(c.users[0]!=r||""!=c.users[1]&&c.users[1]==r?(c.preparebtn=!1,c.verifybtn=!0):(c.verifybtn=!1,c.preparebtn=!1),c.authorizebtn=!0))})},c.show_bills=function(){document.getElementById("mainchk").checked=!1;var e={gldd_comp_code:l,finance_year:m,gldd_doc_code:c.temp3.gltd_doc_code,gldd_ledger_code:c.edt.sllc_ldgr_code,gldd_acct_code:c.edt.gldd_acct_code,gldd_party_ref_no:c.edt1.gldd_acct_code};"00"==c.edt.sllc_ldgr_code||null==c.edt.sllc_ldgr_code||""==c.edt.sllc_ldgr_code?swal({text:"Please Select Except General Ledger",imageUrl:"assets/img/close.png",width:300,height:200}):c.edt.gldd_acct_code?(c.Billdetailsdata=[],$("#Billdetails").modal("show"),i.post(_.apiUrl+"api/BankPayment/BillDetails",e).then(function(e){if(c.billdata=e.data,c.billdata)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(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)})}),c.reset=function(){c.Docno="0",c.budgetdesc=!1,c.temp.gltd_doc_narr1=null,c.edt5.master_acno=null,c.edt5.sims_dep=null,c.edt5.sims_dep="",c.temp.gltd_cheque_No=null,c.temp.gltd_cheque_No="",c.temp.gltd_paid_to=null,c.temp.gltd_paid_to="",c.totalfinal=0,c.edt5.sims_dep=null,c.edt5.sims_dep=""},c.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)},c.ddt={},c.file_changed=function(e,t){if(10485760e.gldd_acct_name),!1===i.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===i.chk_condition){if(0==i.totalfinal||void 0===i.totalfinal||"NaN"===i.totalfinal||"0.000"===i.totalfinal||0===i.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0,D="Save",i.Update_temp_docs()}}else D="Save",i.Update_temp_docs();else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},i.Update_temp_docs=function(){var e=[];null==i.temp1&&(i.temp1="");for(let e=0;et&&(t=i.dep_data[a].glma_dept_no,i.edt5.sims_dep=t)}),i.DocNarr=[],c.get(_.apiUrl+"api/JVCreation/getDoc_Remarks?&cmp_cd="+r+"&fyear="+l+"&doc_code="+i.temp.gltd_doc_code+"&remark_type=Bank_Receipt").then(function(e){if(i.DocNarration=e.data,0i.invoiceAmt?(swal({text:"Amount should be less than "+i.invoiceAmt,imageUrl:"assets/img/close.png",width:400,height:250}),i.Bankdetails[e].gldd_doc_amount=parseFloat(i.Bankdetails[e].invoice).toFixed(3),i.total=parseFloat(i.Bankdetails[e].invoice).toFixed(3)):i.total=parseFloat(parseFloat(i.total)+parseFloat(i.Bankdetails[e].gldd_doc_amount)+parseFloat(i.Bankdetails[e].gldd_doc_vat_amt)).toFixed(3)},i.up=function(e){i.Add_btn=!1,i.updatebtn=!0,i.readonly=!0,i.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,i.getSLAccNo(i.edt.sllc_ldgr_code),i.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}},i.Update=function(){for(var e=0;ee.gldd_acct_name),!1===i.chk_condition)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});if(!0===i.chk_condition&&(void 0===i.totalfinal||"NaN"===i.totalfinal||"0.000"===i.totalfinal||0===i.totalfinal))return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300})}i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0}D="Save",i.Insert_temp_docs()}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},i.Verify=function(){try{if(0e.gldd_acct_name),!1===i.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===i.chk_condition){if(void 0===i.totalfinal||"NaN"===i.totalfinal||"0.000"===i.totalfinal||0===i.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});continue}i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0,D="Verify",i.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){}},i.Authorize=function(){try{if(0e.gldd_acct_name),!1===i.chk_condition)swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});else if(!0===i.chk_condition){if(void 0===i.totalfinal||"NaN"===i.totalfinal||"0.000"===i.totalfinal||0===i.totalfinal)return void swal({text:"Please enter Transaction details",showCloseButton:!0,width:380,height:300});continue}i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0,D="Authorize",i.Insert_temp_docs()}else swal({text:"Please Add Doc Details",showCloseButton:!0,width:380})}catch(e){}},i.ClearInsert=function(){i.temp1.gltd_doc_narr1="",i.temp1.gltd_paid_to="",i.vis.updaten=!1,i.showButtons=!0,i.totalfinal="",i.temp.gltd_prov_doc_no="",i.temp.gltd_doc_code1="",i.Bankdetails=[],i.doc_detail_data=[],i.doc_data=!1,i.Bankdetails=[],i.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),i.total=0,i.temp.gltd_cheque_No="",i.temp1={gltd_doc_narr1:"",gltd_doc_remark:"",gltd_paid_to:""},i.getSLAccNo(i.Bankdetails[i.Bankdetails.length-1],i.Bankdetails.length-1)},i.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()},i.check_post_date=function(){null==i.edt4.PostDate&&""==i.edt4.PostDate||c.get(_.apiUrl+"api/JVCreation/Get_Check_Postdate?post_date="+i.edt4.PostDate+"&comp_cd="+r+"&fyear="+l).then(function(e){i.msg=e.data,""!=i.msg?(swal({text:i.msg,width:300,height:200}),i.preparebtn=!0,i.verifybtn=!0,i.authorizebtn=!0):0!=i.users.length&&(i.users[0]==n&&i.users[1]==n?(i.preparebtn=!1,i.verifybtn=!1,i.authorizebtn=!1):(i.users[0]!=n||""!=i.users[1]&&i.users[1]==n?(i.preparebtn=!1,i.verifybtn=!0):(i.verifybtn=!1,i.preparebtn=!1),i.authorizebtn=!0))})},c.get(_.apiUrl+"api/JVCreation/Getdocument_type").then(function(e){i.document_type=e.data}),i.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)})}),i.reset=function(){i.temp1.gltd_doc_narr1="",i.edt5.master_acno=null,i.edt5.sims_dep=null,i.edt5.sims_dep="",i.temp.gltd_cheque_No=null,i.temp.gltd_cheque_No="",i.temp.gltd_paid_to=null,i.Bankdetails=[],i.totalfinal="",i.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),i.doc_detail_data=[],i.temp1.gltd_paid_to="",i.edt5.sims_dep=null,i.edt5.sims_dep="",i.getSLAccNo(i.Bankdetails[i.Bankdetails.length-1],i.Bankdetails.length-1)},i.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)},i.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),i.prdocdata[t].gldd_doc_amount_credit=o+"."+a)},i.Docno="0",i.insertDocuments=function(){var e=[],t=1;if(1==i.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+"