!function(){"use strict";angular.module("sims.module.teacher",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.teacher").controller("TeacherController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.turl=e.ObjSchoolDetails.lic_website_url,"asd"!=n.defaults.headers.common.schoolId&&"aps"!=n.defaults.headers.common.schoolId&&"lwg"!=n.defaults.headers.common.schoolId&&"aelc"!=n.defaults.headers.common.schoolId&&"smsm"!=n.defaults.headers.common.schoolId||(e.hide_tile=!0),e.getTeachersList=function(){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,"brs"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/teacher/getTeachersListNew?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,e.access=!0}):"asd"==n.defaults.headers.common.schoolId||"aps"==n.defaults.headers.common.schoolId||"lwg"==n.defaults.headers.common.schoolId||"aelc"==n.defaults.headers.common.schoolId||"smsm"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/teacher/getTeachersListAsd?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,t.data.length>0?e.chk_no_found=!1:e.chk_no_found=!0}):n.get(r.apiUrl+"api/teacher/getTeachersList?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,t.data.length>0?e.chk_no_found=!1:e.chk_no_found=!0})},e.open_link=function(e){setTimeout(function(){$("#sidr").toggleChat()},1e3),window.open(e,"_new")},e.contentClick=function(){},a.globals.studentsLoaded&&e.getTeachersList(),e.$on("student_change",function(){e.getTeachersList()})}])}(),angular.module("sims.module.teacher").directive("errSrc",["$scope","gettextCatalog",function(e,t){return{link:function(e,t,a){t.bind("error",function(){a.src!=a.errSrc&&a.$set("src",a.errSrc)})}}}]),function(){"use strict";angular.module("sims.module.teacher").controller("communicationController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.uploading_doc1=!0,e.mainnn=!0,e.display=!1,e.show_subject=!0,e.newchat=!1,e.comm_filename=!1,"asd"!=n.defaults.headers.common.schoolId&&"aps"!=n.defaults.headers.common.schoolId&&"lwg"!=n.defaults.headers.common.schoolId&&"aelc"!=n.defaults.headers.common.schoolId&&"smsm"!=n.defaults.headers.common.schoolId||(e.hide_tile=!0);var i,l=n.defaults.headers.common.schoolId;e.path1=r.docUrl+l+"/Images/MessageFile/",e.link=function(t){window.open(e.path1+t,"_new")},e.path2=r.docUrl+l+"/Docs/Student/",e.comurl=e.ObjSchoolDetails.lic_website_url+"Docs/Student/",e.viewfile=function(t){window.open(e.comurl+t,"_new")},n.get(r.apiUrl+"api/ParentPortal/Communication/getParentID?enrollNumber="+a.globals.currentStudent.enroll_number).then(function(t){e.parent_id2=t.data,e.pid2=e.parent_id2[0].pid2}),e.getTeachersList=function(){e.newchat=!1,e.turl=e.ObjSchoolDetails.lic_website_url+"/",e.prev_img="",e.studentName=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/ParentPortal/Communication/getParentID?enrollNumber="+a.globals.currentStudent.enroll_number).then(function(t){e.parent_id=t.data,e.pid=e.parent_id[0].pid}),"brs"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/teacher/getTeachersListNew?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,e.access=!0}):"asd"==n.defaults.headers.common.schoolId||"aps"==n.defaults.headers.common.schoolId||"lwg"==n.defaults.headers.common.schoolId||"aelc"==n.defaults.headers.common.schoolId||"smsm"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/teacher/getTeachersListAsd?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,t.data.length>0?e.chk_no_found=!1:e.chk_no_found=!0}):n.get(r.apiUrl+"api/teacher/getTeachersList?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data,t.data.length>0?e.chk_no_found=!1:e.chk_no_found=!0}),e.previousMessage=function(){if(e.currentIndex>0){e.currentIndex--;const t=e.comm_subject[e.currentIndex];e.onsubjectClk1(t,e.currentIndex)}},e.nextMessage=function(){if(e.currentIndex{e.current_subject="",n.get(r.apiUrl+"api/ParentPortal/Communication/getCommunicationSubject?sender="+e.pid+"&receiver="+e.tnm.sims_teacher_login_code+"&enrollNumber="+a.globals.currentStudent.enroll_number).then(function(t){e.comm_subject=t.data,console.log("zzz",e.comm_subject)}),n.get(r.apiUrl+"api/teacher/getTeachersList?enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.teachers=t.data})}),e.teacherClick1=function(t,s){e.newchat=!0;for(var o=0;o0)for(let t=0;t0)for(let t=0;t0)for(let t=0;t0)for(let t=0;t0)for(var s=0;s0)for(var s=0;s0&&""!=e.upldurl[0].sims_appl_form_field_value1?e.uploadurl=e.upldurl[0].sims_appl_form_field_value1:e.uploadurl="https://api.mograsys.com/kindoapi/"}),e.editFatherDetails=function(){e.Fname=!0,$("#myModal").modal("show")},e.FatherOtherDetailsClick=function(){$("#FatherOtherDetails").modal("show")},e.saveFatherOtherDetails=function(){var t={sims_parent_number:a.globals.currentUser.username,sims_parent_father_company:e.obj.sims_admission_father_company,sims_parent_father_family_name:e.obj.sims_admission_family_name_en,sims_parent_father_building_number:e.obj.sims_admission_father_building_number,sims_parent_father_street_number:e.obj.sims_admission_father_street_number,sims_parent_father_occupation:e.obj.sims_admission_father_occupation,sims_parent_father_dob:i(e.obj.sims_parent_father_dob)};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=FAD&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,e.fod?swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.saveMotherOtherDetails=function(){var t={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_building_number:e.obj.sims_admission_mother_building_number,sims_parent_mother_street_number:e.obj.sims_admission_mother_street_number,sims_parent_mother_company:e.obj.sims_admission_mother_company,sims_parent_mother_family_name:e.obj.sims_admission_mother_family_name_en,sims_parent_mother_occupation:e.obj.sims_admission_mother_occupation,sims_parent_mother_dob:i(e.obj.sims_parent_mother_dob)};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MAD&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,e.fod?swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.saveFatherDetails=function(){var t;"seps"==n.defaults.headers.common.schoolId?(t={sims_parent_number:a.globals.currentUser.username,sims_parent_father_first_name:e.obj.sims_admission_father_first_name,sims_parent_father_middle_name:e.obj.sims_admission_father_middle_name,sims_parent_father_last_name:e.obj.sims_admission_father_last_name,sims_parent_father_email:e.obj.sims_admission_father_email,sims_parent_father_summary_address:e.obj.sims_admission_father_summary_address,sims_parent_father_country_code:e.obj.sims_parent_father_country_code_c,sims_parent_father_state:e.obj.sims_admission_father_state_c,sims_parent_father_city:e.obj.sims_admission_father_city_c,sims_parent_father_po_box:e.obj.sims_admission_father_po_box,sims_parent_father_phone:e.obj.sims_admission_father_phone,sims_parent_father_mobile:e.obj.sims_admission_father_mobile,sims_parent_father_fax:e.obj.sims_admission_father_fax,sims_parent_father_passport_number:e.obj.sims_admission_father_passport_number,sims_parent_father_nationality1_code:e.obj.sims_parent_father_nationality1_code_c,sims_parent_father_national_id:e.obj.sims_parent_father_national_id},n.post(r.apiUrl+"api/parent/updateParentDetails_seps?opr=FP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})):(t={sims_parent_number:a.globals.currentUser.username,sims_parent_father_first_name:e.obj.sims_admission_father_first_name,sims_parent_father_middle_name:e.obj.sims_admission_father_middle_name,sims_parent_father_last_name:e.obj.sims_admission_father_last_name,sims_parent_father_email:e.obj.sims_admission_father_email,sims_parent_father_summary_address:e.obj.sims_admission_father_summary_address,sims_parent_father_country_code:e.obj.sims_parent_father_country_code_c,sims_parent_father_state:e.obj.sims_admission_father_state_c,sims_parent_father_city:e.obj.sims_admission_father_city_c,sims_parent_father_po_box:e.obj.sims_admission_father_po_box,sims_parent_father_phone:e.obj.sims_admission_father_phone,sims_parent_father_mobile:e.obj.sims_admission_father_mobile,sims_parent_father_fax:e.obj.sims_admission_father_fax,sims_parent_father_passport_number:e.obj.sims_admission_father_passport_number,sims_parent_father_nationality1_code:e.obj.sims_parent_father_nationality1_code_c},n.post(r.apiUrl+"api/parent/updateParentDetails?opr=FP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})}))},e.saveMotherDetails=function(){var t;"seps"==n.defaults.headers.common.schoolId?(t={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_first_name:e.obj.sims_admission_mother_first_name,sims_parent_mother_middle_name:e.obj.sims_admission_mother_middle_name,sims_parent_mother_last_name:e.obj.sims_admission_mother_last_name,sims_parent_mother_email:e.obj.sims_admission_mother_email,sims_parent_mother_summary_address:e.obj.sims_admission_mother_summary_address,sims_parent_mother_country_code:e.obj.sims_admission_mother_country_code_c,sims_parent_mother_state:e.obj.sims_admission_mother_state,sims_parent_mother_city:e.obj.sims_admission_mother_city,sims_parent_mother_po_box:e.obj.sims_admission_mother_po_box,sims_parent_mother_phone:e.obj.sims_admission_mother_phone,sims_parent_mother_mobile:e.obj.sims_admission_mother_mobile,sims_parent_mother_fax:e.obj.sims_admission_mother_fax,sims_parent_mother_passport_number:e.obj.sims_admission_mother_passport_number,sims_parent_mother_nationality1_code:e.obj.sims_parent_mother_nationality1_code_c,sims_parent_mother_national_id:e.obj.sims_parent_mother_national_id},n.post(r.apiUrl+"api/parent/updateParentDetails_seps?opr=MP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})):(t={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_first_name:e.obj.sims_admission_mother_first_name,sims_parent_mother_middle_name:e.obj.sims_admission_mother_middle_name,sims_parent_mother_last_name:e.obj.sims_admission_mother_last_name,sims_parent_mother_email:e.obj.sims_admission_mother_email,sims_parent_mother_summary_address:e.obj.sims_admission_mother_summary_address,sims_parent_mother_country_code:e.obj.sims_admission_mother_country_code_c,sims_parent_mother_state:e.obj.sims_admission_mother_state,sims_parent_mother_city:e.obj.sims_admission_mother_city,sims_parent_mother_po_box:e.obj.sims_admission_mother_po_box,sims_parent_mother_phone:e.obj.sims_admission_mother_phone,sims_parent_mother_mobile:e.obj.sims_admission_mother_mobile,sims_parent_mother_fax:e.obj.sims_admission_mother_fax,sims_parent_mother_passport_number:e.obj.sims_admission_mother_passport_number,sims_parent_mother_nationality1_code:e.obj.sims_parent_mother_nationality1_code_c},n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})}))},e.editmotherDetails=function(){e.Mname=!0,$("#motherDetails").modal("show")},e.motherOtherDetailsClick=function(){$("#motherOtherDetails").modal("show")},e.edit=function(){e.ro=!1,e.eo=!0},e.cancel=function(){e.ro=!0,e.eo=!1},e.save=function(){var t=new Object;t.CustomerId=e.CustomerId,t.CustomerName=e.CustomerName,t.Status=e.Status,n.delete("http://localhost/SIMSAPI/api/madan/madanDelete",{data:t,headers:{"Content-Type":"application/json"}},null).then(function(e){},function(e){}),n.post(r.apiUrl+"api/parent/updateParentInfo?obj="+JSON.stringify(e.obj)).then(function(t){e.obj1=t.data})};var l=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){l.append(t,e)})},e.file_changed=function(t){e.flg_check_photo=!1;var a=t.files[0];imageConversion.compressAccurately(a,{type:"image/jpeg",width:168,size:100}).then(t=>{e.sims_photo_compressed_f=new File([t],"compressed_photo",{type:"image/jpeg"})}),e.photo_filename=a.type;var s=a.name.split(".");if(s=s[s.length-1],t.files[0].size<8e6)if("jpeg"==s||"jpg"==s||"png"==s){var o=new FileReader;o.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},o.readAsDataURL(a)}else swal({title:"File format not Supported. Supporting formats are jpeg , jpg , png",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380}),e.flg_check_photo=!0,setTimeout(function(){e.uploadImgClickFShow=!1},1e3);else swal({title:"Error : File size should be less than 8MB.",imageUrl:"assets/img/notification-alert.png"}),e.flg_check_photo=!0,setTimeout(function(){e.uploadImgClickFShow=!1},1e3)},e.uploadImgClickF=function(){e.uploadImgClickFShow=!0},e.uploadImgCancel=function(){e.uploadImgClickFShow=!1},e.uploadImg=function(){var t=Math.random(),s=new FormData;if($(".loader_f").show(),!1===e.flg_check_photo){if(e.upapi_path="",["facp","smsm","modernjr","smsk","nacasca","gurukulponda","ccw64","sessos","ameyahss","vmsiihe","clarahealtonation","puneiat","christ","dmc","dvhs","dvhss","dvps","modern"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".appsis.co.in/kindoapi/",e.aws_path=!0;var o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);var i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["ang1dev","aas","ang1prod","saisd","saiss","saisa","saids","saisu","sokstaging","tsk","tsis","sisqatar","abps","svs","nas","cbsesmf","ds","sia","sok","uksmf","ics","iisqatar","ges","iis","slis","clarionschool","oesco","abqstaging","demo","asdportal","apsportal","aelc","lpn","bloomeseuaq","bloomesealwadi","modern","abqis","siso","asis"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["portal"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".rakaa.sch.ae/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["asdportal","apsportal"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".amitydubai.ae/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://apiihs.schoolappsuae.com/mograSISAPI/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/file1/uploadDocumentIHS?filename="+a.globals.currentUser.username+"_f"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/file1/uploadDocumentIHS?filename="+a.globals.currentUser.username+"_f"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)){e.upapi_path=r.kindoApi,e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/AssignmentUpload/upload1?filename="+a.globals.currentUser.username+"_f.png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f"+t+"_lowres.png",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/AssignmentUpload/upload1?filename="+a.globals.currentUser.username+"_f_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else{e.upapi_path=r.kindoApi;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f&location="+e.uploading_path,data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_f_lowres",e.sims_photo_compressed_f);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_f_lowres&location="+e.uploading_path,data:s,headers:{"Content-Type":void 0}}}n(o).success(function(t){r.AWS.includes(n.defaults.headers.common.schoolId)&&(t=t.substring(t.lastIndexOf("/")+1));var s=t.replace(".png","_lowres.png"),o={sims_parent_number:a.globals.currentUser.username,sims_parent_father_img:t,sims_parent_father_img_lowres:s};n(i).success(function(e){}),n.post(r.apiUrl+"api/parent/updateParentDetails?opr=FI&parent_details="+JSON.stringify(o)).then(function(e){$(".loader_f").hide(),e.data?swal({title:"Updated",text:"Photo Saved Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Photo not saved",imageUrl:"assets/img/notification-alert.png"})}),e.uploadImgClickFShow=!1,$(".loader_f").hide()})}},e.file_changedM=function(t){e.flg_check_photo=!1;var a=t.files[0];imageConversion.compressAccurately(a,{type:"image/jpeg",width:168,size:100}).then(t=>{e.sims_photo_compressed_m=new File([t],"compressed_photo",{type:"image/jpeg"})}),e.photo_filename=a.type;var s=a.name.split(".");if(s=s[s.length-1],t.files[0].size<8e6)if("jpeg"==s||"jpg"==s||"png"==s){var o=new FileReader;o.onload=function(t){e.$apply(function(){e.prev_imgM=t.target.result})},o.readAsDataURL(a)}else swal({title:"File format not Supported. Supporting formats are jpeg , jpg , png",imageUrl:"assets/img/notification-alert.png",showCloseButton:!0,width:380}),e.flg_check_photo=!0,setTimeout(function(){e.uploadImgClickFShow=!1},1e3);else swal({title:"Error : File size should be less than 8MB.",imageUrl:"assets/img/notification-alert.png"}),e.flg_check_photo=!0,setTimeout(function(){e.uploadImgClickFShow=!1},1e3)},e.uploadImgClickM=function(){e.uploadImgClickMShow=!0},e.uploadImgMCancel=function(){e.uploadImgClickMShow=!1},e.uploadImgM=function(){var t=Math.random(),s=new FormData;if($(".loader_m").show(),!1===e.flg_check_photo){if(e.upapi_path="",["facp","smsm","modernjr","smsk","nacasca","gurukulponda","ccw64","sessos","ameyahss","vmsiihe","clarahealtonation","puneiat","christ","dmc","dvhs","dvhss","dvps","modern"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".appsis.co.in/kindoapi/",e.aws_path=!0;var o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);var i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["ang1dev","aas","ang1prod","saisd","saiss","saisa","saids","saisu","sokstaging","tsk","tsis","sisqatar","abps","svs","nas","cbsesmf","ds","sia","sok","uksmf","ics","iisqatar","ges","iis","slis","clarionschool","oesco","abqstaging","demo","asdportal","apsportal","aelc","lpn","bloomeseuaq","bloomesealwadi","modern","abqis","siso","asis"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["portal"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".rakaa.sch.ae/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["asdportal","apsportal"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://"+n.defaults.headers.common.schoolId+".amitydubai.ae/kindoapi/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom"].includes(n.defaults.headers.common.schoolId)){e.upapi_path="https://apiihs.schoolappsuae.com/mograSISAPI/",e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/file1/uploadDocumentIHS?filename="+a.globals.currentUser.username+"_m"+t+".png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/file1/uploadDocumentIHS?filename="+a.globals.currentUser.username+"_m"+t+"_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else if(["tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)){e.upapi_path=r.kindoApi,e.aws_path=!0;o={method:"POST",url:e.upapi_path+"api/AssignmentUpload/upload1?filename="+a.globals.currentUser.username+"_m.png&location=/Images/ParentImages/",data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m"+t+"_lowres.png",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/AssignmentUpload/upload1?filename="+a.globals.currentUser.username+"_m_lowres.png&location=/Images/ParentImages/",data:s,headers:{"Content-Type":void 0}}}else{e.upapi_path="https://api.mograsys.com/kindoapi/";o={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m&location="+e.uploading_path,data:l,headers:{"Content-Type":void 0}};s.append(a.globals.currentUser.username+"_m_lowres",e.sims_photo_compressed_m);i={method:"POST",url:e.upapi_path+"api/fileNew/uploadDocument?filename="+a.globals.currentUser.username+"_m_lowres&location="+e.uploading_path,data:s,headers:{"Content-Type":void 0}}}n(o).success(function(t){(r.AWS.includes(n.defaults.headers.common.schoolId)||r.isLeamEducation)&&(t=t.substring(t.lastIndexOf("/")+1));var s=t.replace(".png","_lowres.png"),o={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_img:t,sims_parent_mother_img_lowres:s};n(i).success(function(e){}),n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MI&parent_details="+JSON.stringify(o)).then(function(e){$(".loader_m").hide(),e.data?swal({title:"Updated",text:"Photo Saved Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Photo not saved",imageUrl:"assets/img/notification-alert.png"})}),e.uploadImgClickMShow=!1,$(".loader_m").hide()})}}}]),e.directive("ngFiles",["$parse",function(e){return{link:function(t,a,s){var o=e(s.ngFiles);a.on("change",function(e){o(t,{$files:e.target.files})})}}}])}(),function(){"use strict";angular.module("sims.module.attendance",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.attendance").controller("AttendanceController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.eventsList=[];var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.today=i.getFullYear()+"-"+l+"-"+d,e.getstudentList=function(){n.get(r.apiUrl+"api/attendance/getAttendanceMonthly?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade="+a.globals.currentStudent.sims_grade_code+"§ion="+a.globals.currentStudent.sims_section_code).then(function(t){console.log("att"),e.display=!0,e.obj3=t.data,e.eventsList=[];for(var a=0;a0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code))}),e.selectTerm=function(t){for(let a=0;e.obj5.length>a;a++)e.obj5[a].sims_term_code==t&&(e.sims_from_date=e.obj5[a].sims_term_start_date,e.sims_to_date=e.obj5[a].sims_term_end_date,e.getDatewise(e.sims_from_date,e.sims_to_date))},e.getDatewise=function(t,s){var o=(d=t).split("/")[0],i=d.split("/")[1],l=d.split("/")[2];e.fromnew=l+"-"+i+"-"+o;var d;o=(d=s).split("/")[0],i=d.split("/")[1],l=d.split("/")[2];e.tonew=l+"-"+i+"-"+o,n.get(r.apiUrl+"api/attendance/getPPSubjectAttendance?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&from_date="+e.fromnew+"&to_date="+e.tonew).then(function(t){e.obj6=t.data;e.total_cls;let a=0,s=0,o=0,n=0,r=0,i=0,l=0,d=0,_=0;for(let t=0;e.obj6.length>t;t++)a+=parseInt(e.obj6[t].slot_code),e.slot_code_total=a,s+=parseInt(e.obj6[t].present_stud),e.present_total=s,o+=parseInt(e.obj6[t].absent_stud),e.absent_total=o,n+=parseInt(e.obj6[t].j_medical),e.jm_total=n,r+=parseInt(e.obj6[t].j_medical_new),e.jm_new_total=r,i+=parseInt(e.obj6[t].un_justified),e.uj_total=i,l+=parseInt(e.obj6[t].justified_duty),e.jd_total=l,d+=parseInt(e.obj6[t].total),e.t_total=d;_=Math.round(parseInt(100*parseInt(e.t_total)/parseInt(e.slot_code_total))),e.totper=_})},e.today="2018-10-09",n.get(r.apiUrl+"api/attendance/getPPSubjectAttendance?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&from_date="+e.sims_from_date+"&to_date="+e.sims_to_date).then(function(t){e.obj6=t.data}),e.getstudentList=function(){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/attendance/getAttendanceMonthly?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade="+a.globals.currentStudent.sims_grade_code+"§ion="+a.globals.currentStudent.sims_section_code).then(function(t){e.obj3=t.data})},e.$on("student_change",function(t,a){e.getstudentList()}),a.globals.studentsLoaded&&e.getstudentList(),$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top right",autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy"}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("AssignmentMarksGkpController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeOut("slow"),e.display=!1;var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.obj6=[],e.temp=[],e.obj={},e.enrollno=a.globals.currentStudent.enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,"smsm"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/attendance/getPPSectionTermSMSM?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code)),console.log(e.obj5)}):n.get(r.apiUrl+"api/attendance/getPPSectionTermDMC?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code)),console.log(e.obj5)}),e.selectTerm=function(t){n.get(r.apiUrl+"api/attendance/getAssignmentName?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+t).then(function(t){e.assignNames=t.data,console.log(e.assignNames),e.assignNames.length>0&&(e.obj.sims_assignment_name=e.assignNames[0].sims_assignment_name)})},e.selectAssignment=function(t){e.assignment=t},e.getData=function(){n.get(r.apiUrl+"api/attendance/getPPStudentAssignmentMarks?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+e.obj.sims_term_code+"&assignmentname="+e.obj.sims_assignment_name).then(function(t){if(e.obj6=t.data,console.log(e.obj6),e.total_Max=0,e.total_Mark_obt=0,e.total_Mark=0,e.obj6.length>0){e.names=e.obj6[0].student_name;for(var s=0;e.obj6.length>s;s++)e.total_Max+=parseInt(e.obj6[s].theory_max_score,10),""!=e.obj6[s].theory_mark&&(e.total_Mark_obt+=parseFloat(e.obj6[s].theory_mark,10)),""!=e.obj6[s].tot_marks&&(e.total_Mark+=parseFloat(e.obj6[s].tot_marks,10));console.log(e.total_Max)}else e.names=a.globals.currentStudent.sims_student_passport_fullname})},e.getData(),e.$on("student_change",function(t,a){e.getData()}),a.globals.studentsLoaded&&e.getData()}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("AssignmentMarksController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeOut("slow"),e.display=!1;var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.obj6=[],e.temp=[],e.obj={},e.enrollno=a.globals.currentStudent.enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/attendance/getPPSectionTermDMC?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code)),console.log(e.obj5)}),e.selectTerm=function(t){n.get(r.apiUrl+"api/attendance/getAssignmentName?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+t).then(function(t){e.assignNames=t.data,console.log(e.assignNames),e.assignNames.length>0&&(e.obj.sims_assignment_name=e.assignNames[0].sims_assignment_name)})},e.selectAssignment=function(t){e.assignment=t},e.getData=function(){n.get(r.apiUrl+"api/attendance/getPPStudentAssignmentMarks?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+e.obj.sims_term_code+"&assignmentname="+e.obj.sims_assignment_name).then(function(t){e.obj6=t.data,console.log(e.obj6),e.obj6.length>0?e.names=e.obj6[0].student_name:e.names=a.globals.currentStudent.sims_student_passport_fullname})},e.getData(),e.$on("student_change",function(t,a){e.getData()}),a.globals.studentsLoaded&&e.getData()}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("AssignmentMarksCorvController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeOut("slow"),e.display=!1;var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.obj6=[],e.temp=[],e.obj={},e.getstudentList=function(){e.enrollno=a.globals.currentStudent.enroll_number,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.sims_grade_code=a.globals.currentStudent.sims_grade_code,e.sims_section_code=a.globals.currentStudent.sims_section_code,e.sims_student_passport_fullname_new=a.globals.currentStudent.sims_student_passport_fullname_new,e.names=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/attendance/getAssignmentSubject?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.assignSubject=t.data,console.log("assignSubject",e.assignSubject)}),n.get(r.apiUrl+"api/attendance/getPPSectionTermCORV?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code),console.log(e.obj5)})},e.selectAssignment=function(t){e.assignment=t,e.subject_name_new=""},e.getData=function(t,s){n.get(r.apiUrl+"api/attendance/getPPStudentAssignmentMarks_corv?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+t+"&assignmentname="+s).then(function(t){e.obj6=t.data,e.subject_name_new=e.obj6[0].subject_name,e.percent=e.obj6[0].percenatage,console.log("sttudent mark details",e.obj6)})},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("GpsAttendanceController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.temp={},e.obj={};var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.temp.startdate=d+"/"+l+"/"+i.getFullYear(),e.temp.enddate=d+"/"+l+"/"+i.getFullYear(),jQuery.isEmptyObject(a.globals.currentStudent)||(e.enrollno=a.globals.currentStudent.enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname),e.getstartdate=function(){var t=e.temp.startdate,a=t.split("/")[0],s=t.split("/")[1],o=t.split("/")[2];e.fromnew=o+"-"+s+"-"+a},e.gettodate=function(){var t=e.temp.enddate,a=t.split("/")[0],s=t.split("/")[1],o=t.split("/")[2];e.tonew=o+"-"+s+"-"+a},e.gettodate(),e.getstartdate(),e.getstudentList=function(){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/common/getGpsStudentAttendanceIHS?enroll="+e.enrollno+"&startDate="+e.fromnew+"&endDate="+e.tonew).then(function(t){e.obj=t.data,e.obj6=[],"success"==e.obj.status?(angular.forEach(e.obj.StudentDetails,function(t,a){var s={vehicleno:t.vehicleno,StartLocation:t["Start Location"],EndLocation:t["End Location"],LoginTime:t["Login Time"],LogoutTime:t["Logout Time"]};e.obj6.push(s)}),console.log(e.obj6)):swal(e.obj.message)})},e.$on("student_change",function(t,a){e.getstudentList()}),a.globals.studentsLoaded&&e.getstudentList(),$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top right",autoclose:!0,todayHighlight:!0,format:"dd/mm/yyyy"}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus(),console.log(e)})}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("AssignmentMarksSaisdController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeOut("slow"),e.display=!1;var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.obj6=[],e.temp=[],e.obj={},e.getstudentList=function(){e.enrollno=a.globals.currentStudent.enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/student/getStudentGradeSection?enroll_num="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.current_student_info=t.data[0],e.current_student_info.cur_code,e.current_student_info.academic_year,e.current_student_info.grade_code,e.current_student_info.section_code,e.getPPsectionTerm()}),e.getPPsectionTerm=function(){n.get(r.apiUrl+"api/attendance/getPPSectionTermSAISD?cur_code="+e.current_student_info.cur_code+"&ac_year="+e.current_student_info.academic_year+"&grade_code="+e.current_student_info.grade_code+"§ion_code="+e.current_student_info.section_code).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code),e.getAcademicYr())})},n.get(r.apiUrl+"api/common/getCuriculum").then(function(t){e.display=!0,e.cur_data=t.data,e.getAcademicYr()}),e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.getAcademicYr=function(){n.get(r.apiUrl+"api/common/getAllAcademicYear?cur_code="+e.current_student_info.cur_code).then(function(t){e.display=!0,e.acad_data=t.data,e.obj.sims_academic_year=e.acad_data[0].sims_academic_year})},n.get(r.apiUrl+"api/common/getAllAcademicYear?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.acad_data=t.data}),e.selectTerm=function(t){n.get(r.apiUrl+"api/attendance/getAssignmentNameSAISD?cur_code="+e.current_student_info.cur_code+"&ac_year="+e.current_student_info.academic_year+"&grade_code="+e.current_student_info.grade_code+"§ion_code="+e.current_student_info.section_code+"&term="+t+"&enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.assignNames=t.data})},e.getData=function(){n.get(r.apiUrl+"api/attendance/getPPStudentAssignmentMarksSAISD?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+e.current_student_info.cur_code+"&ac_year="+e.current_student_info.academic_year+"&grade_code="+e.current_student_info.grade_code+"§ion_code="+e.current_student_info.section_code+"&term="+e.obj.sims_term_code+"&subject_code="+e.obj.sims_assignment_code).then(function(t){e.obj6=t.data})}},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.attendance").controller("CoAssignmentMarksheetController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeOut("slow"),e.display=!1;var i=new Date,l=i.getMonth()+1,d=i.getDate();l<10&&(l="0"+l),d<10&&(d="0"+d),e.obj6=[],e.temp=[],e.obj={},e.enrollno=a.globals.currentStudent.enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/gradebookcoscholastic/getPPSectionTerm?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.grid=!0,e.obj5=t.data,e.obj5.length>0&&(e.obj.sims_term_code=e.obj5[0].sims_term_code,e.selectTerm(e.obj.sims_term_code),e.getAcademicYr())}),n.get(r.apiUrl+"api/common/getCuriculum").then(function(t){e.display=!0,e.cur_data=t.data,e.getAcademicYr()}),e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.getAcademicYr=function(){n.get(r.apiUrl+"api/common/getAllAcademicYear?cur_code="+e.sims_cur_code).then(function(t){e.display=!0,e.acad_data=t.data})},n.get(r.apiUrl+"api/common/getAllAcademicYear?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.acad_data=t.data}),e.selectTerm=function(t){n.get(r.apiUrl+"api/gradebookcoscholastic/getPPSubject?cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+t+"&enrollNo="+a.globals.currentStudent.enroll_number).then(function(t){e.assignNames=t.data})},e.getData=function(){n.get(r.apiUrl+"api/gradebookcoscholastic/getPPStudentCoAssignmentMarks?enrollNo="+a.globals.currentStudent.enroll_number+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&ac_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&term="+e.obj.sims_term_code+"&subject_code="+e.obj.sims_assignment_code).then(function(t){e.obj6=t.data})},e.$on("student_change",function(t,a){e.getData()}),a.globals.studentsLoaded&&e.getData()}])}(),function(){"use strict";angular.module("sims.module.medical",["sims","gettext"])}(),function(){"use strict";var e=angular.module("sims.module.medical");e.directive("validNumber",function(){return{require:"?ngModel",link:function(e,t,a,s){s&&(s.$parsers.push(function(e){if(angular.isUndefined(e))e="";var t=e.replace(/[^0-9]+/g,"");return e!==t&&(s.$setViewValue(t),s.$render()),t}),t.bind("keypress",function(e){32===e.keyCode&&e.preventDefault()}))}}}),e.controller("MedicalController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(e,t,a,s,o,n,r,i){e.display=!1,e.btnEdit=!1,e.btnCancel=!0,e.btnSave=!1,e.t=!0,e.disable=!0,e.tt=!0,e.tp=!1,e.editHeightShow=!0,e.editWeightShow=!0,e.editBloodShow=!0,e.editTeethShow=!0,e.readonly=!0,e.readonlyO=!0,e.onlyges=!1,"asis"!=n.defaults.headers.common.schoolId&&"abqis"!=n.defaults.headers.common.schoolId&&"siso"!=n.defaults.headers.common.schoolId||(e.meicalTile=!0),"amps"!=n.defaults.headers.common.schoolId&&"asis"!=n.defaults.headers.common.schoolId&&"abqis"!=n.defaults.headers.common.schoolId&&"siso"!=n.defaults.headers.common.schoolId&&"asdportal"!=n.defaults.headers.common.schoolId&&"elcportal"!=n.defaults.headers.common.schoolId&&"apsportal"!=n.defaults.headers.common.schoolId&&"lwgportal"!=n.defaults.headers.common.schoolId&&"saisa"!=n.defaults.headers.common.schoolId&&"saiss"!=n.defaults.headers.common.schoolId&&"saisd"!=n.defaults.headers.common.schoolId&&"saisu"!=n.defaults.headers.common.schoolId&&"ges"!=n.defaults.headers.common.schoolId||(e.hide_edit=!0),"ges"==n.defaults.headers.common.schoolId&&(e.onlyges=!0),n.get(r.apiUrl+"api/common/getAllComboBoxValues?academicYear=2015&routeCode=01").then(function(t){e.display=!0,e.cmbres=t.data}),e.saveTeeth=function(){var t={student_teeth:e.obj.student_teeth,enroll:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/medical/updateMediacalDetails?opr=H&medical_details="+JSON.stringify(t)).then(function(t){e.STeeth=t.data}),e.editTeethShow=!0},e.editTeeth=function(){e.editTeethShow=!1},e.cancelTeeth=function(){e.editTeethShow=!0},e.saveBlood=function(){var t={blood_group:e.obj.student_blood_group_code,enroll:a.globals.currentStudent.enroll_number,opr:"J"};n.post(r.apiUrl+"api/medical/updateMediacalDetailsBlood",t).then(function(t){e.STeeth=t.data}),e.editTeethShow=!0},e.editBlood=function(){e.editBloodShow=!1},e.cancelBlood=function(){e.editBloodShow=!0},e.saveWeight=function(){var t={student_wieght:e.obj.student_wieght,enroll:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/medical/updateMediacalDetails?opr=G&medical_details="+JSON.stringify(t)).then(function(t){e.SWeight=t.data}),e.editWeightShow=!0},e.editWeight=function(){e.editWeightShow=!1},e.cancelWeight=function(){e.editWeightShow=!0},e.saveHeight=function(){var t={student_height:e.obj.student_height,enroll:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/medical/updateMediacalDetails?opr=F&medical_details="+JSON.stringify(t)).then(function(t){e.SHeight=t.data}),e.editHeightShow=!0},e.editHeight=function(){e.editHeightShow=!1},e.cancelHeight=function(){e.editHeightShow=!0},e.editEnable=function(){e.readonly=!1},e.editEnableOther=function(){e.readonlyO=!1},e.cancel=function(){e.readonly=!0},e.cancelOther=function(){e.readonlyO=!0},e.saveOther=function(){var t={health_card_number:e.obj.health_card_number,health_card_issue_date:e.obj.health_card_issue_date,health_card_expiry_date:e.obj.health_card_expiry_date,health_card_issuing_authority:e.obj.health_card_issuing_authority,regular_doctor_name:e.obj.regular_doctor_name,regular_doctor_phone:e.obj.regular_doctor_phone,regular_hospital_name:e.obj.regular_hospital_name,regular_hospital_phone:e.obj.regular_hospital_phone,enroll:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/medical/updateMediacalDetails?opr=B&medical_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,swal({title:"Alert",text:"Saved successfully",imageUrl:"assets/img/check.png"})}),e.readonlyO=!0},e.save=function(){var t={student_health_restriction_status:e.obj.student_health_restriction_status,student_disability_status:e.obj.student_disability_status,student_medication_status:e.obj.student_medication_status,health_other_status:e.obj.health_other_status,health_hearing_status:e.obj.health_hearing_status,health_vision_status:e.obj.health_vision_status,enroll:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/medical/updateMediacalDetails?opr=A&medical_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,swal({title:"Alert",text:"Saved successfully",imageUrl:"assets/img/check.png"})}),e.readonly=!0};var l="";e.getMedicalDetails=function(t){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,n.get(r.apiUrl+"api/medical/getMedicalDetails?student_enroll_no="+a.globals.currentStudent.enroll_number).then(function(t){var a;e.display=!0,e.obj=t.data,void 0!=e.obj.student_height&&void 0!=e.obj.student_wieght&&(a=e.obj.student_wieght/(e.obj.student_height/100*(e.obj.student_height/100))),e.lbl_bmi="",e.lbl_bmi=a>0&&a<18?"Underweight":a>18&&a<25?"Normalweight":a>25&&a<30?"Overweight":"Obese",0==parseInt(a)&&(e.lbl_bmi="-"),(l=new Gauge({renderTo:"gauge",width:270,height:268,glow:!0,units:e.lbl_bmi,title:!1,minValue:0,maxValue:50,majorTicks:["05","10","15","20","25","30","35","40","45"],minorTicks:2,strokeTicks:!1,highlights:[{from:0,to:18,color:" rgba(255, 255, 0, 65535)"},{from:18,to:25,color:"rgba(50, 205, 50, 3329330)"},{from:25,to:30,color:"rgba(255, 0, 225, .25)"},{from:30,to:50,color:"rgba(255, 69, 0, 17919)"}],colors:{plate:"#fff",majorTicks:"#234567",minorTicks:"#340099",title:"#fff",units:"#234567",numbers:"#234567",needle:{start:"rgba(240, 128, 128, 1)",end:"rgba(255, 160, 122, .9)"}}})).onready=function(){setInterval(function(){void 0!=e.obj.student_height&&void 0!=e.obj.student_wieght&&"-"!=e.obj.student_height&&"-"!=e.obj.student_wieght?l.setValue(e.obj.student_wieght/(e.obj.student_height/100*(e.obj.student_height/100))):l.setValue(0)},1e3)},l.draw()}),n.get(r.apiUrl+"api/medical/getMedicalVisits?enroll_no="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.medi_visit=t.data})},e.edit=function(){e.t=!1,e.disable=!1,e.btnEdit=!1,e.btnSave=!0,e.btnCancel=!0,e.tp=!0,e.tt=!1},e.Cancel=function(){e.t=!0,e.disable=!1,e.btnEdit=!0,e.btnSave=!1,e.btnCancel=!1,e.tt=!0,e.tp=!1},i.flag&&$("html, body").animate({scrollTop:1e3},2e3),e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.fees",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){var i;e.display=!1,e.username=a.globals.currentUser.username,e.previous=[],e.printbtn=!0,e.PreviousFeeDetailsDisplay=!1,e.detailsDisplayTab=!0,"iis"==n.defaults.headers.common.schoolId?e.flg_iis=!0:e.VNamount=!0,"tsis"!=n.defaults.headers.common.schoolId&&"tsk"!=n.defaults.headers.common.schoolId||(e.flg_tsis=!0,e.VNamount=!0),n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data}),e.payModal=function(){$("#payFeeModal").modal("show"),e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee?data="+JSON.stringify(e.IP)).then(function(t){e.StudFeeDetails=t.data,e.currentClass=0})},s(function(){$("#fixTable1").tableHeadFixer({top:1})},100),n.get(r.apiUrl+"api/fees/getPrintOption").then(function(t){e.printbtn=t.data,!0===e.printbtn?e.print=!0:e.print=!1}),e.SalesDetails=function(){n.get(r.apiUrl+"api/common/getAllRecords_dps?enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.sales_lst=t.data})},e.printReport=function(t){var a;$("#report_Modal").modal("show"),e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;a="dmc"==n.defaults.headers.common.schoolId?"SimsReports.Sims.SIMR51_DMCNEWProv,SimsReports":"SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})})},e.printReportSales=function(t){var a;$("#report_Modal").modal("show"),e.parameters={doc_prov_no:t.doc_prov_no},a="SimsReports."+t.reporturl+",SimsReports";var o=window.location.href,i=(o.substring(0,o.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.expand=function(e,t){"none"==e.isexpanded?(e.sims_icon="fa fa-minus-circle",e.isexpanded="grid"):(e.sims_icon="fa fa-plus-circle",e.isexpanded="none")},e.displayTab=function(){e.detailsDisplayTab=!0,e.PreviousFeeDetailsDisplay=!1},e.PreviousFeeDetails=function(){var t;(console.log("Trigger"),e.detailsDisplayTab=!1,e.PreviousFeeDetailsDisplay=!0,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},"abqis"==n.defaults.headers.common.schoolId||"asis"==n.defaults.headers.common.schoolId)?($("#report_Modal").modal("show"),e.parameters={cur_code:a.globals.currentStudent.sims_cur_code,acad_year:a.globals.currentStudent.sims_acad_yr,parent_flag:1,user_no:a.globals.currentStudent.enroll_number,from_date:moment(new Date).format("YYYY-MM-DD"),other_fee_flag:!0,cumfeeflag:!0},n.get("https://api.mograsys.com/kindoapi/api/JVCreation/GetReportUrl?opr=J&sub_opr=family").then(function(a){var o=a.data;t="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:t,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})})):n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+(parseInt(a.globals.currentStudent.sims_acad_yr)+1)+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){angular.forEach(t.data[0],function(t,a){e.feesReceiptData.push(t)}),angular.forEach(t.data[1],function(t,a){e.feesDisReceiptData.push(t),t.sims_icon="fa fa-minus-circle"}),console.log("--------------$scope.feesReceiptData: ",e.feesReceiptData)})})},e.flag=!0,e.expandFee=function(t,a){if(!0===e.flag)for(var s=0;s
Particulars "+s.sims_fee_code_description+"
Expected Amount "+s.dd_fee_amount_final+"
Fee Amount "+s.dd_fee_amount_final+"
Balance "+(s.dd_fee_amount_final-t.dd_fee_amount_discounted)+"
Payment Mode "+s.dd_fee_payment_mode+"
Cheque/DD No "+s.cheque_number+"
Cheque Status "+s.ChequeStatus_Desc+"
Date "+s.creation_date+"
Received By "+s.creation_user+"
"),$(a.currentTarget).parents("tr").after(i),e.flag=!1;else{$("#innerRow").css({display:"none"});for(var o=0;o0){for(var o=0;o0&&(s=s.substring(0,s.length-1)),e.stdl=s}e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.Student=a.globals.currentStudent,"svcc"==n.defaults.headers.common.schoolId||"sisqatar"==n.defaults.headers.common.schoolId||"svvmc"==n.defaults.headers.common.schoolId||"lpn"==n.defaults.headers.common.schoolId||"dvhss"==n.defaults.headers.common.schoolId||"dvhs"==n.defaults.headers.common.schoolId||"dvps"==n.defaults.headers.common.schoolId||"hedgewar"==n.defaults.headers.common.schoolId||"mptesdvs"==n.defaults.headers.common.schoolId||"vision"==n.defaults.headers.common.schoolId||"csdportal"==n.defaults.headers.common.schoolId||"dmc"==n.defaults.headers.common.schoolId||"ahis"==n.defaults.headers.common.schoolId||"ges"==n.defaults.headers.common.schoolId||"rakaa"==n.defaults.headers.common.schoolId||"rakmps"==n.defaults.headers.common.schoolId||"facp"==n.defaults.headers.common.schoolId||"vmsiihe"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/fees/getFeeDetailsSvcc?student_enroll_no="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.display=!0,e.obj=t.data}):"asdportal"==n.defaults.headers.common.schoolId||"elcportal"==n.defaults.headers.common.schoolId||"apsportal"==n.defaults.headers.common.schoolId||"lwgportal"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/fees/getFeeDetailsAsd?student_enroll_no="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.display=!0,e.obj=t.data}):n.get(r.apiUrl+"api/fees/getFeeDetails?student_enroll_no="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.display=!0,e.obj=t.data})},e.remove=function(){var t=e.obj;e.obj=[],angular.forEach(t,function(e){})},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.calendar",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.calendar").controller("CalendarController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){$(".preloader").fadeIn(),document.addEventListener("deviceready",function(){window.localStorage.DeviceVersion=device.version,window.localStorage.DeviceUuid=device.uuid},!1),e.syncloading=!0;var i=a.globals.currentUser.username+","+window.localStorage.DeviceUuid;function l(t){window.plugins.calendar.hasReadWritePermission(function(a){1!=a?window.plugins.calendar.requestReadWritePermission():function(t){e.syncloading=!1;for(var a="",s=0;t.length>s;s++)if("100"!=t[s].id){a=a+t[s].id+",";var o=new Date(t[s].start),l=new Date(t[s].end),d=t[s].title;window.plugins.calendar.createEvent(d,"School Calendar","",o,l,function(e){console.log("Success: "+JSON.stringify(e))},function(t){e.syncloading=!0,console.log("Error: "+t)})}else e.syncloading=!0;""!=a||void 0!=a?n.post(r.apiUrl+"api/calender/InsertCalenderSync?username="+i+"&calendar_number="+a).then(function(t){t.data?(e.syncloading=!0,swal("Sync Completed")):(e.syncloading=!0,swal("Sync Not Completed"))}):(e.syncloading=!0,swal("Error in Sync"))}(t)})}e.eventsList=[],e.CalendarData=[],e.androidVer="5.1.1",n.get(r.apiUrl+"api/dashboard/getDashboardData").then(function(t){t.data.length>0&&(e.portal_data=t.data)}),e.syncToggle=function(){window.localStorage.DeviceVersion>e.androidVer?n.get(r.apiUrl+"api/calender/getCalenderSyncHistory?username="+i).then(function(t){e.synchistory=t.data;var a=e.compareArrays(e.CalendarData,e.synchistory);a.length>0?l(a):swal("Already Synced")}):swal("Android ver. not supported, Requires min ver. 6.0")},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.id===t.id})})},n.get(r.apiUrl+"api/calender/getCalenderDataCheck").then(function(t){e.display=!0,e.obj=t.data;for(var a=0;a0)for(var t=0;t0?(e.main=!0,e.NR=!1,e.alternative=!1,e.getimg(),e.getdata()):(e.main=!1,e.NR=!0,e.alternative=!1)})},e.getinfo=function(t){for(var a=0;ae.pageCount()-5&&(t=e.pageCount()-5+1);for(let e=t;e=0&&a.push(e);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0==e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0?e.grid=!0:(e.grid=!1,alert("Records Not Found"))})})}),e.sims_acad_yr=e.currentAcadmic,e.GetData=function(t,s){if(void 0!=e.startDate)var o=moment(e.startDate,"DD-MM-YYYY").format("YYYY-MM-DD");if(void 0!=e.endDate)var i=moment(e.endDate,"DD-MM-YYYY").format("YYYY-MM-DD");let l=_(o),d=_(i);n.get(r.apiUrl+"api/agenda/getAgendaInfo_new?section="+e.g_s.sims_section_code+"&grade="+e.g_s.sims_grade_code+"&academic="+e.edt.sims_academic_year+"&startdate="+l+"&enddate="+d+"&sub_code="+s+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data;for(let t=0;t0?e.grid=!0:(e.grid=!1,alert("Records Not Found"))})},e.link=function(t){if(e.a_url="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(let t=0;t{return`${String(e.getDate()).padStart(2,"0")}-${String(e.getMonth()+1).padStart(2,"0")}-${e.getFullYear()}`};e.startDate=r(o),e.endDate=r(n)},e.getCurrentMonthStartEndDates(),e.getCurrentMonthStartEndDates=function(){const t=new Date;t.getFullYear(),t.getMonth();e.startForm=!1,e.filter_on=function(){e.startForm=!e.startForm},n.get(r.apiUrl+"api/agenda/getAgendaInfocolor").then(function(t){e.data1=t.data[0].sims_agenda_assessment_status});const a=new Date,s=new Date;s.setDate(a.getDate()-30);const o=e=>{return`${String(e.getDate()).padStart(2,"0")}-${String(e.getMonth()+1).padStart(2,"0")}-${e.getFullYear()}`};e.startDate=o(s),e.endDate=o(a)},e.getCurrentMonthStartEndDates(),e.startForm=!1,e.filter_on=function(){e.startForm=!e.startForm},n.get(r.apiUrl+"api/agenda/getAgendaInfocolor").then(function(t){e.data1=t.data[0].sims_agenda_assessment_status}),n.get(r.apiUrl+"api/agenda/get_Subjects?cur="+a.globals.currentStudent.sims_cur_code+"&grade="+a.globals.currentStudent.sims_grade_code+"§ion="+a.globals.currentStudent.sims_section_code+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.subject_data=t.data}),e.clear=function(){e.sims_acad_yr="",e.startDate="",e.endDate="",e.sims_subject_code=""},e.print=function(e){let t=document.head.outerHTML,a=document.getElementById(e).outerHTML,o=window.open("","_blank","location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=865, height=600, resizable=yes, screenX=200, screenY=200, personalbar=no, scrollbars=yes"),n=o.document;n.open(),n.write(""+t+''+a+""),n.close(),o.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)}},$('*[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()}),e.getAcademic=function(){},e.$on("student_change",function(t,a){e.getTransportDetails()}),a.globals.studentsLoaded&&e.getTransportDetails()}])}(),function(){"use strict";angular.module("sims.module.handbook",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.handbook").controller("HandbookController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","pdfDelegate",function(e,t,a,s,o,n,r,i){e.display=!0,e.dis=!1,e.itemsPerPage="5",e.currentPage=0,e.obj=[],e.obj.table=[],e.size=function(t){e.itemsPerPage=t},n.get(r.apiUrl+"api/parentportal/GetHandBook?Ref_Number=").then(function(t){e.display=!0,e.dis=!1,e.obj=t.data}),e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0==e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.table.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0)for(var s=0;s=-750&&i.stop(!1,!0).animate({left:"-=100px"},{duration:400})}),$("#leftArrow").click(function(){parseInt(i.css("left"))<0&&i.stop(!1,!0).animate({left:"+=100px"},{duration:400})})}])}(),function(){"use strict";var e=angular.module("sims.module.gallery");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("BadgeViewCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.create=!1,e.imghide=!1,e.photoShow=!1;new Array;e.obj=[],e.loadingscr=!0,$("#readyClass").removeClass("mfp-bg mfp-ready"),e.getBadgeid=function(){n.get(i.apiUrl+"api/transport/getBadgeid").then(function(t){e.Acc_year=t.data,e.edt={sims_academic_year:e.Acc_year[0].sims_academic_year},e.getalbums(),e.OnAlbumClick()})},e.getBadgeid(),e.getalbums=function(){n.get(i.apiUrl+"api/transport/getBadgeDetails?badgecode="+e.edt.sims_academic_year).then(function(t){e.CmbAllAlbum_details=t.data})},n.get(i.apiUrl+"api/common/Album/getAllGroupNames").then(function(t){e.CmbGroupNm=t.data,setTimeout(function(){$("#cmb_Group").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"}),$("#cmb_Group_create").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)}),e.OnAlbumClick=function(){n.get(i.apiUrl+"api/transport/getBadgeDetails?badgecode="+e.edt.sims_academic_year).then(function(t){e.photoList=t.data,e.PhotoCount=e.photoList.length,e.photoList.length>0?e.photoShow=!0:e.photoShow=!1})},e.CurChange=function(t){n.get(i.apiUrl+"api/common/Album/getClassListHtml?sims_cur_code="+t+"&academic_year=2016").then(function(t){e.CmbClass=t.data,console.log(e.CmbClass),setTimeout(function(){$("#cmb_Classes_create").change(function(){console.log($(this).val())}).multipleSelect({width:"100%"})},1e3)})},e.imageClose=function(){$("#readyClass").removeClass("mfp-bg mfp-ready"),e.imghide=!1},e.viewimg=function(t,a){e.showIndex=a+1,e.ImgIndex=a,e.imgsrc=t[a].sims_album_photo_path,e.details=t[a].sims_album_name,$("#readyClass").addClass("mfp-bg mfp-ready"),e.imghide=!0},e.nextimg=function(){e.photoList.length-1==e.ImgIndex?(e.ImgIndex=0,e.showIndex=1):(e.ImgIndex=e.ImgIndex+1,e.showIndex=e.ImgIndex+1),e.imgsrc=e.photoList[e.ImgIndex].sims_album_photo_path,e.details=e.photoList[e.ImgIndex].sims_album_name},e.Previmg=function(){0==e.ImgIndex?(e.ImgIndex=e.photoList.length-1,e.showIndex=e.photoList.length):(e.ImgIndex=e.ImgIndex-1,e.showIndex=e.ImgIndex+1),e.imgsrc=e.photoList[e.ImgIndex].sims_album_photo_path,e.details=e.photoList[e.ImgIndex].sims_album_name},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()})}]),e.directive("ngFiles",["$parse",function(e){return{link:function(t,a,s){var o=e(s.ngFiles);a.on("change",function(e){o(t,{$files:e.target.files})})}}}])}(),function(){"use strict";angular.module("sims.module.reportcard",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.reportcard").controller("ReportCardController",["$scope","$state","$rootScope","$timeout","gettextCatalog","pdfDelegate","$http","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.s2=!1,e.s3=!1,e.dis=!1,e.getAcademicYr=function(s){e.s2=!1,e.s3=!1,e.dis=!1,e.NR=!1,console.log(a.globals.currentStudent),e.senroll=a.globals.currentStudent.enroll_number,e.url=a.globals.currentSchool.lic_website_url;var o=a.globals.currentSchool.lic_website_url.substring(a.globals.currentSchool.lic_website_url.indexOf("/")+2,a.globals.currentSchool.lic_website_url.indexOf("."));console.log(o),r.get(i.apiUrl+"api/reportcard/get_Academic_year?cur="+a.globals.currentStudent.sims_cur_code).then(function(t){t.data.length>0?(e.obj4=t.data,console.log(e.obj4),e.NR=!1):e.NR=!0}),"misqatar"==o&&t.go("main.sjspp"),"sjs"==o&&t.go("main.sjspp"),"smm"==o&&t.go("main.smmpp"),"sisqatar"==o&&t.go("main.smmpp")},e.link=function(e){window.open(a.globals.currentSchool.lic_website_url+"/Docs/Results/"+e,"_new")},e.Getinf=function(t){e.s2=!1,e.dis=!1,e.obj1=null,e.NR=!1,r.get(i.apiUrl+"api/reportcard/GetReportCardLevel?section="+a.globals.currentStudent.sims_section_code+"&grade="+a.globals.currentStudent.sims_grade_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&cur="+a.globals.currentStudent.sims_cur_code).then(function(t){t.data.length>0?(e.obj1=t.data,e.s2=!0,e.NR=!1,e.table=!0,1==t.data.length&&(e.sims_report_filename=t.data[0].sims_report_filename,e.s2=!0,e.showreportcard)):(e.s2=!0,e.s3=!1,e.table=!1,e.NR=!0,e.obj1=null)})},e.$on("student_change",function(t,a){e.getAcademicYr()}),a.globals.studentsLoaded&&e.getAcademicYr();var l=$("#tslshow");$("#rightArrow").click(function(){parseInt(l.css("left"))>=-750&&l.stop(!1,!0).animate({left:"-=100px"},{duration:400})}),$("#leftArrow").click(function(){parseInt(l.css("left"))<0&&l.stop(!1,!0).animate({left:"+=100px"},{duration:400})})}])}(),function(){"use strict";angular.module("sims.module.uploadimages",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.uploadimages").controller("UploadImageController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,console.log(a.globals.currentSchool.lic_website_url),e.url=a.globals.currentSchool.lic_website_url,n.get(r.apiUrl+"api/uploadimages/getActiveParentImage?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data}),e.display=!1,n.get(r.apiUrl+"api/uploadimages/getSiblingImage?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj1=t.data}),e.upload=function(t){var a=document.getElementById("file1").value;n.post(r.apiUrl+"api/uploadimages/updateImage?filename="+a).then(function(t){e.display=!0})}}])}(),function(){"use strict";angular.module("sims.module.lms",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.lms").controller("LMSController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.getMedicalDetails=function(t){function s(e){var t;t='I got "'+e.data+'" from "'+e.origin+'"',null==document.getElementById("taRecvMessage")?alert(t):document.getElementById("taRecvMessage").innerHTML=t}n.get(i.apiUrl+"api/common/getUserDetailsnew?uname="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,console.log(e.obj.table[0].comn_user_password),console.log(e.obj.table[0].comn_user_key),"iconems"==n.defaults.headers.common.schoolId?n.get(i.apiUrl+"api/common/getGrdsubforlmsIconems?uname="+a.globals.currentUser.username).then(function(t){e.pass=t.data[0].user_key,e.grades=t.data[0].gradecode,e.subjects=t.data[0].subjectcode,e.type=t.data[0].usertype,e.rurl=a.globals.currentSchool.lic_lms_url+"?u="+a.globals.currentUser.username+"&p="+e.pass+"&g="+e.grades+"&su="+e.subjects,window.open(e.rurl,"_new")}):window.open(a.globals.currentSchool.lic_lms_url+"?u="+a.globals.currentStudent.enroll_number+"&p="+e.obj.table[0].comn_user_key,"_new")}),e.SendMessage=function(){var e=document.getElementById("ifrmChild").contentWindow;null!=e&&window.postMessage?e.postMessage("hello","*"):alert("oh crap")},window.postMessage?window.addEventListener?window.addEventListener("message",s,!1):window.attachEvent("onmessage",s):alert("oh crap")},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.library",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.library").controller("LibraryController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.menu=!0,e.getLabDetails=function(){e.Getinfo=function(t,s,o){n.get(r.apiUrl+"api/parentportal/getLibraryDetails?enrollNo="+a.globals.currentStudent.enroll_number+"&fromDate="+s+"&toDate="+o).then(function(t){e.display=!0,e.dis2=!0,e.dis=!1,e.menu=!0,e.BookDetaildisplay=!1,e.obj2=t.data,t.data.length>0?(e.IR=!0,e.NR=!1):(e.NR=!0,e.IR=!1,swal({title:"Alert",text:"No Library Transactions",imageUrl:"assets/img/notification-alert.png"}))})},e.Getinfo(void 0,void 0,void 0),e.setStart=function(t){var a=t.getMonth()+1,s=t.getDate();a<10&&(a="0"+a),s<10&&(s="0"+s);var o=t.getFullYear()+"-"+a+"-"+s;e.startDate=o},e.setEnd=function(t){var a=t.getMonth()+1,s=t.getDate();a<10&&(a="0"+a),s<10&&(s="0"+s);var o=t.getFullYear()+"-"+a+"-"+s;e.endDate=o},e.back=function(){e.dis=!1,e.NR=!1,e.IR=!0,e.menu=!0,e.BookDetaildisplay=!1},e.GetDetails=function(t){n.get(r.apiUrl+"api/parentportal/getLibraryDetailsByID?transaction_no="+t).then(function(t){e.dis=!0,e.NR=!1,e.IR=!1,e.menu=!1,e.display=!0,e.BookDetaildisplay=!1,e.obj3=t.data})},e.GetBookDetails=function(t){e.dis=!1,e.BookDetaildisplay=!0,e.disback=!0,n.get(r.apiUrl+"api/parentportal/getLibraryShowStatus").then(function(t){e.obj5=t.data}),""===e.obj3[0].sims_library_item_accession_number||void 0===e.obj3[0].sims_library_item_accession_number?(e.obj3[0].sims_library_item_accession_number="",e.obj3[0].sims_library_item_title="",e.obj3[0].sims_library_item_author1="",e.obj3[0].sims_library_item_name_of_publisher="",e.obj3[0].sims_library_item_status_code="",e.obj3[0].sims_library_isbn_number="",e.obj3[0].sims_library_category_name="",e.obj3[0].sims_library_subcategory_name="",e.obj3[0].sims_library_item_place_of_publication=""):(e.save_btn=!0,n.get(r.apiUrl+"api/parentportal/get_bookdata?str="+e.obj3[0].sims_library_item_accession_number).then(function(t){e.CreDiv=t.data,e.obj3[0].sims_library_item_accession_number=e.CreDiv[0].sims_library_item_accession_number,e.obj3[0].sims_library_item_title=e.CreDiv[0].sims_library_item_title,e.obj3[0].sims_library_item_author1=e.CreDiv[0].sims_library_item_author1,e.obj3[0].sims_library_item_name_of_publisher=e.CreDiv[0].sims_library_item_name_of_publisher,e.obj3[0].sims_library_item_status_code=e.CreDiv[0].sims_library_item_status_code,e.obj3[0].sims_library_isbn_number=e.CreDiv[0].sims_library_isbn_number,e.obj3[0].sims_library_category_name=e.CreDiv[0].sims_library_category_name,e.obj3[0].sims_library_subcategory_name=e.CreDiv[0].sims_library_subcategory_name,e.obj3[0].sims_library_item_place_of_publication=e.CreDiv[0].sims_library_item_place_of_publication,e.totalItems=e.CreDiv.length,e.todos=e.CreDiv,e.makeTodos(),e.book_ratting=!0}),n.get(r.apiUrl+"api/parentportal/get_grid?str="+e.obj3[0].sims_library_item_accession_number).then(function(t){e.CreDiv=t.data,e.totalItems=e.CreDiv.length,e.todos=e.CreDiv,e.makeTodos(),e.show_table=!0,e.display=!1}))}},e.user=a.globals.currentUser.username,e.savedata=function(t){var a=[];if(t){var s={opr:"I",login_id:e.user,rating:e.obj3[0].rating,comment:e.obj3[0].comment,accession_number:e.obj3[0].sims_library_item_accession_number,display_cmt_status:e.obj3[0].display_cmt_status};a.push(s)}n.post(r.apiUrl+"api/parentportal/CUDLibBookReview",a).then(function(t){e.msg1=t.data,e.msg1,swal({title:"Alert",text:e.msg1.strMessage,showCloseButton:!0,width:300,height:200}),n.get(r.apiUrl+"api/parentportal/get_grid?str="+e.obj3[0].sims_library_item_accession_number).then(function(t){e.CreDiv=t.data,e.totalItems=e.CreDiv.length,e.todos=e.CreDiv,e.makeTodos(),e.show_table=!0,e.display=!1})})},$('*[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()}),e.$on("student_change",function(t,a){e.getLabDetails()}),a.globals.studentsLoaded&&e.getLabDetails()}])}(),function(){"use strict";angular.module("sims.module.email",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.email").controller("EmailController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.eDetail=!1,e.email=!0,e.itemsPerPage=15,e.currentPage=0,e.items=[],e.size=function(t){e.itemsPerPage=t},n.get(r.apiUrl+"api/parentportal/getEmail?userCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.items=t.data,console.log(t.data)}),e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return e.items.length=365,Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0?(e.obj1=t.data,e.NR=!1):e.NR=!0}),r.get(i.apiUrl+"api/timetable/gettimetable_Year").then(function(t){e.acad_year=t.data}),e.academic_change=function(t){console.log(t);let s={enrollno:a.globals.currentStudent.enroll_number,sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:t,sims_section_code:a.globals.currentStudent.sims_section_code,sims_grade_code:a.globals.currentStudent.sims_grade_code};r.get(i.apiUrl+"api/timetable/gettimetable?data1="+JSON.stringify(s)).then(function(t){t.data.length>0?(e.obj1=t.data,e.NR=!1):e.NR=!0})},e.link=function(t){if(e.cir_url="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(let t=0;t0?(e.obj1=t.data,console.log(e.obj1),e.NR=!1):e.NR=!0}),e.link=function(t){if(void 0!=t.sims_timetable_url)window.open(t.sims_timetable_url,"_new");else{if(e.cir_url="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var s=0;s{""==t.data[a][e]&&(t.data[a][e]="-")}),o.title="Mor(P): "+t.data[a].am_pickuptime+"\nMor(D): "+t.data[a].am_droptime+"\nAfn(P): "+t.data[a].pm_pickuptime+"\nAfn(D): "+t.data[a].pm_droptime,o.id=a+s+1,o.color="#0EAD1F",e.eventsList.push(o)}$("#calendar").fullCalendar("removeEvents"),$("#calendar").fullCalendar("addEventSource",e.eventsList),$("#calendar").fullCalendar("refetchEvents")})}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.enroll_number=a.globals.currentStudent.enroll_number,n.get(r.apiUrl+"api/attendance/getMonthlyAttendance?enroll="+a.globals.currentStudent.enroll_number+"&acad="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&date="+e.today).then(function(t){e.month=t.data})},$(document).ready(function(){$("#calendar").fullCalendar({header:{left:"prev,next,today",center:"title",right:"month,basicWeek,basicDay"},defaultDate:"2015-02-02",editable:!0,showNonCurrentDates:!1,eventLimit:!1,events:e.eventsList})}),$(".fc-header").hide();var _=$("#calendar").fullCalendar("getDate");$("#calender-current-day").html($.fullCalendar.formatDate(_,"dddd")),$("#calender-current-date").html($.fullCalendar.formatDate(_," MMM yyyy")),$("#calender-prev").click(function(){$("#calendar").fullCalendar("prev"),_=$("#calendar").fullCalendar("getDate"),$("#calender-current-day").html($.fullCalendar.formatDate(_,"dddd")),$("#calender-current-date").html($.fullCalendar.formatDate(_," MMM yyyy")),n.get(r.apiUrl+"api/attendance/getMonthlyAttendance?enroll="+e.enroll_number+"&acad="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&date="+$.fullCalendar.formatDate(_,"yyyy-MM-dd")).then(function(t){e.display=!0,e.month=t.data})}),$("#calender-next").click(function(){$("#calendar").fullCalendar("next"),_=$("#calendar").fullCalendar("getDate"),$("#calender-current-day").html($.fullCalendar.formatDate(_,"dddd")),$("#calender-current-date").html($.fullCalendar.formatDate(_,"MMM yyyy")),n.get(r.apiUrl+"api/attendance/getMonthlyAttendance?enroll="+e.enroll_number+"&acad="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&date="+$.fullCalendar.formatDate(_,"yyyy-MM-dd")).then(function(t){e.display=!0,e.month=t.data})}),$("#change-view-month").click(function(){$("#calendar").fullCalendar("changeView","month")}),e.$on("student_change",function(t,a){e.getstudentList()}),a.globals.studentsLoaded&&e.getstudentList()}])}(),function(){"use strict";angular.module("sims.module.test").controller("ExitSlipController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter","AuthenticationService",function(e,t,a,s,o,n,r,i,l){$(".preloader").fadeIn(),e.display=!1,e.btnEdit=!0,e.btnCancel=!1,e.btnSave=!1,e.btnEdit1=!0,e.btnCancel1=!1,e.btnSave1=!1,e.btnEdit2=!0,e.btnCancel2=!1,e.btnSave2=!1,e.btnEdit3=!0,e.btnCancel3=!1,e.btnSave3=!1,e.btnEdit4=!0,e.btnCancel4=!1,e.btnSave4=!1,e.qrcodeString="",e.size=200,e.correctionLevel="",e.typeNumber=0,e.inputMode="",e.image=!0,e.otherDetailsReadonly=!0,e.otherDetailshow=!1,e.Passportshow=!1,e.PassportReadonly=!0,e.Nationalshow=!1,e.NationalReadonly=!0,e.Departmentshow=!1,e.DepartmentReadonly=!0,e.filteredTodos=[],e.abqis=!1,e.edt={};window.localStorage.UploadUrl;n.get(r.apiUrl+"api/Leave/getExitSlipCategory").then(function(t){e.Exit_cat=t.data}),n.get(r.apiUrl+"api/Leave/getParentTermsCondition").then(function(t){e.res1=t.data[0],e.ParentTermsCondition=e.res1.sims_appl_form_field_value1}),e.parentfield=!1,e.showfileds=function(t){e.parentfield="2"==t},e.checkparentRequired=function(){e.parentRequired=!0};var d=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){d.append(t,e)})},e.file_changed=function(t){let s=t.files[0];e.photo_filename=s.type;t.files[0].name.split(".")[1];e.file_name_en=s.name;let o=t.files;if(o.length){e.files=new FormData;for(let t=0;t0){e.portal_data=t.data,console.log(e.portal_data);for(var a=0;e.portal_data.length>a;a++){if("StudentImgUpload"==e.portal_data[a].sims_field_name&&"N"==e.portal_data[a].sims_field_iseditable){$("#stimg").css({"pointer-events":"none"});break}$("#stimg").css({"pointer-events":""})}}}),e.div_hide=!1,e.show=!0,e.hide=!1,e.obj=[],e.obj2=[],e.obj3=[],e.obj4=[];n.defaults.headers.common.schoolId.toLowerCase();function _(e,t){var a=moment(e+" "+t,"DD-MM-YYYY hh:mm:ss a");return a.isValid()?a.toDate():(console.error("Invalid date or time format:",e,t),null)}e.getstudentList=function(){e.studentName=a.globals.currentStudent.sims_student_passport_fullname_new,e.enroll_number=a.globals.currentStudent.sims_student_enroll_number,e.grade=a.globals.currentStudent.sims_grade_name_en,e.section=a.globals.currentStudent.sims_section_name_en,e.class=e.grade+"-"+e.section,e.url=a.globals.currentSchool.lic_website_url,console.log(a.globals.currentStudent.sims_student_img),e.studImg=a.globals.currentStudent.sims_student_img,e.sims_parent_father_phone=e.obj.sims_parent_father_phone,e.sims_academic_year_description=a.globals.currentStudent.sims_academic_year_description,e.schoolCode=n.defaults.headers.common.schoolId,e.apiurlpath=r.apiUrl,e.getdata(),n.get(r.apiUrl+"api/student/getStudentInfo?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.obj=t.data,console.log(e.obj),$(".preloader").fadeOut("slow"),e.div_hide=!0,e.getimg(),window.localStorage.StudentInfo=JSON.stringify(e.obj)},function(t){0==t.status&&($(".preloader").fadeOut("slow"),e.obj=JSON.parse(window.localStorage.StudentInfo),e.getimg())})},e.reset=function(){e.edt.exit_date="",e.edt.exit_time="",e.edt.exit_reason="",e.edt.exit_student_status="",e.edt.exit_return_date="",e.edt.exit_return_time="",e.edt.exit_reason_other="",e.edt.gate_number="",e.edt.sims_exit_category="",e.edt.sims_exit_accompanied_parent_name="",e.edt.sims_exit_accompanied_parent_eid="",e.exitForm.$setPristine(),e.exitForm.$setUntouched()},e.close=function(){e.showMessage=!1,e.message=""},e.save=function(t){if(!1===t)e.showMessage=!0,e.messageClass="alert-error",e.message="Please fill all required field's";else{if(void 0==e.edt.exit_date||null==e.edt.exit_date||""==e.edt.exit_date)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="Exit date is required");if(void 0==e.edt.exit_time||null==e.edt.exit_time||""==e.edt.exit_time)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="Exit time is required");if(void 0==e.edt.exit_reason||null==e.edt.exit_reason||""==e.edt.exit_reason)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="Exit reason is required");if(void 0==e.edt.exit_student_status||null==e.edt.exit_student_status||""==e.edt.exit_student_status)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="'Will the child return back to school' This field is required");if(void 0==e.edt.sims_exit_category||null==e.edt.exit_student_status||""==e.edt.exit_student_status)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="Exit category is required");if("1"===e.edt.sims_exit_category&&!e.edt.sims_exit_parent_terms_and_condition)return e.showMessage=!0,e.messageClass="alert-error",void(e.message="You must agree to the terms and conditions");if(!("2"!==e.edt.sims_exit_category||e.edt.sims_exit_accompanied_parent_name&&e.edt.sims_exit_accompanied_parent_eid&&e.file_name_en_1))return e.showMessage=!0,e.messageClass="alert-error",void(e.message="Name of Parent/Guardian, EID number ,EID attachment are all required if you have chosen Accompanied by Parent/Guardian");var s=new Date,o=s.getDate(),i=s.getMonth()+1,l=s.getFullYear();o<10&&(o="0"+o),i<10&&(i="0"+i);var d=o+"-"+i+"-"+l,_={exit_name:e.studentName,exit_enrollnumber:e.enroll_number,exit_date:e.edt.exit_date,exit_time:e.edt.exit_time,exit_reason:e.edt.exit_reason,exit_reason_other:e.edt.exit_reason_other,exit_student_status:e.edt.exit_student_status,exit_return_date:e.edt.exit_return_date,exit_return_time:e.edt.exit_return_time,gate_number:e.edt.gate_number,exit_requested_by:a.globals.currentUser.username,exit_requested_by_datetime:d,sims_exit_category:e.edt.sims_exit_category,sims_exit_accompanied_parent_name:e.edt.sims_exit_accompanied_parent_name,sims_exit_accompanied_parent_eid:e.edt.sims_exit_accompanied_parent_eid,file_attached_upload_document:e.file_name_en_1,sims_exit_parent_terms_and_condition:e.edt.sims_exit_parent_terms_and_condition};n.post(r.apiUrl+"api/Leave/insertExitslip",_).then(function(t){e.msg1=t.data,1==e.msg1?(e.showMessage=!0,e.messageClass="alert-success",e.message="Successfully Submitted",e.getdata(),e.reset()):(e.showMessage=!0,e.messageClass="alert-error",e.message="You have already applied for an Exit for the same date.")})}},e.clcik_check=function(){"1"==e.edt.sims_id_acknowlegde_flag?e.main_edt1=!0:e.main_edt1=!1},e.clcik_1=function(){"1"==e.edt.student_id_wrong?e.main_edt=!0:e.main_edt=!1},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},n.get(r.apiUrl+"api/Leave/getExitreason").then(function(t){e.Exit_leave=t.data}),e.updateAboutMe=function(){a.globals.currentStudent.enroll_number;var t={sims_student_birth_country_code:e.obj.sims_student_birth_country_code,sims_student_nationality_code:e.obj.sims_nationality_code,sims_student_gender:e.obj.sims_appl_parameter_gender,sims_student_dob:e.obj.sims_student_dob,sims_student_enroll_number:a.globals.currentStudent.enroll_number,sims_religion_code:e.obj.sims_religion_code};n.post(r.apiUrl+"api/student/updateStudentDetails?opr=AM&student_details="+JSON.stringify(t)).then(function(t){e.abt=t.data,e.abt?(e.getstudentList(),swal({title:"Updated",text:"Update Successfully",imageUrl:"assets/img/check.png"})):(e.getstudentList(),swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"}))})},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"}),e.size=function(t){e.pagesize=t,e.currentPage=1,e.numPerPage=t,e.makeTodos()},e.index=function(t){e.pageindex=t,e.currentPage=t,e.makeTodos(),main.checked=!1,e.CheckAllChecked()},e.filteredTodos=[],e.currentPage=1,e.numPerPage=5,e.maxSize=5,e.makeTodos=function(){let t=parseInt(e.totalItems%e.numPerPage);e.pagersize="0"==t?parseInt(e.totalItems/e.numPerPage):parseInt(e.totalItems/e.numPerPage)+1;let a=(e.currentPage-1)*e.numPerPage,s=parseInt(a)+parseInt(e.numPerPage);e.filteredTodos=e.todos.slice(a,s)},e.cancelrequest=function(t){swal({title:"Are you sure?",text:"Do you want to cancel this required",showCancelButton:!0,confirmButtonClass:"btn-success",confirmButtonText:"Yes",closeOnConfirm:!0},function(){var a=[],s={opr:"K",sims_exit_no:t.sims_exit_no,sims_exit_enrollno:t.sims_exit_enrollno};a.push(s),n.post(r.apiUrl+"api/Leave/ExitCancel_request",a).then(function(t){e.msg1=t.data,1==e.msg1?(swal({text:"Record Updated Successfully",imageUrl:"assets/img/check.png",width:300,height:200}),e.getdata()):swal({text:"Record Not Updated Successfully. ",imageUrl:"assets/img/close.png",width:300,height:200})})})},e.getdata=function(){n.get(r.apiUrl+"api/Leave/getExitRequiest?enrollno="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,e.mainnnn=e.obj[0].sims_exit_no,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?e.tablehide=!1:e.tablehide=!0})},e.getCurrentDate=function(){return i("date")(new Date,"dd-MM-yyyy")},e.setDefaultDate=function(){e.edt.exit_date=e.getCurrentDate(),e.edt.exit_return_date=e.getCurrentDate()},e.updateDate=function(){var t=new Date,a=new Date(e.edt.exit_date.split("-").reverse().join("-"));t.setHours(0,0,0,0),a&&a<=t?(e.edt.exit_date=null,$("Text2e").datepicker("hide"),e.showMessage=!0,e.messageClass="alert-error",e.message="Previous date not allowed",e.Refresh()):e.chk_holiday_weekend(e.edt.exit_date)},e.Refresh=function(){e.edt.exit_time=""},e.getCurrentTime=function(){return i("date")(new Date,"hh:mm:ss a")},e.setDefaultTime=function(){e.edt.exit_time=e.getCurrentTime()},e.updateTime=function(){var t=e.getCurrentDate(),a=e.getCurrentTime(),s=e.edt.exit_date+" "+e.edt.exit_time;console.log("currentDateTime:",t+" "+a),console.log("exitDateTime:",s),s&&function(e,t){var a="DD-MM-YYYY hh:mm:ss a",s=moment(e,a),o=moment(t,a);return s.isBefore(o)?-1:s.isAfter(o)?1:0}(s,t+" "+a)<=0&&(e.edt.exit_time=null,e.showMessage=!0,e.messageClass="alert-error",e.message="Please select a future time for exit.")},n.get(r.apiUrl+"api/student/getAcademicyearID?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.transp=[],e.display=!0,e.transp=t.data,e.edt.sims_academic_year=e.transp[0].sims_academic_year,console.log("acadyear",e.edt.sims_academic_year)}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,console.log(e.obj),e.edt.academic_year=e.obj[0].academic_year,e.objAcademic=t.data}),e.updateAboutMe=function(){a.globals.currentStudent.enroll_number;var t={sims_student_birth_country_code:e.obj.sims_student_birth_country_code,sims_student_nationality_code:e.obj.sims_nationality_code,sims_student_gender:e.obj.sims_appl_parameter_gender,sims_student_dob:e.obj.sims_student_dob,sims_student_enroll_number:a.globals.currentStudent.enroll_number,sims_religion_code:e.obj.sims_religion_code};n.post(r.apiUrl+"api/student/updateStudentDetails?opr=AM&student_details="+JSON.stringify(t)).then(function(t){e.abt=t.data,e.abt?(e.getstudentList(),swal({title:"Updated",text:"Update Successfully",imageUrl:"assets/img/check.png"})):(e.getstudentList(),swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"}))})},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=qrcodeString").then(function(t){e.qrdata=t.data,console.log(e.qrdata),e.qrdata.length>0&&"Y"==e.qrdata[0].sims_appl_form_field_value4?e.qrcodeString=e.qrdata[0].sims_appl_form_field_value1:e.qrcodeString="Roll Number -"+a.globals.currentStudent.sims_student_enroll_number}),e.getimg=function(){if(e.prev_img="",e.uploading_path="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var t=0;t0){if("W"==e.alldata[0].sims_calendar_exception_type)$("Text2e").datepicker("hide"),e.showMessage=!0,e.messageClass="alert-error",e.message="You cannot request exit on weekend",e.edt.exit_date="",document.getElementById("Text2e").value="";else if("H"==e.alldata[0].sims_calendar_exception_type){$("Text2e").datepicker("hide"),e.showMessage=!0,e.messageClass="alert-error",e.message="You cannot request exit on holiday",e.edt.exit_date="",document.getElementById("Text2e").value=""}}else e.showMessage=!1})},e.validateReturnTime=function(){var t=new Date,a=("0"+t.getDate()).slice(-2)+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+t.getFullYear();if(e.edt.exit_return_date=a,e.edt.exit_time&&e.edt.exit_return_time){e.setDefaultDate();var s=_(e.edt.exit_date,e.edt.exit_time);_(e.edt.exit_return_date,e.edt.exit_return_time)<=s&&(e.edt.exit_return_time=null,e.showMessage=!0,e.messageClass="alert-error",e.message="Return Time cannot be less than Exit time")}0==e.edt.exit_student_status&&(e.edt.exit_return_date=null)}}])}(),function(){"use strict";angular.module("sims.module.assignment",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.assignment").controller("AssignmentController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV","$stateParams",function(e,t,a,s,o,n,r,i,l){e.display=!1,e.grid=!0,e.click=!1,e.edt="",e.create=!1,e.imghide=!1,e.photoShow=!1;var d=[];e.images=[],e.images_delete=[];new Array;e.obj=[],e.predicate="",e.reverse=!1,"asis"!=n.defaults.headers.common.schoolId&&"abqis"!=n.defaults.headers.common.schoolId&&"siso"!=n.defaults.headers.common.schoolId||(e.tile_hide=!0),"oes"==n.defaults.headers.common.schoolId&&(e.term_hide=!0),l.flag?(e.agdate=a.globals.alertDate,e.search=e.agdate):e.search=void 0;var _,c,m=new FormData;e.getTheFiles=function(t){var s=0,o="no";angular.forEach(t,function(n,r){if(m.append(r,n),t[s].size>10485760)a.strMessage=t[s].name+" exceeds file size limit.",$("#message").modal("show");else{if(d.push(t[s].name),e.images.length>0){for(var i=0;i0?e.hasUploaded=!0:e.hasUploaded=!1})},e.save=function(t){var a="";if(e.images.length>0){for(var s=0;s0)for(var s=0;sd(e.current_date)&&(swal({title:"Alert",text:"From date should not be greater then today date",imageUrl:"assets/img/notification-alert.png"}),e.edt.sdate="")},$('*[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()}),e.$on("student_change",function(t,a){e.getNewsDetails(),e.getalldata()}),a.globals.studentsLoaded&&(e.getNewsDetails(),e.getalldata())}])}(),function(){"use strict";angular.module("sims.module.news").controller("NewsController_classwise",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.itemsPerPage="5",e.currentPage=0,e.cur_code="01",e.obj=[],e.mydata=t,console.log("currentStudent",a.globals.currentStudent),e.grade1=a.globals.currentStudent.sims_grade_code,e.section1=a.globals.currentStudent.sims_section_code,e.curcode1=a.globals.currentStudent.sims_cur_code,e.month=[{month_nm:"January",month_code:"01"},{month_nm:"February",month_code:"02"},{month_nm:"March",month_code:"03"},{month_nm:"April",month_code:"04"},{month_nm:"May",month_code:"05"},{month_nm:"June",month_code:"06"},{month_nm:"July",month_code:"07"},{month_nm:"August",month_code:"08"},{month_nm:"September",month_code:"09"},{month_nm:"October",month_code:"10"},{month_nm:"November",month_code:"11"},{month_nm:"December",month_code:"12"}],n.get(r.apiUrl+"api/common/getAllAcademicYear?cur_code="+e.cur_code).then(function(t){e.display=!0,e.acad_data=t.data,console.log("Years: ",e.acad_data)}),e.search_Archive_click=function(){void 0==e.temp.month_code&&(e.temp.month_code=""),n.get(r.apiUrl+"api/news/GetArchiveNews?academic_year="+e.temp.sims_academic_year+"&month="+e.temp.month_code).then(function(t){e.display=!0,e.obj=t.data,e.currentPage=0})},e.cirClick=function(){n.get(r.apiUrl+"api/news/GetNews_classwise?fromDate="+void 0+"&toDate="+void 0+"&grade_code="+e.grade1+"&cur_temp_code="+e.curcode1+"§ion_temp_code="+e.section1).then(function(t){e.display=!0,e.obj=t.data})},e.archClick=function(){e.temp=[],e.temp.sims_academic_year=a.globals.currentStudent.sims_acad_yr,e.obj=[],n.get(r.apiUrl+"api/news/GetArchiveNews?academic_year="+e.temp.sims_academic_year+"&month=").then(function(t){e.display=!0,e.obj=t.data,e.currentPage=0})},e.size=function(t){e.itemsPerPage=t},n.get(r.apiUrl+"api/news/GetNews_classwise?fromDate="+void 0+"&toDate="+void 0+"&grade_code="+e.grade1+"&cur_temp_code="+e.curcode1+"§ion_temp_code="+e.section1).then(function(t){e.display=!0,e.obj=t.data}),e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0)for(var s=0;ss;s++)e.academics[s].sims_academic_year==a.globals.currentStudent.sims_acad_yr&&(e.start_academicyear=e.academics[s].sims_academic_year_start_date,e.end_academicyear=e.academics[s].sims_academic_year_end_date,e.setAcademicDatetoDatepicker())})},e.setAcademicDatetoDatepicker=function(){$("#Fromdate").kendoDatePicker({value:"",format:"dd-MM-yyyy",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}}),$("#Todate").kendoDatePicker({value:"",format:"dd-MM-yyyy",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}})},e.size=function(t){e.itemsPerPage=t},["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom","tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)?(e.MissedCycle=!1,e.stutdetails=!0):(e.MissedCycle=!0,e.stutdetails=!1),n.get(i.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.obj=t.data,e.obj.sims_leave_address=e.obj.sims_admission_father_summary_address,e.obj.sims_leave_mobile=e.obj.sims_admission_father_mobile,e.obj.sims_leave_phone=e.obj.sims_admission_father_phone,e.obj.sims_leave_email=e.obj.sims_admission_father_email,console.log("getParentDetail",e.obj)}),e.getdata=function(){n.get(i.apiUrl+"api/Leave/getLeave_leams?studentid="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.items=t.data,t.data.length>0&&(e.gridShow=!0,console.log("getLeave",t.data)),e.items.forEach(function(t,s){e.leaveCounter=[],n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t.sims_leave_number).then(function(t){e.leaveCounter=t.data,e.leaveCounter.length>0&&(e.items[s].attachment_Count=e.leaveCounter.length),console.log(e.items[s])})}),moment(e.items[0].sims_leave_application_date,"DD-MM-YYYY").format("DD/MM/YYYY")==e.date||(e.savebtn=!0)})},n.get(i.apiUrl+"api/Leave/getLeaveCode").then(function(t){e.display=!0,e.CmbLeaveCode=t.data,console.log("CmbLeaveCode",t.data)}),e.viewRemark=function(t){e.remark=t,$("#viewremark").modal("show")},e.leaveNumber=function(){Array.from(Math.random().toString());let e="";if(null==e||void 0==e)return"";e=""},e.uploadAttachment1=function(t){e.getAttachment1(t),$("#uploadDocument1").modal("show")},e.getAttachment1=function(t){e.curLeaveNumber1=t,n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t).then(function(t){e.attachmentsList=t.data,console.log("CmbLeaveCode",e.attachmentsList),e.docList=[];for(var a=0;a<5;a++){var s={fdisplay:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_attachment_display_name:"",floader:!1,fstatus:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_status:"A"};console.log("test1",e.docList),e.docList.push(s)}})},e.uploadAttachment=function(t){e.getAttachment(t),$("#uploadDocument").modal("show")},e.getAttachment=function(t){e.curLeaveNumber=t,n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t).then(function(t){e.attachmentsList=t.data,console.log("CmbLeaveCode",e.attachmentsList),e.docList1=[];for(var a=0;a<5;a++){var s={fdisplay:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_attachment_display_name:"",floader:!1,fstatus:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_status:"A"};console.log("test1",e.docList1),e.docList1.push(s)}})},e.viewAttachment=function(t){n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t).then(function(t){e.attachmentsList=t.data,console.log("CmbLeaveCode",e.attachmentsList),e.attachmentsList.length>0?$("#viewattachment").modal("show"):swal("Attachment not available")})},e.get_leave_policy=function(){["ihsonlineom","mstagingom","portalom","staging1","staging2","staging3","staging4"].includes(n.defaults.headers.common.schoolId)?(e.get_Terms_Cond_Link="https://apiihs.schoolappsuae.com/mograSISAPI/Content/ihsonlineom/download/Student_Leave_Policy.pdf",window.open(e.get_Terms_Cond_Link)):["mstagingdso","iisonlinedso","portaldso","staging1","staging2","staging3","staging4"].includes(n.defaults.headers.common.schoolId)?(e.get_Terms_Cond_Link="https://apiihs.schoolappsuae.com/mograSISAPI/Content/iisonlinedso/download/Student_Leave_Policy.pdf",window.open(e.get_Terms_Cond_Link)):["mstagingag","ihsonlineag","portalag"].includes(n.defaults.headers.common.schoolId)&&(e.get_Terms_Cond_Link="https://apiihs.schoolappsuae.com/mograSISAPI/Content/ihsonlineag/download/Student_Leave_Policy.pdf",window.open(e.get_Terms_Cond_Link))},e.openAttachments=function(t){if(!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var s=0;smoment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")&&(e.obj.sims_leave_end_date="")},e.compareDate=function(){e.frmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.todate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.frmdate>e.todate&&(swal({title:"Alert",text:"To date should be greater than From date",showCloseButton:!0,width:300,height:200}),e.obj.sims_leave_end_date="")},""!=e.obj.sims_leave_start_date&&""!=e.obj.sims_leave_end_date&&e.t){e.busy=!1;e.sims_acad_yr,e.enroll_number,e.obj.sims_leave_code,moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.obj.sims_leave_reason,a.globals.currentUser.username,e.obj.sims_leave_address,e.obj.sims_leave_phone,e.obj.sims_leave_mobile,e.obj.sims_leave_email,e.obj.sims_leave_missed_cycle_test_term_exam,"".toString();n.get(i.apiUrl+"api/Leave/GetCheckLeaveExists?enrollnumber="+enroll_number+"&sims_leave_start_date="+e.obj.sims_leave_start_date+"&sims_leave_end_date="+e.obj.sims_leave_end_date).then(function(t){e.checkLeaveExists=t.data,"Y"==e.checkLeaveExists[0].leave_exists&&(swal({title:"Alert",text:"You have already applied leave between "+e.obj.sims_leave_start_date+" and "+e.obj.sims_leave_end_date,showCloseButton:!0,width:380}),e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="")}),e.checkbetweenDate=function(e,t,a){var s=new Date(e),o=new Date(t),n=new Date(a);return s>=o&&s<=n}}e.GetDays=function(){if(e.dateDifference={noOfDays:0},!(""==e.obj.sims_leave_start_date&&void 0==e.obj.sims_leave_start_date||""==e.obj.sims_leave_end_date&&void 0==e.obj.sims_leave_start_date)&&moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")>=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD")){var t=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),a=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),s=new Date(a),o=new Date(t);if(s===o)e.dateDifference.noOfDays=1;else{e.dateDifference.noOfDays=parseInt((s-o)/864e5+1);e.obj.sims_leave_code;n.get(i.apiUrl+"api/Leave/getMax?leave="+e.obj.sims_leave_code).then(function(t){e.minmax=t.data,e.minmax[0].max_dayse.dateDifference.noOfDays?(swal({title:"Alert",text:"Maximum days applicable for this leave type is : "+e.minmax[0].max_days+". And minimum days applicable for this leave type is : "+e.minmax[0].min_days+". Please refer to leave policy for more details.",showCloseButton:!0,width:380,imageUrl:"assets/img/notification-alert.png"}),e.savebtn=!1):e.savebtn=!0})}}},e.edit=function(t){e.uploadbtn=!0,e.onedit=!0,console.log(t),e.obj.sims_leave_code=t.sims_leave_code,e.obj.sims_leave_start_date=t.sims_leave_start_date,e.obj.sims_leave_end_date=t.sims_leave_end_date,e.obj.sims_leave_reason=t.sims_leave_reason,e.obj.sims_leave_address=t.sims_leave_address,e.obj.sims_leave_phone=t.sims_leave_phone,e.obj.sims_leave_mobile=t.sims_leave_mobile,e.obj.sims_leave_email=t.sims_leave_email,e.leaveno=t.sims_leave_number,e.updatebtn=!1},e.Update=function(t){e.t=!0,e.chkfrmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.chktodate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD");for(var s=0;e.items.length>s;s++)if(e.leaveno!=e.items[s].sims_leave_number){var o=e.checkbetweenDate(e.chkfrmdate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")),r=e.checkbetweenDate(e.chktodate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"));if(1==o&&1==r&&("P"==e.items[s].sims_leave_status||"A"==e.items[s].sims_leave_status)){e.t=!1;break}}if(e.t){e.busy=!0;var l={opr:"L",sims_leave_number:e.leaveno,sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_code:e.obj.sims_leave_code,sims_leave_start_date:moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_end_date:moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_reason:e.obj.sims_leave_reason,sims_parent_id:a.globals.currentUser.username,sims_leave_address:e.obj.sims_leave_address,sims_leave_phone:e.obj.sims_leave_phone,sims_leave_mobile:e.obj.sims_leave_mobile,sims_leave_email:e.obj.sims_leave_email,sims_leave_attachment:"",sims_leave_missed_cycle_test_term_exam:"",sims_leave_attachment_multi:"".toString(),sims_leave_attachment_display_name:""};n.post(i.apiUrl+"api/Leave/LeaveUpdate",l).then(function(t){e.r=t.data,e.busy=!1,e.r?(e.images=[],e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave updated successfully.",imageUrl:"assets/img/check.png"}),e.getdata()):(e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave not updated.",imageUrl:"assets/img/notification-alert.png"})),e.updatebtn=!0})}else swal({title:"Alert",text:"Leave already applied between "+e.obj.sims_leave_start_date+" and "+e.obj.sims_leave_end_date,imageUrl:"assets/img/notification-alert.png"})};var l=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){l.append(t,e)})},e.getTheFiles1=function(e){angular.forEach(e,function(e,t){l.append(t,e)})},e.file_changed=function(t){var s=t.files[0];e.photo_filename=s.type;var o=s.name.split(".")[1],d=new FileReader;d.onload=function(s){e.$apply(function(){if(e.prev_img=s.target.result,t.files[0].size<2097152){var d=a.globals.currentStudent.enroll_number+"_"+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss");["tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://leamsuae.schoolappsuae.com/api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://apiihs.schoolappsuae.com/mograSISAPI/api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["facp","smsm","modernjr","smsk","nacasca","gurukulponda","ccw64","sessos","ameyahss","vmsiihe","clarahealtonation","puneiat","christ","dmc","dvhs","dvhss","dvps","modern"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".appsis.co.in/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["ang1dev","aas","ang1prod","saisd","saiss","saisa","saids","saisu","sokstaging","tsk","tsis","sisqatar","abps","svs","nas","cbsesmf","ds","sia","sok","uksmf","ics","iisqatar","ges","iis","slis","clarionschool","oesco","abqstaging","demo","asdportal","apsportal","aelc","lpn","bloomeseuaq","bloomesealwadi","bloomeseajman","bloomesealmizhar","bloomesealtwar","modern","abqis","siso","asis"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["portal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".rakaa.sch.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["asdportal","apsportal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".amitydubai.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":e.urlapi=i.apiUrl+"api/file1/uploadDocumentIHS?filename="+d+"."+o+"&location=/Docs/Attachment/";var _={method:"POST",url:e.urlapi,data:l,headers:{"Content-Type":void 0}};n(_).success(function(t){e.busy=!0,e.uploadfun=!0,i.AWS.includes(n.defaults.headers.common.schoolId)&&(t=t.substring(t.lastIndexOf("/")+1));var a={opr:"G",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_number:e.curLeaveNumber,sims_leave_attachment:t};n.post(i.apiUrl+"api/Leave/insertdelattachment",a).then(function(t){console.log("data1",t),e.ins=t.data,console.log("data2",t.data),t.data?swal({title:"Alert",text:"Document Uploaded Successfully."}):swal({title:"Alert",text:"Document Not Uploaded Successfully."}),e.uploadfun=!1,e.busy=!1,e.disabled=!0})})}else e.strMessage=t.files[0].name+" exceeds file size limit.",swal(e.strMessage)})},d.readAsDataURL(s),$("#uploadDocument1").modal("hide"),$("#uploadDocument").modal("hide")},e.file_changed1=function(t){var s=t.files[0];e.photo_filename=s.type;var o=s.name.split(".")[1],d=new FileReader;d.onload=function(s){e.$apply(function(){if(e.prev_img=s.target.result,t.files[0].size<2097152){var d=a.globals.currentStudent.enroll_number+"_"+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss");["tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://leamsuae.schoolappsuae.com/api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://apiihs.schoolappsuae.com/mograSISAPI/api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["facp","smsm","modernjr","smsk","nacasca","gurukulponda","ccw64","sessos","ameyahss","vmsiihe","clarahealtonation","puneiat","christ","dmc","dvhs","dvhss","dvps","modern"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".appsis.co.in/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["ang1dev","aas","ang1prod","saisd","saiss","saisa","saids","saisu","sokstaging","tsk","tsis","sisqatar","abps","svs","nas","cbsesmf","ds","sia","sok","uksmf","ics","iisqatar","ges","iis","slis","clarionschool","oesco","abqstaging","demo","asdportal","apsportal","aelc","lpn","bloomeseuaq","bloomesealwadi","bloomeseajman","bloomesealmizhar","bloomesealtwar","modern","abqis","siso","asis"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["portal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".rakaa.sch.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["asdportal","apsportal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".amitydubai.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":e.urlapi=i.apiUrl+"api/file1/uploadDocumentIHS?filename="+d+"."+o+"&location=/Docs/Attachment/";var _={method:"POST",url:e.urlapi,data:l,headers:{"Content-Type":void 0}};n(_).success(function(t){e.busy=!0,i.AWS.includes(n.defaults.headers.common.schoolId)&&(t=t.substring(t.lastIndexOf("/")+1));var a={opr:"H",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_number:e.curLeaveNumber,sims_leave_attachment:t};n.post(i.apiUrl+"api/Leave/insertdelattachment_new",a).then(function(t){console.log("data1",t),e.ins=t.data,console.log("data2",t.data),t.data?swal({title:"Alert",text:"Document Uploaded Successfully."}):swal({title:"Alert",text:"Document Not Uploaded."}),e.busy=!1})})}else e.strMessage=t.files[0].name+" exceeds file size limit.",swal(e.strMessage)})},d.readAsDataURL(s),$("#uploadDocument1").modal("hide"),$("#uploadDocument").modal("hide")},e.uploadClick=function(t){e.index=t,l=new FormData},e.uploadClick1=function(t){e.index=t,l=new FormData},e.deleteDoc=function(t){swal({title:"Please confirm",text:"You want to delete",type:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes",cancelButtonText:"No",closeOnConfirm:!1,closeOnCancel:!1},function(a){if(a){var s={opr:"K",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_number:e.curLeaveNumber,sims_leave_attachment:e.docList1[t].fdisplay};n.post(i.apiUrl+"api/Leave/insertdelattachment",s).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Deleted Successfully."}),e.getAttachment(e.curLeaveNumber))})}else swal.close()})},e.Save=function(t){if(e.t=!0,t.$valid){e.chkfrmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.chktodate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD");for(var s=0;e.items.length>s;s++){var o=e.checkbetweenDate(e.chkfrmdate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")),r=e.checkbetweenDate(e.chktodate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"));if(1==o&&1==r&&("P"==e.items[s].sims_leave_status||"A"==e.items[s].sims_leave_status)){e.t=!1;break}}if(e.t){e.busy=!0;var l={opr:"C",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_code:e.obj.sims_leave_code,sims_leave_start_date:moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_end_date:moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_reason:e.obj.sims_leave_reason,sims_parent_id:a.globals.currentUser.username,sims_leave_address:e.obj.sims_leave_address,sims_leave_phone:e.obj.sims_leave_phone,sims_leave_mobile:e.obj.sims_leave_mobile,sims_leave_email:e.obj.sims_leave_email,sims_leave_attachment:"",sims_leave_missed_cycle_test_term_exam:e.obj.sims_leave_missed_cycle_test_term_exam,sims_leave_attachment_multi:"".toString(),sims_leave_attachment_display_name:""};n.post(i.apiUrl+"api/Leave/insertLeaveNewUpdated?obj",l).then(function(t){e.r=t.data,e.busy=!1,e.r?(e.images=[],e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave applied successfully.",imageUrl:"assets/img/check.png"}),e.getdata()):(e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave not applied.",imageUrl:"assets/img/notification-alert.png"}))})}else swal({title:"Alert",text:"Leave already applied between "+e.obj.sims_leave_start_date+" and "+e.obj.sims_leave_end_date,imageUrl:"assets/img/notification-alert.png"})}},e.checkbetweenDate=function(e,t,a){var s=new Date(e),o=new Date(t),n=new Date(a);return s>=o&&s<=n},e.reset=function(){e.updatebtn=!0,e.uploadbtn=!1,e.onedit=!1,e.savebtn=!1,e.obj.sims_leave_code="0",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",e.obj=[],e.obj.sims_leave_code="0",e.obj.sims_leave_missed_cycle_test_term_exam="N"},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPages;s++)e.academics[s].sims_academic_year==a.globals.currentStudent.sims_acad_yr&&(e.start_academicyear=e.academics[s].sims_academic_year_start_date,e.end_academicyear=e.academics[s].sims_academic_year_end_date,e.setAcademicDatetoDatepicker())})},e.setAcademicDatetoDatepicker=function(){$("#Fromdate").kendoDatePicker({value:"",format:"dd-MM-yyyy",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}}),$("#Todate").kendoDatePicker({value:"",format:"dd-MM-yyyy",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}})},e.size=function(t){e.itemsPerPage=t},["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom","tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)?(e.MissedCycle=!1,e.stutdetails=!0):(e.MissedCycle=!0,e.stutdetails=!1),n.get(i.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.obj=t.data,e.obj.sims_leave_address=e.obj.sims_admission_father_summary_address,e.obj.sims_leave_mobile=e.obj.sims_admission_father_mobile,e.obj.sims_leave_phone=e.obj.sims_admission_father_phone,e.obj.sims_leave_email=e.obj.sims_admission_father_email,console.log("getParentDetail",e.obj)}),e.getdata=function(){n.get(i.apiUrl+"api/Leave/getLeave_leams?studentid="+a.globals.currentStudent.enroll_number).then(function(t){e.display=!0,e.items=t.data,t.data.length>0&&(e.gridShow=!0,console.log("getLeave",t.data)),moment(e.items[0].sims_leave_application_date,"DD-MM-YYYY").format("DD/MM/YYYY")==e.date||(e.savebtn=!0)})},n.get(i.apiUrl+"api/Leave/getLeaveCode").then(function(t){e.display=!0,e.CmbLeaveCode=t.data,console.log("CmbLeaveCode",t.data)}),e.viewRemark=function(t){e.remark=t,$("#viewremark").modal("show")},e.uploadAttachment=function(t){e.getAttachment(t),$("#uploadDocument").modal("show")},e.getAttachment=function(t){e.curLeaveNumber=t,n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t).then(function(t){e.attachmentsList=t.data,console.log("CmbLeaveCode",e.attachmentsList),e.docList=[];for(var a=0;a<5;a++){var s={fdisplay:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_attachment_display_name:"",floader:!1,fstatus:e.attachmentsList.length>a?e.attachmentsList[a].sims_leave_status:"A"};e.docList.push(s)}})},e.viewAttachment=function(t){n.get(i.apiUrl+"api/Leave/getLeaveAttachments?enrollnumber="+a.globals.currentStudent.enroll_number+"&academicyear="+a.globals.currentStudent.sims_acad_yr+"&leavenumber="+t).then(function(t){e.attachmentsList=t.data,console.log("CmbLeaveCode",e.attachmentsList),e.attachmentsList.length>0?$("#viewattachment").modal("show"):swal("Attachment not available")})},e.openAttachments=function(t){if(!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var s=0;smoment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")&&(e.obj.sims_leave_end_date="")},e.compareDate=function(){e.frmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.todate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.frmdate>e.todate&&(swal({title:"Alert",text:"To date should be greater than From date",showCloseButton:!0,width:300,height:200}),e.obj.sims_leave_end_date="")},e.edit=function(t){console.log(t),e.obj.sims_leave_code=t.sims_leave_code,e.obj.sims_leave_start_date=t.sims_leave_start_date,e.obj.sims_leave_end_date=t.sims_leave_end_date,e.obj.sims_leave_reason=t.sims_leave_reason,e.obj.sims_leave_address=t.sims_leave_address,e.obj.sims_leave_phone=t.sims_leave_phone,e.obj.sims_leave_mobile=t.sims_leave_mobile,e.obj.sims_leave_email=t.sims_leave_email,e.leaveno=t.sims_leave_number,e.updatebtn=!1},e.Update=function(t){if(e.t=!0,t.$valid){e.chkfrmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.chktodate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD");for(var s=0;e.items.length>s;s++)if(e.leaveno!=e.items[s].sims_leave_number){var o=e.checkbetweenDate(e.chkfrmdate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")),r=e.checkbetweenDate(e.chktodate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"));if(1==o&&1==r&&("P"==e.items[s].sims_leave_status||"A"==e.items[s].sims_leave_status)){e.t=!1;break}}if(e.t){e.busy=!0;var l={opr:"L",sims_leave_number:e.leaveno,sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_code:e.obj.sims_leave_code,sims_leave_start_date:moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_end_date:moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_reason:e.obj.sims_leave_reason,sims_parent_id:a.globals.currentUser.username,sims_leave_address:e.obj.sims_leave_address,sims_leave_phone:e.obj.sims_leave_phone,sims_leave_mobile:e.obj.sims_leave_mobile,sims_leave_email:e.obj.sims_leave_email,sims_leave_attachment:"",sims_leave_missed_cycle_test_term_exam:"",sims_leave_attachment_multi:"".toString(),sims_leave_attachment_display_name:""};n.post(i.apiUrl+"api/Leave/LeaveUpdate",l).then(function(t){e.r=t.data,e.busy=!1,e.r?(e.images=[],e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave updated successfully.",imageUrl:"assets/img/check.png"}),e.getdata()):(e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave not updated.",imageUrl:"assets/img/notification-alert.png"})),e.updatebtn=!0})}else swal({title:"Alert",text:"Leave already applied between selected dates.",imageUrl:"assets/img/notification-alert.png"})}};var l=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){l.append(t,e)})},e.file_changed=function(t){var s=t.files[0];e.photo_filename=s.type;var o=s.name.split(".")[1],d=new FileReader;d.onload=function(s){e.$apply(function(){if(e.prev_img=s.target.result,t.files[0].size<2097152){var d=a.globals.currentStudent.enroll_number+"_"+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss");["tiadxb","tiashj","staging1","staging2","staging3","staging4","aisdxb","tosdxb","aics"].includes(n.defaults.headers.common.schoolId)?e.urlapi=i.kindoApi+"api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["ihsonlineom","mstagingdso","iisonlinedso","mstagingag","ihsonlineag","mstagingom","portaldso","portalag","portalom"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://apiihs.schoolappsuae.com/mograSISAPI/api/file1/uploadDocumentIHS?filename="+d+"&location=/Docs/Attachment/":["facp","smsm","modernjr","smsk","nacasca","gurukulponda","ccw64","sessos","ameyahss","vmsiihe","clarahealtonation","puneiat","christ","dmc","dvhs","dvhss","dvps","modern"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".appsis.co.in/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["ang1dev","aas","ang1prod","saisd","saiss","saisa","saids","saisu","sokstaging","tsk","tsis","sisqatar","abps","svs","nas","cbsesmf","ds","sia","sok","uksmf","ics","iisqatar","ges","iis","slis","clarionschool","oesco","abqstaging","demo","asdportal","apsportal","aelc","lpn","bloomeseuaq","bloomesealwadi","modern","abqis","siso","asis"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["portal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".rakaa.sch.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":["asdportal","apsportal"].includes(n.defaults.headers.common.schoolId)?e.urlapi="https://"+n.defaults.headers.common.schoolId+".amitydubai.aeapi/fileNew/uploadDocument?filename="+d+"."+o+"&location=/Docs/Attachment/":e.urlapi=i.apiUrl+"api/fileNew/uploadDocumentIHS?filename="+d+"."+o+"&location=/Docs/Attachment/";var _={method:"POST",url:e.urlapi,data:l,headers:{"Content-Type":void 0}};n(_).success(function(t){i.AWS.includes(n.defaults.headers.common.schoolId)&&(t=t.substring(t.lastIndexOf("/")+1));var a={opr:"G",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_number:e.curLeaveNumber,sims_leave_attachment:t};n.post(i.apiUrl+"api/Leave/insertdelattachment",a).then(function(t){e.ins=t.data,t.data&&swal({title:"Alert",text:"Document Uploaded Successfully."})})})}else e.strMessage=t.files[0].name+" exceeds file size limit.",swal(e.strMessage)})},d.readAsDataURL(s)},e.uploadClick=function(t){e.index=t,l=new FormData},e.deleteDoc=function(t){swal({title:"Please confirm",text:"You want to delete",type:"",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes",cancelButtonText:"No",closeOnConfirm:!1,closeOnCancel:!1},function(a){if(a){var s={opr:"K",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_number:e.curLeaveNumber,sims_leave_attachment:e.docList[t].fdisplay};n.post(i.apiUrl+"api/Leave/insertdelattachment",s).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Deleted Successfully."}),e.getAttachment(e.curLeaveNumber))})}else swal.close()})},e.Save=function(t){if(e.t=!0,t.$valid){e.chkfrmdate=moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),e.chktodate=moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD");for(var s=0;e.items.length>s;s++){var o=e.checkbetweenDate(e.chkfrmdate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD")),r=e.checkbetweenDate(e.chktodate,moment(e.items[s].sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),moment(e.items[s].sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"));if(1==o&&1==r&&("P"==e.items[s].sims_leave_status||"A"==e.items[s].sims_leave_status)){e.t=!1;break}}if(e.t){e.busy=!0;var l={opr:"C",sims_academic_year:e.sims_acad_yr,sims_enroll_number:e.enroll_number,sims_leave_code:e.obj.sims_leave_code,sims_leave_start_date:moment(e.obj.sims_leave_start_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_end_date:moment(e.obj.sims_leave_end_date,"DD-MM-YYYY").format("YYYY-MM-DD"),sims_leave_reason:e.obj.sims_leave_reason,sims_parent_id:a.globals.currentUser.username,sims_leave_address:e.obj.sims_leave_address,sims_leave_phone:e.obj.sims_leave_phone,sims_leave_mobile:e.obj.sims_leave_mobile,sims_leave_email:e.obj.sims_leave_email,sims_leave_attachment:"",sims_leave_missed_cycle_test_term_exam:e.obj.sims_leave_missed_cycle_test_term_exam,sims_leave_attachment_multi:"".toString(),sims_leave_attachment_display_name:""};n.post(i.apiUrl+"api/Leave/insertLeaveNewUpdated?obj",l).then(function(t){e.r=t.data,e.busy=!1,e.r?(e.images=[],e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave applied successfully.",imageUrl:"assets/img/check.png"}),e.getdata()):(e.obj.sims_leave_code="",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",swal({title:"Alert",text:"Leave not applied.",imageUrl:"assets/img/notification-alert.png"}))})}else swal({title:"Alert",text:"Leave already applied between selected dates.",imageUrl:"assets/img/notification-alert.png"})}},e.checkbetweenDate=function(e,t,a){var s=new Date(e),o=new Date(t),n=new Date(a);return s>=o&&s<=n},e.reset=function(){e.obj.sims_leave_code="0",e.obj.sims_leave_start_date="",e.obj.sims_leave_end_date="",e.obj.sims_leave_reason="",e.obj=[],e.obj.sims_leave_code="0",e.obj.sims_leave_missed_cycle_test_term_exam="N"},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPagee.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0){e.fees_lst=t.data.table;for(var a=0;a0)for(n=0;e.confirm_last.length>n;n++)a.get(s.apiUrl+"api/fees/getfailedstudentsExam?&cur="+t.globals.currentStudent.sims_cur_code+"&term="+e.sims_term_code+"&ac_year="+t.globals.currentStudent.sims_acad_yr+"&grade_code="+t.globals.currentStudent.sims_grade_code+"§ion_code="+t.globals.currentStudent.sims_section_code+"&sub_code="+e.confirm_last[n].sims_subject_code+"&i="+n).then(function(t){if(t.data.length>0)if(e.confirm_last[t.data[0].i].confirm_last2=[],e.confirm_last[t.data[0].i].confirm_last2=t.data,""==e.confirm_last[t.data[0].i].sims_gb_cat_code||void 0==e.confirm_last[t.data[0].i].sims_gb_cat_code)e.confirm_last[t.data[0].i].sims_gb_cat_code=t.data[0];else for(var a=0;a0&&(e.pdetails=t.data[0],e.mobile=e.pdetails.pmobile,""==e.pdetails.pemail?e.pemail="info@dmscollege.ac.in":e.pemail=e.pdetails.pemail)})},e.$on("student_change",function(t,a){e.getFeesDetails()}),t.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew",["sims","gettext"])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardNewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,e.reportShow=!1,e.showAssign=!1,e.obj=[],e.obj1=[],e.obj2=[],e.obj3=[],e.obj5=[],e.obj4=[],e.eflag=!1,console.log(a.globals.currentUser.username),console.log(a.globals.currentUser),e.getMedicalDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,"misqatar"==n.defaults.headers.common.schoolId&&(e.btnSubmitShow=!0),e.showAssign=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,console.log("Reportcard"),console.log(a.globals.currentStudent),n.get(r.apiUrl+"api/common/getreportFlag").then(function(t){e.rptflg=t.data[0],console.log(e.rptflg)}),n.get(r.apiUrl+"api/common/getreportMsg").then(function(t){t.data.length>0&&(e.rptmsg=t.data[0].sims_appl_form_field_value1),console.log(e.rptmsg)}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data}),n.get(r.apiUrl+"api/reportcardnew/getResultType").then(function(t){var s=a.globals.currentStudent.sims_grade_code;"03"!=s&&"04"!=s&&"05"!=s&&"06"!=s&&"07"!=s||t.data.length>0&&t.data.splice(0,1),e.grid=!0,e.obj4=t.data,console.log(e.obj4)}),e.AcademicChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(s){e.studentGrade=s.data[0],console.log("grede"),console.log(e.studentGrade.sims_grade_code),"sjs"==n.defaults.headers.common.schoolId&&n.get(r.apiUrl+"api/reportcardnew/getResultType").then(function(s){a.globals.currentStudent.sims_grade_code;if(e.obj4=s.data,"2017"==t)for(var o=0;o0&&(e.std=t.data[0])}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.Getinfo6=function(t){"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aics"==n.defaults.headers.common.schoolId)var l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".leamseducation.com/report/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId)l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".ihsdubai.org/report/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),setTimeout(function(){var e=$("#reportViewer1").data("telerik_ReportViewer");e.commands.togglePrintPreview.exec(),e.ShowExportGroup=!1},1e3),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)})}},e.print_rpt=function(t){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),e.flg_report=!0,n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aics"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId)l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".ihsdubai.org/report/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)})},e.print_rptnew=function(t){e.flg_report=!1,n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aics"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),$("#reportViewer1").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardNewController_Skill_New",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,e.dvhss_flag=!0,e.flg_dvhss=!1,e.report_btn=!1,e.report_btnnew=!1,e.dis=[],e.getMedicalDetails=function(t){e.reportShow=!1,e.brs_rpt=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data)}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.Getinfo6=function(t,o){e.dis[o]=!0,n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId)l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".ihsdubai.org/report/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}});var d=$("#reportViewer1").data("telerik_ReportViewer");d.reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),d.commands.export.exec("pdf"),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)})}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardController_SkillNew",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,e.dvhss_flag=!0,e.flg_dvhss=!1,e.getMedicalDetails=function(t){e.reportShow=!1,e.brs_rpt=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data)}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.Getinfo6=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId)l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".ihsdubai.org/report/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),setTimeout(function(){$("#reportViewer1").data("telerik_ReportViewer").commands.togglePrintPreview.exec()},1e3),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)})}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardNewController_View_Download",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.getMedicalDetails=function(t){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.username=a.globals.currentUser.username,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data)}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.Getinfo6=function(t){e.btnreport="1"},e.print_rpt=function(t){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),e.flg_report=!0,n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aics"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId)l="https://"+n.defaults.headers.common.schoolId.toLowerCase()+".ihsdubai.org/report/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)})},e.print_rptnew=function(t){e.flg_report=!1,n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(o){e.report_name=o.data;var i;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"aics"==n.defaults.headers.common.schoolId)var l="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:a.globals.currentStudent.enroll_number,scheme_code:t.sims_prog_card_config_code,visible_status:t.sims_report_display_status,visibility_msg:t.sims_report_err_display_msg},$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){$("#report_Modal").modal("hide")}},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("SJSController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,$(document).ready(function(){$("#reportViewer1").telerik_ReportViewer({serviceUrl:"http://localhost/SIMSAPI/api/reports/",reportSource:{report:"SimsReports.Gradebook.GBR002SJSG1to8,SimsReports",parameters:{}},viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}})}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),s(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";angular.module("sims.module.documentUpload",["sims","gettext"])}(),function(){"use strict";var e=angular.module("sims.module.documentUpload");e.controller("documentUploadController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.filesize=!0,e.itemsPerPage="15",e.currentPage=0,e.items=[];new Date;e.ddMMyyyy=r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss"),console.log(e.ddMMyyyy),e.size=function(t){e.itemsPerPage=t},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-15&&(t=e.pageCount()-15+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage2e5&&(e.filesize=!1,e.edt.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 200Kb.",imageUrl:"assets/img/notification-alert.png"}))})},e.file_changed=function(t,s){var o=t.files[0];e.photo_filename=o.type;var d=new FileReader;if(d.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},d.readAsDataURL(o),t.files[0].size<2097152){var _={method:"POST",url:"https://api.mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+e.edt.sims_admission_criteria_code+"-"+e.enroll_number+"-"+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss")+"&location=Docs/Student",data:l,headers:{"Content-Type":void 0}};n(_).success(function(t){var s={sims_admission_criteria_code:e.edt.sims_admission_criteria_code,sims_admission_enroll_number:e.enroll_number,sims_admission_cur_code:e.simscur,sims_admission_academic_year:e.sims_acad_yr,sims_admission_grade_code:e.grade,sims_admission_section_code:e.section,sims_admission_user_code:a.globals.currentUser.username,sims_admission_doc_path:t};n.post(i.apiUrl+"api/document/insertdoc",s).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Uploaded Successfully.",imageUrl:"assets/img/notification-alert.png"}),n.get(i.apiUrl+"api/document/getDocument?enroll="+e.enroll_number+"&grade="+e.grade).then(function(t){e.items=t.data,console.log(t.data)}))})})}},e.uploadClick=function(t){e.filesize=!0,e.edt=t,e.edt.photoStatus=!0,e.ins=!1,l=new FormData},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}]),e.directive("ngFiles",["$parse",function(e){return{link:function(t,a,s){var o=e(s.ngFiles);a.on("change",function(e){o(t,{$files:e.target.files})})}}}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardSmmController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,"abps"==n.defaults.headers.common.schoolId&&(e.flg_abps=!0),"dmc"==n.defaults.headers.common.schoolId&&(e.Category=!0),e.dvhss_flag=!0,e.flg_dvhss=!1,e.getMedicalDetails=function(o){e.reportShow=!1,e.brs_rpt=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,console.log("Reportcard"),console.log(a.globals.currentStudent),"ahis"==n.defaults.headers.common.schoolId&&t.go("main.gradeB"),e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data)}),"smm"==n.defaults.headers.common.schoolId||"smfc"==n.defaults.headers.common.schoolId||"sms"==n.defaults.headers.common.schoolId||"iis"==n.defaults.headers.common.schoolId||"abps"==n.defaults.headers.common.schoolId||"eiama"==n.defaults.headers.common.schoolId?(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)})):"sisqatar"==n.defaults.headers.common.schoolId?(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_sisqatar?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&grade_code="+a.globals.currentStudent.sims_grade_code).then(function(s){e.grid=!0,e.obj5=s.data,console.log(e.obj5);["26","27","28","29"].includes(e.std.sims_grade_code)&&n.get(r.apiUrl+"api/reportcardnew/getAllReportLevelCodes?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&grade_code="+e.std.sims_grade_code+"§ion_code="+e.std.sims_section_code).then(function(t){e.brs_rpt=!0,e.cmbReportLevel=t.data})})):"tiashj"==n.defaults.headers.common.schoolId||"tiadxb"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId||"Staging3"==n.defaults.headers.common.schoolId||"nas"==n.defaults.headers.common.schoolId?(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log("terms dropdown",e.obj5),console.log("display_msg:",e.display_msg),console.log("display_status:",e.display_status)})):"dmc"==n.defaults.headers.common.schoolId?(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_DMC?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"§ion_code="+a.globals.currentStudent.sims_section_code+"&grade_code="+a.globals.currentStudent.sims_grade_code).then(function(t){e.grid=!0,e.obj5=t.data,console.log("terms dropdown",e.obj5)})):"portal"==n.defaults.headers.common.schoolId?(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_portal?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&grade_code="+a.globals.currentStudent.sims_grade_code).then(function(t){e.grid=!0,e.obj5=t.data,console.log("terms dropdown",e.obj5)})):(e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log("terms dropdown",e.obj5)}))},"dmc"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears_DMC?cur_code="+a.globals.currentStudent.sims_cur_code+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}):n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year),"smm"==n.defaults.headers.common.schoolId||"deps"==n.defaults.headers.common.schoolId||"slis"==n.defaults.headers.common.schoolId||"smfc"==n.defaults.headers.common.schoolId||"siso"==n.defaults.headers.common.schoolId||"iis"==n.defaults.headers.common.schoolId||"abps"==n.defaults.headers.common.schoolId||"eiama"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)}):"adis"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)}):"brs"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)}):"sisqatar1"==n.defaults.headers.common.schoolId?n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)})}):n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)})}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data,Console.log(" $scope.cmbReportcard",e.cmbReportcard)})},e.reportcardChange=function(t){if("sisqatar1"==n.defaults.headers.common.schoolId){if("2020"==e.obj.academic_year){var o="",i={};["26","27","28","29"].includes(e.std.sims_grade_code)&&(o="SimsReports.Gradebook.GBR11to12SISQATAR_term_PP,SimsReports",i={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:e.obj.sims_term_code,level_detail:e.obj.sims_level_code,report_card_name:e.obj.sims_report_card,search:a.globals.currentStudent.enroll_number});var l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:o,parameters:i}),e.reportShow=!0,setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(10)").css({display:"none"}),$(".trv-nav li:nth-child(11)").css({display:"none"}),$(".trv-nav li:eq(11)").css({display:"none"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(10)").css({display:"none"}),$(".trv-nav li:nth-child(11)").css({display:"none"}),$(".trv-nav li:eq(11)").css({display:"none"})},100)}}else{if("05"==e.std.sims_grade_code||"06"==e.std.sims_grade_code||"07"==e.std.sims_grade_code||"08"==e.std.sims_grade_code||"09"==e.std.sims_grade_code||"10"==e.std.sims_grade_code){l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports.Gradebook.GBR002BRS5to10PP,SimsReports",parameters:{acad_year:a.globals.currentStudent.sims_acad_yr,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:a.globals.currentStudent.sims_grade_code,section_code:a.globals.currentStudent.sims_section_code,term_code:e.obj.sims_term_code,serch_student:a.globals.currentStudent.enroll_number,level:e.obj.sims_level_code,report_card:e.obj.sims_report_card}}),e.reportShow=!0,setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)}if("11"==e.std.sims_grade_code||"12"==e.std.sims_grade_code||"07"==e.std.sims_grade_code||"08"==e.std.sims_grade_code||"09"==e.std.sims_grade_code||"10"==e.std.sims_grade_code){l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer1").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports.Gradebook.GBR002BRS11to12PP,SimsReports",parameters:{acad_year:a.globals.currentStudent.sims_acad_yr,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:a.globals.currentStudent.sims_grade_code,section_code:a.globals.currentStudent.sims_section_code,term_code:e.obj.sims_term_code,serch_student:a.globals.currentStudent.enroll_number,level:e.obj.sims_level_code,report_card:e.obj.sims_report_card}}),e.reportShow=!0,setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"})},100)}}},e.Getinfo6=function(t){a.globals.termcode=t;for(var o=0;o0&&(e.std=t.data[0]),console.log("$scope.std",t.data)}),e.obj.sims_term_code="",n.get(i.apiUrl+"api/reportcardnew/getTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)})},n.get(i.apiUrl+"api/reportcardnew/getAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year),e.obj.length>0&&n.get(i.apiUrl+"api/reportcardnew/getTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.obj5=t.data,console.log(e.obj5)})}),e.reportcardLevelChange=function(t){n.get(i.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.subjectChange=function(t){n.get(i.apiUrl+"api/reportcardnew/getReportLevelCodes?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"§ion_code="+a.globals.currentStudent.sims_section_code+"&grade_code="+a.globals.currentStudent.sims_grade_code+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj9=t.data})},e.Getselectdate=function(t,s,o){n.post(i.apiUrl+"api/reportcardnew/Dateselection?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+o+"&termcode="+s).then(function(t){e.objdate=t.data,console.log(" $scope.objdate",e.objdate)})},e.Getinfo6=function(t,o,r){if(a.globals.termcode=t,a.globals.termdesc=document.getElementById("cmb_term").options[document.getElementById("cmb_term").selectedIndex].text,"corvuss"==n.defaults.headers.common.schoolId){var l,d,_="";i.AWS.includes(n.defaults.headers.common.schoolId)&&(_="reports-");var c="https://"+_+n.defaults.headers.common.schoolId.toLowerCase()+".mograsys.com/report/api/reports/";l=" SimsReports.Gradebook.GBR002Corvuss_SportsEval,SimsReports",d={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t,search:a.globals.currentStudent.enroll_number,subject:o,assign_date:r},console.log("para",d),$("#reportViewer1").telerik_ReportViewer({serviceUrl:c,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:l,parameters:d}),e.reportShow=!0,setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.alert").controller("alertController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(e,t,a,s,o,n,r,i){var l=a.globals.currentUser.username;e.expand1={display:"none"},e.alert=[];var d=(c=new Date).getMonth()+1,_=c.getDate();if(d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=c.getFullYear()+"-"+d+"-"+_,e.focusLost=function(){void 0==e.d&&(e.d="",n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=Z").then(function(t){e.busy=!0,t.data.length>0?e.alert=t.data:e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0}))},i.flag){d=(c=new Date(a.globals.alterDate)).getMonth()+1,_=c.getDate();d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=c.getFullYear()+"-"+d+"-"+_,n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=Z").then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})}else{var c;d=(c=new Date).getMonth()+1,_=c.getDate();d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=void 0,n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=Z").then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})}function m(e){var t=e.split("-");return t[2]+"-"+t[1]+"-"+t[0]}e.getDatewise=function(t,a){console.log(t),console.log(a),n.get(r.apiUrl+"api/alert/getAlertFromTodate?username="+l+"&frmdate="+t+"&todate="+a).then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})},e.SaveData=function(s){if(""!=s||void 0!=s)switch(s.alert_mod_code){case"038":a.globals.circularMessage=s.alert_message,a.globals.alertDate=s.comn_alert_seq_number,a.globals.cirflag=!0,t.go("main.PP015",{flag:!0});break;case"015":a.globals.alertDate=s.alert_date,t.go("main.PP030",{flag:!0});break;case"041":a.globals.alertDate=s.alert_date,t.go("main.PP004",{flag:!0});break;case"039":t.go("main.PP025");break;case"030":t.go("main.PP013");break;case"012":t.go("main.PP002");break;case"033":t.go("main.PP003");break;case"023":t.go("main.PP011");break;case"016":t.go("main.PP009",{flag:!0});break;case"010":t.go("main.PP008");break;case"014":t.go("main.PP028",{flag:!0})}e.d=moment(s.alert_date,"DD-MM-YYYY").format("YYYY-MM-DD");var o=new Date(e.d),i=o.getMonth()+1,d=o.getDate();i<10&&(i="0"+i),d<10&&(d="0"+d),e.d=o.getFullYear()+"-"+i+"-"+d;var _=e.d+"";n.get(r.apiUrl+"api/alert/getAlertUpdate?number="+s.alert_number).then(function(t){t.data.length>0&&(e.al={alert_status:"true"})}),n.get(r.apiUrl+"api/alert/getAlert?username="+l+"&date="+e.d+"&opr=Z").then(function(t){e.busy=!0,e.alert=t.data,e.busy=!1,e.display=!0,window.localStorage[_]=JSON.stringify(e.alert)},function(t){0==t.status&&(e.alert=JSON.parse(window.localStorage[_]),e.alert=e.alerts)})},e.chkdate=function(){var t,s=(t=new Date).getDate(),o=t.getMonth()+1,n=t.getFullYear();s=(t=new Date).getDate(),a.globals.currentUser.username;s<10&&(s="0"+s),(o=t.getMonth()+1)<10&&(o="0"+o);n=t.getFullYear();e.current_date=s+"-"+o+"-"+n,m(e.from)>m(e.current_date)&&(swal({title:"Alert",text:"From date should not be greater then today date",imageUrl:"assets/img/notification-alert.png"}),e.edt.sdate="")},$('*[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()})}])}(),function(){"use strict";angular.module("sims.module.alert").controller("FeeReminderController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(e,t,a,s,o,n,r,i){var l=a.globals.currentUser.username;e.expand1={display:"none"},e.alert=[];var d=(c=new Date).getMonth()+1,_=c.getDate();if(d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=c.getFullYear()+"-"+d+"-"+_,e.focusLost=function(){void 0==e.d&&(e.d="",n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=F").then(function(t){e.busy=!0,t.data.length>0?e.alert=t.data:e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0}))},i.flag){debgger;d=(c=new Date(a.globals.alterDate)).getMonth()+1,_=c.getDate();d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=c.getFullYear()+"-"+d+"-"+_,n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=F").then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})}else{var c;d=(c=new Date).getMonth()+1,_=c.getDate();d<10&&(d="0"+d),_<10&&(_="0"+_),e.d=void 0,n.get(r.apiUrl+"api/alert/getNewAlert?username="+l+"&date="+e.d+"&opr=F").then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})}e.getDatewise=function(t,a){n.get(r.apiUrl+"api/alert/getAlertFromTodatefee?username="+l+"&frmdate="+t+"&todate="+a).then(function(t){e.busy=!0,t.data.length>0?(e.alert=t.data,window.localStorage[currDate]=JSON.stringify(e.alert)):e.alert=[{alert_message:"Alerts Not Found."}],e.busy=!1,e.display=!0})},e.SaveData=function(s){if(""!=s||void 0!=s)switch(s.alert_mod_code){case"038":a.globals.circularMessage=s.alert_message,a.globals.alertDate=s.comn_alert_seq_number,a.globals.cirflag=!0,t.go("main.PP015",{flag:!0});break;case"015":a.globals.alertDate=s.alert_date,t.go("main.PP030",{flag:!0});break;case"041":a.globals.alertDate=s.alert_date,t.go("main.PP004",{flag:!0});break;case"039":t.go("main.PP025");break;case"030":t.go("main.PP013");break;case"012":t.go("main.PP002");break;case"033":t.go("main.PP003");break;case"023":t.go("main.PP011");break;case"016":t.go("main.PP009",{flag:!0});break;case"010":t.go("main.PP008");break;case"014":t.go("main.PP028",{flag:!0})}e.d=moment(s.alert_date,"DD-MM-YYYY").format("YYYY-MM-DD");var o=new Date(e.d),i=o.getMonth()+1,d=o.getDate();i<10&&(i="0"+i),d<10&&(d="0"+d),e.d=o.getFullYear()+"-"+i+"-"+d;var _=e.d+"";n.get(r.apiUrl+"api/alert/getAlertUpdate?number="+s.alert_number).then(function(t){t.data.length>0&&(e.al={alert_status:"true"})}),n.get(r.apiUrl+"api/alert/getAlert?username="+l+"&date="+e.d+"&opr=F").then(function(t){e.busy=!0,e.alert=t.data,e.busy=!1,e.display=!0,window.localStorage[_]=JSON.stringify(e.alert)},function(t){0==t.status&&(e.alert=JSON.parse(window.localStorage[_]),e.alert=e.alerts)})},$('*[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()})}])}(),function(){"use strict";angular.module("sims.module.certificate").controller("TCCertificateController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(e,t,a,s,o,n,r,i){console.clear(),e.tablehide=!1,e.pagesize="5",e.pageindex="1",a.visible_stud=!0,a.chkMulti=!1;var l=n("date")(new Date,"yyyy-MM-dd");e.dt={sims_tc_certificate_request_date:l},e.size=function(t){e.pagesize=t,e.currentPage=1,e.numPerPage=t,console.log("numPerPage="+e.numPerPage),e.makeTodos()},e.index=function(t){e.pageindex=t,e.currentPage=t,console.log("currentPage="+e.currentPage),e.makeTodos(),main.checked=!1,e.CheckAllChecked()},e.filteredTodos=[],e.currentPage=1,e.numPerPage=5,e.maxSize=5,e.makeTodos=function(){var t=parseInt(e.totalItems%e.numPerPage);e.pagersize="0"==t?parseInt(e.totalItems/e.numPerPage):parseInt(e.totalItems/e.numPerPage)+1;var a=(e.currentPage-1)*e.numPerPage,s=parseInt(a)+parseInt(e.numPerPage);console.log("begin="+a),console.log("end="+s),e.filteredTodos=e.todos.slice(a,s)},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"}),e.Show=function(){r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiestDate?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?(swal({title:"Alert",text:"No Record Found...",showCloseButton:!0,width:450,height:200}),e.tablehide=!1):e.tablehide=!0})},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),e.SearchEnroll=function(){e.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},e.$on("global_cancel",function(){e.SelectedUserLst.length>0&&(e.edt={sims_enroll_number:e.SelectedUserLst[0].s_enroll_no,sims_student_name:e.SelectedUserLst[0].name})}),e.Save=function(t){if(t){var s=a.globals.currentUser.username,o=[],n={sims_enroll_number:e.edt.sims_enroll_number,sims_tc_certificate_reason:e.edt.sims_tc_certificate_reason,sims_tc_certificate_requested_by:s,sims_tc_certificate_request_date:e.dt.sims_tc_certificate_request_date,opr:"I"};o.push(n),r.post(i.apiUrl+"api/TCertificate/CUDTccertificaterequiest",o).then(function(t){e.msg1=t.data,void 0!=e.msg1.strMessage?null==e.msg1.strMessage&&""==e.msg1.strMessage&&void 0==e.msg1.strMessage||(swal({title:"Alert",text:e.msg1.strMessage,width:380,height:200}),e.showdata(),e.currentPage=!0):swal({title:"Alert",text:"Record Not Inserted...",showCloseButton:!0,width:380})})}},e.searched=function(e,t){return _.filter(e,function(e){return function(e,t){return e.sims_tc_certificate_request_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sims_enroll_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sager==t}(e,t)})},e.search=function(){e.todos=e.searched(e.obj,e.searchText),e.totalItems=e.todos.length,e.currentPage="1",""==e.searchText&&(e.todos=e.obj),e.makeTodos()},e.clear=function(){e.edt.sims_tc_certificate_reason="",e.searchText=""},e.Reset=function(){e.clear(),e.tablehide=!1},e.getstudentList=function(){e.edt={sims_student_name:a.globals.currentStudent.sims_student_passport_fullname,sims_enroll_number:a.globals.currentStudent.sims_student_enroll_number},r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiest?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?e.tablehide=!1:e.tablehide=!0})},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("confirmationReportController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.grid=!1,e.getMedicalDetails=function(t){e.enroll_number=a.globals.currentStudent.enroll_number,e.grade=a.globals.currentStudent.sims_grade_code,e.section=a.globals.currentStudent.sims_section_code,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.showAssign=!1,"smfb"==n.defaults.headers.common.schoolId?$("#reportViewer3").telerik_ReportViewer({serviceUrl:r.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.PRINT_PREVIEW,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,reportSource:{report:"SimsReports.Sims.SMR101smfB,SimsReports",parameters:{Acadmic_Year:e.sims_acad_yr,Cur:e.sims_cur_code,Grade:e.grade,Section:e.section,enroll_no:e.enroll_number}}}):$("#reportViewer3").telerik_ReportViewer({serviceUrl:r.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.PRINT_PREVIEW,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,reportSource:{report:"SimsReports.Gradebook.GBR001,SimsReports",parameters:{acad_year:e.sims_acad_yr,cur_code:e.sims_cur_code,grade_code:e.grade,section_code:e.section,serch_student:e.enroll_number}}}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("ReportCardParameterCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){try{e.rpt=JSON.parse(window.localStorage.ReportDetails),e.location=e.rpt.location,e.parameter=e.rpt.parameter,e.state=e.rpt.state}catch(e){}var i;i="SimsReports."+e.location+",SimsReports",e.parameters={},$("#reportViewer1").telerik_ReportViewer({serviceUrl:r.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:i,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"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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(){t.go(e.state)}}])}(),function(){"use strict";angular.module("sims.module.lms").controller("OnlineAdmissionController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.getMedicalDetails=function(e){console.log(a.globals.currentUser),n.get(i.apiUrl+"api/common/getinsertadmission_parent?parentid="+a.globals.currentUser.username+"&pass="+a.globals.currentUser.pass).then(function(e){window.open("http://oa.mograsys.com/"+n.defaults.headers.common.schoolId+"/OnlineAdmission.html#?u="+e.data+"&p="+l.encode(a.globals.currentUser.pass),"_new")})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails();var l={keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,a,s,o,n,r="",i="",l="",d=0;do{s=(t=e.charCodeAt(d++))>>2,o=(3&t)<<4|(a=e.charCodeAt(d++))>>4,n=(15&a)<<2|(i=e.charCodeAt(d++))>>6,l=63&i,isNaN(a)?n=l=64:isNaN(i)&&(l=64),r=r+this.keyStr.charAt(s)+this.keyStr.charAt(o)+this.keyStr.charAt(n)+this.keyStr.charAt(l),t=a=i="",s=o=n=l=""}while(de.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.learnarabic.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage8e5&&(e.filesize=!1,e.edt.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 800Kb.",imageUrl:"assets/img/notification-alert.png"}))})},e.file_changed=function(t,a){var s=t.files[0];e.photo_filename=s.name,e.edt1={sims_timetable_filename:e.photo_filename},$.extend(e.edt,e.edt1),e.photo_filename=s.type;var o=new FileReader;o.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},o.readAsDataURL(s),t.files[0].size},$(function(){$("table tbody tr:even").addClass("even_row"),$("#all_chk").change(function(){$("input:checkbox").prop("checked",this.checked),$("tr").toggleClass("selected_row",this.checked)}),$("table tbody :checkbox").change(function(e){$(this).closest("tr").toggleClass("selected_row",this.checked)}),$("table tbody tr").click(function(e){"checkbox"!==e.target.type&&$(":checkbox",this).trigger("click"),$("input[type='checkbox']").not("#all_chk").change(function(e){$(this).is(":checked")?$(this).closest("tr").addClass("selected_row"):$(this).closest("tr").removeClass("selected_row")})})}),s(function(){$("#fixTable").tableHeadFixer({top:1})},100),s(function(){$("#fixTable1").tableHeadFixer({top:1})},100),e.searched=function(e,t){return _.filter(e,function(e){return searchUtil(e,t)})}}])}(),function(){"use strict";angular.module("sims.module.agenda").controller("WeeklyAssessmentShowCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){a.globals.currentUser.username;e.getstudentList=function(){e.enroll_number=a.globals.currentStudent.sims_student_enroll_number,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,n.get(r.apiUrl+"api/assessmentreport/getAssessmentmonthdetails?enroll_number="+e.enroll_number).then(function(t){e.Assessmentmonthdetails=t.data}),e.getweek=function(){n.get(r.apiUrl+"api/assessmentreport/getAssessmentweekdetails?enroll_number="+e.enroll_number+"&month_name="+e.edt.month_code).then(function(t){e.Assessmentweekdetails=t.data})},e.getSubject=function(){n.get(r.apiUrl+"api/assessmentreport/getAssessmentsubjectdetails?enroll_number="+e.enroll_number+"&cat_code="+e.edt.month_code+"&assign_code="+e.edt.Week_code).then(function(t){e.Assessmentsubjectdetails=t.data})},e.Reset=function(){e.edt=""},e.Show=function(){e.table=!1,e.busy=!0;var t={};t.sims_cur_code=e.sims_cur_code,t.sims_academic_year=e.sims_acad_yr,t.sims_enroll_number=e.enroll_number,t.sims_gb_cat_code=e.edt.month_code,t.sims_gb_cat_assign_number=e.edt.Week_code,t.sims_gb_number=e.edt.subject_code,n.post(r.apiUrl+"api/assessmentreport/AssessmentChilddetails",t).then(function(t){e.AssessmentChilddetails=t.data,e.busy=!1,console.log(e.AssessmentChilddetails),e.AssessmentChilddetails.length>0?e.table=!0:swal({text:"Data Not Found",width:300,showCloseButton:!0})})}},e.$on("student_change",function(t,a){e.getstudentList()}),a.globals.studentsLoaded&&e.getstudentList()}])}(),function(){"use strict";var e=angular.module("sims.module.documentUpload");e.controller("documentUploadAdisController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(e,t,a,s,o,n,r,i){e.getTransportDetails=function(t){if(e.senroll=a.globals.currentStudent.enroll_number,e.url_doc="",e.uploading_path="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var s=0;s2097152&&(e.filesize=!1,e.edt1.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 2MB.",imageUrl:"assets/img/notification-alert.png"}))}),console.log("VALUES",l.append.length)},e.uploadClick=function(t){console.log(t),e.filesize=!0,e.edt1=t,console.log(e.edt1),e.edt1.photoStatus=!0,e.ins=!1,l=new FormData},e.file_changed=function(t,s){var o=t.files[0];e.photo_filename=o.type;var d=new FileReader,_=o.name.indexOf(".");if(e.name=o.name.substr(0,_),e.fileext=o.name.substr(_+1),d.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},d.readAsDataURL(o),t.files[0].size<2097152)if(console.log(e.edt1.count),e.edt1.count<2){console.log(e.edt1.sims_admission_doc_path),null==e.edt1.sims_admission_doc_path||""==e.edt1.sims_admission_doc_path?e.edt1.count=e.edt1.count:e.edt1.count=e.edt1.count+1;var c="";c=void 0==e.edt1.admis_num?a.globals.currentStudent.enroll_number:e.edt1.admis_num;var m={method:"POST",url:"https://"+n.defaults.headers.common.schoolId+".mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+c+"_"+e.edt1.sims_criteria_code+"_"+e.edt1.count+"("+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss")+")."+e.fileext+"&location=/Docs/Student/",data:l,headers:{"Content-Type":void 0}};n(m).success(function(t){var s=t.lastIndexOf("/");e.filename=t.substr(s+1);var o={admis_num:e.edt1.admis_num,sims_criteria_code:e.edt1.sims_criteria_code,sims_admission_doc_path:e.filename,sims_admission_doc_path_old:e.edt1.sims_admission_doc_path,sims_admission_enroll_number:a.globals.currentStudent.enroll_number};null==o.sims_admission_doc_path&&""==o.sims_admission_doc_path||(null==e.edt1.sims_admission_doc_path||""==e.edt1.sims_admission_doc_path?(console.log(e.edt1.count),o.sims_admission_doc_status="false",o.sims_admission_doc_verify="false",o.opr="N",n.post(i.apiUrl+"api/common/AdmissionDashboard/CUD_Update_Admission_Doc",o).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Updated Successfully",showCloseButton:!0,width:380}),e.edt1.count=e.edt1.count+1),e.UploadDocument(e.edt1.admis_num)})):(console.log(e.edt1.count),n.post(i.apiUrl+"api/common/AdmissionDashboard/CUD_Insert_Admission_DocNew",o).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Uploaded Successfully",showCloseButton:!0,width:380}),e.edt1.count=e.edt1.count+1),e.UploadDocument(e.edt1.admis_num)})))})}else swal({title:"Alert",text:"You Can Upload Max 2 File Documents For Each Criteria",showCloseButton:!0,width:380})},e.UploadDocModal_Reset=function(){$("#viewdashDetailsModal").modal("hide"),e.maingrid1=!0,e.Upload_doc=!1},e.add_upload_doc=function(){for(var t=e.Upload_doc_datails,a=0;a0)for(var s=0;s2097152&&(e.filesize=!1,e.edt1.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 2MB.",imageUrl:"assets/img/notification-alert.png"}))}),console.log("VALUES",l.append.length)},e.uploadClick=function(t){console.log(t),e.filesize=!0,e.edt1=t,console.log(e.edt1),e.edt1.photoStatus=!0,e.ins=!1,l=new FormData},e.file_changed=function(t,s){var o=t.files[0];e.photo_filename=o.type;var d=new FileReader;if(d.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},d.readAsDataURL(o),t.files[0].size<2097152)if(console.log(e.edt1.count),e.edt1.count<2){console.log(e.edt1.sims_admission_doc_path),null==e.edt1.sims_admission_doc_path||""==e.edt1.sims_admission_doc_path?e.edt1.count=e.edt1.count:e.edt1.count=e.edt1.count+1;var _;_=e.senroll,"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),"ihsonlineom"==n.defaults.headers.common.schoolId||"mstagingdso"==n.defaults.headers.common.schoolId||"iisonlinedso"==n.defaults.headers.common.schoolId||"mstagingag"==n.defaults.headers.common.schoolId||"ihsonlineag"==n.defaults.headers.common.schoolId||"mstagingom"==n.defaults.headers.common.schoolId?e.urlapi_path="https://apiihs.schoolappsuae.com/mograSISAPI/api/fileNew/uploadDocument?filename="+_+"_"+e.edt1.sims_criteria_code+"_"+e.edt1.count+"("+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss")+")&location=Docs/Student":e.urlapi_path="https://api.mograsys.com/kindoapi/api/fileNew/uploadDocument?filename="+_+"_"+e.edt1.sims_criteria_code+"_"+e.edt1.count+"("+r("date")(new Date,"dd-MM-yyyy")+"-"+r("date")(new Date,"HH-mm-ss")+")&location=Docs/Student";var c={method:"POST",url:e.urlapi_path,data:l,headers:{"Content-Type":void 0}};n(c).success(function(t){var s={admis_num:e.edt1.admis_num,sims_criteria_code:e.edt1.sims_criteria_code,sims_admission_doc_path:t,sims_admission_doc_path_old:e.edt1.sims_admission_doc_path,sims_admission_enroll_number:a.globals.currentStudent.enroll_number};null==s.sims_admission_doc_path&&""==s.sims_admission_doc_path||("student_doc"==e.edt1.sims_admission_doc_path?(console.log(e.edt1.count),s.sims_admission_doc_status="false",s.sims_admission_doc_verify="false",s.opr="U",n.post(i.apiUrl+"api/common/AdmissionDashboard/CUD_Update_Admission_Doc",s).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Updated Successfully",showCloseButton:!0,width:380}),e.edt1.count=e.edt1.count+1),e.UploadDocument(e.edt1.admis_num)})):(console.log(e.edt1.count),s.sims_admission_doc_status="true",n.post(i.apiUrl+"api/common/AdmissionDashboard/CUD_Insert_Student_DocNew",s).then(function(t){e.ins=t.data,t.data&&(swal({title:"Alert",text:"Document Uploaded Successfully",showCloseButton:!0,width:380}),e.edt1.count=e.edt1.count+1),e.UploadDocument(e.edt1.admis_num)})))})}else swal({title:"Alert",text:"You Can Upload Max 2 File Documents For Each Criteria",showCloseButton:!0,width:380})},e.UploadDocModal_Reset=function(){$("#viewdashDetailsModal").modal("hide"),e.maingrid1=!0,e.Upload_doc=!1},e.add_upload_doc=function(){for(var t=e.Upload_doc_datails,a=0;a0){e.filedata1=t.data;for(let t=0;t0){e.filedata2=t.data;for(let t=0;t0){e.filedata2=t.data;for(let t=0;t0){e.filedata4=t.data;for(let t=0;t0){e.filedata4=t.data;for(let t=0;te.year_data.yearcurrentyend)return swal("","Date must be within Current Academic Year date"),void(e.s_btn=!0);e.s_btn=!1})},e.stud_details()},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";var e=angular.module("sims.module.incidence");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("StoresRequestCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.disable_btn=!1,e.save_btn=!0,e.Update_btn=!1,e.display=!1,e.table=!0,e.temp1={im_inv_no:void 0,invs021_sg_name:void 0,im_item_code:void 0,im_desc:void 0,invs021_dep_code:void 0,sec_code:void 0,invs021_sup_code:void 0,im_assembly_ind_s:void 0,category_code:void 0,subcategory_code:void 0},e.temp2={im_inv_no:"",im_desc:"",dept_name:""},e.itemsPerPage="5",e.currentPage=0,e.obj=[],e.itemList=[],e.temp={},e.reqval="",setTimeout(function(){$("#rcbItem").select2()},100),setTimeout(function(){$("#rcbItem1").select2()},100);var i=new Date,l=i.getDate(),d=i.getMonth()+1,_=i.getFullYear();l<10&&(l="0"+l),d<10&&(d="0"+d),i=_+"-"+d+"-"+l,e.tdate=i,e.temp.provDate=i,e.paymodeList=[{name:"Cash",value:"CS"},{name:"Cheques",value:"CH"},{name:"Bank Transfer",value:"BT"},{name:"Card Payment",value:"CP"}],e.temp.paymentMode="CS",e.GetItemServiceMethods=function(){e.reqval=e.temp.servicevalue,"I"==e.temp.servicevalue&&(e.show_div_search_item=!0,e.show_div_search_service=!1,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[1].servicevalue)),"S"==e.temp.servicevalue&&(e.show_div_search_item=!1,e.show_div_search_service=!0,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[0].servicevalue))},e.GetItemServiceMethods1=function(t){if(e.reqval==t)"I"==t&&(e.show_div_search_item=!0,e.show_div_search_service=!1,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[1].servicevalue)),"S"==t&&(e.show_div_search_item=!1,e.show_div_search_service=!0,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[0].servicevalue));else{if(!(e.reqval!=t&&e.itemList.length<=0))return e.temp.servicevalue=e.reqval,void swal({title:"Alert",text:"Please select valid Request Type.",width:300,height:200});"I"==t&&(e.show_div_search_item=!0,e.show_div_search_service=!1,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[1].servicevalue)),"S"==t&&(e.show_div_search_item=!1,e.show_div_search_service=!0,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[0].servicevalue))}},n.get("https://api.mograsys.com/apierp/api/CreateOrder/GetServiceTypes").then(function(t){e.ServiceTypes=t.data,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[1].servicevalue),e.GetItemServiceMethods()}),e.SearchService=function(t){e.GetItems=[],$("#MyModal2").modal("show")},e.size1=function(t){e.itemsPerPage=t},e.enroll_change=function(t){if("05"==e.temp.sal_type){e.inCustFlg=!0;for(var a=0;ae.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0&&("03"==e.temp.sal_type?(e.temp.enroll=e.SelectedUserLst[0].em_number,e.temp.name=e.SelectedUserLst[0].empName):"04"==e.temp.sal_type&&(e.temp.enroll=e.SelectedUserLst[0].s_enroll_no,e.temp.name=e.SelectedUserLst[0].name+" Class: "+e.SelectedUserLst[0].s_class)),""==e.temp.enroll||void 0==e.temp.enroll||(e.disable_btn=!1)}),$(window).bind("keydown",function(t){if(t.ctrlKey||t.metaKey)switch(String.fromCharCode(t.which).toLowerCase()){case"p":t.preventDefault(),e.print("tableIDDiv")}}),e.edit=function(t){e.temp.enroll=t.s_enroll_no},n.get("https://api.mograsys.com/apierp/api/ItemRequests/get_supplier_code").then(function(t){e.cmb_supplier=t.data}),n.get("https://api.mograsys.com/apierp/api/ItemRequests/GetAllSupplierGroupName").then(function(t){e.rcbGroup=t.data}),n.get("https://api.mograsys.com/apierp/api/ItemRequests/get_Categories").then(function(t){e.rcbCategories=t.data}),e.print=function(e){$("#tableIDDiv").css({display:"block"});var t=document.head.outerHTML,a=document.getElementById(e).outerHTML,o=window.open("","_blank","location=yes, statusbar=no, menubar=no, titlebar=no, toolbar=no,dependent=no, width=865, height=600, resizable=yes, screenX=200, screenY=200, personalbar=no, scrollbars=yes"),n=o.document;n.open(),n.write(""+t+''+a+""),n.close(),o.focus(),s(function(){$("#tableIDDiv").css({display:"none"})},200)},e.cancel=function(){e.temp={},e.temp1={},e.GetItems=[],e.itemList=[],e.rcbInternal=[],e.im_item_code1="",e.temp.paymentMode="CS",e.temp.provDate=i,e.cardpay=!1,e.rcbSalesType.length>0&&(e.temp.sal_type=e.rcbSalesType[1].sal_type),e.rcbDocType.length>0&&(e.temp.doc_type=e.rcbDocType[0].dt_code),e.ServiceTypes=[],n.get("https://api.mograsys.com/apierp/api/CreateOrder/GetServiceTypes").then(function(t){e.ServiceTypes=t.data,e.ServiceTypes.length>0&&(e.temp.servicevalue=e.ServiceTypes[1].servicevalue),e.GetItemServiceMethods()})},e.getCategories=function(t){void 0==e.temp.subcategory_code&&(e.rcbItems=[]),""==e.temp.subcategory_code&&(e.rcbItems=[]),n.get("https://api.mograsys.com/apierp/api/ItemRequests/get_SubCategories?pc_parentcode="+t).then(function(t){e.rcbSubCategories=t.data})},e.getSubCategories=function(t){n.get("https://api.mograsys.com/apierp/api/ItemRequests/GetAllItemsInSubCategoryNew?pc_code="+t).then(function(t){e.rcbItems=t.data})},e.qtychange=function(t){e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()},e.qtychangeby=function(t){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.getitemCode=function(t){n.get("https://api.mograsys.com/apierp/api/ItemRequests/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.resitem.original_qty>0?"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0):(e.temp.qty=1,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price)):swal({title:"Alert",text:"Item quantity is 0.Please Update Selected Item Quantity.",imageUrl:"assets/img/notification-alert.png"}),n.get("https://api.mograsys.com/apierp/api/ItemRequests/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,e.temp.loc_code})})},e.getServiceCode=function(t){n.get("https://api.mograsys.com/apierp/api/ItemRequests/GetServiceDetails?item_code="+t.im_inv_no).then(function(t){e.serdata=t.data})},e.addservice=function(){if(""==e.im_service_code1.im_inv_no||void 0==e.im_service_code1.im_inv_no);else{var t={sg_name:e.im_service_code1.sg_name,sg_code:"",im_inv_no:e.im_service_code1.im_inv_no,im_item_code:e.im_service_code1.im_item_code,im_desc:$("#rcbItem1").find("option:selected").text(),item_location_name:"",loc_code:"",original_qty:"",dd_qty:"",dd_sell_price:"",dd_sell_value_final:0,doc_remark:e.temp.ser_doc_remark,doc_require_date:e.tdate};e.itemList.push(t)}e.CancelService(),document.getElementById("rcbItem1").focus()},e.add=function(){if(""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg)if("02"==e.temp.doc_type){var t={sg_name:e.temp.gcode,sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.im_item_code1.im_item_code,im_desc:$("#rcbItem").find("option:selected").text(),item_location_name:e.temp.loc_code,loc_code:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:e.temp.im_sell_price,dd_sell_value_final:0,doc_remark:e.temp.doc_remark,doc_require_date:e.tdate};e.itemList.push(t)}else{t={sg_name:e.temp.gcode,sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.im_item_code1.im_item_code,im_desc:$("#rcbItem").find("option:selected").text(),item_location_name:e.temp.loc_code,loc_code:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:e.temp.im_sell_price,dd_sell_value_final:e.temp.finalValue,doc_remark:e.temp.doc_remark,doc_require_date:e.tdate};e.itemList.push(t)}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus()},e.finalize=function(){e.disable_btn=!1;var t={dep_code:"10",doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,up_name:"admin",creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"0",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:"10",doc_order_ref_no:"",doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:i,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_delivery_remarks:e.temp.doc_delivery_remarks,servicevalue:e.temp.servicevalue};n.post("https://api.mograsys.com/apierp/api/ItemRequests/Insert_Sale_Documents",t).then(function(t){var a=t.data;e.salesDetails=[];for(var s=0;s0?e.GetItems=t.data:swal({title:"Alert",text:"No Record Found.",imageUrl:"assets/img/notification-alert.png"})})},e.getfetch=function(){e.itemsetflg?e.temp1.im_assembly_ind=!0:e.temp1.im_assembly_ind=!1,n.post("https://api.mograsys.com/apierp/api/ItemRequests/postgetItemSerch",e.temp1).then(function(t){t.data.length>0?e.GetItems=t.data:swal({title:"Alert",text:"No Record Found.",imageUrl:"assets/img/notification-alert.png"})})},e.okbuttonclick=function(){},e.calculateTotal=function(){e.totalFinal=0;for(var t=0;t1?(e.itemList[o].dd_qty-=1,e.itemList[o].dd_sell_value_final-=parseFloat(t.im_sell_price)):e.itemList.splice(o,1));e.totalAmtClick()}}},e.CancelItem=function(){e.temp.finalValue="",e.temp.im_sell_price="",e.temp.qty="",e.temp.loc_code="",e.temp.subcategory_code="",e.temp.category_code="",e.temp.gcode="",e.temp.doc_remark="",e.rcbItems=[],e.rcbSubCategories=[],e.im_item_code1="",$("#rcbItem").select2("val",""),e.rcbItems=e.rcbitemOld},e.CancelService=function(){e.temp.finalValue="",e.temp.im_sell_price="",e.temp.ser_qty="",e.temp.loc_code="",e.temp.subcategory_code="",e.temp.category_code="",e.temp.gcode="",e.temp.ser_doc_remark="",e.rcbItems1=[],e.rcbSubCategories=[],e.im_service_code1="",$("#rcbItem1").select2("val",""),e.rcbItems1=e.rcbitem1Old},e.studentSearch=function(){e.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},e.totalAmtClick=function(){e.totalFinal=0;for(var t=0;t0){for(var a=0;ae.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.get_Details=function(t){e.hide_submit=!0,n.get(i.apiUrl+"api/common/StoreRequest/getInvoiceDetails?cur="+e.sims_cur_code+"&aca="+e.sims_acad_yr+"&grd="+e.sims_grade_code+"§ion=NaN"+t.from_date+"&todate="+t.to_date+"&doc_no="+t.doc_no).then(function(t){if(e.store_issue_details=t.data,e.store_issue_details.length>0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data;for(var a=0;a0){e.itemList=t.data;for(var a=0;a0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(i.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(i.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(i.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(i.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(i.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(void 0==t.dd_sell_price&&n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var l=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(l))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var l=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(l))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),parseInt(t.dd_qty)>0||""==t.dd_qty)if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}},e.check_qty_value=function(t){if(parseInt(t.dd_qty)>parseInt(t.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),t.dd_qty=t.invoice_qty),""==t.dd_qty)if(t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(a)+parseFloat(o)).toFixed(2)}e.totalAmtClick()}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var n=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(n))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(o)).toFixed(2)}}},e.lineDiscountPer=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct)if(t.dd_line_discount_pct=0,(isNaN(parseFloat(t.dd_line_discount_amount))||""==t.dd_line_discount_amount||void 0==t.dd_line_discount_amount)&&(t.dd_line_discount_amount=0),0==t.sell_price_inclusiv_vat)void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-parseFloat(t.dd_line_discount_amount))*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2);else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}else if(0==t.sell_price_inclusiv_vat)t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2);else{s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(t.dd_line_discount_amount=parseFloat(parseFloat(s)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,t.sell_price_inclusiv_vat,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.lineDiscountPerInclusiveVat=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct){if(t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);var o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2)}else{if(t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.getitemCode=function(t){console.log("str",t),e.im_item_vat_percentage=t.im_item_vat_percentage,n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.item_dept_code=t.dep_code,e.im_revenue_acno=e.resitem.im_revenue_acno,e.im_cost_acno=e.resitem.im_cost_acno,e.im_vat_sale_profile=e.resitem.im_vat_sale_profile,"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price_including_vat=e.resitem.im_sell_price_including_vat,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0,e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage):(e.temp.qty=1,0==parseFloat(e.resitem.im_sell_price)?(e.sellPriceInclusiveVat=!1,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price_including_vat),e.temp.im_sell_price=e.resitem.im_sell_price_including_vat):(e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price),e.temp.im_sell_price=e.resitem.im_sell_price,e.sellPriceInclusiveVat=!0),e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage),n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:d,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(i.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code;for(var a=0;a0){for(t=0;t0)for(var a=0;a0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(l.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.grid_selectnew=function(t){var a=0;e.total=0;for(var s=0;s0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.enroll_change=function(t){if(""!=t){if("01"==e.temp.sal_type){e.inCustFlg=!0;for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(l.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(void 0==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),parseInt(t.dd_qty)>0||""==t.dd_qty){if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."})),e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}e.grid_select(),e.grid_selectnew()}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."}))}else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:"Item Quantity should not be Decimal."}))}e.lineDiscountPer(t),e.grid_selectnew()}},e.check_qty_value=function(t){if(parseInt(t.dd_qty)>parseInt(t.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),t.dd_qty=t.invoice_qty),""==t.dd_qty)if(t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(a)+parseFloat(o)).toFixed(2)}e.totalAmtClick()}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var n=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(n))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(o)).toFixed(2)}}},e.lineDiscountPer=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct)if(t.dd_line_discount_pct=0,(isNaN(parseFloat(t.dd_line_discount_amount))||""==t.dd_line_discount_amount||void 0==t.dd_line_discount_amount)&&(t.dd_line_discount_amount=0),0==t.sell_price_inclusiv_vat)void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-parseFloat(t.dd_line_discount_amount))*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2);else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}else if(0==t.sell_price_inclusiv_vat)t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2);else{s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(t.dd_line_discount_amount=parseFloat(parseFloat(s)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,t.sell_price_inclusiv_vat,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.lineDiscountPerInclusiveVat=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct){if(t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);var o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2)}else{if(t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.getitemCode=function(t){console.log("str",t),e.im_item_vat_percentage=t.im_item_vat_percentage,n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.item_dept_code=t.dep_code,e.im_revenue_acno=e.resitem.im_revenue_acno,e.im_cost_acno=e.resitem.im_cost_acno,e.im_vat_sale_profile=e.resitem.im_vat_sale_profile,"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price_including_vat=e.resitem.im_sell_price_including_vat,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0,e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage):(e.temp.qty=1,0==parseFloat(e.resitem.im_sell_price)?(e.sellPriceInclusiveVat=!1,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price_including_vat),e.temp.im_sell_price=e.resitem.im_sell_price_including_vat):(e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price),e.temp.im_sell_price=e.resitem.im_sell_price,e.sellPriceInclusiveVat=!0),e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage),n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:c,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(l.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code,e.temp.totalFinal=0;for(var a=0;a0){e.GetItems=t.data;for(var a=0;a0){e.itemListnew=t.data;for(var a=0;a0){for(t=0;t0)for(var a=0;ae.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.get_Details=function(t){e.hide_submit=!0,n.get(i.apiUrl+"api/common/StoreRequest/getInvoiceDetails?cur="+e.sims_cur_code+"&aca="+e.sims_acad_yr+"&grd="+e.sims_grade_code+"§ion=NaN"+t.from_date+"&todate="+t.to_date+"&doc_no="+t.doc_no).then(function(t){if(e.store_issue_details=t.data,e.store_issue_details.length>0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data;for(var a=0;a0||(e.table1=!1,swal({title:"Alert",text:"No Record Found.",imageUrl:"assets/img/notification-alert.png"}))})},e.add_selected_data=function(){e.getstudentList()},e.Back=function(){e.flg_report=!1,$("#rpt_mdl").modal("hide")},e.Pre_report_cancel=function(){e.flg_report=!1,$("#rpt_mdl").modal("hide")},e.print_rpt=function(t){var a;e.flg_report=!0,$("#rpt_mdl").modal("show"),e.parameters={doc_code:t.gltr_doc_code,doc_no:t.gltr_our_doc_no},a="SimsReports.Fees.SIMR60InvRec_SMSM,SimsReports";var s=window.location.href,o=(s.substring(0,s.indexOf(":")),i.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:o,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),setTimeout(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"dd-mm-yyyy"}),$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ItemReqSMSMCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.alternative=!1,e.main=!0;var l=a.globals.currentUser.username;e.table_scroll_block=!1,e.disable_btn=!0,e.disable_btn_total=!0,e.payment_mode_grid=!0,e.disable_btn1=!0,e.save_btn=!0,e.grade_code="",e.academic_year="",e.rcbDocType=[],e.Update_btn=!1,e.itemsetsearchbtn=!0,e.display=!1,e.table=!0,e.showPickInvoice=!1,e.old_doc_prov_no_show=!1;e.temp1={im_inv_no:void 0,invs021_sg_name:void 0,im_item_code:void 0,im_desc:void 0,invs021_dep_code:void 0,sec_code:void 0,invs021_sup_code:void 0,im_assembly_ind_s:void 0,category_code:void 0,subcategory_code:void 0},e.itemsPerPage="5",e.currentPage=0,e.obj=[],e.itemList=[],e.temp={},e.paymodeList=[],e.disable_total_dis_per=!1,e.edt={},e.disableOnInvoiceReturn=!1,e.showBtnOnInvoiceReturn=!1,e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0,e.disablePayementMode=!1,e.totalPMAmount=0,e.dept_code_mutiple="",e.showSublegerData=!1,e.showldgr=!0,$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"});var d=new Date;d=("0"+d.getDate()).slice(-2)+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+d.getFullYear(),e.getstudentList=function(){e.table_scroll_block=!1,e.enroll_number=a.globals.currentStudent.enroll_number,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.sims_grade_code=a.globals.currentStudent.sims_grade_code,e.sims_section_code=a.globals.currentStudent.sims_section_code,e.sims_student_passport_fullname_new=a.globals.currentStudent.sims_student_passport_fullname_new,e.temp.enroll=a.globals.currentStudent.enroll_number,"dpsmis"==n.defaults.headers.common.schoolId&&(e.disable_sale=!0),e.tdate=d,e.temp.provDate=d,console.log(" $scope.temp['provDate']",e.temp.provDate),e.temp.paymentMode="CA",e.size=function(t){e.itemsPerPage=t},""!=e.enroll_number&&n.get(i.apiUrl+"api/common/StoreRequest/GetStudentInfo?enrollnum="+e.enroll_number).then(function(t){void 0!=t.data.studentname?(e.temp.name=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,e.studentname=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,console.log("name",e.temp.name),e.grade_code=t.data.grade_code,e.disable_btn=!1):(swal({title:"Alert",text:"Please Enter Correct Student ID."}),e.disable_btn=!0,e.disable_btn1=!0,e.showBtnOnInvoiceReturn=!1,e.grade_code="")}),n.get(i.apiUrl+"api/common/StoreRequest/GetAllSalesType").then(function(t){e.rcbSalesType=t.data,console.log("Customer Type:",e.rcbSalesType),e.rcbSalesType.length>0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(i.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(i.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(i.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(i.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(i.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(void 0==t.dd_sell_price&&n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var l=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(l))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var l=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(l))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),parseInt(t.dd_qty)>0||""==t.dd_qty)if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}},e.check_qty_value=function(t){if(parseInt(t.dd_qty)>parseInt(t.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),t.dd_qty=t.invoice_qty),""==t.dd_qty)if(t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(a)+parseFloat(o)).toFixed(2)}e.totalAmtClick()}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var n=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(n))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(o)).toFixed(2)}}},e.lineDiscountPer=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct)if(t.dd_line_discount_pct=0,(isNaN(parseFloat(t.dd_line_discount_amount))||""==t.dd_line_discount_amount||void 0==t.dd_line_discount_amount)&&(t.dd_line_discount_amount=0),0==t.sell_price_inclusiv_vat)void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-parseFloat(t.dd_line_discount_amount))*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2);else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}else if(0==t.sell_price_inclusiv_vat)t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2);else{s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(t.dd_line_discount_amount=parseFloat(parseFloat(s)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,t.sell_price_inclusiv_vat,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.lineDiscountPerInclusiveVat=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct){if(t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);var o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2)}else{if(t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.getitemCode=function(t){console.log("str",t),e.im_item_vat_percentage=t.im_item_vat_percentage,n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.item_dept_code=t.dep_code,e.im_revenue_acno=e.resitem.im_revenue_acno,e.im_cost_acno=e.resitem.im_cost_acno,e.im_vat_sale_profile=e.resitem.im_vat_sale_profile,"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price_including_vat=e.resitem.im_sell_price_including_vat,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0,e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage):(e.temp.qty=1,0==parseFloat(e.resitem.im_sell_price)?(e.sellPriceInclusiveVat=!1,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price_including_vat),e.temp.im_sell_price=e.resitem.im_sell_price_including_vat):(e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price),e.temp.im_sell_price=e.resitem.im_sell_price,e.sellPriceInclusiveVat=!0),e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage),n.get(i.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:d,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(i.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code;for(var a=0;at.choice_item_count)t.sims_cat_status=!1,swal({title:"You can select only "+t.choice_item_count+" group."});else for(s=0;s0){for(t=0;t0)for(var a=0;a0){e.GetItems=t.data;for(var a=0;ae.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.get_Details=function(t){e.hide_submit=!0,n.get(i.apiUrl+"api/common/StoreRequest/getInvoiceDetails?cur="+e.sims_cur_code+"&aca="+e.sims_acad_yr+"&grd="+e.sims_grade_code+"§ion=NaN"+t.from_date+"&todate="+t.to_date+"&doc_no="+t.doc_no).then(function(t){if(e.store_issue_details=t.data,e.store_issue_details.length>0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data;for(var a=0;a0){e.itemList=t.data;for(var a=0;a2097152)swal("","File size limit not exceed upto 2 MB.");else{e.uploading_doc1=!1,e.photo_filename=e.photofile.type,console.log(e.edt);var _=new FileReader;_.onload=function(a){e.$apply(function(){e.prev_img=a.target.result;var o={method:"POST",url:r.apiUrl+"api/TCApplicationAdis/upload?filename="+s+"."+l+"&location=Images/TCDocs",data:t,headers:{"Content-Type":void 0}};n(o).success(function(t){e.maindata.sims508_doc_name=t,e.uploading_doc1=!0})})},_.readAsDataURL(e.photofile)}else swal("","."+l+" File format not allowed.")},e.downloaddoc1=function(t){e.url=r.apiUrl+"Content/"+n.defaults.headers.common.schoolId+"/TCDocs/"+t.sims508_doc_name,window.open(e.url)},e.CancelFileUpload=function(t){e.images.splice(t,1),console.log(e.images)},e.Cancel=function(){e.temp="",e.display=!0,e.table=!0},e.checkAlldoc=function(e){for(var t=0;te.year_data.yearcurrentyend)return swal("","Date must be within Current Academic Year date"),void(e.s_btn=!0);e.s_btn=!1})},e.deletedoc=function(e){[],e.sims508_doc_name=""},e.stud_details()},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.calendar").controller("reportCardAdiswController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,"portaldso"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="iisonlinedso"),e.getMedicalDetails=function(t){"adisw"==n.defaults.headers.common.schoolId?e.termShow=!0:e.termShow=!1,e.reportShow=!1,e.brs_rpt=!0,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnewviewmap/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0?e.std=t.data[0]:0!=t.data.length&&void 0!=t.data.length||swal({title:"Alert",text:"No external report to be displayed"})}),n.get(r.apiUrl+"api/reportcardnewviewmap/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t).then(function(t){e.grid=!0,e.obj5=t.data})},n.get(r.apiUrl+"api/reportcardnewviewmap/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,n.get(r.apiUrl+"api/reportcardnewviewmap/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj[0].academic_year).then(function(t){e.grid=!0,e.obj5=t.data,t.data.length>0?(e.obj.sims_term_code=t.data[0].sims_term_code,e.Getinfo6(t.data[0].sims_term_code)):e.Getinfo6("")})}),e.Getinfo6=function(t){a.globals.termcode=t,n.get(r.apiUrl+"api/reportcardnewviewmap/getReportCardLevel?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code).then(function(t){e.cmbReportLevel=t.data,e.obj.sims_level_code=t.data[0].sims_level_code,e.reportcardLevelChange(t.data[0].sims_level_code)})},e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnewviewmap/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data,e.obj.sims_report_card=t.data[0].sims_level_code,e.reportcardChange(t.data[0].sims_level_code),0!=t.data.length&&void 0!=t.data.length||swal({title:"Alert",text:"No external report to be displayed"})})},e.reportcardChange=function(t){e.school_id=n.defaults.headers.common.schoolId,"portaldso"==n.defaults.headers.common.schoolId?e.school_id="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?e.school_id="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(e.school_id="ihsonlineom"),n.get(r.apiUrl+"api/reportcardnew/getAllReportCardPdf?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"§ion_code="+e.std.sims_section_code+"&report_level_code="+e.obj.sims_level_code+"&report_code="+e.obj.sims_report_card+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){"saisa"==n.defaults.headers.common.schoolId?($("#pdfAttendace").attr("src","https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+t.data),e.hide_iframe=!1):"https://apiihs.schoolappsuae.com/ppapi/"==r.apiUrl?$("#pdfAttendace").attr("src","https://apiihs.schoolappsuae.com/mograSISAPI/Content/"+e.school_id+"/ResultUpload/"+t.data):""==t.data?(e.hide_iframe=!0,swal({title:"Alert",text:"File is not found",imageUrl:"assets/img/notification-alert.png"})):($("#pdfAttendace").attr("src","https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+t.data),e.hide_iframe=!1)})}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeTransactionDetailsCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.busyindicator=!1,e.hide=!0,e.hide2=!1,console.clear(),e.getFeesDetails=function(o){var i={temp_dd_enroll_number:a.globals.currentStudent.enroll_number};function l(t){for(var a=[],s=0;s0&&(e.chk_disabled=!1),e.grid.total1=100*parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=100*(parseInt(a)+parseInt(e.grid.convence_charge)),e.grid.grad_total=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee1?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[];for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){if(void 0==e.card_last_digit&&(e.card_last_digit=""),e.card_last_digit.length<4)swal({title:"Alert",text:"Please enter last 4 digit of card number"});else{for(var t=[],s=0,o=0;o0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"Data Not Found",width:250,height:250,showCloseButton:!0}))}),e.Start_survey_btn_click=function(t){n.get(r.apiUrl+"api/surveyselection/get_survey_details_check?sims_survey_code="+t.sims_survey_code+"&sims_user_code="+l).then(function(s){e.survey_details_check=s.data,1==e.survey_details_check?swal({title:"Sorry, you have already completed this survey",width:300,height:250,showCloseButton:!0}):(e.survey_detail_table=!1,e.save_btn=!0,n.get(r.apiUrl+"api/Survey/get_SurveyQuestion?sims_survey_code="+t.sims_survey_code+"&enroll="+a.globals.currentStudent.sims_student_enroll_number+"&user="+l+"&grade="+a.globals.currentStudent.sims_grade_code+"§ion="+a.globals.currentStudent.sims_section_code+"&acad_yr="+a.globals.currentStudent.sims_acad_yr).then(function(a){i=t.sims_survey_code,console.log(i),e.questiondata=a.data,console.log(e.questiondata),setTimeout(function(){angular.forEach(e.questiondata,function(e,t){angular.forEach(e.answers,function(t,a){var s=Math.random(),o="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/Images/Emojis/"+t.sims_survey_rating_img_path+"?v="+s;$("#"+e.sims_survey_question_code+a).attr("src",o),console.log(o)}),console.log(e)})},500)}))})},e.radioclick=function(e,t,a){for(var s=0;s0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no survey open",width:250,height:250,showCloseButton:!0}))}),e.Start_survey_btn_click=function(t){e.survey_code=t.sims_survey_code,n.get(r.apiUrl+"api/surveyselection/get_survey_details_check?sims_survey_code="+t.sims_survey_code+"&sims_user_code="+i).then(function(a){e.survey_details_check=a.data,1==e.survey_details_check?swal({title:"Alert",text:"Sorry, you have already completed this survey",width:300,height:250,showCloseButton:!0}):n.get(r.apiUrl+"api/surveyselection/get_survey_details_quetions?sims_survey_code="+t.sims_survey_code).then(function(a){e.start_Survey=a.data,void 0!=window.localStorage["survey"+e.survey_code]&&(e.start_Survey=JSON.parse(window.localStorage["survey"+e.survey_code])),e.ques_count=e.start_Survey.length,e.start_Survey.length>0?(e.sims_survey_type=e.start_Survey[0].sims_survey_type,e.sims_survey_no_of_question_available=e.start_Survey[0].sims_survey_no_of_question_available,e.sims_survey_no_of_question_to_attempt=e.start_Survey[0].sims_survey_no_of_question_to_attempt,e.sims_survey_subject=t.sims_survey_subject,e.sims_survey_desc_en=t.sims_survey_desc_en,e.popup_start_btn_click()):(e.start_survey_table=!1,swal({title:"Alert",text:"Sorry,questions are not available for this survey",width:350,height:250,showCloseButton:!0}))})})},e.Prevoius_btn_click=function(){0!=e.question_counter&&(e.question_counter=e.question_counter-1,e.binding_object=e.start_Survey[e.question_counter],e.btn_next=!1,e.btn_sub=!0,e.question_counter1=e.question_counter1-1),0==e.question_counter&&(e.btn_pre=!0),e.SubmitObject=[],e.progress_counter=0;for(var t=0;t0?n.post(r.apiUrl+"api/surveyselection/CUD_PP_Survey",e.SenddataObject).then(function(t){e.Surveyresult=t.data,1==e.Surveyresult?(e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0",swal({title:"Alert",text:"Survey Submitted Successfully",width:300,height:250,showCloseButton:!0}),window.localStorage.removeItem("survey"+e.survey_code),e.get_link()):(e.btn_pre=!1,swal({title:"Alert",text:"Survey Not Submitted",width:300,height:250,showCloseButton:!0}))}):swal({title:"Alert",text:"Select Atleast One Answer Or Back",width:300,height:250,showCloseButton:!0})}})},e.Back_btn_click=function(){e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0"},e.btn_sub1=!0,e.answer_change=function(t){for(var a=0;ae.pageCount()-20&&(t=e.pageCount()-20+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.start_Survey.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage{n.get(r.apiUrl+"api/surveyselection/get_survey_attempts_check?sims_user_code="+i+"&sims_survey_code="+t.sims_survey_code).then(function(t){e.Survey_Details1=t.data;let a=Number(e.Survey_Details1[0].sims_survey_max_attempt_count_check),s=Number(e.Survey_Details1[0].response_count);e.surveyflag[e.Survey_Details1[0].sims_survey_code]=a>s,e.Survey_Details1.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no response open",width:250,height:250,showCloseButton:!0}))})}),e.Survey_Details.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no survey open",width:250,height:250,showCloseButton:!0})))}),e.Start_survey_btn_click=function(t){e.survey_code=t.sims_survey_code,n.get(r.apiUrl+"api/surveyselection/get_survey_details_quetions_new?sims_survey_code="+t.sims_survey_code+"&sims_survey_user_response_user_code="+i).then(function(a){e.start_Survey=a.data,void 0!=window.localStorage["survey"+e.survey_code]&&(e.start_Survey=JSON.parse(window.localStorage["survey"+e.survey_code])),e.ques_count=e.start_Survey.length,e.start_Survey.length>0?(e.sims_survey_type=e.start_Survey[0].sims_survey_type,e.sims_survey_no_of_question_available=e.start_Survey[0].sims_survey_no_of_question_available,e.sims_survey_no_of_question_to_attempt=e.start_Survey[0].sims_survey_no_of_question_to_attempt,e.sims_survey_subject=t.sims_survey_subject,e.sims_survey_desc_en=t.sims_survey_desc_en,e.popup_start_btn_click()):(e.start_survey_table=!1,swal({title:"Alert",text:"Sorry,questions are not available for this survey",width:350,height:250,showCloseButton:!0}))})},e.Prevoius_btn_click=function(){0!=e.question_counter&&(e.question_counter=e.question_counter-1,e.binding_object=e.start_Survey[e.question_counter],e.btn_next=!1,e.btn_sub=!0,e.question_counter1=e.question_counter1-1),0==e.question_counter&&(e.btn_pre=!0),e.SubmitObject=[],e.progress_counter=0;for(var t=0;t0?n.post(r.apiUrl+"api/surveyselection/CUD_PP_Survey_New",e.SenddataObject).then(function(t){e.Surveyresult=t.data,1==e.Surveyresult?(e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0",swal({title:"Alert",text:"Survey Submitted Successfully",width:300,height:250,showCloseButton:!0}),window.localStorage.removeItem("survey"+e.survey_code)):(e.survey_detail_table=!0,e.start_survey_table=!1,e.btn_pre=!1,swal({title:"Alert",text:"Survey Not Submitted",width:300,height:250,showCloseButton:!0}))}):swal({title:"Alert",text:"Select Atleast One Answer Or Back",width:300,height:250,showCloseButton:!0})}})},e.Back_btn_click=function(){e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0"},e.btn_sub1=!0,e.answer_change=function(t){for(var a=0;ae.pageCount()-20&&(t=e.pageCount()-20+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.start_Survey.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage{n.get(r.apiUrl+"api/surveyselection/get_survey_attempts_check_new?sims_user_code="+i+"&sims_survey_code="+t.sims_survey_code).then(function(t){e.Survey_Details1=t.data;let a=Number(e.Survey_Details1[0].sims_survey_max_attempt_count_check),s=Number(e.Survey_Details1[0].response_count);e.surveyflag[e.Survey_Details1[0].sims_survey_code]=a>s,e.Survey_Details1.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no response open",width:250,height:250,showCloseButton:!0}))})}),e.Survey_Details.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no survey open",width:250,height:250,showCloseButton:!0})))}),e.mankl=function(){n.get(r.apiUrl+"api/surveyselection/Get_teacher_List?academic_year="+a.globals.currentStudent.sims_acad_yr+"&grade_code="+a.globals.currentStudent.sims_grade_code+"&user_code="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){t.data.length&&(e.Survey_Details=t.data,e.surveyflag=[],e.Survey_Details.forEach((t,a)=>{n.get(r.apiUrl+"api/surveyselection/get_survey_attempts_check_new?sims_user_code="+i+"&sims_survey_code="+t.sims_survey_code).then(function(t){e.Survey_Details1=t.data;let a=Number(e.Survey_Details1[0].sims_survey_max_attempt_count_check),s=Number(e.Survey_Details1[0].response_count);e.surveyflag[e.Survey_Details1[0].sims_survey_code]=a>s,e.Survey_Details1.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no response open",width:250,height:250,showCloseButton:!0}))})}),e.Survey_Details.length>0?e.survey_detail_table=!0:(e.survey_detail_table=!1,swal({text:"",title:"There are no survey open",width:250,height:250,showCloseButton:!0})))})},e.Start_survey_btn_click=function(t){e.survey_code=t.sims_survey_code,e.sims_teacher_code=t.sims_teacher_code,n.get(r.apiUrl+"api/surveyselection/get_survey_details_quetions_teacher?sims_survey_code="+t.sims_survey_code+"&sims_survey_user_response_user_code="+i).then(function(a){e.start_Survey=a.data,void 0!=window.localStorage["survey"+e.survey_code]&&(e.start_Survey=JSON.parse(window.localStorage["survey"+e.survey_code])),e.ques_count=e.start_Survey.length,e.start_Survey.length>0?(e.sims_survey_type=e.start_Survey[0].sims_survey_type,e.sims_survey_no_of_question_available=e.start_Survey[0].sims_survey_no_of_question_available,e.sims_survey_no_of_question_to_attempt=e.start_Survey[0].sims_survey_no_of_question_to_attempt,e.sims_survey_subject=t.sims_survey_subject,e.sims_survey_desc_en=t.sims_survey_desc_en,e.popup_start_btn_click()):(e.start_survey_table=!1,swal({title:"Alert",text:"Sorry,questions are not available for this survey",width:350,height:250,showCloseButton:!0}))})},e.Prevoius_btn_click=function(){0!=e.question_counter&&(e.question_counter=e.question_counter-1,e.binding_object=e.start_Survey[e.question_counter],e.btn_next=!1,e.btn_sub=!0,e.question_counter1=e.question_counter1-1),0==e.question_counter&&(e.btn_pre=!0),e.SubmitObject=[],e.progress_counter=0;for(var t=0;t0?n.post(r.apiUrl+"api/surveyselection/CUD_PP_Survey_New_teacher",e.SenddataObject).then(function(t){e.Surveyresult=t.data,1==e.Surveyresult?(e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0",swal({title:"Alert",text:"Review Submitted Successfully",width:300,height:250,showCloseButton:!0}),window.localStorage.removeItem("survey"+e.survey_code),e.mankl()):(e.survey_detail_table=!0,e.start_survey_table=!1,e.btn_pre=!1,swal({title:"Alert",text:"Survey Not Submitted",width:300,height:250,showCloseButton:!0}))}):swal({title:"Alert",text:"Select Atleast One Answer Or Back",width:300,height:250,showCloseButton:!0}),e.mankl()},e.Back_btn_click=function(){e.survey_detail_table=!0,e.start_survey_table=!1,e.maxmark1="0%",e.progress_counter="0"},e.btn_sub1=!0,e.answer_change=function(t){for(var a=0;ae.pageCount()-20&&(t=e.pageCount()-20+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.start_Survey.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage-1}(e,t)})},e.search=function(){e.todos=e.searched(e.studHealth,e.searchText),e.totalItems=e.todos.length,e.currentPage="1",""==e.searchText&&(e.todos=e.studHealth),e.makeTodos()};e.savedata=function(t){if(void 0!=e.temp.sims_medical_consent_health_records&&""!=e.temp.sims_medical_consent_health_records&&void 0!=e.temp.sims_medical_consent_immunization&&""!=e.temp.sims_medical_consent_immunization)if(void 0!=e.temp.sims_medical_consent_emergency_treatment&&""!=e.temp.sims_medical_consent_emergency_treatment&&void 0!=e.temp.sims_medical_consent_medical_treatment&&""!=e.temp.sims_medical_consent_medical_treatment)if(void 0!=e.temp.sims_medical_consent_over_the_counter_medicine&&""!=e.temp.sims_medical_consent_over_the_counter_medicine&&void 0!=e.temp.sims_medical_consent_medicine_allowed&&""!=e.temp.sims_medical_consent_medicine_allowed)if(void 0!=e.temp.sims_medical_consent_approved_by&&""!=e.temp.sims_medical_consent_approved_by){if(t){var s={opr:"F",sims_medical_consent_cur_code:e.edt.s_cur_code,sims_medical_consent_enroll_number:a.globals.currentStudent.enroll_number,sims_medical_consent_parent_number:i,sims_medical_consent_health_records:e.temp.sims_medical_consent_health_records,sims_medical_consent_immunization:e.temp.sims_medical_consent_immunization,sims_medical_consent_emergency_treatment:e.temp.sims_medical_consent_emergency_treatment,sims_medical_consent_medical_treatment:e.temp.sims_medical_consent_medical_treatment,sims_medical_consent_over_the_counter_medicine:e.temp.sims_medical_consent_over_the_counter_medicine,sims_medical_consent_medicine_allowed:e.temp.sims_medical_consent_medicine_allowed,sims_medical_consent_remark:e.edt.sims_medical_consent_remark,sims_medical_consent_applicable_from_acad_year:e.temp.sims_academic_year,sims_medical_consent_updated_on:null,sims_medical_consent_approved_by:e.temp.sims_medical_consent_approved_by};n.post(r.apiUrl+"api/MedicalConsentPPN/InsertSims_MedicalConsent",s).then(function(t){e.msg1=t.data,e.msg1=t.data,1==e.msg1?(swal({title:"Alert",text:"Record Inserted Successfully",width:300,height:200}),e.clear()):swal({title:"Alert",text:"Record cannot be inserted, Record Already Exists",width:300,height:200})}),e.table=!0,e.newdisplay=!1,[]}}else swal({title:"Alert",text:"Please Select Approved By",width:300,height:200});else swal({title:"Alert",text:"Please Select OTC and Medicine Allowed",width:300,height:200});else swal({title:"Alert",text:"Please Select Emergency Treatment and Medical Treatment",width:300,height:200});else swal({title:"Alert",text:"Please Select Health Records and Immunization",width:300,height:200})},e.Cancel=function(){e.temp="",e.table=!0,e.newdisplay=!1,e.hide_img=!1,e.Myform.$setPristine(),e.Myform.$setUntouched(),t.go(t.current,{},{reload:!0})},e.clear=function(){e.temp="",e.hide_img=!1,t.go(t.current,{},{reload:!0})},e.edit=function(t){e.medication=!0,e.disability=!0,e.restriction=!0,e.hearing=!0,e.vision=!0,e.other=!0,e.other_disability=!0,e.table=!1,e.newdisplay=!0,e.save_btn=!1,e.Update_btn=!0,e.temp={enroll_number:t.sims_enrollment_number,sims_blood_group_code:t.sims_blood_group_code,sims_health_card_number:t.sims_health_card_number,sims_health_card_issue_date:t.sims_health_card_issue_date,sims_health_card_expiry_date:t.sims_health_card_expiry_date,sims_health_card_issuing_authority:t.sims_health_card_issuing_authority,sims_height:t.sims_height,sims_wieght:t.sims_wieght,sims_teeth:t.sims_teeth,sims_health_bmi:t.sims_health_bmi,sims_medication_status:t.sims_medication_status,sims_medication_desc:t.sims_medication_desc,sims_disability_status:t.sims_disability_status,sims_disability_desc:t.sims_disability_desc,sims_health_restriction_status:t.sims_health_restriction_status,sims_health_restriction_desc:t.sims_health_restriction_desc,sims_health_hearing_status:t.sims_health_hearing_status,sims_health_hearing_desc:t.sims_health_hearing_desc,sims_health_vision_status:t.sims_health_vision_status,sims_health_vision_desc:t.sims_health_vision_desc,sims_health_other_status:t.sims_health_other_status,sims_health_other_desc:t.sims_health_other_desc,sims_regular_hospital_name:t.sims_regular_hospital_name,sims_regular_hospital_phone:t.sims_regular_hospital_phone,sims_regular_doctor_name:t.sims_regular_doctor_name,sims_regular_doctor_phone:t.sims_regular_doctor_phone,sims_has_your_child_any_other_disability:t.sims_health_other_disability_desc,sims_has_your_child_any_other_disability_status:t.sims_health_other_disability_status}};var o=[];e.update=function(){var t=e.temp;t.opr="U",o.push(t),n.post(r.apiUrl+"api/StudentHealth/CUDStudentHealth",o).then(function(t){e.msg1=t.data,1==e.msg1?swal({title:"Alert",text:"Record Updated Successfully",width:300,height:200}):swal({title:"Alert",text:"Record Not Updated",width:300,height:200}),e.stud_Details_fun(void 0,void 0,void 0,void 0)}),e.table=!0,e.newdisplay=!1,o=[]},e.StudAdd=function(t){e.temp={comn_user_name:t.s_enroll_no}}},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0}),e.CheckedReadonly=function(t){1==document.getElementById(t).checked?e[t]=!1:e[t]=!0},e.radio1Click=function(){document.getElementById("yes").checked=!0,e.temp.sims_medical_consent_health_records="Y"},e.radio2Click=function(){document.getElementById("no").checked=!0,e.temp.sims_medical_consent_health_records="N"},e.radio3Click=function(){document.getElementById("yes1").checked=!0,e.temp.sims_medical_consent_immunization="Y"},e.radio4Click=function(){document.getElementById("no1").checked=!0,e.temp.sims_medical_consent_immunization="N"},e.radio5Click=function(){document.getElementById("yes2").checked=!0,e.temp.sims_medical_consent_emergency_treatment="Y"},e.radio6Click=function(){document.getElementById("no2").checked=!0,e.temp.sims_medical_consent_emergency_treatment="N"},e.radio7Click=function(){document.getElementById("yes3").checked=!0,e.temp.sims_medical_consent_medical_treatment="Y"},e.radio8Click=function(){document.getElementById("no3").checked=!0,e.temp.sims_medical_consent_medical_treatment="N"},e.radio9Click=function(){document.getElementById("yes4").checked=!0,e.temp.sims_medical_consent_over_the_counter_medicine="Y"},e.radio10Click=function(){document.getElementById("no4").checked=!0,e.temp.sims_medical_consent_over_the_counter_medicine="N"},e.radio11Click=function(){document.getElementById("yes5").checked=!0,e.temp.sims_medical_consent_medicine_allowed="Y"},e.radio12Click=function(){document.getElementById("no5").checked=!0,e.temp.sims_medical_consent_medicine_allowed="N"},e.radio13Click=function(){document.getElementById("f").checked=!0,e.temp.sims_medical_consent_approved_by="F"},e.radio14Click=function(){document.getElementById("m").checked=!0,e.temp.sims_medical_consent_approved_by="M"},e.radio15Click=function(){document.getElementById("g").checked=!0,e.temp.sims_medical_consent_approved_by="G"},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";var e=angular.module("sims.module.parent");e.controller("ParentDpsmisController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.schoolCode=n.defaults.headers.common.schoolId,e.apiurlpath=r.apiUrl,n.get(r.apiUrl+"api/parent/getCountry").then(function(t){e.Country=t.data,console.log(e.Country)}),n.get(r.apiUrl+"api/parent/getNationality").then(function(t){e.Nationality=t.data,console.log(e.Nationality)}),e.uname=a.globals.currentUser.username,n.get(r.apiUrl+"api/device/GetRegIdNew?username="+a.globals.currentUser.username).then(function(t){e.device=t.data,console.log(e.device)}),e.updateDevice=function(t){n.post(r.apiUrl+"api/device/UpdateRegId?opr=X&obj="+JSON.stringify(t)).then(function(t){e.devi=t.data})},e.display=!1,e.readonly=!1,e.ro=!0,e.eo=!1,n.get(r.apiUrl+"api/parent/getParentDetailNew?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data,console.log(e.obj)}),e.editFatherDetails=function(){$("#myModal").modal("show")},e.FatherOtherDetailsClick=function(){$("#FatherOtherDetails").modal("show")},e.saveFatherOtherDetails=function(){var t={sims_parent_number:a.globals.currentUser.username,sims_parent_father_company:e.obj.sims_admission_father_company,sims_parent_father_family_name:e.obj.sims_admission_family_name_en,sims_parent_father_building_number:e.obj.sims_admission_father_building_number,sims_parent_father_street_number:e.obj.sims_admission_father_street_number,sims_parent_father_occupation:e.obj.sims_admission_father_occupation};n.post(r.apiUrl+"api/parent/updateParentDetailsNew?opr=FAD&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,e.fod?swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.saveMotherOtherDetails=function(){console.log(e.obj.sims_admission_mother_street_number);var t={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_building_number:e.obj.sims_admission_mother_building_number,sims_parent_mother_street_number:e.obj.sims_admission_mother_street_number,sims_parent_mother_company:e.obj.sims_admission_mother_company,sims_parent_mother_family_name:e.obj.sims_admission_mother_family_name_en,sims_parent_mother_occupation:e.obj.sims_admission_mother_occupation};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MAD&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,e.fod?swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.saveFatherDetails=function(){var t={sims_parent_number:a.globals.currentUser.username,sims_parent_father_first_name:e.obj.sims_admission_father_first_name,sims_parent_father_middle_name:e.obj.sims_admission_father_middle_name,sims_parent_father_last_name:e.obj.sims_admission_father_last_name,sims_parent_father_email:e.obj.sims_admission_father_email,sims_parent_father_summary_address:e.obj.sims_admission_father_summary_address,sims_parent_father_country_code:e.obj.sims_parent_father_country_code_c,sims_parent_father_state:e.obj.sims_admission_father_state_c,sims_parent_father_city:e.obj.sims_admission_father_city_c,sims_parent_father_po_box:e.obj.sims_admission_father_po_box,sims_parent_father_phone:e.obj.sims_admission_father_phone,sims_parent_father_mobile:e.obj.sims_admission_father_mobile,sims_parent_father_fax:e.obj.sims_admission_father_fax,sims_parent_father_passport_number:e.obj.sims_admission_father_passport_number,sims_parent_father_nationality1_code:e.obj.sims_parent_father_nationality1_code_c,sims_parent_father_home_summary_address:e.obj.sims_parent_father_home_summary_address,sims_parent_father_home_country_code:e.obj.sims_parent_father_home_country_code,sims_parent_father_home_state:e.obj.sims_parent_father_home_state,sims_parent_father_home_city:e.obj.sims_parent_father_home_city,sims_parent_father_home_po_box:e.obj.sims_parent_father_home_po_box,sims_parent_father_home_phone:e.obj.sims_parent_father_home_phone,sims_parent_father_home_mobile:e.obj.sims_parent_father_home_mobile};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=FP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data,console.log(e.obj)})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.saveMotherDetails=function(){var t={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_first_name:e.obj.sims_admission_mother_first_name,sims_parent_mother_middle_name:e.obj.sims_admission_mother_middle_name,sims_parent_mother_last_name:e.obj.sims_admission_mother_last_name,sims_parent_mother_email:e.obj.sims_admission_mother_email,sims_parent_mother_summary_address:e.obj.sims_admission_mother_summary_address,sims_parent_mother_country_code:e.obj.sims_admission_mother_country_code_c,sims_parent_mother_state:e.obj.sims_admission_mother_state,sims_parent_mother_city:e.obj.sims_admission_mother_city,sims_parent_mother_po_box:e.obj.sims_admission_mother_po_box,sims_parent_mother_phone:e.obj.sims_admission_mother_phone,sims_parent_mother_mobile:e.obj.sims_admission_mother_mobile,sims_parent_mother_fax:e.obj.sims_admission_mother_fax,sims_parent_mother_passport_number:e.obj.sims_admission_mother_passport_number,sims_parent_mother_nationality1_code:e.obj.sims_parent_mother_nationality1_code_c,sims_parent_mother_home_summary_address:e.obj.sims_parent_mother_home_summary_address,sims_parent_mother_home_country_code:e.obj.sims_parent_mother_home_country_code,sims_parent_mother_home_state:e.obj.sims_parent_mother_home_state,sims_parent_mother_home_city:e.obj.sims_parent_mother_home_city,sims_parent_mother_home_po_box:e.obj.sims_parent_mother_home_po_box,sims_parent_mother_home_phone:e.obj.sims_parent_mother_home_phone,sims_parent_mother_home_mobile:e.obj.sims_parent_mother_home_mobile};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MP&parent_details="+JSON.stringify(t)).then(function(t){e.fod=t.data,t.data?(swal({title:"Alert",text:"Record Updated Successfully",imageUrl:"assets/img/check.png"}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.display=!0,e.obj=t.data,console.log(e.obj)})):swal({title:"Alert",text:"Record Not Updated",imageUrl:"assets/img/notification-alert.png"})})},e.editmotherDetails=function(){$("#motherDetails").modal("show")},e.motherOtherDetailsClick=function(){$("#motherOtherDetails").modal("show")},e.edit=function(){e.ro=!1,e.eo=!0},e.cancel=function(){e.ro=!0,e.eo=!1},e.save=function(){console.log(e.obj);var t=new Object;t.CustomerId=e.CustomerId,t.CustomerName=e.CustomerName,t.Status=e.Status,n.delete("http://localhost/SIMSAPI/api/madan/madanDelete",{data:t,headers:{"Content-Type":"application/json"}},null).then(function(e){console.log(e)},function(e){console.log(e)}),n.post(r.apiUrl+"api/parent/updateParentInfo?obj="+JSON.stringify(e.obj)).then(function(t){e.obj1=t.data,console.log(t.data)})};var i=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){i.append(t,e)})},e.file_changed=function(t){var a=t.files[0];e.photo_filename=a.type;var s=new FileReader;s.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},s.readAsDataURL(a)},e.uploadImgClickF=function(){e.uploadImgClickFShow=!0},e.uploadImgCancel=function(){e.uploadImgClickFShow=!1},e.uploadImg=function(){var t={method:"POST",url:r.apiUrl+"/api/file/upload?filename="+a.globals.currentUser.username+"_f&location=Images/ParentImage",data:i,headers:{"Content-Type":void 0}};n(t).success(function(t){var s={sims_parent_number:a.globals.currentUser.username,sims_parent_father_img:t};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=FI&parent_details="+JSON.stringify(s)).then(function(e){}),e.uploadImgClickFShow=!1})},e.file_changedM=function(t){var a=t.files[0];e.photo_filename=a.type;var s=new FileReader;s.onload=function(t){e.$apply(function(){e.prev_imgM=t.target.result})},s.readAsDataURL(a)},e.uploadImgClickM=function(){e.uploadImgClickMShow=!0},e.uploadImgMCancel=function(){e.uploadImgClickMShow=!1},e.uploadImgM=function(){var t={method:"POST",url:r.apiUrl+"/api/file/upload?filename="+a.globals.currentUser.username+"_m&location=Images/ParentImage",data:i,headers:{"Content-Type":void 0}};n(t).success(function(t){var s={sims_parent_number:a.globals.currentUser.username,sims_parent_mother_img:t};n.post(r.apiUrl+"api/parent/updateParentDetails?opr=MI&parent_details="+JSON.stringify(s)).then(function(e){}),e.uploadImgClickMShow=!1})}}]),e.directive("ngFiles",["$parse",function(e){return{link:function(t,a,s){var o=e(s.ngFiles);a.on("change",function(e){o(t,{$files:e.target.files})})}}}])}(),function(){"use strict";var e=angular.module("sims.module.gallery");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("GradebookCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.headcolor="1",e.markentryflag=!1,e.newinsert=!0,e.upinsert=!1,e.Nodata=!1,e.markentries=!0,e.Expand1=!0,e.statuss=!1;e.Expand=!0,e.GradeBookAssignment=!1,e.name="CREATION";e.edt={gb_status:!0};a.globals.currentUser.username;e.table=!0,e.Expand=!0,e.Expand5=!1,e.mark={},s(function(){$("#menu-wrapper1").scrollbar(),$("#scroll-wrapper").css({height:"600px"})},100),e.getTransportDetails=function(){e.senroll=a.globals.currentStudent.enroll_number,n.get(r.apiUrl+"api/Gradebook/GetAccessGradebookNewPPN?enroll_number="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.status=t.data,"A"==e.status[0].sims_status?(e.display=!1,e.loaderShow=!1,e.table=!1,swal({title:"Alert",text:"Report Card Blocked Please Contact To School",imageUrl:"assets/img/notification-alert.png"})):(e.display=!0,e.table=!0,e.loaderShow=!1,e.table=!0,e.loaderShow=!1)}),n.get(r.apiUrl+"api/Gradebook/GetAllGradebookNewPPN?enroll_number="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code).then(function(t){e.gradebook_data=t.data,e.loaderShow=!1}),n.get(r.apiUrl+"api/Gradebook/GetAllGradebookSubject?enroll_number="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr).then(function(t){e.subject_names1=t.data}),n.get(r.apiUrl+"api/Gradebook/GetAllGradebookTerm?academic_year="+a.globals.currentStudent.sims_acad_yr+"&cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.term_names1=t.data}),e.getSbjectCategory=function(t){n.get(r.apiUrl+"api/Gradebook/getAllGradebookCategory?enroll="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr+"&term_code="+e.edt.gb_term_code+"&subject_code="+e.edt.sims_subject_code).then(function(t){e.category_names1=t.data,console.log("My Category=",e.category_names1)})},n.get(r.apiUrl+"api/Gradebook/GetAllGradebookComments").then(function(t){e.comment_names1=t.data})},e.GetAllGradebookNmae1=function(){void 0==e.edt.sims_subject_code&&(e.edt.sims_subject_code=""),void 0==e.edt.gb_term_code&&(e.edt.gb_term_code=""),void 0==e.edt.sims_gb_cat_code&&(e.edt.sims_gb_cat_code=""),n.get(r.apiUrl+"api/Gradebook/GetAllGradebookNewPPNParamter?enroll_number="+a.globals.currentStudent.enroll_number+"&academic_year="+a.globals.currentStudent.sims_acad_yr+"&cur_code="+a.globals.currentStudent.sims_cur_code+"&grade_code="+a.globals.currentStudent.sims_grade_code+"§ion_code="+a.globals.currentStudent.sims_section_code+"&subject="+e.edt.sims_subject_code+"&term="+e.edt.gb_term_code+"&cat="+e.edt.sims_gb_cat_code).then(function(t){e.gradebook_data=t.data,e.gradebook_data.length>0?(e.loaderShow=!1,e.table=!0,e.Nodata=!1):(e.table=!1,e.Nodata=!0)})},$(document).ready(function(){e.loaderShow=!1}),e.reset=function(){e.obj="",e.edt.gb_term_code="",e.edt.sims_subject_code="",e.edt.sims_gb_cat_code="",e.edt="",e.temp=[],e.temp.sims_term_code=e.edt.gb_term_code,e.temp.sims_subject_code=e.edt.sims_subject_code,e.temp.sims_gb_cat_code=e.edt.sims_gb_cat_code},e.raplay=function(t){console.log(t);var s={sims_teacher_login_code:t.sims_employee_code,sims_teacher_name:t.sims_teacher_name};e.teacherClick(s),e.newsubject_txt(t.sims_term_desc_en+"-"+t.sims_subject_name_en+"-"+t.sims_gb_cat_name+"-"+t.sims_gb_cat_assign_name+"-"+a.globals.currentStudent.enroll_number)},e.DisplayStudentComment=function(){$("#myCommentModal").modal("show")},e.$on("student_change",function(t,a){e.getTransportDetails()}),a.globals.studentsLoaded&&e.getTransportDetails(),e.contentClick=function(){}}])}(),function(){"use strict";var e=angular.module("sims.module.agenda");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("SyllabusViewCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){a.globals.currentUser.username;var i=n.defaults.headers.common.schoolId;e.School_Name=e.obj1.lic_school_name,e.schoolLogoImg=r.apiUrl+"Content/"+n.defaults.headers.common.schoolId+"/Images/SchoolLogo/"+e.School_Logo,e.getCircularDetails=function(t){e.path1="https://api.mograsys.com/APIERP/Content/"+i+"/Images/Syllabus/",n.get(r.apiUrl+"api/syllabus_lesson_PP/get_syllabus_lesson_for_PP?grade="+a.globals.currentStudent.sims_grade_code+"§ion="+a.globals.currentStudent.sims_section_code+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){null!==t.data?e.lesson_approvaled_data=t.data:swal({text:"Data Not Found"})}),e.Getsyllabus_Approve_data=function(t){t.sims_cur_code,t.sims_academic_year,t.sims_grade_code,t.sims_subject_code,t.sims_month_code;e.Approve_plan=[],e.busy=!0,e.month_name=t.month_name,e.academic_year=t.sims_academic_year_description,e.grade_section=t.sims_grade_name+" / "+t.sims_section_name,e.subject_name=t.sims_subject_name,e.sims_syllabus_created_name=t.sims_syllabus_created_name,e.sims_syllabus_approved_name=t.sims_syllabus_approved_name,n.post(r.apiUrl+"api/syllabus_lesson_PP/syllabus_Approve_PP?sims_cur_code="+t.sims_cur_code+"&sims_academic_year="+t.sims_academic_year+"&sims_grade_code="+t.sims_grade_code+"&sims_subject_code="+t.sims_subject_code+"&sims_month_code="+t.sims_month_code).then(function(t){t.data.length>0?(e.Approve_plan=t.data,e.busy=!1):(swal({title:"Alert",text:"'Data Not Found",imageUrl:"assets/img/notification-alert.png"}),e.busy=!1)})},e.print=function(e){var t=document.head.outerHTML,a=document.getElementById(e).outerHTML,s=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"),o=s.document;o.open(),o.write(""+t+''+a+""),o.close(),s.focus()}},e.$on("student_change",function(t,a){e.getCircularDetails()}),a.globals.studentsLoaded&&e.getCircularDetails()}])}(),function(){"use strict";var e=angular.module("sims.module.gallery");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),e.controller("AlbumViewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$filter","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.create=!1,e.imghide=!1,e.photoShow=!1;new Array;e.obj=[],e.loadingscr=!0,$("#readyClass").removeClass("mfp-bg mfp-ready"),e.getstudentList=function(){n.get(i.apiUrl+"api/albums/getAlbumRights?parentID="+a.globals.currentStudent.enroll_number).then(function(t){e.photoList=[],e.sims_album_code={},e.display=!0,e.obj1=t.data,t.data.length>0&&(e.sims_album_code=t.data[0].sims_album_code,e.Getinfo(t.data[0].sims_album_code))}),e.Getinfo=function(t){n.get(i.apiUrl+"api/albums/getAlbumDetailsByID?albumCode="+t+"&parentID="+a.globals.currentStudent.enroll_number).then(function(t){if(e.photoList=t.data,e.PhotoCount=e.photoList.length,e.photoList.length>0?e.photoShow=!0:e.photoShow=!1,e.url="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var s=0;s0)e.portal_data=t.data,e.arr=[],e.arr=e.portal_data[0].sims_appl_form_field_value1.split("/"),e.url="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F"+e.arr[3]+"&tabs=timeline&width=500&height=1000&small_header=true&adapt_container_width=false&hide_cover=true&show_facepile=false&appId",$("#social").attr("src",e.url);else{let t={sims_appl_form_field_value1:"http://www.facebook.com",sims_appl_form_field_value3:"http://www.twitter.com",sims_appl_form_field_value2:"http://www.instagram.com"};e.portal_data.push(t)}})}])}(),function(){"use strict";var e=angular.module("sims.module.social");e.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){})}]),e.controller("twitterCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){}])}(),function(){"use strict";angular.module("sims.module.lms").controller("ParentRefController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,"iis"==n.defaults.headers.common.schoolId?e.parent_birth=!0:e.parent_birth=!1,e.getMedicalDetails=function(t){e.display=!0,e.edt={},n.get(i.apiUrl+"api/common/getMobilecode").then(function(t){e.mobile_code=t.data}),e.academic_year_change=function(t,a){n.get(i.apiUrl+"api/common/getGrade?curCode="+t+"&academic_year="+a).then(function(t){e.grade_lst=t.data})},e.getacademicYear=function(t){n.get(i.apiUrl+"api/common/getAcademicYear_new?curCode="+t).then(function(a){e.ac_year_lst=a.data,e.edt.academic_year=e.ac_year_lst[0].sims_academic_year,e.academic_year_change(t,e.edt.academic_year)})},n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)}),e.Confirm=function(t){t&&("iis"==n.defaults.headers.common.schoolId?n.get(i.apiUrl+"api/common/getEmailCountNew?email="+e.edt.father_email+"&academic_year="+e.edt.academic_year).then(function(t){parseInt(t.data)>0?swal({title:"Alert",text:"Email ID is already exist.",imageUrl:"assets/img/notification-alert.png"}):(e.edt.father_mobile=e.mobile_code+e.edt.father_mobile1,e.edt.parent_id=a.globals.currentUser.username,n.post(i.apiUrl+"api/common/insertadmission_parent",e.edt).then(function(t){console.log(t.data),""!=t.data&&(e.edt.parent_id=t.data,n.post(i.apiUrl+"api/common/insertadmission_student_iis",e.edt).then(function(t){t.data?(swal({title:"Alert",text:"Data Inserted Successfully",imageUrl:"assets/img/check.png"}),e.clear()):swal({title:"Alert",text:"Data Not Inserted",imageUrl:"assets/img/notification-alert.png"})}))}))}):n.get(i.apiUrl+"api/common/getEmailCount?email="+e.edt.father_email).then(function(t){parseInt(t.data)>0?swal({title:"Alert",text:"Email ID is already exist.",imageUrl:"assets/img/notification-alert.png"}):(e.edt.father_mobile=e.mobile_code+e.edt.father_mobile1,e.edt.parent_id=a.globals.currentUser.username,n.post(i.apiUrl+"api/common/insertadmission_parent",e.edt).then(function(t){console.log(t.data),""!=t.data&&(e.edt.parent_id=t.data,n.post(i.apiUrl+"api/common/insertadmission_student",e.edt).then(function(t){t.data?(swal({title:"Alert",text:"Data Inserted Successfully",imageUrl:"assets/img/check.png"}),e.clear()):swal({title:"Alert",text:"Data Not Inserted",imageUrl:"assets/img/notification-alert.png"})}))}))}))},e.clear=function(){e.edt={},e.myForm.$setPristine(),e.myForm.$setUntouched(),n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)})},e.New=function(){e.display=!0,e.clear()},e.viewApplied=function(){e.display=!1,n.get(i.apiUrl+"api/common/getAppliedStatus?parent="+a.globals.currentUser.username).then(function(t){e.Upload_doc_datails=t.data})},e.printReport=function(e){var t;$("#report_Modal").modal("show"),t="imert"==n.defaults.headers.common.schoolId?"SimsReports.Sims.SIMR202N,SimsReports":"demo"==n.defaults.headers.common.schoolId?"SimsReports.Sims.SIMR202DEMO,SimsReports":"SimsReports.Sims.SIMR202,SimsReports",$("#reportViewer4").telerik_ReportViewer({serviceUrl:i.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:t,parameters:{parent_ref_id:e}}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})},e.getchkAge=function(t,a,s){n.get(i.apiUrl+"api/common/GetAgecompare?cur_code="+t+"&acad_yr="+a+"&grade="+s).then(function(t){e.obj_age=t.data})},e.getchkDOB=function(){for(var t=0;tnew Date(e.obj_age[t].sims_birth_date_to)&&(e.edt.birth_date="",swal({title:"Alert",text:"Age criteria not met.",showCloseButton:!0,width:450}).then(function(){swal()},function(e){"cancel"===e&&swal()}),e.edt.birth_date="")}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails(),$('*[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";angular.module("sims.module.lms").controller("ParentAsdController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.getMedicalDetails=function(t){e.display=!0,e.edt={},e.academic_year_change=function(t,a){n.get(i.apiUrl+"api/common/getGrade?curCode="+t+"&academic_year="+a).then(function(t){e.grade_lst=t.data})},e.getacademicYear=function(t){n.get(i.apiUrl+"api/common/getAcademicYear_new?curCode="+t).then(function(a){e.ac_year_lst=a.data,e.edt.academic_year=e.ac_year_lst[0].sims_academic_year,e.academic_year_change(t,e.edt.academic_year)})},n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)}),n.get(i.apiUrl+"api/common/getParentDetails_siso?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log(e.pdetails))}),e.Confirm=function(t){t&&(e.edt.parent_id=a.globals.currentUser.username,e.temp={sname:e.edt.first_name+" "+e.edt.last_name,gender:e.edt.gender_code,dob:moment(e.edt.birth_date,"DD-MM-YYYY").format("YYYY-MM-DD"),cur_code:e.edt.curr_code,grade:e.edt.grade_code,pname:e.pdetails.pname,mobile:e.pdetails.pmobile,email:e.pdetails.pemail,mname:e.pdetails.mname,mmobile:e.pdetails.mmobile,memail:e.pdetails.memail,sims_parent_father_nationality1_code:e.pdetails.sims_parent_father_nationality1_code,sims_parent_father_appartment_number:e.pdetails.sims_parent_father_appartment_number,sims_parent_father_building_number:e.pdetails.sims_parent_father_building_number,sims_parent_father_street_number:e.pdetails.sims_parent_father_street_number,sims_parent_father_area_number:e.pdetails.sims_parent_father_area_number,sims_parent_father_summary_address:e.pdetails.sims_parent_father_summary_address,sims_parent_father_city:e.pdetails.sims_parent_father_city,sims_parent_father_state:e.pdetails.sims_parent_father_state,sims_parent_father_country_code:e.pdetails.sims_parent_father_country_code,sims_parent_father_po_box:e.pdetails.sims_parent_father_po_box,sims_parent_father_occupation:e.pdetails.sims_parent_father_occupation,sims_parent_father_company:e.pdetails.sims_parent_father_company,sims_parent_mother_nationality1_code:e.pdetails.sims_parent_mother_nationality1_code,sims_parent_mother_appartment_number:e.pdetails.sims_parent_mother_appartment_number,sims_parent_mother_building_number:e.pdetails.sims_parent_mother_building_number,sims_parent_mother_street_number:e.pdetails.sims_parent_mother_street_number,sims_parent_mother_area_number:e.pdetails.sims_parent_mother_area_number,sims_parent_mother_summary_address:e.pdetails.sims_parent_mother_summary_address,sims_parent_mother_city:e.pdetails.sims_parent_mother_city,sims_parent_mother_state:e.pdetails.sims_parent_mother_state,sims_parent_mother_country_code:e.pdetails.sims_parent_mother_country_code,sims_parent_mother_po_box:e.pdetails.sims_parent_mother_po_box,sims_parent_mother_occupation:e.pdetails.sims_parent_mother_occupation,sims_parent_mother_company:e.edt.sims_parent_mother_company,parent_id:a.globals.currentUser.username,sibling_id:a.globals.currentStudent.sims_student_enroll_number},console.log(e.temp),n.post(i.apiUrl+"api/common/AddEnquiry_Siso",e.temp).then(function(t){console.log(t.data),t.data?(swal({title:"Alert",text:"Data Inserted Successfully",imageUrl:"assets/img/check.png"}),e.clear()):swal({title:"Alert",text:"Record Not Inserted",imageUrl:"assets/img/notification-alert.png"})}))},e.clear=function(){e.edt={},e.myForm.$setPristine(),e.myForm.$setUntouched(),n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)})},e.New=function(){e.display=!0,e.clear()},e.viewApplied=function(){e.display=!1,n.get(i.apiUrl+"api/common/getAppliedStatus_Asd?parent="+a.globals.currentUser.username).then(function(t){e.Upload_doc_datails=t.data})}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("HealthReportController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.grid=!1,e.rpt_lst=[],e.getMedicalDetails=function(t){e.rpt_obj={},"clarahealtonation"==n.defaults.headers.common.schoolId?e.rpt_lst=[{rpt_code:"HLTR20NewPP",rpt_name:"Student Health Report"}]:e.rpt_lst=[{rpt_code:"HLTR14PP",rpt_name:"Student Health Record"},{rpt_code:"HLTR11PP",rpt_name:"Consent for Immunization"},{rpt_code:"HLTR07PP",rpt_name:"Consent for Emergency Treatment"},{rpt_code:"HLTR13PP",rpt_name:"Authorization and Consent to Medical Treatment"},{rpt_code:"HLTR08PP",rpt_name:"Infection Control Policy"},{rpt_code:"HLTR10PP",rpt_name:"Parental Consent to Administer Over – The –Counter Medications"},{rpt_code:"HLTR12",rpt_name:"Allergy Form"},{rpt_code:"HLTR15PP",rpt_name:" Medical Declaration"},{rpt_code:"HLTR16PP",rpt_name:" Immunization Record Report"}],e.rpt_change=function(t){var a="";if(r.AWS.includes(n.defaults.headers.common.schoolId)&&(a="reports-"),e.showrpt=!0,"HLTR14PP"==t||"HLTR10PP"==t||"HLTR15PP"==t||"HLTR16PP"==t||"HLTR17PP"==t?e.para={cur_code:e.sims_cur_code,acad_year:e.sims_acad_yr,grade_code:e.grade,section_code:e.section,search:e.enroll_number}:"HLTR12"==t||(e.para={search:e.enroll_number}),"clarahealtonation"==n.defaults.headers.common.schoolId)e.apiUrl_n="https://clarahealtonation.appsis.co.in/report/api/reports/",$("#reportViewer4").telerik_ReportViewer({serviceUrl:e.apiUrl_n,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()},persistSession:!1,reportSource:{report:"SimsReports.Health."+t+",SimsReports",parameters:e.para}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports.Health."+t+",SimsReports",parameters:e.para});else if("apsportal"==n.defaults.headers.common.schoolId||"asdportal"==n.defaults.headers.common.schoolId){var o="https://"+a+n.defaults.headers.common.schoolId.toLowerCase()+".mograsys.com/report/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:o,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()},persistSession:!1,reportSource:{report:"SimsReports.Health."+t+"APS,SimsReports",parameters:e.para}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports.Health."+t+"APS,SimsReports",parameters:e.para})}else{$("#reportViewer4").telerik_ReportViewer({serviceUrl:r.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()},persistSession:!1,reportSource:{report:"SimsReports.Health."+t+",SimsReports",parameters:e.para}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports.Health."+t+",SimsReports",parameters:e.para})}setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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.enroll_number=a.globals.currentStudent.enroll_number,e.grade=a.globals.currentStudent.sims_grade_code,e.section=a.globals.currentStudent.sims_section_code,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.showrpt=!1},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("transportReportController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$stateParams",function(e,t,a,s,o,n,r,i){e.display=!1,e.grid=!1,e.getMedicalDetails=function(t){e.enroll_number=a.globals.currentStudent.enroll_number,e.grade=a.globals.currentStudent.sims_grade_code,e.section=a.globals.currentStudent.sims_section_code,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.showrpt=!1,e.rpt_change=function(t){e.showrpt=!0,e.para="HLTR14PP"==t||"HLTR10PP"==t||"HLTR15PP"==t||"HLTR16PP"==t||"HLTR17PP"==t?{cur_code:e.sims_cur_code,acad_year:e.sims_acad_yr,grade_code:e.grade,section_code:e.section,search:e.enroll_number}:{cur_code:e.sims_cur_code,search:e.enroll_number},$("#reportViewer4").telerik_ReportViewer({serviceUrl:r.apiUrl+"api/reports/",viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()},persistSession:!1,reportSource:{report:"SimsReports.Sims."+t+",SimsReports",parameters:e.para}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports.Sims."+t+",SimsReports",parameters:e.para}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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.rpt_change(i.flag)},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeAsdController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location",function(e,t,a,s,o,n,r,i){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var l=i.search();if(!jQuery.isEmptyObject(l)){var d={order_id:l.order_id,tracking_id:l.tracking_id,bank_ref_no:l.bank_ref_no,failure_message:l.failure_message,payment_mode:l.payment_mode,card_name:l.card_name,status_code:l.status_code,status_message:l.status_message,billing_tel:l.billing_tel,billing_email:l.billing_email,eci_value:l.eci_value,card_holder_name:l.card_holder_name,bank_receipt_no:l.bank_receipt_no,merchant_param:l.merchant_param,mer_amount:l.mer_amount,order_status:l.order_status};n.post(r.apiUrl+"api/fees/update_docAsd",d).then(function(t){e.msg1=t.data,t.data?"Success"==l.order_status?swal({title:"Alert",text:"Payment Done Successfully. Your Transaction Number is "+l.tracking_id,imageUrl:"assets/img/check.png"},function(e){!0===e&&window.open("http://asdportal.amitydubai.ae/ppn/index.html#/main/feesAsd","_self")}):swal({title:"Alert",text:"Your Transaction Number is "+l.tracking_id,imageUrl:"assets/img/notification-alert.png"},function(e){!0===e&&window.open("http://asdportal.amitydubai.ae/ppn/index.html#/main/feesAsd","_self")}):swal({title:"Alert",text:"Some Problem in Payment plz check agian..",width:380,height:200},function(e){!0===e&&window.open("http://asdportal.amitydubai.ae/ppn/index.html#/main/feesAsd","_self")})})}e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){if(void 0==e.card_last_digit&&(e.card_last_digit=""),e.card_last_digit.length<4)swal({title:"Alert",text:"Please enter last 4 digit of card number"});else{for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=100*parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=100*(parseInt(a)+parseInt(e.grid.convence_charge)),e.grid.grad_total=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeV?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName),console.log(e.main_lst);var s=t.data.length;e.termwise=[];for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(t){if(t){e.amount=e.grid.grad_total;for(var s=[],o=0,i=0;i Class: '+a+" "+o+""),$(".grid-body").removeClass("hide"),e.gridData=t.data.table,e.slot_count=t.data.table1[0].column1,e.day_count=t.data.table2[0].column1,e.time_break_detail=t.data.table3,void 0!=t.data.table1[0].column1&&e.genGrid()}).then(function(){$(e.gridData).each(function(a,s){var o='
'+s.sims_subject_name_en+'
'+s.sims_teacher_name+"
",n=t(o)(e);$("#"+s.sims_bell_day_code+"_"+s.sims_bell_slot_code).children(".sub_tec_cont").length>0&&$("#"+s.sims_bell_day_code+"_"+s.sims_bell_slot_code).addClass("group"),$("#"+s.sims_bell_day_code+"_"+s.sims_bell_slot_code).addClass("occupied").append(n)}),$(".lec_count").html($(".occupied").length)})},e.genGrid=function(){var a='';a+="",a+="",a+='';for(var s=0;s'+e.oSlotDayNames[s]+"";a+="",a+="",a+="";for(s=0;s ";for(var l=0;l'}}a+="",a+="";var c=t(a+="
D/Lec
'+o+'['+r+" to "+(i[0]+":"+i[1])+"]
")(e);$("#CVgrid").html(c)},e.getdays=function(){i.post(e.apiurlnew+"api/SchoolTimeTable/TimeTableCommon",{opr:"Q"}).then(function(t){e.oSlotDayNamestemp=t.data.table,e.oSlotDayNames=[],$(e.oSlotDayNamestemp).each(function(t,a){e.oSlotDayNames[parseInt(a.sims_appl_parameter)-1]=a.sims_appl_form_field_value1}),setTimeout(function(){e.genClassView()},500)})},e.printDiv=function(){var t;$("#report_Modal").modal("show"),e.parameters={acad_year:e.aca_year,bell:e.bell_code,gradecode:e.grade_code,seccode:e.sec_code},t="SimsReports.Schedulling.SCHR05,SimsReports";var a=window.location.href,s=a.substring(0,a.indexOf(":"));if("sms"==i.defaults.headers.common.schoolId)if("https"==s)var n="https://"+i.defaults.headers.common.schoolId+".nis.edu.kw/report/api/reports/";else n="http://"+i.defaults.headers.common.schoolId+".nis.edu.kw/report/api/reports/";else if("elcportal"==i.defaults.headers.common.schoolId||"lwgportal"==i.defaults.headers.common.schoolId)if("https"==s)n="https://"+i.defaults.headers.common.schoolId+".amityelc.ae/report/api/reports/";else n="http://"+i.defaults.headers.common.schoolId+".amityelc.ae/report/api/reports/";else n=l.newReportUrl+i.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:n,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:t,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})},$(document).ready(function(){e.condenseMenu(),e.getdays()})},e.$on("student_change",function(t,a){e.getstudentList()}),s.globals.studentsLoaded&&e.getstudentList()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeePearlController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location",function(e,t,a,s,o,n,r,i){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var l=i.search();if(!jQuery.isEmptyObject(l)){var d={temp_dd_doc_no:l.vpc_MerchTxnRef,temp_dd_fee_status:l.vpc_TxnResponseCode,temp_dd_fee_transaction_id:l.vpc_TransactionNo,receiptno:l.receiptNo,cardtype:l.cardType,batchno:l.batchNo,authorizeid:l.authorizeID,acqresponsecode:l.acqResponseCode};n.post(r.apiUrl+"api/fees/update_doc1",d).then(function(t){e.msg1=t.data,t.data?swal({title:"Alert",text:"Payement Done Successfully Your Transaction Number is "+l.vpc_TransactionNo,imageUrl:"assets/img/check.png"},function(e){!0===e&&window.open("http://dpsmis.mograsys.com/ppn#/main/fees","_self")}):swal({title:"Alert",text:"Some Problem in Payment plz check agian..",width:380,height:200},function(e){!0===e&&window.open("http://dpsmis.mograsys.com/ppn#/main/fees","_self")})})}e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=100*parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=100*(parseInt(a)+parseInt(e.grid.convence_charge)),e.grid.grad_total=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=s.data[0].sims_term_desc_en),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee1?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[];for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})})},e.getFeesDetails=function(t){n.post(r.apiUrl+"api/reportcardnew/ReportCommon",{opr:"S"}).then(function(t){e.academic_year_lst=t.data.table,e.academic_year=a.globals.currentStudent.sims_acad_yr}),e.get_once(a.globals.currentStudent.sims_acad_yr)},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentFull_name=a.globals.currentStudent.sims_student_passport_fullname_new,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.academic_year="",n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.std_enroll_number+"-"+e.studentFull_name+"-"+e.studengrade_name+"-"+e.school_name,e.description="Current Year Fee",console.log("$scope.school_name",e.school_name)}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data,console.log("$scope.academic_year_lst",e.academic_year_lst[0].sims_academic_year),e.academic_year=e.academic_year_lst[0].sims_academic_year,e.academic_change(e.academic_year_lst[0].sims_academic_year)})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+e.std_enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var a=t.data.length,s=0;s0){console.log(t.data[s].feeDetails);for(var o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){if(e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.total){var a=100*parseFloat(e.grid.total);setTimeout(function(){document.getElementById("sss").innerHTML="";var t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index1.php"),t.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",a);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","trackId"),o.setAttribute("value",e.refNumbertrans);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","dataname"),r.setAttribute("value",e.dataname);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value",e.description);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),t.appendChild(s),t.appendChild(o),t.appendChild(r),t.appendChild(i),t.appendChild(l),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600)}else swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeedisleyController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1,e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=l("number")(parseFloat(a)+0*parseFloat(a),0),e.grid.grad_total=parseFloat(a)+0*parseFloat(a)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var o=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var n=0;n0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name)),e.propertyName="sltr_doc_date1",s(function(){$("#fixTable3").tableHeadFixer({top:1})},100)})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=l("number")(parseFloat(a)+0*parseFloat(a),0),e.grid.grad_total=parseFloat(a)+0*parseFloat(a)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var o=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var n=0;n0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name)),e.propertyName="sltr_doc_date1",s(function(){$("#fixTable3").tableHeadFixer({top:1})},100)})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,console.log("$scope.charges",e.charges),n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){if(void 0==e.card_last_digit&&(e.card_last_digit=""),e.card_last_digit.length<4)swal({title:"Alert",text:"Please enter last 4 digit of card number"});else{for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@gmail.com":e.pemail=e.pdetails.pemail,""==e.pdetails.pmobile||"-"==e.pdetails.pmobile?e.pemobile="123456789":e.pemobile=e.pdetails.pmobile)}),e.get_tc=function(){n.get(r.apiUrl+"api/common/Get_Terms_Cond").then(function(t){e.get_Terms_Cond_Link=t.data,window.open(e.get_Terms_Cond_Link)})},e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.academic_change=function(t){e.fee_codee=null,e.period_codee=null,e.custom_amount=null,e.sims_advanced_academic_year=null,e.acade_year=null,e.fe_enroll=null,e.chk_select_disabled=null,e.studentName=null,e.std_enroll_number=null,e.std_cur_code=null,e.grid.chkAll=null,e.Student=null,e.IP=null,e.card_charges=null,e.studFeeDetails=null,e.display=null,e.firstname=null,e.studFeeDetails=[],e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/get_Custom_fee").then(function(t){t.data&&t.data.length>0&&t.data[0].sims_appl_form_field_value1?(e.fee_codee=t.data[0].sims_appl_form_field_value1,e.period_codee=t.data[0].sims_appl_form_field_value2,e.custom_amount=t.data[0].sims_appl_form_field_value3,e.sims_advanced_academic_year=t.data[0].sims_advanced_academic_year):console.log("Registration fee data is null, undefined, or empty."),n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);var s=t.data.length;if(e.fee_academic=t.data[0].studAcademic,e.fee_academic===e.sims_advanced_academic_year){var o=t.data[0].feeDetails.some(function(t){return t.studFeeCode===e.fee_codee&&t.studFeePeriodNo===e.period_codee&&t.studTotalPaidAMT===e.custom_amount});o||t.data[0].feeDetails.sort(function(t,a){return t.studFeeCode===e.fee_codee&&t.studFeePeriodNo===e.period_codee?-1:a.studFeeCode===e.fee_codee&&a.studFeePeriodNo===e.period_codee?1:0})}for(var n=0;n0&&t.data[0].sims_appl_form_field_value1?(e.fee_codee=t.data[0].sims_appl_form_field_value1,e.period_codee=t.data[0].sims_appl_form_field_value2,e.custom_amount=t.data[0].sims_appl_form_field_value3,e.sims_advanced_academic_year=t.data[0].sims_advanced_academic_year):console.log("custom fee data is null in paramter, undefined, or empty. Setting a default value."),n.get(r.apiUrl+"api/fees/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/fees/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.acade_year=t.data,e.current_academic_year=e.acade_year[0].academic_year,e.current_academic_year_desc=e.acade_year[0].academic_year_desc,e.academic_year=e.acade_year[0].academic_year,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=e.current_academic_year,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);var s=t.data.length;if(e.acYear===e.sims_advanced_academic_year){var o=t.data[0].feeDetails.some(function(t){return t.studFeeCode===e.fee_codee&&t.studFeePeriodNo===e.period_codee&&t.studTotalPaidAMT===e.custom_amount});o||t.data[0].feeDetails.sort(function(t,a){return t.studFeeCode===e.fee_codee&&t.studFeePeriodNo===e.period_codee?-1:a.studFeeCode===e.fee_codee&&a.studFeePeriodNo===e.period_codee?1:0})}for(var n=0;n0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.grad_total?setTimeout(function(){e.pay_ful("creditcard")},100):swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})}else swal({title:"Alert",text:"Please accept the terms and conditions before continuing.",width:380,height:200})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){let a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let r=window.location.href;r.substring(0,r.indexOf(":"));var i="https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){let a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let r=window.location.href;r.substring(0,r.indexOf(":"));var i="https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r=window.location.href,i=(r.substring(0,r.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feSisd&sims_appl_form_field=Fee Terms").then(function(t){t.data.length>0&&(e.terms=t.data[0].sims_appl_form_field_value2)}),e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r=window.location.href,i=(r.substring(0,r.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://pg.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","description"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","fname"),i.setAttribute("value",e.username);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","lastName"),l.setAttribute("value",e.username);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","email"),d.setAttribute("value",e.pemail);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","mobile"),_.setAttribute("value",e.pemobile);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","phone"),c.setAttribute("value",e.pemobile);var m=document.createElement("input");m.setAttribute("type","submit"),m.setAttribute("value","Submit"),m.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.calendar").controller("CanteenSetupController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){let i=a.globals.currentUser.username,l=new Date;e.currentDate=l;let d=l.getDate(),_=l.getMonth()+1,c=l.getFullYear();d=(d<10?"0":"")+d,_=(_<10?"0":"")+_,e.swalopenModal=!1,e.swalopenModal1=!1;let m=`${d}-${_}-${c}`;function u(){!function(){$("#loader").modal({backdrop:"static",keyboard:!1});let t=new Date(c.toString(),e.currentMonth.getMonth(),1),a=t.getDate(),s=t.getMonth()+1,o=t.getFullYear(),i=`${a=(a<10?"0":"")+a}-${s=(s<10?"0":"")+s}-${o}`;n.get(r.apiUrl+"api/Canteen/getStudentCanteenDetailsForMonth?s_en_no="+localStorage.getItem("enroll_number")+"&date="+i).then(function(t){$("#loader").modal("hide"),e.StudentCanteenDedtails=t.data;let a=[],s=(new Date,new Date(e.currentMonth.getFullYear(),e.currentMonth.getMonth(),1)),o=new Date(e.currentMonth.getFullYear(),e.currentMonth.getMonth()+3,0),n=new Date(s);for(n.setDate(n.getDate()-n.getDay()),e.isRecordSaved=!1,e.cartItemCount=0,e.month=e.currentMonth.getMonth();n<=o;){let t=[];for(let a=0;a<7;a++){let a=null;const s=("0"+(a=new Date(n)).getDate()).slice(-2)+"-"+("0"+(a.getMonth()+1)).slice(-2)+"-"+a.getFullYear();if(e.obj=e.StudentCanteenDedtails.filter(function(e){return e.order_date==s}),e.obj.sort((t,a)=>t.can_menu_type_code===e.menuTypeArr[0].can_menu_type_code&&a.can_menu_type_code!==e.menuTypeArr[0].can_menu_type_code?-1:t.can_menu_type_code!==e.menuTypeArr[0].can_menu_type_code&&a.can_menu_type_code===e.menuTypeArr[0].can_menu_type_code?1:0),e.obj.length>0&&"2"==e.obj[0].tran_pay_status&&(e.payBtnShow=!0),2==e.obj.length)e.isRecordSaved=!0,t.push({date:a,dataB:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:e.obj[0].can_menu_type_code,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:e.obj[0].can_menu_srno,tran_qty:e.obj[0].tran_qty,tran_amt:e.obj[0].tran_amt,tran_value:e.obj[0].tran_value,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status,can_can_code:e.obj[0].can_can_code,can_opr_code:e.obj[0].can_opr_code,can_line_no:e.obj[0].can_line_no,can_prov_no:e.obj[0].can_prov_no},dataL:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:e.obj[1].can_menu_type_code,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:e.obj[1].can_menu_srno,tran_qty:e.obj[1].tran_qty,tran_amt:e.obj[1].tran_amt,tran_value:e.obj[1].tran_value,disabled:!0,tran_pay_status:e.obj[1].tran_pay_status,can_can_code:e.obj[1].can_can_code,can_opr_code:e.obj[1].can_opr_code,can_line_no:e.obj[1].can_line_no,can_prov_no:e.obj[1].can_prov_no},isOutOfMonth:n.getMonth()!==e.currentMonth.getMonth(),selectedImage:e.breakfastImg,selectedImage1:e.lunchImg,fastingImg:e.fastingImg,noFoodItemImg:e.noFoodItemImg,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status});else if(1==e.obj.length)e.isRecordSaved=!0,e.obj[0].can_menu_type_code==e.menuTypeArr[0].can_menu_type_code?t.push({date:a,dataB:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:e.obj[0].can_menu_type_code,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:e.obj[0].can_menu_srno,tran_qty:e.obj[0].tran_qty,tran_amt:e.obj[0].tran_amt,tran_value:e.obj[0].tran_value,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status,can_can_code:e.obj[0].can_can_code,can_opr_code:e.obj[0].can_opr_code,can_line_no:e.obj[0].can_line_no,can_prov_no:e.obj[0].can_prov_no},dataL:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:null,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:null,tran_qty:1,tran_amt:null,tran_value:null,disabled:!1,tran_pay_status:null,can_can_code:null,can_opr_code:null,can_line_no:null,can_prov_no:null},isOutOfMonth:n.getMonth()!==e.currentMonth.getMonth(),selectedImage:e.breakfastImg,fastingImg:e.fastingImg,noFoodItemImg:e.noFoodItemImg,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status}):e.obj[0].can_menu_type_code==e.menuTypeArr[1].can_menu_type_code&&t.push({date:a,dataB:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:null,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:null,tran_qty:1,tran_amt:null,tran_value:null,disabled:!1,tran_pay_status:null,can_can_code:null,can_opr_code:null,can_line_no:null,can_prov_no:null},dataL:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:e.obj[0].can_menu_type_code,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:e.obj[0].can_menu_srno,tran_qty:e.obj[0].tran_qty,tran_amt:e.obj[0].tran_amt,tran_value:e.obj[0].tran_value,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status,can_can_code:e.obj[0].can_can_code,can_opr_code:e.obj[0].can_opr_code,can_line_no:e.obj[0].can_line_no,can_prov_no:e.obj[0].can_prov_no},isOutOfMonth:n.getMonth()!==e.currentMonth.getMonth(),selectedImage1:e.lunchImg,fastingImg:e.fastingImg,noFoodItemImg:e.noFoodItemImg,disabled:!0,tran_pay_status:e.obj[0].tran_pay_status});else{const s=("0"+(a=new Date(n)).getDate()).slice(-2)+"-"+("0"+(a.getMonth()+1)).slice(-2)+"-"+a.getFullYear();t.push({date:a,dataB:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:null,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:null,tran_qty:1,tran_amt:null,tran_value:null,disabled:!1,tran_pay_status:null,can_can_code:null,can_opr_code:null,can_line_no:null},dataL:{day_code:(a.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),month_code:a.getMonth().toString(),year:a.getFullYear().toString(),can_prod_code_type:null,student_enroll_no:localStorage.getItem("enroll_number"),order_date:s,tran_date:m,can_menu_srno:null,tran_qty:1,tran_amt:null,tran_value:null,disabled:!1,tran_pay_status:null,can_can_code:null,can_opr_code:null,can_line_no:null},isOutOfMonth:n.getMonth()!==e.currentMonth.getMonth(),disabled:!1,tran_pay_status:null,fastingImg:e.fastingImg,noFoodItemImg:e.noFoodItemImg})}n.setDate(n.getDate()+1)}a.push(t)}function r(e){const t=e.split("-").map(Number);return new Date(t[2],t[1]-1,t[0])}e.calendar=a,e.calendar.forEach(t=>{t.forEach(t=>{const a=new Date(t.date);e.holidays.forEach(e=>{const s=r(e.sims_from_date),o=r(e.sims_to_date);a>=s&&a<=o&&(t.sims_calendar_exception_color_code=e.sims_calendar_exception_color_code,t.sims_calendar_exception_description=e.sims_calendar_exception_description)})})}),console.log("$scope.calendar: ",e.calendar),e.addtocart(),$("#loader").modal("hide")})}()}e.fastingImg="https://assets.mograsys.com/Images/Canteen/booking2.png",e.fastingIMG="https://assets.mograsys.com/Images/Canteen/booking2.png",e.fastingGIF="https://assets.mograsys.com/Images/Canteen/booking.gif",e.noFoodItemImg="",e.noFoodItemIMG="",e.noFoodItemGIF="",e.breakfastGIF="https://assets.mograsys.com/Images/Canteen/cookie-and-milk.gif",e.breakfastImg="https://assets.mograsys.com/Images/Canteen/cookie-and-milk2.png",e.lunchImg="https://assets.mograsys.com/Images/Canteen/pasta2.png",e.lunchGIF="https://assets.mograsys.com/Images/Canteen/pasta.gif",e.removeImg="https://assets.mograsys.com/Images/Canteen/canteen-cross-circle.png",e.cartGIF="https://assets.mograsys.com/Images/Canteen/cart.gif",e.cartImg="https://assets.mograsys.com/Images/Canteen/cart2.png",e.weekdays=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e.currentMonth=new Date,e.prevMonth=function(){e.currentMonth.setMonth(e.currentMonth.getMonth()-1),u()},e.nextMonth=function(){e.currentMonth.setDate(1),e.currentMonth.setMonth(e.currentMonth.getMonth()+1),u()},e.showPrevMonth=function(){new Date;return!0},e.showNextMonth=function(){return e.currentMonth0&&(e.TotalOrderAmt=e.CartItems.reduce(function(e,t){return e+parseFloat(t.tran_value)},0))})},e.addItemsTocart=function(){const t=[];e.cartItemCount=0;for(let a=0;ae.dataB&&null!==e.dataB.can_menu_srno&&("2"==e.dataB.tran_pay_status||null==e.dataB.tran_pay_status)).map(e=>e.dataB),s=t.filter(e=>e.dataL&&null!==e.dataL.can_menu_srno&&("2"==e.dataL.tran_pay_status||null==e.dataL.tran_pay_status)).map(e=>e.dataL);let o=a.concat(s);o=o.filter(e=>!(e.disabled||"2"!=e.tran_pay_status&&null!=e.tran_pay_status||e.can_prov_no));const l=p(o);if(o.length>0){$("#loader").modal({backdrop:"static",keyboard:!1});let t={student_enroll_no:o[0].student_enroll_no,tran_date:o[0].tran_date,tran_amt:l,can_can_code:o[0].can_can_code,can_opr_code:o[0].can_opr_code,user:i};e.data=[],e.data.push(t),o.length>0&&n.post(r.apiUrl+"api/Canteen/Insert_canteen_sale_document",e.data).then(function(t){e.prov_no=t.data,e.prov_no&&($("#loader").modal("hide"),n.post(r.apiUrl+"api/Canteen/Insert_canteen_sale_document_details?prov_no="+e.prov_no,o).then(function(t){t.data&&($("#loader").modal("hide"),e.closeModalCart(),e.closeModal(),e.swalopenModal=!0,setTimeout(()=>{e.swalclose()},2e3),u())}))})}},n.get(r.apiUrl+"api/Canteen/getAcademic_year").then(function(t){e.sims_academic_year=t.data[0].sims_academic_year,n.get(r.apiUrl+"api/Canteen/getMenuType").then(function(t){e.menuTypeArr=t.data,u()}),n.get(r.apiUrl+"api/Canteen/getCanteenMenu?sims_acad_yr="+e.sims_academic_year).then(function(t){e.Menu=t.data})}),e.isCurrentDate=function(e){var t=new Date;return e.getDate()==t.getDate()&&e.getMonth()==t.getMonth()&&e.getFullYear()==t.getFullYear()},e.grayedOutDays=function(e){if(!e||isNaN(new Date(e).getTime()))return console.error("Invalid date:",e),!1;var t=new Date(e),a=new Date;if(t=15},e.openModalCart=function(){e.modalOpenCart=!0},e.closeModalCart=function(){e.modalOpenCart=!1},e.openModalPrevOrd=function(){n.get(r.apiUrl+"api/Canteen/getPreviousOrderDetails?s_en_no="+localStorage.getItem("enroll_number")).then(function(t){e.prevOrd=t.data,e.modalOpenPrevOrd=!0,e.prevOrd.length>0&&e.prevOrd.forEach(t=>{let a=t.order_date.split("-"),s=parseInt(a[0],10),o=parseInt(a[1],10)-1,n=parseInt(a[2],10);let r=(new Date(n,o,s).getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1});const i=e.Menu.find(e=>e.can_menu_weekday_code===r&&e.can_menu_type_code===t.can_menu_type_code);i&&(t.desc=i.can_prod_description)})})},e.closeModalPrevOrd=function(){e.modalOpenPrevOrd=!1},e.openModal=function(t){let a=new Date(l);if(a.setDate(l.getDate()+1),a.setHours(0,0,0,0),e.selectedDate=t.date,e.selectedData=t,""!=e.selectedDate&&null!=e.selectedDate&&void 0!=e.selectedDate&&e.selectedData.date>l&&!e.grayedOutDays(e.selectedDate)&&!e.selectedData.sims_calendar_exception_description){if(e.selectedData.isOutOfMonth)return;e.modalOpen=!0,e.daycode=(e.selectedDate.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),e.combinedMenu=e.Menu.filter(function(t){return t.can_menu_weekday_code===e.daycode}),e.combinedMenu[0].can_prod_rate=parseFloat(e.combinedMenu[0].can_prod_rate).toFixed(2),e.combinedMenu[1].can_prod_rate=parseFloat(e.combinedMenu[1].can_prod_rate).toFixed(2),e.isBreakfastSelected=null!=t.dataB.can_menu_srno&&""!=t.dataB.can_menu_srno,e.isLunchSelected=null!=t.dataL.can_menu_srno&&""!=t.dataB.can_menu_srno,e.isBreakfastSelected&&e.isLunchSelected?(e.itemText="Selected",e.itemText1=" Items"):(e.itemText="Choose",e.itemText1=" Items")}else swal({title:"Alert",text:"Orders are closed for "+`${e.selectedDate.getDate()}-${e.selectedDate.getMonth()+1}-${e.selectedDate.getFullYear()}`,imageUrl:"assets/img/close.png",showCloseButton:!0,width:400});e.selectedData.date.getFullYear()===a.getFullYear()&&e.selectedData.date.getMonth()===a.getMonth()&&e.selectedData.date.getDate()===a.getDate()&&(l.getHours()>14||14===l.getHours()&&l.getMinutes()>0)&&(swal({title:"Alert",text:"Orders are closed for "+`${e.selectedDate.getDate()}-${e.selectedDate.getMonth()+1}-${e.selectedDate.getFullYear()}`,imageUrl:"assets/img/close.png",showCloseButton:!0,width:400}),e.modalOpen=!1),e.selectedDay=t},e.applyForNextNdays=function(t,a){swal({title:"Alert",text:"Are you Sure you want to apply these changes?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No",allowOutsideClick:!1},function(s){if(s){let s=-1,o=-1;e:for(let a=0;al&&!e.grayedOutDays(a.date)&&!a.sims_calendar_exception_color_code&&e.applyInnerLogic(a),0!=a.date.getDay()&&6!=a.date.getDay()&&t++}}e.addItemsTocart()}})},e.applyInnerLogic=function(t){if(e.selectedData=t,e.daycode=(t.date.getDay()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}),e.combinedMenu=e.Menu.filter(function(t){return t.can_menu_weekday_code===e.daycode}),e.combinedMenu.length>0){e.combinedMenu[0].can_prod_rate=parseFloat(e.combinedMenu[0].can_prod_rate).toFixed(2),void 0!=e.combinedMenu[1]&&(e.combinedMenu[1].can_prod_rate=parseFloat(e.combinedMenu[1].can_prod_rate).toFixed(2));let t=new Date(l);t.setDate(t.getDate()+30),e.selectedData.date>l&&e.selectedData.datel&&e.selectedData.datee.currentDate&&t.date&&t.date.getMonth()===e.currentMonth.getMonth()&&(t.fastingImg=e.fastingGIF),t.datee.currentDate&&t.date&&t.date.getMonth()===e.currentMonth.getMonth()&&(t.fastingImg=e.fastingIMG),t.datee.reduce((e,t)=>{const a=parseFloat(t.tran_amt);return isNaN(a)?e:e+a},0));const p=e=>e.reduce((e,t)=>{const a=parseFloat(t.tran_amt);return isNaN(a)?e:e+a},0);let g;e.singleChecked=function(t){for(let a=0;ae&&null!==e.can_menu_srno&&("2"==e.tran_pay_status||null==e.tran_pay_status)).map(e=>e),a=e.CartItems.filter(e=>e&&null!==e.can_menu_srno&&("2"==e.tran_pay_status||null==e.tran_pay_status)).map(e=>e),s=Array.from(new Set(e.CartItems.map(e=>e.can_prov_no)));Array.from(new Set(e.CartItems.map(e=>e.order_date)));s.length>0&&(s=s.join(","));let o=new Date(l);o.setDate(l.getDate()+1);let d=`${String(o.getDate()).padStart(2,"0")}-${String(o.getMonth()+1).padStart(2,"0")}-${o.getFullYear()}`,_=!1;t.forEach(t=>{let a=t.order_date.split("-"),s=new Date(a[2],a[1]-1,a[0]);(t.order_date==m||s14||14===l.getHours()&&l.getMinutes()>=0))&&(_=!0,e.date=d)}),_?(swal({title:"Alert",text:"Payment is closed for all dates on or before "+`${e.date}`+" at 2pm. Please remove expired orders to proceed with payment for next day.",imageUrl:"",showCloseButton:!0,width:600}),$("#loader").modal("hide")):0!=t.length?swal({title:"Alert",text:"Are you Sure you want to Pay?",showCloseButton:!0,showCancelButton:!0,confirmButtonText:"Yes",width:380,cancelButtonText:"No",allowOutsideClick:!1},function(o){if(o){let o={student_enroll_no:t[0].student_enroll_no,tran_date:t[0].tran_date,tran_amt:(e=>e.reduce((e,t)=>{const a=parseFloat(t.tran_amt);return isNaN(a)?e:e+a},0))(t),can_can_code:t[0].can_can_code,can_opr_code:t[0].can_opr_code,user:i,can_prov_no:t[0].can_prov_no};e.data=[],e.data.push(o),n.get(r.apiUrl+"api/Canteen/getUserDetails?user="+localStorage.getItem("username")).then(function(t){e.userDetails=t.data[0]}),n.post(r.apiUrl+"api/Canteen/Insert_canteen_payment",e.data).then(function(o){$("#loader").modal("hide"),"2"==o.data[0].flag?"1"==o.data[0].in_flag?n.post(r.apiUrl+"api/Canteen/Insert_canteen_payment_details?prov_no="+t[0].can_prov_no+"&new_prov_no="+o.data[0].can_prov_no+"&in_flag=1",a).then(function(t){t.data?setTimeout(function(){document.getElementById("sss").innerHTML="";let t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://pg.mograsys.com/ihs_test/transaction/"),t.setAttribute("name","form2");let a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("name","amount"),a.setAttribute("value",e.data[0].tran_amt);let o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","OrdNo"),o.setAttribute("value",s);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","enroll_number"),r.setAttribute("value",localStorage.getItem("enroll_number"));let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value","Canteen Payment");let l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","parentID"),l.setAttribute("value",localStorage.getItem("username"));let d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","studName"),d.setAttribute("value",localStorage.getItem("sims_student_passport_fullname_new"));let _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","acadYear"),_.setAttribute("value",localStorage.getItem("sims_acad_yr"));let c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","parentName"),c.setAttribute("value",e.userDetails.comn_user_alias);let u=document.createElement("input");u.setAttribute("type","text"),u.setAttribute("name","parentEmail"),u.setAttribute("value",e.userDetails.comn_user_email);let p=document.createElement("input");p.setAttribute("type","text"),p.setAttribute("name","parentPhNo"),p.setAttribute("value",e.userDetails.comn_user_ph_no);let g=document.createElement("input");g.setAttribute("type","text"),g.setAttribute("name","auth"),g.setAttribute("value",n.defaults.headers.common.Authorization);let h=document.createElement("input");h.setAttribute("type","text"),h.setAttribute("name","schoolId"),h.setAttribute("value",n.defaults.headers.common.schoolId);let f=document.createElement("input");f.setAttribute("type","text"),f.setAttribute("name","studClass"),f.setAttribute("value",localStorage.getItem("sims_grade_name_en")+" "+localStorage.getItem("sims_section_name_en"));let b=document.createElement("input");b.setAttribute("type","text"),b.setAttribute("name","studtransDate"),b.setAttribute("value",m);let y=document.createElement("input");y.setAttribute("type","submit"),y.setAttribute("value","Submit"),y.setAttribute("name","Submit1"),t.appendChild(a),t.appendChild(o),t.appendChild(r),t.appendChild(i),t.appendChild(l),t.appendChild(d),t.appendChild(_),t.appendChild(_),t.appendChild(c),t.appendChild(u),t.appendChild(p),t.appendChild(g),t.appendChild(h),t.appendChild(f),t.appendChild(b),t.appendChild(y),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600):swal({title:"",text:"Something went wrong. Please try again",showCloseButton:!0,height:300,width:380})}):n.post(r.apiUrl+"api/Canteen/Insert_canteen_payment_details?prov_no="+t[0].can_prov_no+"&new_prov_no="+o.data[0].can_prov_no+"&in_flag=2",t).then(function(t){t.data?setTimeout(function(){document.getElementById("sss").innerHTML="";let t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://pg.mograsys.com/ihs_test/transaction/"),t.setAttribute("name","form2");let a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("name","amount"),a.setAttribute("value",e.data[0].tran_amt);let o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","OrdNo"),o.setAttribute("value",s);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","enroll_number"),r.setAttribute("value",localStorage.getItem("enroll_number"));let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value","Canteen Payment");let l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","parentID"),l.setAttribute("value",localStorage.getItem("username"));let d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","studName"),d.setAttribute("value",localStorage.getItem("sims_student_passport_fullname_new"));let _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","acadYear"),_.setAttribute("value",localStorage.getItem("sims_acad_yr"));let c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","parentName"),c.setAttribute("value",e.userDetails.comn_user_alias);let u=document.createElement("input");u.setAttribute("type","text"),u.setAttribute("name","parentEmail"),u.setAttribute("value",e.userDetails.comn_user_email);let p=document.createElement("input");p.setAttribute("type","text"),p.setAttribute("name","parentPhNo"),p.setAttribute("value",e.userDetails.comn_user_ph_no);let g=document.createElement("input");g.setAttribute("type","text"),g.setAttribute("name","auth"),g.setAttribute("value",n.defaults.headers.common.Authorization);let h=document.createElement("input");h.setAttribute("type","text"),h.setAttribute("name","schoolId"),h.setAttribute("value",n.defaults.headers.common.schoolId);let f=document.createElement("input");f.setAttribute("type","text"),f.setAttribute("name","studClass"),f.setAttribute("value",localStorage.getItem("sims_grade_name_en")+" "+localStorage.getItem("sims_section_name_en"));let b=document.createElement("input");b.setAttribute("type","text"),b.setAttribute("name","studtransDate"),b.setAttribute("value",m);let y=document.createElement("input");y.setAttribute("type","submit"),y.setAttribute("value","Submit"),y.setAttribute("name","Submit1"),t.appendChild(a),t.appendChild(o),t.appendChild(r),t.appendChild(i),t.appendChild(l),t.appendChild(d),t.appendChild(_),t.appendChild(_),t.appendChild(c),t.appendChild(u),t.appendChild(p),t.appendChild(g),t.appendChild(h),t.appendChild(f),t.appendChild(b),t.appendChild(y),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600):swal({title:"",text:"Something went wrong. Please try again",showCloseButton:!0,height:300,width:380})}):"1"==o.data[0].flag?setTimeout(function(){document.getElementById("sss").innerHTML="";let t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://pg.mograsys.com/ihs_test/transaction/"),t.setAttribute("name","form2");let a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("name","amount"),a.setAttribute("value",e.data[0].tran_amt);let s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","OrdNo"),s.setAttribute("value",o.data[0].can_prov_no);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","enroll_number"),r.setAttribute("value",localStorage.getItem("enroll_number"));let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value","Canteen Payment");let l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","parentID"),l.setAttribute("value",localStorage.getItem("username"));let d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","studName"),d.setAttribute("value",localStorage.getItem("sims_student_passport_fullname_new"));let _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","acadYear"),_.setAttribute("value",localStorage.getItem("sims_acad_yr"));let c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","parentName"),c.setAttribute("value",e.userDetails.comn_user_alias);let u=document.createElement("input");u.setAttribute("type","text"),u.setAttribute("name","parentEmail"),u.setAttribute("value",e.userDetails.comn_user_email);let p=document.createElement("input");p.setAttribute("type","text"),p.setAttribute("name","parentPhNo"),p.setAttribute("value",e.userDetails.comn_user_ph_no);let g=document.createElement("input");g.setAttribute("type","text"),g.setAttribute("name","auth"),g.setAttribute("value",n.defaults.headers.common.Authorization);let h=document.createElement("input");h.setAttribute("type","text"),h.setAttribute("name","schoolId"),h.setAttribute("value",n.defaults.headers.common.schoolId);let f=document.createElement("input");f.setAttribute("type","text"),f.setAttribute("name","studClass"),f.setAttribute("value",localStorage.getItem("sims_grade_name_en")+" "+localStorage.getItem("sims_section_name_en"));let b=document.createElement("input");b.setAttribute("type","text"),b.setAttribute("name","studtransDate"),b.setAttribute("value",m);let y=document.createElement("input");y.setAttribute("type","text"),y.setAttribute("name","schoolTelNo"),y.setAttribute("value",e.userDetails.comp_tel_no);let v=document.createElement("input");v.setAttribute("type","text"),v.setAttribute("name","schoolEmail"),v.setAttribute("value",e.userDetails.comp_e_mail);let k=document.createElement("input");k.setAttribute("type","submit"),k.setAttribute("value","Submit"),k.setAttribute("name","Submit1"),t.appendChild(a),t.appendChild(s),t.appendChild(r),t.appendChild(i),t.appendChild(l),t.appendChild(d),t.appendChild(_),t.appendChild(_),t.appendChild(c),t.appendChild(u),t.appendChild(p),t.appendChild(g),t.appendChild(h),t.appendChild(f),t.appendChild(b),t.appendChild(y),t.appendChild(v),t.appendChild(k),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600):swal({title:"",text:"Something went wrong",imageUrl:"assets/img/close.png",showCloseButton:!0,height:300,width:380})})}else $("#loader").modal("hide")}):(swal({title:"",text:"Please select Alteast one menu item",showCloseButton:!0,height:300,width:380}),$("#loader").modal("hide"))},e.removeItemFromCart=function(t){for(let a=0;a0?(e.attendance=t.data,e.attendance_copy=angular.copy(e.attendance),e.operation=!0,e.totalstudents=e.attendance.length,e.hidesummary=!1):swal({title:"Alert",text:" Data is not Available for selected date",showCloseButton:!0,width:300,height:200}),console.log(e.attendance)})},e.size=function(t){e.itemsPerPage=t},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-50&&(t=e.pageCount()-50+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.ddata.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0&&(e.meritdata=t.data)})},e.meritModal_M=function(t,a){e.merit1=!1,e.merit2=!1,e.back=!0,e.merit3=!0,$("#merit_demerit_main").modal("show"),n.get(e.apiUrl+"api/MeritDemeritForm/getMeritDemerit?cur_code="+e.current_student_info.cur_code+"&academic_year="+e.current_student_info.academic_year+"&grade_code="+e.current_student_info.grade_code+"§ion_code="+e.current_student_info.section_code+"&mom_start_date= &mom_end_date= &search="+t.sims_enroll_number+"&var=2").then(function(t){t.data.length>0&&(e.meritdata=t.data,e.meritdemeritwise(a))})},e.meritsubModal=function(t){e.merit1=!0,e.merit2=!0,e.merit3=!0,e.back=!1,$("#only_merit").modal("show"),n.get(e.apiUrl+"api/MeritDemeritForm/getMeritDemeritSubModel?cur_code="+e.current_student_info.cur_code+"&academic_year="+e.current_student_info.academic_year+"&grade_code="+e.current_student_info.grade_code+"§ion_code="+e.current_student_info.section_code+"&search= &date="+t.sims_detention_transaction_created_date+"&trans_number="+t.sims_detention_transaction_number).then(function(t){t.data.length>0&&(e.meritsubdata=t.data)})},e.meritdemeritwise=function(t){var a;e.ddata=[],"M"==t?(a="Merit",n.get(e.apiUrl+"api/MeritDemeritForm/getMeritDemeritParameter?meritdemerit="+a).then(function(t){e.parameter_data=t.data;for(var a=0;a=new Date(t)&&new Date(moment(e.ddata_copy[s].sims_detention_transaction_created_date,"DD-MM-YYYY").format("YYYY-MM-DD"))<=new Date(a)&&e.ddata_new.push(e.ddata_copy[s]);e.ddata=e.ddata_new},e.back_data=function(){e.merit1=!1,e.short_data=!1,e.merit3=!1,e.back=!0,e.merit2=!1},e.modal_cancel=function(){e.merit3=!0,e.short_data=!0},e.save_comment=function(){n.post(e.apiUrl+"api/attendance/markAttendanceComment_update?enroll="+e.copy_comment.sims_student_enroll+"&date="+e.edt.attDate+"&comment="+e.copy_comment.sims_attendance_day_comment).then(function(e){$("#comment_dailog").modal("hide")})},a.globals.studentsLoaded&&e.getalldata(),e.$on("student_change",function(){e.getalldata()})}])}(),function(){"use strict";angular.module("sims.module.calendar").controller("AcademicCalendarController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.eventsColorList=[],e.eventsList=[],e.getdataall=function(){var t=$("#scheduler").data("kendoScheduler");t&&(t.destroy(),$("#scheduler").empty()),n.get(r.apiUrl+"api/student/getStudentGradeSection?enroll_num="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.current_student_info=t.data[0],e.get_acad_calender()})},e.get_acad_calender=function(){n.get(r.apiUrl+"api/acadCalender/getCalender?section="+e.current_student_info.section_code+"&grade="+e.current_student_info.grade_code+"&sims_student_enroll_number="+a.globals.currentStudent.sims_student_enroll_number+"&sims_acad_yr="+e.current_student_info.academic_year).then(function(t){e.display=!0,e.obj=t.data,e.eventsList=[],e.colorData=[];for(let a=0;aDescription'),o.forEach(function(t){let a=e.attachments(t),s=t.uid;$(".k-task[data-uid='"+s+"']").parent().after(`\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t${t.description}\n\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\tAttachments: \n\t\t\t\t\t\t\t\t\t\t\t\t${a}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t`)}))}}),e.link=function(t){if(e.a_url="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(let t=0;t{console.log(t.agenda_doc_list);let a="";return Object.values(e.eventsList).forEach(s=>{s.Title==t.title&&Object.values(t.agenda_doc_list).forEach(t=>{Object.values(s.agenda_doc_list).forEach(s=>{if(""!=s.sims_agenda_filename&&s.sims_agenda_number==t.sims_agenda_number&&s.sims_agenda_filename==t.sims_agenda_filename){let t=e.link(s.sims_agenda_filename);a+=`\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t${s.sims_agenda_filename_en}\n\t\t\t\t\t\t\t`}})})}),a})})},n.get(r.apiUrl+"api/acadCalender/getColors").then(function(t){e.obj=t.data,e.eventsColorList=[];for(let a=0;a0&&(e.std=t.data[0]),console.log(t.data)}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.obj.sims_prog_card_config_code=e.term_lst[0].sims_term_code,e.Getinfo6(e.term_lst[0].sims_term_code)})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}),e.Getinfo6=function(t,o){if("1"==e.sims_report_code_kg){if("01"==e.std.sims_grade_code||"02"==e.std.sims_grade_code||"15"==e.std.sims_grade_code)if(void 0!=t){e.report_name="Gradebook.GBR002AHIS_KG_Front_2020";var i={},l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_details:a.globals.currentStudent.sims_cur_code,grade_details:e.std.sims_grade_code,section_details:e.std.sims_section_code,term_details:t,search:a.globals.currentStudent.enroll_number},$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)}else swal({title:"Alert",text:"Report Card is Blocked"})}else if("2"==e.sims_report_code_kg){if("01"==e.std.sims_grade_code||"02"==e.std.sims_grade_code||"15"==e.std.sims_grade_code)if(void 0!=t){e.report_name="Gradebook.GBR002AHIS_KG_Back_2020";i={},l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";i={acad_year:e.obj.academic_year,cur_details:a.globals.currentStudent.sims_cur_code,grade_details:e.std.sims_grade_code,section_details:e.std.sims_section_code,term_details:t,search:a.globals.currentStudent.enroll_number},$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:i}),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)}else swal({title:"Alert",text:"Report Card is Blocked "})}else{var d={opr:"Q",sims_academic_year:e.obj.academic_year,sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_grade_code:e.std.sims_grade_code,sims_section_code:e.std.sims_section_code,sims_term_code:e.obj.sims_prog_card_config_code};n.post(r.apiUrl+"api/reportcardnew/ReportCommon",d).then(function(t){e.cat_name_lst=[],t.data.table.length>0&&(e.cat_name_lst=t.data.table),console.log(e.cat_name_lst)})}},e.reportcardLevelChange=function(t){if(e.reportShow=!0,"03"==e.std.sims_grade_code||"04"==e.std.sims_grade_code||"05"==e.std.sims_grade_code){e.report_name="Gradebook.GBR002AHIS_1to3_2021";var o,i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:e.obj.sims_prog_card_config_code,search:a.globals.currentStudent.enroll_number,student_status:"1",scheme_code:"1"},console.log("para",o),$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:o}),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)}else n.get(r.apiUrl+"api/reportcardnew/getReportName?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"&term="+t.sims_prog_card_config_code).then(function(t){e.report_name=t.data;var o;if("tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)i="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else var i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_details:e.std.sims_grade_code,section_details:e.std.sims_section_code,term_details:e.obj.sims_prog_card_config_code,search:a.globals.currentStudent.enroll_number,Category:e.obj.sims_level_code},$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:o}),setTimeout(function(){$("#reportViewer4").data("telerik_ReportViewer").commands.togglePrintPreview.exec()},1e3),e.reportShow=!0,e.rowshow=!1,setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)})}},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.gallery").controller("SetTargetGradeCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.showSubjectList=!0;var d=new Date,_=d.getMonth()+1,c=d.getDate();_<10&&(_="0"+_),c<10&&(c="0"+c),e.obj6=[],e.getData=function(){e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=a.globals.currentStudent.sims_acad_yr,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,n.get(r.apiUrl+"api/attendance/getSetTargetGradeMark?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old).then(function(t){e.obj6=t.data,console.log("GetSubject",e.obj6),n.get(r.apiUrl+"api/attendance/getstudentgradeSubjectflag?sims_enroll_number="+e.enrollno+"&cur_code="+e.cur_code+"&ac_year="+e.ac_year+"&grade_code="+e.grade+"§ion_code="+e.section_code).then(function(t){e.markflag=t.data,console.log("markflag",e.markflag)})})},e.getgrade_variation=function(t,a){n.get(r.apiUrl+"api/attendance/Getgrade_variation?sims_enroll_number="+e.enrollno+"&cur_code="+e.cur_code+"&ac_year="+e.ac_year+"&subject_code="+t).then(function(s){if(e.obj_gradevariation=s.data,console.log("obj_gradevariation",e.obj_gradevariation),e.obj_gradevariation.length>0)if(e.variation_minus=e.obj_gradevariation[0].sims_grade_variation_minus,e.variation_plus=e.obj_gradevariation[0].sims_grade_variation_plus,console.log("variation_plus",e.variation_plus),console.log("variation_minus",e.variation_minus),parseFloat(e.variation_minus)<=parseFloat(a)&&parseFloat(e.variation_plus)>=parseFloat(a));else{swal({title:"Target grade are out or variation limit set by school",text:"Allowed target variation from school suggested target is "+e.variation_minus+" and "+e.variation_plus,showCloseButton:!0,width:450}),a=0;for(var o=0;o100){swal({title:"You can select a target up to 100.",text:"",showCloseButton:!0,width:450});for(o=0;o0){for(var a=0;a0)if(e.variation_minus=e.obj_gradevariation[0].sims_grade_variation_minus,e.variation_plus=e.obj_gradevariation[0].sims_grade_variation_plus,console.log("variation_plus",e.variation_plus),console.log("variation_minus",e.variation_minus),parseFloat(e.variation_minus)<=parseFloat(s)&&parseFloat(e.variation_plus)>=parseFloat(s));else{swal({title:"Target grade are out or variation limit set by school",text:"Allowed target variation from school suggested target is "+e.variation_minus+" and "+e.variation_plus,showCloseButton:!0,width:450}),s=0;for(var n=0;n0){for(var a=0;a0&&(setTimeout(function(){$(".preloader").fadeOut("slow")},1500),e.portal_data=t.data,console.log(e.portal_data[0].sims_appl_form_field_value2),window.open(e.portal_data[0].sims_appl_form_field_value2,"_blank"))}),t.go("main.dashboard")}])}(),function(){"use strict";var e=angular.module("sims.module.email");e.controller("CommunicationHistoryController",["$scope","$state","$rootScope","$timeout","$stateParams","gettextCatalog","$http","ENV","$interval","AuthenticationService",function(e,t,a,s,o,n,r,i,l,d){e.display=!1,e.eDetail=!1,e.email=!0,e.itemsPerPage=10,e.currentPage=0,e.items=[],e.size=function(t){e.itemsPerPage=t},r.get(i.apiUrl+"api/parentportal/Communication/GetAllPortalCommunication?user_code_from="+a.globals.currentUser.username).then(function(t){e.display=!0,e.items=t.data,$(".preloader").fadeOut("slow"),console.log(e.items)},function(t){0==t.status&&($(".preloader").fadeOut("slow"),e.items=JSON.parse(window.localStorage.Emails),console.log(e.items))}),e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.items.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0)for(var s=0;s>>0));if("png"==s.toLowerCase()||"jpg"==s.toLowerCase()||"jpeg"==s.toLowerCase())cordova.InAppBrowser.open(t,"_blank","location=no");else cordova.InAppBrowser.open("https://docs.google.com/viewer?url="+t+"&embedded=false","_blank","location=no")}},o.flag?e.get(a.globals.emailMsg):e.subject_msg=void 0,e.back=function(){e.eDetail=!1,e.email=!0}}]),e.directive("compile",["$compile",function(e){return function(t,a,s){t.$watch(function(e){return e.$eval(s.compile)},function(s){a.html(s),e(a.contents())(t)})}}])}(),function(){"use strict";angular.module("sims.module.suggestion").controller("QuestionbankCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){var i=a.globals.currentUser.username;e.btn_sub=!0,e.itemsPerPage=1,e.currentPage=0,e.size=function(t){e.itemsPerPage=t},e.urlimg="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/Images/schoollogo/",n.get(r.apiUrl+"api/surveyselection/Get_Question_for_user?user_code="+i).then(function(t){e.questionbank_Details=t.data,e.questionbank_Details.length>0?e.questionbank_detail_table=!0:(e.questionbank_detail_table=!1,swal({text:"Data Not Found",width:250,height:250,showCloseButton:!0}))}),e.Start_questionbank_btn_click=function(t){e.questionbank_code=t.sims_questionbank_code,n.get(r.apiUrl+"api/surveyselection/get_questionbank_details_check?sims_questionbank_code="+t.sims_questionbank_code+"&sims_user_code="+i).then(function(a){e.questionbank_details_check=a.data,1==e.questionbank_details_check?swal({title:"Alert",text:"Sorry, you have already completed this questionbank",width:300,height:250,showCloseButton:!0}):n.get(r.apiUrl+"api/surveyselection/get_questionbank_details_quetions?sims_questionbank_code="+t.sims_questionbank_code).then(function(a){e.start_questionbank=a.data,void 0!=window.localStorage["questionbank"+e.questionbank_code]&&(e.start_questionbank=JSON.parse(window.localStorage["questionbank"+e.questionbank_code])),e.ques_count=e.start_questionbank.length,e.start_questionbank.length>0?(e.sims_questionbank_type=e.start_questionbank[0].sims_questionbank_type,e.sims_questionbank_no_of_question_available=e.start_questionbank[0].sims_questionbank_no_of_question_available,e.sims_questionbank_no_of_question_to_attempt=e.start_questionbank[0].sims_questionbank_no_of_question_to_attempt,e.sims_questionbank_subject=t.sims_questionbank_subject,e.sims_questionbank_desc_en=t.sims_questionbank_desc_en,e.popup_start_btn_click()):(e.start_questionbank_table=!1,swal({title:"Alert",text:"Sorry,questions are not available for this questionbank",width:350,height:250,showCloseButton:!0}))})})},e.Prevoius_btn_click=function(){0!=e.question_counter&&(e.question_counter=e.question_counter-1,e.binding_object=e.start_questionbank[e.question_counter],e.btn_next=!1,e.btn_sub=!0,e.question_counter1=e.question_counter1-1),0==e.question_counter&&(e.btn_pre=!0),e.SubmitObject=[],e.progress_counter=0;for(var t=0;t0?n.post(r.apiUrl+"api/surveyselection/CUD_PP_questionbank",e.SenddataObject).then(function(t){e.questionbankresult=t.data,1==e.questionbankresult?(e.questionbank_detail_table=!0,e.start_questionbank_table=!1,e.maxmark1="0%",e.progress_counter="0",swal({title:"Alert",text:"questionbank Submitted Successfully",width:300,height:250,showCloseButton:!0}),window.localStorage.removeItem("questionbank"+e.questionbank_code),e.get_link()):(e.btn_pre=!1,swal({title:"Alert",text:"questionbank Not Submitted",width:300,height:250,showCloseButton:!0}))}):swal({title:"Alert",text:"Select Atleast One Answer Or Back",width:300,height:250,showCloseButton:!0})}})},e.Back_btn_click=function(){e.questionbank_detail_table=!0,e.start_questionbank_table=!1,e.maxmark1="0%",e.progress_counter="0"},e.btn_sub1=!0,e.answer_change=function(){for(var t=0,a=0;ae.pageCount()-20&&(t=e.pageCount()-20+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.start_questionbank.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=e.academic_year,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_abqis_new?academic_year="+e.academic_year+"&parent="+a.globals.currentUser.username).then(function(t){e.grid=[],e.grid.total=0,e.grid.grad_total=0,e.grid.total_bal=0,e.grid.total_pdc=0,e.grid.grad_total1=0,e.show_fee_lst=[];for(var a=0;a0&&("Y"==t.data[0].sims_appl_form_field_value1&&(e.show_school_flg=!0),"Y"==t.data[0].sims_appl_form_field_value2&&(e.show_pay_flg=!0))}),n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0&&(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for seat confirmation.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0)}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data,$("#popover1").popover({content:'

1. You can choose to pay the full amount. Minimum payable is 200 OMR per student. If Transport is selected, minimum deposit of 100 OMR will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 OMR per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" OMR is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 OMR per child and Transport deposit of 100 OMR per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 OMR per child and Transport deposit of 100 OMR per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 OMR per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" OMR is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.trans_change=function(t){for(var a=0;a5&&"4"==e.concession_lst[s].sims_concession_onward_child&&(e.sibling_fee=e.sibling_fee+parseFloat(e.concession_lst[s].sims_concession_discount_value));e.sibling_fee>0?e.sibling_flag=!0:e.sibling_flag=!1,e.trans_fee>0?e.trans_flag=!0:e.trans_flag=!1,e.total_due=e.total_due+parseFloat(e.confirm_lst[a].tution_fee_total)}e.willing?e.confirm_lst.length==a+1&&(e.total_due=e.total_due+e.trans_fee-e.seat_conf_amt-e.sibling_fee-e.seat_trans_amt):e.confirm_lst.length==a+1&&(e.total_due=e.total_due+e.trans_fee-e.sibling_fee)}0==e.chk_flg?(e.paying=!1,e.grad_total=""):e.check_amt()},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?(e.transflg="Transport,",e.paying&&(e.chk_stud(),e.check_amt())):(e.transflg="",t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="",e.chk_stud())},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is OMR 200 per child.
If Transport is selected, minimum transport deposit is OMR 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.chk_inst_m1=!0,e.grad_total=""):e.chk_inst_m1=!1},e.pay_current_year=function(){t.go("main.feeAbq")},e.check_box=function(t){"P"==t?e.paying&&(e.willing=!1,e.chk_stud()):e.willing&&(e.paying=!1,e.grad_total=0,e.fee_amt=0)},e.check_box_chk=function(t){e.dis_submit=t},e.submit_btn=function(t){if(e.dis_submit=!1,t){$("#report_Modal").modal("hide");for(var s=[],o="",i=0;i Dear Parent,
Thank you for filling and submitting the Seat Confirmation Form. Please pay the fees at school. Please note that seat for next year will be confirmed only upon
a) Payment of seat confirmation fee 200 OMR per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+"OMR is paid full.",imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the 2021-22 seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_dmc",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter",function(e,t,a,s,o,n,r,i){function l(t,a,s,o){var n="FAGNELARCM|"+t+"|NA|"+a+"|NA|NA|NA|INR|NA|R|fagnelarcm|NA|NA|F|"+s+"|"+o+"|A3|A4|A5|A6|A7|NA",r=CryptoJS.HmacSHA256(n,"2YuYd5GQSlUc3dih9dnBw4i11OZ5n7Qz"),i=n+"|"+(r=r.toString().toUpperCase());bdPayment.initialize({msg:i,callbackUrl:"https://gateway1.mograsys.com/facp/Response.php",options:{enableChildWindowPosting:!0,enablePaymentRetry:!0,retry_attempt_count:2}}),document.addEventListener("readystatechange",function(t){var a;"complete"===t.target.readyState?((a=document.getElementById("pay")).disabled=!1,a.value="Pay",a.classList.remove("disabled"),e.launchMyAppHere("Approved")):((a=document.getElementById("pay")).disabled=!1,a.value="Pay",a.classList.remove("disabled"),e.launchMyAppHere("Cancelled"))})}e.url_doc="https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/Docs/Student",e.apiurl="https://oa.mograsys.com/"+n.defaults.headers.common.schoolId+"/",e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,"modern"==e.school_id||"democollege"==e.school_id?e.flg_modern=!0:e.flg_sem4=!0,e.username=a.globals.currentUser.username,n.get(e.apiurl+"api/Comn/GetIncomeSvcc").then(function(t){e.income_lst=t.data}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Re-Registration PPN Fee Show").then(function(t){t.data.length>0&&"Y"==t.data[0].sims_appl_parameter&&(e.show_fee_table=!0)}),e.show_application_fee=!1,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Re-Registration Application Fee").then(function(t){t.data.length>0&&"Y"==t.data[0].sims_appl_parameter&&(e.show_application_fee=!0)}),e.exam=[];var t={opr:"J",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/re_regi_Common",t).then(function(t){e.fees_lst1=[],t.data.table.length>0&&(e.fees_lst1=t.data.table,e.exam.sims_student_exam_form_fee_total_amount1=e.fees_lst1[0].expected_Fee)});var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)});o={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en):e.exam=[]}),n.post(r.apiUrl+"api/parentportal/re_regi_Common",o).then(function(t){if(t.data.table.length>0){if(e.confirm_lst=t.data.table,e.confirm_lst.length>0&&(e.exam.sims_student_exam_student_email=e.confirm_lst[0].std_email,e.exam.sims_student_exam_student_contact_number=e.confirm_lst[0].std_mobile,e.exam.sims_student_exam_parent_email=e.confirm_lst[0].sims_parent_father_email,e.exam.sims_student_exam_parent_contact_number=e.confirm_lst[0].sims_parent_father_mobile,e.exam.sims_student_attribute6=e.confirm_lst[0].sims_student_attribute6,e.exam.sims_student_national_id=e.confirm_lst[0].sims_student_national_id,e.UploadDocument(),""!=e.confirm_lst[0].sims_subject_group&&(e.exam.sims_cur_level_grade_subcategory_code=e.confirm_lst[0].sims_subject_group,e.exam.sims_cur_level_grade_subcategory_code1=e.confirm_lst[0].sims_subject_group1,e.sub_cat_change()),"7"==e.confirm_lst[0].status||!0===e.show_fee_table)){e.show_fee_table=!0;var s={opr:"G",sims_cur_code:e.confirm_lst[0].sims_cur_code,sims_enroll_number:e.confirm_lst[0].sims_student_enroll_number,sims_academic_year:e.confirm_lst[0].sims_academic_year,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:e.confirm_lst[0].sims_grade_code,sims_section_code:e.confirm_lst[0].next_section_code,sims_subject_fee_category:e.confirm_lst[0].sims_subject_fee_category,fee_partial_payment:"Y"===e.confirm_lst[0].sims_subject_fee_partial_payment?"P1":""};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){if(t.data.table.length>0){var a=new Map;e.fees_lst=[];var s=0;t.data.table.forEach(function(t){if(a.has(t.sims_fee_code))for(var o=0;o0?(e.sub_cat_list=t.data.table,void 0==e.exam.sims_cur_level_grade_subcategory_code&&(e.exam.sims_cur_level_grade_subcategory_code=e.sub_cat_list[0].sims_cur_level_grade_subcategory_code,e.sub_cat_change())):e.sub_cat_list=[]});s={opr:"B",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_term_code:"4"};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){t.data.table.length>0?(e.sub_cat_list1=t.data.table,void 0==e.exam.sims_cur_level_grade_subcategory_code1&&(e.exam.sims_cur_level_grade_subcategory_code1=e.sub_cat_list1[0].sims_cur_level_grade_subcategory_code)):e.sub_cat_list1=[]})}}),e.UploadDocument=function(t){n.get(r.apiUrl+"api/common/AdmissionDashboard/GetCriteriaNameNEw?academic_year="+e.confirm_lst[0].sims_academic_year+"&grade="+e.confirm_lst[0].next_grade_code+"&enroll="+e.confirm_lst[0].sims_student_enroll_number).then(function(t){e.Upload_doc_datails=t.data;for(var a=0;a0){var a=new Map;e.subject_lstt1=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt1.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&e.sublist.push(t)}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt1.push(t),t.sublist=[],t.sublist.push(t))})}else e.subject_lstt1=[]})},e.sub_cat_change=function(){var t={opr:"Q",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:a.globals.currentStudent.sims_grade_code,sims_cur_level_grade_subcategory_code:e.exam.sims_cur_level_grade_subcategory_code};n.post(r.apiUrl+"api/parentportal/re_regi_Common",t).then(function(t){if(t.data.table.length>0){var a=new Map;e.subject_lstt=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&("Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),e.sublist.push(t))}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt.push(t),t.sublist=[],"Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),t.sublist.push(t))})}else e.subject_lstt=[];e.sub_cat_change_new()})},e.launchMyAppHere=function(t){if("Approved"==t){swal({title:"Alert",text:"Payment Completed Successfully. It will be reflected in your account once confirmed by accounts department.",imageUrl:"assets/img/check.png"});var a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"SUCCESS"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else if("Failed"==t){a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Failed"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data}),swal({title:"Alert",text:"Payment Failed. Please try again.",width:380,height:200})}else if("Cancelled"==t){swal({title:"Alert",text:"Payment was Cancelled.",width:380,height:200});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Cancelled"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else{swal({title:"Alert",text:t,imageUrl:"assets/img/check.png"});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"ERROR"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}},e.check_click=function(t,a){for(var s=0,o=0;oparseFloat(t.expected_Fee))swal({title:"",text:"Amount should not less than "+t.sims_fee_installment_min_amount}),t.expected_Fee=t.expected_Fee1;else if(parseFloat(t.expected_Fee1)2097152&&(e.filesize=!1,e.edt1.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 2MB.",imageUrl:"assets/img/notification-alert.png"}))})},e.save=function(t){if(t){for(var s=[],o=0,i=0;i0&&(e.confirm_lst=t.data.table)})}else swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"})})}else swal({title:"Alert",text:"Fill all required field",imageUrl:"assets/img/notification-alert.png"})},$(document).ready(function(){}),e.uploadClick=function(t){e.filesize=!0,e.edt1=t,e.edt1.photoStatus=!0,e.ins=!1,d=new FormData},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_modern",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location",function(e,t,a,s,o,n,r,i){var l=i.search();jQuery.isEmptyObject(l)||swal({title:"Alert",text:l.res+". Your Transaction Number is "+l.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeCof_m","_self"),"Success"==l.res&&e.getFeesDetails())}),e.getFeesDetails=function(){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.previous_fee_amount=0,e.IP={StudCurr:a.globals.currentStudent.sims_cur_code,StudAcademic:e.academic_year,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){for(var s=0;s0&&"Y"==t.data[0].sims_appl_parameter&&(e.show_fee_table=!0)}),e.exam=[];var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)});var i={opr:"V",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",i).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))});var l={opr:"VV",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",l).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflagnew=parseInt(a)+1,console.log("InstallmentStatus",a),console.log("Installmentflagnew",e.Installmentflagnew)});var d={opr:"WW",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",d).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflag=parseInt(a)+parseInt(e.Installmentflagnew),console.log("InstallmentStatus2",a),console.log("Installmentflag",e.Installmentflag)});o={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,console.log("$scope.student_data_lst",e.student_data_lst),e.Mob_No=e.student_data_lst[0].sims_student_exam_student_contact_number,e.email_Id=e.student_data_lst[0].comn_user_email):e.exam=[]}),n.post(r.apiUrl+"api/parentportal/re_regi_Common",o).then(function(t){if(t.data.table.length>0){if(e.confirm_lst=t.data.table,console.log(e.confirm_lst),e.confirm_lst.length>0&&(e.exam.fee_category_name=e.confirm_lst[0].fee_category_name,e.exam.sims_student_exam_permanent_student_address=e.confirm_lst[0].sims_parent_father_summary_address,e.exam.sims_student_exam_student_address=e.confirm_lst[0].sims_parent_father_summary_address_local_language,e.exam.sims_student_exam_student_email=e.confirm_lst[0].std_email,e.exam.sims_student_exam_student_contact_number=e.confirm_lst[0].sims_student_emergency_contact_number1,e.exam.sims_student_exam_student_email=e.confirm_lst[0].std_email,e.exam.sims_student_exam_student_contact_number=e.confirm_lst[0].sims_student_emergency_contact_number1,e.exam.caste=e.confirm_lst[0].caste,e.exam.sub_caste=e.confirm_lst[0].sub_caste,e.exam.sims_student_exam_student_eligibility_no=e.confirm_lst[0].sims_student_exam_student_eligibility_no,""!=e.confirm_lst[0].sims_subject_group&&(e.exam.sims_cur_level_grade_subcategory_code=e.confirm_lst[0].sims_subject_group,e.exam.sims_cur_level_grade_subcategory_code1=e.confirm_lst[0].sims_subject_group1,e.sub_cat_change()),"7"==e.confirm_lst[0].status||"4"==e.confirm_lst[0].status||!0===e.show_fee_table)){e.show_fee_table=!0;var s={opr:"G",sims_cur_code:e.confirm_lst[0].sims_cur_code,sims_enroll_number:e.confirm_lst[0].sims_student_enroll_number,sims_academic_year:e.confirm_lst[0].sims_academic_year,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:e.confirm_lst[0].sims_grade_code,sims_section_code:e.confirm_lst[0].next_section_code,sims_subject_fee_category:e.confirm_lst[0].sims_subject_fee_category,fee_partial_payment:"Y"===e.confirm_lst[0].sims_subject_fee_partial_payment?"P1":""};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){if(t.data.table.length>0){var a=new Map;e.fees_lst=[];var s=0;t.data.table.forEach(function(t){if(a.has(t.sims_fee_code))for(var o=0;o0?(e.sub_cat_list=t.data.table,void 0==e.exam.sims_cur_level_grade_subcategory_code&&(e.exam.sims_cur_level_grade_subcategory_code=e.sub_cat_list[0].sims_cur_level_grade_subcategory_code,e.sub_cat_change())):e.sub_cat_list=[]});s={opr:"B",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:parseInt(e.academic_year)+1,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_term_code:"fy"==e.confirm_lst[0].sims_grade_annual_report?"4":"6"};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){t.data.table.length>0?(e.sub_cat_list1=t.data.table,void 0!=e.exam.sims_cur_level_grade_subcategory_code1&&""!=e.exam.sims_cur_level_grade_subcategory_code1||(e.exam.sims_cur_level_grade_subcategory_code1=e.sub_cat_list1[0].sims_cur_level_grade_subcategory_code)):e.sub_cat_list1=[]})}}),e.ReportExamRevaluationForm=function(t){$("#surmodasl").modal("show");var o="",i={},l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";"A"==t?(o="SimsReports.Sims.SMR207_SY,SimsReports",i={cur_code:a.globals.currentStudent.sims_cur_code,acad_year:parseInt(e.academic_year)+1,grade_code:e.confirm_lst[0].next_grade_code,section_code:e.confirm_lst[0].next_section_code,term_code:"fy"==e.confirm_lst[0].sims_grade_annual_report?"3":"5",search:e.confirm_lst[0].sims_student_enroll_number,doc_code:e.confirm_lst[0].doc_no}):(o="SimsReports.Sims.SIMR51ProModern,SimsReports",i={fee_rec_no:e.confirm_lst[0].doc_no,search:e.confirm_lst[0].sims_student_enroll_number}),$("#reportViewer2").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer2").data("telerik_ReportViewer").reportSource({report:o,parameters:i}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},100)},e.paymentTransaction=function(){for(var t=[],s=0,o=0;o0&&(a.setAttribute("action",t.data.table[0].payment_url),console.log("payment URL",t.data.table[0].payment_url)),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.exam.sims_student_exam_form_fee_total_amount);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.Mob_No);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.email_Id);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.studnamefull);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.confirm_lst[0].next_grade);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","payflag"),_.setAttribute("value",e.Installmentflag);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","paymode"),c.setAttribute("value","Current year Fee");var m=document.createElement("input");m.setAttribute("type","submit"),m.setAttribute("value","Submit"),m.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()})}},e.sub_cat_change_new=function(){for(var t="",s=0;s0){var a=new Map;e.subject_lstt1=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt1.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&("Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),e.sublist.push(t))}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt1.push(t),t.sublist=[],"Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),t.sublist.push(t))}),console.log(e.subject_lstt1)}else e.subject_lstt1=[]})},e.sub_cat_change=function(){var t={opr:"Q",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:parseInt(e.academic_year)+1,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:e.confirm_lst[0].sims_grade_code,sims_cur_level_grade_subcategory_code:e.exam.sims_cur_level_grade_subcategory_code};n.post(r.apiUrl+"api/parentportal/re_regi_Common",t).then(function(t){if(t.data.table.length>0){var a=new Map;e.subject_lstt=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&("Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),e.sublist.push(t))}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt.push(t),t.sublist=[],"Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),t.sublist.push(t))}),console.log(e.subject_lstt)}else e.subject_lstt=[];e.sub_cat_change_new()})},e.previous_fee_pay=function(){t.go("main.feemod")},e.check_click=function(t,a){for(var s=0,o=0;oparseFloat(t.expected_Fee))swal({title:"",text:"Amount should not less than "+t.sims_fee_installment_min_amount}),t.expected_Fee=t.expected_Fee1;else if(parseFloat(t.expected_Fee1)0)i!=parseInt(e.subject_lstt1[0].sims_cur_level_grade_subcategory_subjectcount)&&"Y"===e.confirm_lst[0].pg_flg&&(e.flg_sub=!0,swal({title:"Alert",text:"Select aleast "+e.subject_lstt1[0].sims_cur_level_grade_subcategory_subjectcount+" subject",showCloseButton:!0,width:450}));!1===e.flg_sub&&n.post(r.apiUrl+"api/parentportal/re_regi_CommonList",s).then(function(t){if(t.data){swal({title:"Alert",text:"Your Application is Processed for Faculty Clerk And Vice Principal Approval.",imageUrl:"assets/img/check.png"});var s=[],o={opr:"H",sims_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_permanent_student_address:e.exam.sims_student_exam_permanent_student_address,sims_student_exam_student_address:e.exam.sims_student_exam_student_address,sims_student_exam_student_contact_number:e.exam.sims_student_exam_student_contact_number,sims_student_exam_student_email:e.exam.sims_student_exam_student_email,caste:e.exam.caste,sub_caste:e.exam.sub_caste};s.push(o),n.post(r.apiUrl+"api/parentportal/re_regi_CommonList",s).then(function(e){})}else swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"})})}},$(document).ready(function(){}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_leams",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.today_date=moment(new Date).format("DD-MM-YYYY"),e.already_flg=!1,e.willstatus=!1,e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,e.username=a.globals.currentUser.username;var t=i.search();jQuery.isEmptyObject(t)||swal({title:"Alert",text:t.res+". Your Transaction Number is "+t.temp_dd_fee_transaction_id},function(a){!0===a&&(window.open("https://"+n.defaults.headers.common.schoolId+".leamseducation.com/ppn/#/main/feeLeams","_self"),"Success"==t.res&&e.goto_history())}),n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0?(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for Re-Registration Form.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0):e.already_flg1=!1}),e.min_amount=0,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCofL&sims_appl_form_field=Payment Amount").then(function(t){t.data.length>0&&(e.min_amount=parseFloat(t.data[0].sims_appl_parameter))}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Re-Reg OB Calculation Mode").then(function(t){if(t.data.length>0){e.OB_Calculation_Mode=t.data;for(var a=0;e.OB_Calculation_Mode.length>a;a++)"A"==e.OB_Calculation_Mode[a].sims_appl_parameter&&(e.obdate=moment(new Date).format("DD/MM/YYYY")),"M"==e.OB_Calculation_Mode[a].sims_appl_parameter&&(e.obdate=e.OB_Calculation_Mode[a].sims_appl_form_field_value3)}else e.obdate=moment(new Date).format("DD/MM/YYYY");console.log(e.OB_Calculation_Mode)}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data;for(var a=0;a 1. You can choose to pay the full amount. Minimum payable is 200 AED per student. If Transport is selected, minimum deposit of 100 AED will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" AED is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 AED per child and Transport deposit of 100 AED per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 AED per child and Transport deposit of 100 AED per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_total_balance+" AED is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.balance_due=0,e.trans_change=function(t){for(var a=0;ae.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge),e.grid.grad_due_total<=0?e.payoutstandingbtn_flg=!1:e.payoutstandingbtn_flg=!0,console.log("$scope.grid.grad_due_total",e.grid.grad_due_total)}if(e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0,e.selected_lst.push(t),e.total_due>0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}"1"==t.sims_payment_type&&(e.willing=!0,e.paying=!1)})):(e.willstatus=!0,n.get(r.apiUrl+"api/fees/getStudentConf_leams?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+t.sims_student_enroll_number+"&i=&date="+e.today_date).then(function(a){if(e.confirm_leams=a.data,t.net_total_balance=e.confirm_leams[0].net_total_balance,e.balance_due=parseFloat(t.net_total_balance),t.reG_fee=e.confirm_leams[0].reG_fee,t.reg_fee_code=e.confirm_leams[0].reg_fee_code,t.reg_fee_period=e.confirm_leams[0].reg_fee_period,e.balance_due>e.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge),e.grid.grad_due_total<=0?e.payoutstandingbtn_flg=!1:e.payoutstandingbtn_flg=!0,console.log("$scope.grid.grad_due_total",e.grid.grad_due_total)}e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0;for(var o=0;o0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}else e.willing=!1,e.paying=!1,e.grid.total1=0,e.grid.grad_total=0}))},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?e.paying:(t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="")},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is AED 200 per child.
If Transport is selected, minimum transport deposit is AED 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.grad_total="")},e.pay_current_year=function(){$("#report_Modal").modal("hide");var t=[],s="";e.due_amount=e.confirm_leams[0].net_total_balance;for(var o=0;o Dear Parent,
Thank you for filling and submitting the Re-Registration Form.',imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.pay_ful=function(t){""!=e.confirm_lst[0].sims_parent_father_email?e.pemail=e.confirm_lst[0].sims_parent_father_email:e.pemail="test@leamseducation.com";var s=document.createElement("form");s.setAttribute("method","post"),s.setAttribute("action","https://gateway.leamseducation.com/"+n.defaults.headers.common.schoolId+"/index.php"),s.setAttribute("name","form2");var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","amount"),o.setAttribute("value",e.grid.grad_total);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf1"),r.setAttribute("value",e.username);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","udf2"),i.setAttribute("value","P");var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","trackId"),l.setAttribute("value",e.refNumbertrans);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","email"),d.setAttribute("value",e.pemail);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","enroll"),_.setAttribute("value",a.globals.currentStudent.enroll_number);var c=document.createElement("input");c.setAttribute("type","submit"),c.setAttribute("value","Submit"),c.setAttribute("name","Submit1"),s.appendChild(o),s.appendChild(r),s.appendChild(i),s.appendChild(l),s.appendChild(d),s.appendChild(_),s.appendChild(c),document.getElementById("sss").appendChild(s),document.form2.Submit1.click()},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})},e.check_box=function(t){"P"==t?e.paying&&(e.willstatus=!1,e.willing=!1):e.willing&&(e.paying=!1,e.willstatus=!1,e.grad_total=0,e.fee_amt=0)}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the Next year seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_ahis",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.today_date=moment(new Date).format("DD-MM-YYYY"),e.already_flg=!1,e.willstatus=!1,e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,e.username=a.globals.currentUser.username;var t=i.search();jQuery.isEmptyObject(t)||swal({title:"Alert",text:t.result_msg},function(a){!0===a&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/feeAhis","_self"),"Success"==t.res&&e.goto_history())}),n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0?(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for Re-Registration Form.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0):e.already_flg1=!1}),e.min_amount=0,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCofH&sims_appl_form_field=Payment Amount").then(function(t){t.data.length>0&&(e.min_amount=parseFloat(t.data[0].sims_appl_parameter))}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data;for(var a=0;a 1. You can choose to pay the full amount. Minimum payable is 200 AED per student. If Transport is selected, minimum deposit of 100 AED will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" AED is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 AED per child and Transport deposit of 100 AED per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 AED per child and Transport deposit of 100 AED per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_total_balance+" AED is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.obj=t.data,e.parent_mobile1=e.obj.sims_admission_father_mobile,e.parent_email1=e.obj.sims_admission_father_email,e.parent_name=e.obj.sims_admission_father_full_name,""==e.parent_mobile1||"-"==e.parent_mobile1||null==e.parent_mobile1?e.parent_mobile="97317620820":e.parent_mobile="973"+e.parent_mobile1,""==e.parent_email1||"-"==e.parent_email1||null==e.parent_email1?e.parent_email="info@alhekma.com":e.parent_email=e.parent_email1,console.log("getParentDetail",e.obj)}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Learning Mode").then(function(t){e.Learning_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.balance_due=0,e.trans_change=function(t){for(var a=0;ae.min_amount&&(e.grid.grad_due_total=e.balance_due),e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0,e.selected_lst.push(t),e.total_due>0&&(e.grid.grad_total=e.total_due),"1"==t.sims_payment_type&&(e.willing=!0,e.paying=!1)})):(e.willstatus=!0,n.get(r.apiUrl+"api/fees/getStudentConf_leams?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+t.sims_student_enroll_number+"&i=&date="+e.today_date).then(function(a){e.confirm_leams=a.data,t.net_total_balance=e.confirm_leams[0].net_total_balance,e.balance_due=parseFloat(t.net_total_balance),t.reG_fee=e.confirm_leams[0].reG_fee,t.reg_fee_code=e.confirm_leams[0].reg_fee_code,t.reg_fee_period=e.confirm_leams[0].reg_fee_period,e.balance_due>e.min_amount&&(e.grid.grad_due_total=e.balance_due),e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0;for(var s=0;s0?e.grid.grad_total=e.total_due:(e.willing=!1,e.paying=!1,e.grid.total1=0,e.grid.grad_total=0))}))},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?e.paying:(t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="")},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is AED 200 per child.
If Transport is selected, minimum transport deposit is AED 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.grad_total="")},e.pay_current_year=function(){$("#report_Modal").modal("hide");var t=[],s="";e.due_amount=e.confirm_leams[0].net_total_balance;for(var o=0;o Dear Parent,
Thank you for filling and submitting the Re-Registration Form.',imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.pay_ful=function(t){""!=e.confirm_lst[0].sims_parent_father_email?e.pemail=e.confirm_lst[0].sims_parent_father_email:e.pemail="test@ahis.com";var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","name"),o.setAttribute("value",e.parent_name);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","mobile"),r.setAttribute("value",e.parent_mobile);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","email"),i.setAttribute("value",e.parent_email);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","trackId"),l.setAttribute("value",e.refNumbertrans);var d=document.createElement("input");d.setAttribute("type","submit"),d.setAttribute("value","Submit"),d.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})},e.check_box=function(t){"P"==t?e.paying&&(e.willstatus=!1,e.banking=!1,e.willing=!1,e.paymentmode="O"):"W"==t?e.willing&&(e.paymentmode="S",e.paying=!1,e.banking=!1,e.willstatus=!1,e.grad_total=0,e.fee_amt=0):e.banking&&(e.paymentmode="B",e.paying=!1,e.willing=!1,e.willstatus=!1,e.grad_total=0,e.fee_amt=0)},e.launchMyAppHere=function(t){if("Approved"==t){swal({title:"Alert",text:"Payment Completed Successfully. It will be reflected in your account once confirmed by accounts department.",imageUrl:"assets/img/check.png"});var a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"SUCCESS"};n.post(r.apiUrl+"api/fees/update_doc_Ahis",a).then(function(t){e.msg1=t.data})}else if("Failed"==t){a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Failed"};n.post(r.apiUrl+"api/fees/update_doc_Ahis",a).then(function(t){e.msg1=t.data}),swal({title:"Alert",text:"Payment Failed. Please try again.",width:380,height:200})}else if("Cancelled"==t){swal({title:"Alert",text:"Payment was Cancelled.",width:380,height:200});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Cancelled"};n.post(r.apiUrl+"api/fees/update_doc_Ahis",a).then(function(t){e.msg1=t.data})}else{swal({title:"Alert",text:t,imageUrl:"assets/img/check.png"});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"ERROR"};n.post(r.apiUrl+"api/fees/update_doc_Ahis",a).then(function(t){e.msg1=t.data})}}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the Next year seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_sok",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.today_date=moment(new Date).format("DD-MM-YYYY"),e.already_flg=!1,e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.academic_year=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.username=a.globals.currentUser.username;var t=i.search();if(!jQuery.isEmptyObject(t)){t.status,t.TransactionNo,t.receiptNo;"success"==t.status?swal({title:"Alert",text:"Payement Done Successfully Your Transaction Number is "+t.receiptNo,imageUrl:"assets/img/check.png"},function(e){!0===e&&window.open("http://vision.appsis.co.in/ppn/index.html#/main/feeVis","_self")}):swal({title:"Alert",text:"Some Problem in Payment plz check agian..",width:380,height:200},function(e){!0===e&&window.open("http://vision.appsis.co.in/ppn/index.html#/main/feeVis","_self")})}n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0?(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for Re-Registration Form.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0):e.already_flg1=!1}),e.min_amount=0,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCofL&sims_appl_form_field=Payment Amount").then(function(t){t.data.length>0&&(e.min_amount=parseFloat(t.data[0].sims_appl_parameter))}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data;for(var a=0;a 1. You can choose to pay the full amount. Minimum payable is 200 AED per student. If Transport is selected, minimum deposit of 100 AED will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" AED is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 AED per child and Transport deposit of 100 AED per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 AED per child and Transport deposit of 100 AED per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_total_balance+" AED is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.balance_due=0,e.trans_change=function(t){for(var a=0;ae.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge)}if(e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0,e.selected_lst.push(t),e.total_due>0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}"1"==t.sims_payment_type&&(e.willing=!0,e.paying=!1)}):n.get(r.apiUrl+"api/fees/getStudentConf_leams?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+t.sims_student_enroll_number+"&i=&date="+e.today_date).then(function(a){if(e.confirm_leams=a.data,t.net_total_balance=e.confirm_leams[0].net_total_balance,e.balance_due=parseFloat(t.net_total_balance),t.reG_fee=e.confirm_leams[0].reG_fee,t.reg_fee_code=e.confirm_leams[0].reg_fee_code,t.reg_fee_period=e.confirm_leams[0].reg_fee_period,e.balance_due>e.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge)}e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0;for(var o=0;o0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}else e.willing=!1,e.paying=!1,e.grid.total1=0,e.grid.grad_total=0})},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?e.paying:(t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="")},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is AED 200 per child.
If Transport is selected, minimum transport deposit is AED 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.grad_total="")},e.pay_current_year=function(){$("#report_Modal").modal("hide");var t=[],s="";e.due_amount=e.confirm_leams[0].net_total_balance;for(var o=0;o Dear Parent,
Thank you for filling and submitting the Re-Registration Form.',imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the Next year seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeDvpsController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1,e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var o=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var n=0;n0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name)),e.propertyName="sltr_doc_date1",s(function(){$("#fixTable3").tableHeadFixer({top:1})},100)})},e.insert_temp=function(){e.amt="100"*parseFloat(e.grid.grad_total);var s={id:e.amt};n.post(r.apiUrl+"api/fees/Sessionid_razorpay",s).then(function(s){console.log(s.data);var o=JSON.parse(s.data);e.orderid=o.id,console.log("json",o.id);for(var i=[],l=0,d=0;d0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){e.amt="100"*parseFloat(e.grid.grad_total);for(var s=[],o=0,i=0;i0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){e.studFeeDetails[0]===t&&(t.ischecked=!0);var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.$watch("studFeeDetails",function(e){e&&e.length>0&&(e[0].ischecked=!0)},!0),e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){e.amt=(100*parseFloat(e.grid.grad_total)).toFixed(0);for(var s=[],o=0,i=0;i0?(e.confirm_lst=t.data.table,e.doc_code=e.confirm_lst[0].doc_no,console.log("$scope.confirm_lst",e.confirm_lst),e.printstatus=!0,e.paystatus=!1,console.log("$scope.printstatus",e.printstatus)):(e.paystatus=!0,e.printstatus=!1)})},e.insert_temp=function(s){var o=parseFloat(s),i=parseFloat(o).toFixed(2);e.amt="100"*parseFloat(o);var l=[],d=0,_={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.EnrollNo,temp_dd_line_no:d,temp_dd_fee_number:"FT004",temp_dd_fee_code:"FT004",temp_dd_fee_period_code:"",temp_dd_fee_amount:i,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:i,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"E",temp_dd_fee_academic_year:e.academicyearnew,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.oderid,temp_dd_other_charge_amount:""};d++,l.push(_),n.post(r.apiUrl+"api/fees/CUD_fee_docAsd",l).then(function(a){e.msg1=a.data,e.refNumbertrans=parseInt(a.data);var s="Exam Fee Form:"+e.refNumbertrans,o={amount:e.amt,receipt:s,currency:"INR",payment_capture:1};n.post(r.apiUrl+"api/fees/razorOrder",o).then(function(s){var o=s.data;e.oderid=o,console.log("$scope.oderid",e.oderid),console.log("Form No",e.refNumbertrans);var i={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_card_last_number:e.oderid};n.post(r.apiUrl+"api/fees/update_docIisOrderId",i).then(function(s){if(""==a.data)swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200});else{var o={src:"https://checkout.razorpay.com/v1/checkout.js",key:"rzp_live_gO4q81PWpfxJWz",amount:e.amt,name:e.obj1.lic_school_name,description:e.EnrollNo,image:e.obj1.lic_school_logo,order_id:e.oderid,handler:function(t){alert(t.razorpay_payment_id),e.response_code=t.razorpay_payment_id,console.log(t);var a={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_transaction_id:t.razorpay_payment_id,temp_dd_error_messsage:t.error_description,temp_dd_fee_acq_response_code:t.status};n.post(r.apiUrl+"api/fees/update_docIis",a).then(function(t){""!=e.response_code&&swal({title:"Alert",text:"Payment Done Successfully. Your Transaction Number is "+e.response_code,imageUrl:"assets/img/check.png"}),e.getstudentList()})},notes:{address:e.EnrollNo},modal:{ondismiss:function(){console.log("Checkout form closed"),t.reload()}}};new Razorpay(o).open()}})})})},e.print_rpt=function(t){var a;e.flg_report=!0,$("#rpt_mdl").modal("show"),e.parameters={fee_rec_no:e.doc_code},a="SimsReports.Sims.SIMR51prov_ChristExam,SimsReports";$("#reportViewer3").telerik_ReportViewer({serviceUrl:"https://christ.appsis.co.in/report/api/reports/",viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),setTimeout(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.network=function(){console.log(str),window.open("https://test.timesofmoney.com/direcpay/secure/paymentTransaction.jsp","_new")},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.gotoPG=function(){$("#submitpay").click()},e.$on("student_change",function(t,a){e.getstudentList()}),a.globals.studentsLoaded&&e.getstudentList()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfimationController_rakaa",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.today_date=moment(new Date).format("DD-MM-YYYY"),e.already_flg=!1,e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,e.username=a.globals.currentUser.username;var t=i.search();jQuery.isEmptyObject(t)||swal({title:"Alert",text:t.res+". Your Transaction Number is "+t.temp_dd_fee_transaction_id},function(a){!0===a&&(window.open("https://"+n.defaults.headers.common.schoolId+".rakaa.sch.ae/ppn/#/main/feesRakaag","_self"),"Success"==t.res&&e.goto_history())}),n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0?(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for Re-Registration Form.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0):e.already_flg1=!1}),e.min_amount=0,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCoRG&sims_appl_form_field=Payment Amount").then(function(t){t.data.length>0&&(e.min_amount=parseFloat(t.data[0].sims_appl_parameter))}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data;for(var a=0;a 1. You can choose to pay the full amount. Minimum payable is 200 AED per student. If Transport is selected, minimum deposit of 100 AED will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" AED is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 AED per child and Transport deposit of 100 AED per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 AED per child and Transport deposit of 100 AED per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_total_balance+" AED is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCoRG&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.balance_due=0,e.trans_change=function(t){for(var a=0;ae.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>=0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge)}if(e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0,e.selected_lst.push(t),e.total_due>0){if(e.grid.convence_charge=0,e.card_charges.length>=0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}"1"==t.sims_payment_type&&(e.willing=!0,e.paying=!1)}):n.get(r.apiUrl+"api/fees/getStudentConf_leams?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+t.sims_student_enroll_number+"&i=&date="+e.today_date).then(function(a){if(e.confirm_leams=a.data,t.net_total_balance=e.confirm_leams[0].net_total_balance,e.balance_due=parseFloat(t.net_total_balance),t.reG_fee=e.confirm_leams[0].reG_fee,t.reg_fee_code=e.confirm_leams[0].reg_fee_code,t.reg_fee_period=e.confirm_leams[0].reg_fee_period,e.balance_due>e.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>=0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge)}e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0;for(var o=0;o0){if(e.grid.convence_charge=0,e.card_charges.length>=0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}else e.willing=!1,e.paying=!1,e.grid.total1=0,e.grid.grad_total=0})},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?e.paying:(t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="")},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is AED 200 per child.
If Transport is selected, minimum transport deposit is AED 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.grad_total="")},e.pay_current_year=function(){$("#report_Modal").modal("hide");var t=[],s="";e.due_amount=e.confirm_leams[0].net_total_balance;for(var o=0;o Dear Parent,
Thank you for filling and submitting the Re-Registration Form.',imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the Next year seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("StudentConfirmationController_svs",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.today_date=moment(new Date).format("DD-MM-YYYY"),e.already_flg=!1,e.willstatus=!1,e.getFeesDetails=function(){e.school_id=n.defaults.headers.common.schoolId,e.username=a.globals.currentUser.username,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentFull_name=a.globals.currentStudent.sims_student_passport_fullname_new,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number;var t=i.search();jQuery.isEmptyObject(t)||swal({title:"Alert",text:t.res+". Your Transaction Number is "+t.temp_dd_fee_transaction_id},function(a){!0===a&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/feesSvs","_self"),"Success"==t.res&&e.goto_history())}),n.get(r.apiUrl+"api/fees/getStudentConfStatus?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){t.data>0?(swal({title:"Alert",text:"Dear Parent,You have already submitted the application for Re-Registration Form.Please contact school for more details.",imageUrl:"assets/img/notification-alert.png"}),e.already_flg1=!0,e.already_flg=!0):e.already_flg1=!1}),e.min_amount=0,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feCofL&sims_appl_form_field=Payment Amount").then(function(t){t.data.length>0&&(e.min_amount=parseFloat(t.data[0].sims_appl_parameter))}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Re-Reg OB Calculation Mode").then(function(t){if(t.data.length>0){e.OB_Calculation_Mode=t.data;for(var a=0;e.OB_Calculation_Mode.length>a;a++)"A"==e.OB_Calculation_Mode[a].sims_appl_parameter&&(e.obdate=moment(new Date).format("DD/MM/YYYY")),"M"==e.OB_Calculation_Mode[a].sims_appl_parameter&&(e.obdate=e.OB_Calculation_Mode[a].sims_appl_form_field_value3)}else e.obdate=moment(new Date).format("DD/MM/YYYY");console.log(e.OB_Calculation_Mode)}),n.get(r.apiUrl+"api/fees/getStudentConf?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+a.globals.currentUser.username).then(function(t){e.confirm_lst=t.data;for(var a=0;a 1. You can choose to pay the full amount. Minimum payable is 200 AED per student. If Transport is selected, minimum deposit of 100 AED will be added.
2.\tThe amount payable now will be deducted from total due displayed in above table. The remaining amount will be available for the following payment plans.
3.\tPlease note that seats for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan.
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_balance+" AED is paid full.

",html:!0,placement:"right"}),$("#popover2").popover({content:'

1)The Re- registration fees of 200 AED per child and Transport deposit of 100 AED per child (If required) will be paid at school. You can fill the form online and pay at school accordingly.
2)The above Table excludes the Re- registration fee of 200 AED per child and Transport deposit of 100 AED per child (If selected) which is to be paid at school .
The remaining amount will be available for the following payment plans.
3) Please note that seat for next year will be confirmed only upon
a)\tPayment of seat confirmation fee 200 AED per child.
b)\tReceipt of post dated cheques as per selected payment plan
c)\tCurrent outstanding amount of '+e.confirm_lst[0].net_total_balance+" AED is paid full.

",html:!0,placement:"right"})}),n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data}),n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.username+"-"+e.school_name,e.description="Re-registration Fee",console.log("$scope.school_name",e.school_name)}),n.get(r.apiUrl+"api/fees/get_tranas").then(function(t){e.trans_lst=t.data});var s=parseFloat(a.globals.currentStudent.sims_acad_yr)+1;n.get(r.apiUrl+"api/fees/getConcession?academic_year="+s).then(function(t){e.concession_lst=t.data}),e.balance_due=0,e.trans_change=function(t){for(var a=0;ae.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge),e.grid.grad_due_total<=0?e.payoutstandingbtn_flg=!1:e.payoutstandingbtn_flg=!0,console.log("$scope.grid.grad_due_total",e.grid.grad_due_total)}if(e.selected_lst.push(t),e.total_due>0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge)}"1"==t.sims_payment_type&&(e.willing=!0,e.paying=!0)})):(e.willstatus=!0,n.get(r.apiUrl+"api/fees/getStudentConf_leams?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+a.globals.currentStudent.sims_acad_yr+"&parent="+t.sims_student_enroll_number+"&i=&date="+e.today_date).then(function(a){if(e.confirm_leams=a.data,t.net_total_balance=e.confirm_leams[0].net_total_balance,e.balance_due=parseFloat(t.net_total_balance),t.reG_fee=e.confirm_leams[0].reG_fee,t.reg_fee_code=e.confirm_leams[0].reg_fee_code,t.reg_fee_period=e.confirm_leams[0].reg_fee_period,e.balance_due>e.min_amount){if(e.grid.convence_due_charge=0,e.card_charges.length>0){var s=e.balance_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_due_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_due_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.due_total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_due_charge)),2)),e.grid.grad_due_total=parseFloat(s)+parseFloat(e.grid.convence_due_charge),e.grid.grad_due_total<=0?e.payoutstandingbtn_flg=!1:e.payoutstandingbtn_flg=!0,console.log("$scope.grid.grad_due_total",e.grid.grad_due_total)}e.balance_due<=e.min_amount?e.already_flg=!1:e.already_flg=!0;for(var o=0;o0){if(e.grid.convence_charge=0,e.card_charges.length>0){s=e.total_due;"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3)))}parseFloat(s)>0&&(e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2)),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)}else e.willing=!1,e.paying=!1,e.grid.total1=0,e.grid.grad_total=0}))},e.fee_change=function(t){e.fee_amt=parseFloat(t)},e.transport_check=function(t){t.sims_trans?e.paying:(t.sims_transport_fee=void 0,t.sims_trans_amt=0,t.sims_transport_direction="")},e.check_amt=function(){parseFloat(e.grad_total)The minimum amount for seat confirmation is AED 200 per child.
If Transport is selected, minimum transport deposit is AED 100 per child.",imageUrl:"assets/img/notification-alert.png"}),e.grad_total="")},e.pay_fulnew=function(t){""!=e.confirm_lst[0].sims_parent_father_email?e.pemail=e.confirm_lst[0].sims_parent_father_email:e.pemail="test@leamseducation.com";var s=document.createElement("form");s.setAttribute("method","post"),s.setAttribute("action","https://gateway.leamseducation.com/"+n.defaults.headers.common.schoolId+"/index.php"),s.setAttribute("name","form2");var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","amount"),o.setAttribute("value",e.grid.grad_due_total);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf1"),r.setAttribute("value",e.username);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","udf2"),i.setAttribute("value","P");var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","trackId"),l.setAttribute("value",e.refNumbertrans);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","email"),d.setAttribute("value",e.pemail);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","enroll"),_.setAttribute("value",a.globals.currentStudent.enroll_number);var c=document.createElement("input");c.setAttribute("type","submit"),c.setAttribute("value","Submit"),c.setAttribute("name","Submit1"),s.appendChild(o),s.appendChild(r),s.appendChild(i),s.appendChild(l),s.appendChild(d),s.appendChild(_),s.appendChild(c),document.getElementById("sss").appendChild(s),document.form2.Submit1.click()},e.check_box_chk=function(t){e.dis_submit=t},e.submit_btn=function(t){if(e.dis_submit=!1,t){$("#report_Modal").modal("hide");for(var s=[],o=0;o Dear Parent,
Thank you for filling and submitting the Re-Registration Form.',imageUrl:"assets/img/check.png"}),e.already_flg=!0,e.chk_inst_m1=!0;else swal({title:"Alert",text:"Data not saved",imageUrl:"assets/img/notification-alert.png"})})}},e.pay_ful=function(t){""!=e.confirm_lst[0].sims_parent_father_email?e.pemail=e.confirm_lst[0].sims_parent_father_email:e.pemail="test@svs.mograsys.com";var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index1.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","trackId"),o.setAttribute("value",e.refNumbertrans);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","dataname"),r.setAttribute("value",e.dataname);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value",e.description);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.submit_btn1=function(e){e&&$("#report_Modal").modal({backdrop:"static",keyboard:!1})},e.check_box=function(t){"P"==t?e.paying&&(e.willstatus=!1,e.willing=!1):e.willing&&(e.paying=!1,e.willstatus=!1,e.grad_total=0,e.fee_amt=0)}},$(document).ready(function(){$("#popover").popover({content:'

Please note that the Next year seat will be confirmed after these dues are fully settled.

',html:!0,placement:"right"})}),e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.lms").controller("ParentRefNewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.schoolcode=n.defaults.headers.common.schoolId.toLowerCase(),e.schoolcode1=angular.copy(e.schoolcode),e.getMedicalDetails=function(t){e.display=!0,e.edt={},n.get(i.apiUrl+"api/common/getMobilecode").then(function(t){e.mobile_code=t.data}),"asis"==e.schoolcode&&(e.flg_asis=!0),"siso"==e.schoolcode&&(e.flg_siso=!0),"abqis"==e.schoolcode&&(e.flg_abqis=!0),"alimtiaz"==e.schoolcode&&(e.flg_alimtiaz=!0),e.school_click=function(t){e.flg_asis&&"asis"!=t&&swal({html:"

Dear Parent,

For referring to other schools (ABQ Azzan, ABQ Sohar & Al Imtiaz Private School), please contact:

Ms Jumana Al Ghadani (Head of Marketing and Parent Care, ABQ Education Group)

Direct: +968 24965868

Mobile: +968 94625226

Email: Jumana@abq.edu.om


Ms Jo Marie Tredoux (Communications Advisor, ABQ Education Group)

Direct: +968 2496 5802

Mobile: +968 7997 3990

Email: jmtredoux@abq.edu.om

"}),e.flg_abqis&&"abqis"!=t&&swal({html:"

Dear Parent,

For referring to other schools (ABQ Seeb, ABQ Sohar & Al Imtiaz Private School), please contact:

Ms Jumana Al Ghadani (Head of Marketing and Parent Care, ABQ Education Group)

Direct: +968 24965868

Mobile: +968 94625226

Email: Jumana@abq.edu.om


Ms Jo Marie Tredoux (Communications Advisor, ABQ Education Group)

Direct: +968 2496 5802

Mobile: +968 7997 3990

Email: jmtredoux@abq.edu.om

"}),e.flg_siso&&"siso"!=t&&swal({html:"

Dear Parent,

For referring to other schools (ABQ Azzan, ABQ Seeb & Al Imtiaz Private School), please contact:

Ms Jumana Al Ghadani (Head of Marketing and Parent Care, ABQ Education Group)

Direct: +968 24965868

Mobile: +968 94625226

Email: Jumana@abq.edu.om


Ms Jo Marie Tredoux (Communications Advisor, ABQ Education Group)

Direct: +968 2496 5802

Mobile: +968 7997 3990

Email: jmtredoux@abq.edu.om

"}),e.flg_alimtiaz&&"alimtiaz"!=t&&swal({html:"

Dear Parent,

For referring to other schools (ABQ Azzan, ABQ Seeb & ABQ Sohar International School), please contact:

Ms Jumana Al Ghadani (Head of Marketing and Parent Care, ABQ Education Group)

Direct: +968 24965868

Mobile: +968 94625226

Email: Jumana@abq.edu.om


Ms Jo Marie Tredoux (Communications Advisor, ABQ Education Group)

Direct: +968 2496 5802

Mobile: +968 7997 3990

Email: jmtredoux@abq.edu.om

"}),setTimeout(function(){e.schoolcode1=angular.copy(e.schoolcode),e.$apply()},1e3)},e.academic_year_change=function(t,a){n.get(i.apiUrl+"api/common/getGrade?curCode="+t+"&academic_year="+a).then(function(t){e.grade_lst=t.data})},e.getacademicYear=function(t){n.get(i.apiUrl+"api/common/getAcademicYear_new?curCode="+t).then(function(a){e.ac_year_lst=a.data,e.edt.academic_year=e.ac_year_lst[0].sims_academic_year,e.academic_year_change(t,e.edt.academic_year)})},e.button_click=function(){n.get(i.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=AMBASSADOR").then(function(e){e.data.length>0&&window.open(e.data[0].sims_appl_form_field_value1,"_new")})},n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)}),e.Confirm=function(t){t&&(e.edt.father_mobile=e.mobile_code+e.edt.father_mobile1,e.edt.parent_id=a.globals.currentUser.username,n.post(i.apiUrl+"api/common/insertadmission_parent",e.edt).then(function(t){console.log(t.data),""!=t.data&&(e.edt.sims_admission_parent_reg_id=t.data,n.post(i.apiUrl+"api/common/insertadmission_studentABQ",e.edt).then(function(t){t.data?(swal({title:"Alert",text:"Data Inserted Successfully",imageUrl:"assets/img/check.png"}),e.clear()):swal({title:"Alert",text:"Data Not Inserted",imageUrl:"assets/img/notification-alert.png"})}))}))},e.clear=function(){e.edt={},e.myForm.$setPristine(),e.myForm.$setUntouched(),n.get(i.apiUrl+"api/AddExamPaper/getCuriculum").then(function(t){e.cur_data=t.data,e.edt.curr_code=t.data[0].sims_cur_code,e.getacademicYear(t.data[0].sims_cur_code)})},e.New=function(){e.display=!0,e.clear()},e.viewApplied=function(){e.display=!1,n.get(i.apiUrl+"api/common/getAppliedStatus1?parent="+a.globals.currentUser.username).then(function(t){e.Upload_doc_datails=t.data})},e.printReport=function(e){var t;$("#report_Modal").modal("show"),t="SimsReports.Sims.SMR206,SimsReports";var a=window.location.href,o=(a.substring(0,a.indexOf(":")),i.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:o,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){this.refreshReport()}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:t,parameters:{parent_ref_id:e}}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),$("#report_Modal").modal({backdrop:"static",keyboard:!1})}},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeAhisController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location",function(e,t,a,s,o,n,r,i){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.acYear=a.globals.currentStudent.sims_acad_yr,e.academic_year=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var l=i.search();if(!jQuery.isEmptyObject(l)){if(""!=l.result_msg)swal({title:"Alert",text:l.result_msg},function(e){!0===e&&window.open("http://ahis.mograsys.com/ppn/#/main/feeAhis","_self")});else l.status,l.TransactionNo,l.receiptNo;"success"==l.status?swal({title:"Alert",text:"Payement Done Successfully Your Transaction Number is "+l.receiptNo,imageUrl:"assets/img/check.png"},function(e){!0===e&&window.open("http://vision.appsis.co.in/ppn/index.html#/main/feeVis","_self")}):swal({title:"Alert",text:"Some Problem in Payment plz check agian..",width:380,height:200},function(e){!0===e&&window.open("http://vision.appsis.co.in/ppn/index.html#/main/feeVis","_self")})}e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=$filter("number")(parseFloat(a)+parseFloat(e.grid.convence_charge),2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/parent/getParentDetail?parentCode="+a.globals.currentUser.username).then(function(t){e.obj=t.data,e.parent_mobile1=e.obj.sims_admission_father_mobile,e.parent_email1=e.obj.sims_admission_father_email,e.parent_name=e.obj.sims_admission_father_full_name,""==e.parent_mobile1||"-"==e.parent_mobile1||null==e.parent_mobile1?e.parent_mobile="97317620820":e.parent_mobile="973"+e.parent_mobile1,""==e.parent_email1||"-"==e.parent_email1||null==e.parent_email1?e.parent_email="info@alhekma.com":e.parent_email=e.parent_email1,console.log("getParentDetail",e.obj)}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0)for(o=0;o=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}}else if(parseInt(a)<=parseInt(e.charges[o].sims_max)&&parseInt(a)>=parseInt(e.charges[o].sims_min)){e.grid.convence_charge=parseInt(e.charges[o].sims_charges);break}parseInt(a)>0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(t){e.amount=e.grid.grad_total;for(var s=[],o=0,i=0;i0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.grad_total?setTimeout(function(){e.pay_ful("creditcard")},600):swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";console.log(i),$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";console.log(r),$("#reportViewer4").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway.leamseducation.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","email"),l.setAttribute("value",e.pemail);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","enroll"),d.setAttribute("value",e.fe_enroll);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeIIsqatarController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.disb_lck=!0,e.dis_term=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/FeIISq","_self"),"Success"==d.res&&e.goto_history())}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@gmail.com":e.pemail=e.pdetails.pemail,""==e.pdetails.pmobile||"-"==e.pdetails.pmobile?e.pemobile="123456789":e.pemobile=e.pdetails.pmobile)}),e.get_tc=function(){n.get(r.apiUrl+"api/common/Get_Terms_Cond").then(function(t){e.get_Terms_Cond_Link=t.data,window.open(e.get_Terms_Cond_Link)})},e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.grad_total?setTimeout(function(){e.pay_ful("creditcard")},100):swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){let a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let r=window.location.href;r.substring(0,r.indexOf(":"));var i="https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){let a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let r=window.location.href;r.substring(0,r.indexOf(":"));var i="https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51IISQatar,SimsReports";var r=window.location.href,i=(r.substring(0,r.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=FeIISq&sims_appl_form_field=Fee Terms").then(function(t){t.data.length>0&&(e.terms=t.data[0].sims_appl_form_field_value2)}),e.check_dis=function(){1==e.dis_term?e.chk_disabled=!1:e.chk_disabled=!0},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51IISQatar,SimsReports";var r=window.location.href,i=(r.substring(0,r.indexOf(":")),"https://rep.mograsys.com/"+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://pg.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","description"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","fname"),i.setAttribute("value",e.username);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","lastName"),l.setAttribute("value",e.username);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","email"),d.setAttribute("value",e.pemail);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","mobile"),_.setAttribute("value",e.pemobile);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","phone"),c.setAttribute("value",e.pemobile);var m=document.createElement("input");m.setAttribute("type","submit"),m.setAttribute("value","Submit"),m.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeLeamsnewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;let d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".leamseducation.com/ppn/#/main/feeLeams","_self"),"Success"==d.res&&e.goto_history())}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)}),e.array=[],n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feLNew&sims_appl_form_field=feeLeamsNew").then(function(t){e.feeExcludesParam=new Array,e.feeExcludesParam=t.data,e.array=e.feeExcludesParam[0].sims_appl_form_field_value1.split(",")}),e.grid.selectAll=function(){let t=0;for(let a=0;a0&&(e.chk_disabled=!1),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){let a=0,s=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(let a=0;a1;for(let o=0;o0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);let s=t.data.length;for(let o=0;oa;a++)return("Y"==t.studFeeFrequencyCode||"O"==t.studFeeFrequencyCode)&&-1===e.array.indexOf(t.studFeeCode)},e.insert_temp=function(t){{e.amount=e.grid.grad_total;let t=[],o=0;for(let s=0;s0&&(n=parseFloat(parseFloat(e.studFeeDetails[s].studBalancePayingAMT)*parseFloat(e.studFeeDetails[s].stud_vat_per))/(100+parseFloat(e.studFeeDetails[s].stud_vat_per)),e.studFeeDetails[s].studBalanceAMT=parseFloat(e.studFeeDetails[s].studBalancePayingAMT)-n);let r={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[s].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[s].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[s].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[s].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[s].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[s].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[s].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:n};o++,t.push(r)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)var s={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:t[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};t.push(s)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",t).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),e.amount_totalPPN==e.grid.grad_total?setTimeout(function(){e.pay_ful("creditcard")},600):swal({title:"Alert",text:"Your payment could not be processed. Please try again later (E1x1 Not Matching)",width:380,height:200})})})}},e.onlyNumbers=function(e){let t={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(let a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){let a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){let a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){let o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){let o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){let a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway.leamseducation.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");let s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);let o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);let l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","email"),l.setAttribute("value",e.pemail);let d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","enroll"),d.setAttribute("value",e.fe_enroll);let _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeIhsonlineController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,console.log("LATEST BUILD"),e.chk_disabled=!0,e.buttonstatus=!1,e.payment_type="M",e.discount_amt=0;let d=new Date,c=d.getMonth()+1,m=(d.getMonth(),d.getFullYear());function u(e,t){let a=e+"";for(;a.length0&&(e.chk_disabled=!1),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"===e.card_charges[0].sims_appl_form_field_value1&&("P"===e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"===e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){let a=0,s=0;e.discount_amt=0,t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(let a=0;a1;for(let o=0;o0?e.chk_disabled=!1:e.chk_disabled=!0,e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(let a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=feIhsO&sims_appl_form_field=Terms").then(function(t){t.data.length>0&&(e.terms=t.data[0].sims_appl_form_field_value2)}),e.check_dis=function(){e.disble_term=document.getElementById("Checkbox5").checked},e.get_tc=function(){n.get(r.apiUrl+"api/common/Get_Terms_Cond").then(function(t){e.get_Terms_Cond_Link=t.data,window.open(e.get_Terms_Cond_Link)})},e.getFeesDetails=function(t){e.payment_type="M",e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"===a.globals.currentStudent.sims_academic_year_status,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentFull_name=a.globals.currentStudent.sims_student_passport_fullname_new,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.academic_year="",n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.std_enroll_number+"-"+e.studentFull_name+"-"+e.studengrade_name+"-"+e.school_name,e.description="Current Year Fee"}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic_ihs?cur_code="+a.globals.currentStudent.sims_cur_code+"&opr=Z").then(function(t){e.academic_year_lst=t.data,e.academic_changeNew(e.academic_year_lst[0].sims_academic_year),e.academic_year=e.academic_year_lst[0].sims_academic_year}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic_ihs?cur_code="+a.globals.currentStudent.sims_cur_code+"&opr=G").then(function(t){e.academic_year_lstl=t.data})},e.radioclick=function(){"T"===e.payment_type?e.academic_change(e.academic_year):"M"===e.payment_type&&e.academic_changeNew(e.academic_year)},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+e.std_enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);let a=t.data.length;for(let s=0;s0||e.studFeeDetails.push(t.data[s].feeDetails[a]);if(e.studFeeDetails.length>0){for(let t=0;t0&&(e.std_term_name=t.data[0].sims_term_code)}),e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeIHSMonthly?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);let a=t.data.length;for(let s=0;s0){for(let t=0;t0&&(n=parseFloat(parseFloat(e.studFeeDetails[o].studBalancePayingAMT)*parseFloat(e.studFeeDetails[o].stud_vat_per))/(100+parseFloat(e.studFeeDetails[o].stud_vat_per)),e.studFeeDetails[o].studBalanceAMT=parseFloat(parseFloat(e.studFeeDetails[o].studBalancePayingAMT)-n));let r={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[o].studEnroll,temp_dd_line_no:s,temp_dd_fee_number:e.studFeeDetails[o].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[o].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[o].studFeePeriodNo,temp_dd_fee_amount:parseFloat(e.studFeeDetails[o].studBalanceAMT)-e.studFeeDetails[o].discount_amt,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:parseFloat(e.studFeeDetails[o].studBalancePayingAMT)-e.studFeeDetails[o].discount_amt,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[o].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:n,temp_dd_transaction_type_ref:e.payment_type};s++,t.push(r)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",t).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment please try again..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn);let a=Math.round(100*(parseFloat(e.grid.total)-parseFloat(Math.round(100*e.discount_amt)/100)))/100;if(parseFloat(e.amount_totalPPN)===a){let t=100*(parseFloat(e.grid.total)-parseFloat(Math.round(100*e.discount_amt)/100));setTimeout(function(){document.getElementById("sss").innerHTML="";let a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://fees.ihsdubai.org/"+n.defaults.headers.common.schoolId+"/index1.php"),a.setAttribute("name","form2");let s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",t);let o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","trackId"),o.setAttribute("value",e.refNumbertrans);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","dataname"),r.setAttribute("value",e.dataname);let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value",e.description);let l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},600)}else swal({title:"Alert",text:"Some Problem in Payment please try again..",width:380,height:200})})})}},e.onlyNumbers=function(e){let t={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(let a in t)if(t.hasOwnProperty(a)&&(e.charCode===t[a]||e.keyCode===t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){console.log("Prev Fee details"),$("#Pre_report").modal({backdrop:"static",keyboard:!1})},e.showreceipts=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+e.academic_year1+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){let a;e.show_rpt=!0,"portaldso"===n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"===n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"===n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let r=window.location.href;if("https"===r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;let o;console.log("CLICK"),"portaldso"===n.defaults.headers.common.schoolId?a="portaldso":"portalag"===n.defaults.headers.common.schoolId?a="portalag":"portalom"===n.defaults.headers.common.schoolId?a="portalom":"bcadstaging"===n.defaults.headers.common.schoolId&&(a="portalag"),e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let n=t.data;o="SimsReports."+n+",SimsReports";let r=window.location.href;if("https"===r.substring(0,r.indexOf(":")))var i="https://"+a+".ihsdubai.org/report/api/reports/";else i="http://"+a+".ihsdubai.org/report/api/reports/";console.log("link",i),$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){let o;"portaldso"===n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"===n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"===n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";let r=window.location.href;if("https"===r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;let r;"portaldso"===n.defaults.headers.common.schoolId?o="portaldso":"portalag"===n.defaults.headers.common.schoolId?o="portalag":"portalom"===n.defaults.headers.common.schoolId&&(o="portalom"),e.parameters={fee_rec_no:t,search:a},r="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";let i=window.location.href;if("https"===i.substring(0,i.indexOf(":")))var l="https://"+o+".ihsdubai.org/report/api/reports/";else l="http://"+o+".ihsdubai.org/report/api/reports/";console.log("service_url",l),$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:r,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeIhsonlineControllernew",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.buttonstatus=!1;var d=(new Date).getMonth()+1;console.log("month",d),e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var c=i.search();jQuery.isEmptyObject(c)||swal({title:"Alert",text:c.res+". Your Transaction Number is "+c.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/ppn/#/main/feeIhsonline","_self"),"Success"==c.res&&e.goto_history())}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentFull_name=a.globals.currentStudent.sims_student_passport_fullname_new,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.academic_year="",n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.std_enroll_number+"-"+e.studentFull_name+"-"+e.studengrade_name+"-"+e.school_name,e.description="Current Year Fee",console.log("$scope.school_name",e.school_name),e.academic_changenew("Fe272")}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data,console.log("$scope.academic_year_lst",e.academic_year_lst[0].sims_academic_year),e.academic_year=e.academic_year_lst[0].sims_academic_year})},e.academic_changenew=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.acYear+"&enroll="+e.std_enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:e.std_enroll_number,StudFeeNumber:t},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var a=t.data.length,s=0;s0){console.log(t.data[s].feeDetails);for(var o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){if(e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.total){var a=100*parseFloat(e.grid.total);setTimeout(function(){document.getElementById("sss").innerHTML="";var t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://fees.ihsdubai.org/"+n.defaults.headers.common.schoolId+"/index1.php"),t.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",a);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","trackId"),o.setAttribute("value",e.refNumbertrans);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","dataname"),r.setAttribute("value",e.dataname);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value",e.description);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),t.appendChild(s),t.appendChild(o),t.appendChild(r),t.appendChild(i),t.appendChild(l),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600)}else swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var r=window.location.href;if("https"==r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";console.log(i),$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var r=window.location.href;if("https"==r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";console.log(i),$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r=window.location.href;if("https"==r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;"portaldso"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?n.defaults.headers.common.schoolId="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(n.defaults.headers.common.schoolId="ihsonlineom"),e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r=window.location.href;if("https"==r.substring(0,r.indexOf(":")))var i="https://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";else i="http://"+n.defaults.headers.common.schoolId+".ihsdubai.org/report/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeclarionController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.buttonstatus=!1;var d=new Date,c=d.getMonth()+1,m=d.getMonth(),u=d.getFullYear();function p(e,t){for(var a=e+"";a.length0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentFull_name=a.globals.currentStudent.sims_student_passport_fullname_new,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.academic_year="",n.get(r.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.std_enroll_number+"-"+e.studentFull_name+"-"+e.studengrade_name+"-"+e.school_name,e.description="Current Year Fee",console.log("$scope.school_name",e.school_name)}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data,console.log("$scope.academic_year_lst",e.academic_year_lst[0].sims_academic_year),e.academic_year=e.academic_year_lst[0].sims_academic_year,e.academic_change(e.academic_year_lst[0].sims_academic_year)})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+e.std_enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var a=t.data.length,s=0;s0){console.log(t.data[s].feeDetails);for(var o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){if(e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.total){var a=100*parseFloat(e.grid.total);setTimeout(function(){document.getElementById("sss").innerHTML="";var t=document.createElement("form");t.setAttribute("method","post"),t.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index1.php"),t.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",a);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","trackId"),o.setAttribute("value",e.refNumbertrans);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","dataname"),r.setAttribute("value",e.dataname);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","datadesc"),i.setAttribute("value",e.description);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),t.appendChild(s),t.appendChild(o),t.appendChild(r),t.appendChild(i),t.appendChild(l),document.getElementById("sss").appendChild(t),document.form2.Submit1.click()},600)}else swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var n=window.location.href;n.substring(0,n.indexOf(":"));$("#reportViewer4").telerik_ReportViewer({serviceUrl:void 0,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeSepsController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled_new=!1,e.chk_disabled=!0,e.feedesc=!1,e.buttonstatus=!1,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/feeSeps","_self"),e.goto_history())}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(1)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(){e.Student=a.globals.currentStudent,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.username=a.globals.currentUser.username,n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data,e.academic_year=e.academic_year_lst[0].sims_academic_year,console.log("$scope.academic_year_lst",e.academic_year_lst[0].sims_academic_year),e.academic_change(e.academic_year_lst[0].sims_academic_year)}),console.log("current year",e.acYear),e.grid.chkAll=!1,e.academic_year="",n.get(r.apiUrl+"api/common/getParentDetails?pid="+e.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)})},e.academic_change=function(t){e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:e.std_enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){if(e.display=!0,t.data.length>0){var a=t.data.length;e.firstname=t.data[0].parentName;for(var s=0;s0){for(var o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51SEPSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51SEPSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","email"),l.setAttribute("value",e.email);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","city"),d.setAttribute("value",e.city);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","summary_add"),_.setAttribute("value",e.summary_add);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","fname"),c.setAttribute("value",e.fname);var m=document.createElement("input");m.setAttribute("type","text"),m.setAttribute("name","lname"),m.setAttribute("value",e.lname);var u=document.createElement("input");u.setAttribute("type","submit"),u.setAttribute("value","Submit"),u.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),a.appendChild(u),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeIATController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeiat","_self")}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(1)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName,n.get(r.apiUrl+"api/student/getStudentInfo?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,e.summary_add=e.obj.sims_parent_father_summary_address,e.city="Ras Al Khaimah",e.state=e.obj.sims_parent_father_state,e.fname=e.obj.sims_student_passport_first_name_en,e.lname=e.obj.sims_student_passport_last_name_en,e.email=e.obj.sims_parent_father_email,console.log(" $scope.obj",e.obj)}));for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","email"),l.setAttribute("value",e.email);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","enroll"),d.setAttribute("value",e.studFeeDetails[0].studEnroll);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeesNetworkController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:"Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://network.mograsys.com/ppn/#/main/feesRakaag","_self")}),n.get(r.apiUrl+"api/student/getStudentInfo?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,e.summary_add=e.obj.sims_parent_father_summary_address,e.city="Ras Al Khaimah",e.state=e.obj.sims_parent_father_state,e.fname=e.obj.sims_student_passport_first_name_en,e.lname=e.obj.sims_student_passport_last_name_en,e.email=e.obj.sims_parent_father_email,console.log(" $scope.obj",e.obj)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total1=parseInt(a)+parseInt(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.getFeesDetails=function(t){e.academic_year=a.globals.currentStudent.sims_acad_yr,e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;n.get(r.apiUrl+"api/fees/getPayingAgent?academic_year="+a.globals.currentStudent.sims_acad_yr+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.agent_list=t.data}),n.get(r.apiUrl+"api/fees/getConveceFeeCharges").then(function(t){e.charges=t.data,n.get(r.apiUrl+"api/fees/getConveceFeeCode").then(function(t){e.convecne_fee_code=t.data})}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademic?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.academic_year_lst=t.data}),n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var s=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var o=0;o=0&&(e.studFeeDetails[n].ischecked=!0,e.grid.select(e.studFeeDetails[n]))}e.agent_list.length>0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";console.log(r),$("#reportViewer4").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";console.log(r),$("#reportViewer4").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var r="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:r,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},n.get(r.apiUrl+"api/student/getStudentInfo?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,e.summary_add=e.obj.sims_parent_father_summary_address,e.city="Ras Al Khaimah",e.state=e.obj.sims_parent_father_state,e.fname=e.obj.sims_student_passport_first_name_en,e.lname=e.obj.sims_student_passport_last_name_en,e.email=e.obj.sims_parent_father_email,console.log(" $scope.obj",e.obj)}),e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","email"),l.setAttribute("value",e.email);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","city"),d.setAttribute("value",e.city);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","summary_add"),_.setAttribute("value",e.summary_add);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","fname"),c.setAttribute("value",e.fname);var m=document.createElement("input");m.setAttribute("type","text"),m.setAttribute("name","lname"),m.setAttribute("value",e.lname);var u=document.createElement("input");u.setAttribute("type","submit"),u.setAttribute("value","Submit"),u.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),a.appendChild(u),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeModernController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/dashboard","_self")}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@modern.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t,a){var s=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var o=0;o1;for(o=0;o0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(s)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1;var s={opr:"VV",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflagnew=parseInt(a)+1,console.log("InstallmentStatus",a),console.log("Installmentflagnew",e.Installmentflagnew)});var o={opr:"WW",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflag=parseInt(a)+parseInt(e.Installmentflagnew),console.log("InstallmentStatus2",a),console.log("Installmentflag",e.Installmentflag)}),e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){if(e.refNumbertrans=t.data,""==t.data)swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200});else{var s={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0?(e.exam=[],e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en):e.exam=[]});var o={opr:"V",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),setTimeout(function(){e.pay_ful("creditcard")},600)}})}},e.pay_ful=function(t){var a={opr:"P",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",a).then(function(t){e.student_name=e.student_data_lst[0].sname,e.grade=e.student_data_lst[0].course;var a=document.createElement("form");a.setAttribute("method","post"),"Y"==e.paymentStatus?(a.setAttribute("action","https://gateway1.mograsys.com/modernselfReg/index.php"),console.log("payment URL","https://gateway1.mograsys.com/modernselfReg/index.php")):t.data.table.length>0&&(a.setAttribute("action",t.data.table[0].payment_url),console.log("payment URL",t.data.table[0].payment_url)),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.exam.sims_student_exam_student_contact_number);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.exam.sims_student_exam_student_email);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.student_name);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.grade);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href;i.substring(0,i.indexOf(":")),r.newReportUrl,n.defaults.headers.common.schoolId;$("#reportViewer4").telerik_ReportViewer({serviceUrl:service_url,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href;i.substring(0,i.indexOf(":")),r.newReportUrl,n.defaults.headers.common.schoolId;$("#reportViewer4").telerik_ReportViewer({serviceUrl:service_url,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";var i=window.location.href;i.substring(0,i.indexOf(":")),r.newReportUrl,n.defaults.headers.common.schoolId;$("#reportViewer3").telerik_ReportViewer({serviceUrl:service_url,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";var i=window.location.href;i.substring(0,i.indexOf(":")),r.newReportUrl,n.defaults.headers.common.schoolId;$("#reportViewer3").telerik_ReportViewer({serviceUrl:service_url,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeModernJrController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/dashboard","_self"),"Success"==d.res&&e.getFeesDetails())}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@modernjr.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(a)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})};n.post(r.apiUrl+"api/reportcardnew/ReportCommon",{opr:"Q"}).then(function(t){e.academic_year_lst=t.data.table,e.academic_year=e.academic_year_lst[0].sims_academic_year,e.getFeesDetails(e.academic_year)}),e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=e.academic_year,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeModernJr?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){if(e.refNumbertrans=t.data,""==t.data)swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200});else{var s={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0?(e.exam=[],e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en):e.exam=[]});var o={opr:"V",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),setTimeout(function(){e.pay_ful("creditcard")},600)}})}},e.pay_ful=function(t){var a={opr:"NG",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",a).then(function(t){e.student_name=e.student_data_lst[0].sname,e.grade=e.student_data_lst[0].course;var a=document.createElement("form");a.setAttribute("method","post"),t.data.table.length>0?a.setAttribute("action",t.data.table[0].payment_url):a.setAttribute("action","https://gateway1.mograsys.com/modernRegstdNongrant/index.php"),console.log("payment URL","https://gateway1.mograsys.com/modernRegstdNongrant/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.exam.sims_student_exam_student_contact_number);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.exam.sims_student_exam_student_email);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.student_name);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.grade);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+e.academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeModernControllerPG",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id+". Your Amount is "+d.amount},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeModrpg","_self"),"Success"==d.res&&e.getFeesDetails())}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@modern.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t,a){var s=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var o=0;o1;for(o=0;o0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(s)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1;var s={opr:"VV",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflagnew=parseInt(a)+1,console.log("InstallmentStatus",a),console.log("Installmentflagnew",e.Installmentflagnew)});var o={opr:"WW",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){if(t.data.table.length>0)var a=t.data.table.length;else a="0";e.Installmentflag=parseInt(a)+parseInt(e.Installmentflagnew),console.log("InstallmentStatus2",a),console.log("Installmentflag",e.Installmentflag)}),e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){if(e.refNumbertrans=t.data,""==t.data)swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200});else{var s={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0?(e.exam=[],e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en):e.exam=[]});var o={opr:"V",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),setTimeout(function(){e.pay_ful("creditcard")},600)}})}},e.pay_ful=function(t){var a={opr:"P",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",a).then(function(t){e.student_name=e.student_data_lst[0].sname,e.grade=e.student_data_lst[0].course;var a=document.createElement("form");a.setAttribute("method","post"),"Y"==e.paymentStatus?(a.setAttribute("action","https://gateway1.mograsys.com/modernselfReg_HDFC/index.php"),console.log("payment URL","https://gateway1.mograsys.com/modernselfReg_HDFC/index.php")):t.data.table.length>0&&(a.setAttribute("action",t.data.table[0].payment_url),console.log("payment URL",t.data.table[0].payment_url)),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.exam.sims_student_exam_student_contact_number);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.exam.sims_student_exam_student_email);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.student_name);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.grade);var _=document.createElement("input");_.setAttribute("type","text"),_.setAttribute("name","payflag"),_.setAttribute("value",e.Installmentflag);var c=document.createElement("input");c.setAttribute("type","text"),c.setAttribute("name","paymode"),c.setAttribute("value","Current year Fee");var m=document.createElement("input");m.setAttribute("type","submit"),m.setAttribute("value","Submit"),m.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),a.appendChild(c),a.appendChild(m),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeModernNewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;n.post(r.apiUrl+"api/reportcardnew/ReportCommon",{opr:"Q"}).then(function(t){e.academic_year_lst=t.data.table,e.academic_year=e.academic_year_lst[0].sims_academic_year,e.academic_change(e.academic_year)});let d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/dashboard","_self")}),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@modern.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){let t=0;for(let a=0;a0&&(e.chk_disabled=!1),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(t)+parseFloat(e.grid.convence_charge)},e.grid.select=function(t,a){let s=0,o=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(let s=0;s1;for(let a=0;a0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(s)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(s)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(s)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(s)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=parseFloat(s)+parseFloat(e.grid.convence_charge)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.academic_change(t)},e.getFeesDetails11=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1;let s={opr:"VV",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0){t.data.table.length}else InstallmentStatus="0";e.Installmentflagnew=parseInt(InstallmentStatus)+1});let o={opr:"WW",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){if(t.data.table.length>0){t.data.table.length}else InstallmentStatus2="0";e.Installmentflag=parseInt(InstallmentStatus2)+parseInt(e.Installmentflagnew)}),e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);let s=t.data.length;for(let o=0;o=0&&(e.studFeeDetails[a].ischecked=!0),e.grid.select(e.studFeeDetails[a])},e.academic_change=function(t){e.studFeeDetails=[],n.get(r.apiUrl+"api/reportcardnew/getAllTerms?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number+"&opr=R").then(function(t){e.term_list=t.data,t.data.length>0&&(e.std_term_name=t.data[0].sims_term_code)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=t,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:t,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;let s=t.data.length;e.termwise=[],e.all_Data=t.data;for(let o=0;o0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name))})})},e.insert_temp=function(t){{e.amount=e.grid.grad_total;let t=[],s=0;for(let o=0;o0&&(n=parseFloat(parseFloat(e.studFeeDetails[o].studBalancePayingAMT)*parseFloat(e.studFeeDetails[o].stud_vat_per))/(100+parseFloat(e.studFeeDetails[o].stud_vat_per)),e.studFeeDetails[o].studBalanceAMT=parseFloat(e.studFeeDetails[o].studBalancePayingAMT)-n);let r={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[o].studEnroll,temp_dd_line_no:s,temp_dd_fee_number:e.studFeeDetails[o].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[o].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[o].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[o].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[o].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[o].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:n};s++,t.push(r)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",t).then(function(t){if(e.refNumbertrans=t.data,""==t.data)swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200});else{let t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.exam=[],e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.Mob_No=e.student_data_lst[0].sims_student_exam_student_contact_number,e.email_Id=e.student_data_lst[0].comn_user_email):e.exam=[]});let s={opr:"V",sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status)}),setTimeout(function(){e.pay_ful("creditcard")},600)}})}},"modern"==n.defaults.headers.common.schoolId||"modernjr"==n.defaults.headers.common.schoolId?e.pay_ful=function(t){let a={opr:"P",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",a).then(function(t){e.student_name=e.student_data_lst[0].sname,e.grade=e.student_data_lst[0].course;let a=document.createElement("form");a.setAttribute("method","post"),"Y"==e.paymentStatus?a.setAttribute("action","https://gateway1.mograsys.com/modernselfReg/index.php"):t.data.table.length>0&&a.setAttribute("action",t.data.table[0].payment_url),a.setAttribute("name","form2");let s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);let o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.Mob_No);let n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.email_Id);let r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);let i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);let l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.student_name);let d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.grade);let _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()})}:"nacasca"==n.defaults.headers.common.schoolId?(console.log("nacasca"),e.pay_ful=function(a){var s={opr:"P",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(a){e.amt=100*parseFloat(e.grid.grad_total);var s={id:e.amt+"&receipt=Admission Fee Form:"+e.refNumbertrans,class_code:e.studFeeDetails[0].studGrade+e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/fees/Session_razorpay_Key_Nacs",s).then(function(a){console.log(a.data);var s=a.data;console.log("KeyURL",s),e.razorKeyURL=s;var o="Admission Fee Form:"+e.refNumbertrans;e.amt;e.SessionData={amount:e.amt,receipt:o,currency:"INR",payment_capture:1},n.post(r.apiUrl+"api/fees/razorOrdernacasca?data="+JSON.stringify(e.SessionData)+"&url="+e.razorKeyURL).then(function(a){var s=a.data;e.oderid=s,console.log("$scope.oderid",e.oderid),console.log("$scope.refNumbertrans",e.refNumbertrans);if(["0101","0111","012","013","014","015","016","017","018","019","0212","0213","0214","0215","0216","03152","0317","0318","0319","0320","1330","1431","1532","1633","38103","38104","38105","38106","38107","38108","38109","38110","38111","38112","3858","3959","3960","3961","3962","40178","40179","40180","40181","40182","40183","40184","40185","40186","40187","40188","40189","40190","83102","83122","83123","83124","83125","83126","83127","83128","83129","83130","83131","83159","83160","83161","84121","85133","85134","85135","85136","85137","85138","85139","85140","5375","5476","5577","5678"].includes(e.studFeeDetails[0].studGrade+e.studFeeDetails[0].studSection))var o="rzp_live_Cc42owPPseFDcH";else o="rzp_live_9bQoddSzK6iIvn";var i={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_card_last_number:e.oderid,cardtype:o};n.post(r.apiUrl+"api/fees/update_docIisOrderId",i).then(function(a){var s={src:"https://checkout.razorpay.com/v1/checkout.js",key:o,amount:100*parseFloat(e.grid.grad_total),description:e.refNumbertrans,order_id:e.oderid,handler:function(a){alert(a.razorpay_payment_id),e.response_code=a.razorpay_payment_id;var s={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_transaction_id:a.razorpay_payment_id,temp_dd_error_messsage:a.error_description,authorizeid:e.oderid,temp_dd_fee_trasaction_type:"Ok",temp_dd_error_code:"Ok",temp_dd_fee_card_last_number:e.oderid};n.post(r.apiUrl+"api/fees/update_docIis",s).then(function(s){""!=e.response_code&&swal({title:"Alert",text:"Payment Done Successfully. Your Transaction Number is "+a.razorpay_payment_id,imageUrl:"https://assets.mograsys.com/assets/img/check.png"}),t.reload()})},notes:{address:e.refNumbertrans},modal:{ondismiss:function(){console.log("Checkout form closed"),$("body").css("overflow","auto")}}};new Razorpay(s).open()})})})})}):"newarts"==n.defaults.headers.common.schoolId&&(console.log("newarts"),e.pay_ful=function(a){var s={opr:"P",sims_cur_code:e.studFeeDetails[0].studCurr,sims_enroll_number:e.studFeeDetails[0].studEnroll,sims_academic_year:e.studFeeDetails[0].studAcademic,sims_grade_code:e.studFeeDetails[0].studGrade,sims_section_code:e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(a){e.amt=100*parseFloat(e.grid.grad_total);var s={id:e.amt+"&receipt=Admission Fee Form:"+e.refNumbertrans,class_code:e.studFeeDetails[0].studGrade+e.studFeeDetails[0].studSection};n.post(r.apiUrl+"api/fees/Session_razorpay_Key_Nacs",s).then(function(a){console.log(a.data);var s=a.data;console.log("KeyURL",s),e.razorKeyURL=s;var o="Admission Fee Form:"+e.refNumbertrans;e.amt;e.SessionData={amount:e.amt,receipt:o,currency:"INR",payment_capture:1},n.post(r.apiUrl+"api/fees/razorOrdernacasca?data="+JSON.stringify(e.SessionData)+"&url="+e.razorKeyURL).then(function(a){var s=a.data;e.oderid=s,console.log("$scope.oderid",e.oderid),console.log("$scope.refNumbertrans",e.refNumbertrans);if(["A11","B12","C13","D14","E15","F16","G17","H18","I19","J110","K111","M113","M114","M115","A230","B231","C232","E234","W126","Y128","X127","Z129","K240","U245","V246","W247","X248"].includes(e.studFeeDetails[0].studGrade+e.studFeeDetails[0].studSection))var o="rzp_live_Cc42owPPseFDcH";else o="rzp_live_9bQoddSzK6iIvn";var i={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_card_last_number:e.oderid,cardtype:o};n.post(r.apiUrl+"api/fees/update_docIisOrderId",i).then(function(a){var s={src:"https://checkout.razorpay.com/v1/checkout.js",key:o,amount:100*parseFloat(e.grid.grad_total),description:e.refNumbertrans,order_id:e.oderid,handler:function(a){alert(a.razorpay_payment_id),e.response_code=a.razorpay_payment_id;var s={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_transaction_id:a.razorpay_payment_id,temp_dd_error_messsage:a.error_description,authorizeid:e.oderid,temp_dd_fee_trasaction_type:"Ok",temp_dd_error_code:"Ok",temp_dd_fee_card_last_number:e.oderid};n.post(r.apiUrl+"api/fees/update_docIis",s).then(function(s){""!=e.response_code&&swal({title:"Alert",text:"Payment Done Successfully. Your Transaction Number is "+a.razorpay_payment_id,imageUrl:"https://assets.mograsys.com/assets/img/check.png"}),t.reload()})},notes:{address:e.refNumbertrans},modal:{ondismiss:function(){console.log("Checkout form closed"),$("body").css("overflow","auto")}}};new Razorpay(s).open()})})})})}),e.onlyNumbers=function(e){let t={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(let a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+e.academic_year+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){let a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let i=window.location.href;i.substring(0,i.indexOf(":"));var l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){let a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){let o=t.data;a="SimsReports."+o+",SimsReports";let i=window.location.href;i.substring(0,i.indexOf(":"));var l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){let o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";let i=window.location.href;i.substring(0,i.indexOf(":"));var l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){let o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51Modern_New,SimsReports";let i=window.location.href;i.substring(0,i.indexOf(":"));var l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";let e=["#eef9f8","#d9edf1","#fef2f2","#fae1e1","#edf7fc","#d8ebf4","#FDFDE1","#FFFFD5","#DFFFCC","#D4FFBB"];var t=angular.module("sims.module.lms");t.run(["$rootScope","$templateCache",function(e,t){e.$on("$viewContentLoaded",function(){t.removeAll()})}]),t.controller("HyperlinkslogoCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(t,a,s,o,n,r,i){t.pagesize="5",t.temp0="",t.temp1="",t.table1=!0,t.imageUrl=t.schoolUrl+"/Hylogo/",t.user=s.globals.currentUser.username,t.getgrid=function(){r.get(i.apiUrl+"api/WebsitehyperlinksController/getDocMaster?user="+s.globals.currentUser.username+"&grade_code="+s.globals.currentStudent.sims_grade_code+"§ion_code="+s.globals.currentStudent.sims_section_code).then(function(a){if(!a.data.length)return void swal({title:"Alert",text:"Quick links are not created",imageUrl:"assets/img/notification-alert.png"});$("#links-container").removeClass("hide");let s=e.length;a.data.forEach((t,a)=>{t.bgColor=e[a%s]}),t.DocData=a.data})},t.size=function(e){t.pagesize=e,t.currentPage=1,t.numPerPage=e,t.makeTodos()},t.index=function(e){t.pageindex=e,t.currentPage=e,console.log("currentPage="+t.currentPage),t.makeTodos(),t.chk={},t.chk.check_all=!1,t.row1=""},t.cancel=function(){t.table1=!0,t.operation=!1,t.myForm.$setPristine(),t.myForm.$setUntouched(),t.temp={comn_doc_code:"",comn_doc_short_name:"",comn_doc_desc:"",comn_doc_remark:"",comn_doc_registration_date:"",comn_doc_expiry_date:"",comn_doc_authority_name:"",comn_link_logo_path:"",comn_doc_owner_user_code:"",comn_doc_owner_reminder_days:"",comn_doc_escalation1_user_code:"",comn_doc_escalation1_reminder_days:"",comn_doc_escalation2_user_code:"",comn_doc_escalation2_reminder_days:"",comn_doc_status:""},$(document).ready(function(){$("#btn_cancel").on("click",function(){$("#file1").val("")})})},t.downloaddoc=function(e){var a=s.globals.currentStudent.enroll_number,o=s.globals.currentStudent.sims_student_passport_fullname,n=s.globals.currentStudent.sims_grade_name_en,r=s.globals.currentStudent.sims_section_name_en;"Book Store"===e.comn_link_name?(t.url=e.comn_link_URL+a,window.open(t.url)):"SEED(Social-Educational-Emotional Development)"===e.comn_link_name?(t.url=e.comn_link_URL+"std_enroll_number="+a+"|std_name="+o+"|std_grade="+n+"|std_section="+r,window.open(t.url)):(t.url=e.comn_link_URL,window.open(t.url))},s.globals.studentsLoaded&&t.getgrid(),t.$on("student_change",function(){t.getgrid()})}])}(),function(){"use strict";angular.module("sims.module.fees").controller("feeSmfcController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/feeSmfc","_self")}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=100*parseFloat(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(a)+parseFloat(e.grid.convence_charge),2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,console.log("getdataparameter",e.card_charges),n.get(r.apiUrl+"api/fees/GetStudentFeeDvps?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)l={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit};s.push(l)}n.post(r.apiUrl+"api/fees/CUD_fee_doc",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("CheckOut")},600)})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){t.go("main.FeeParent")},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("feeSmsmController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;let d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeSmsm","_self")}),e.grid.selectAll=function(){let t=0;for(let a=0;a0&&(e.chk_disabled=!1),e.grid.total1=100*parseFloat(t)},e.grid.select=function(t){let a=0;if(t.ischecked){let t=e.studFeeDetails.length>1;for(let s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(a)+parseFloat(e.grid.convence_charge),2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode==t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);let s=t.data.length;for(let o=0;o0&&(e.pdetails=t.data[0],console.log("$scope.pdetails",e.pdetails),""==e.pdetails.pemail||"-"==e.pdetails.pemail?e.pemail="test@payfort.com":e.pemail=e.pdetails.pemail)}),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(t)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.grid.select=function(t){var a=0;t.stud_vat_calc_amt_n=parseFloat(t.studBalancePayingAMT)*(parseFloat(t.stud_vat_per)/100);for(var s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total_new=parseFloat(a)+parseFloat(e.grid.convence_charge),e.grid.grad_total=e.grid.grad_total_new.toFixed(2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0&&(l=parseFloat(parseFloat(e.studFeeDetails[i].studBalancePayingAMT)*parseFloat(e.studFeeDetails[i].stud_vat_per))/(100+parseFloat(e.studFeeDetails[i].stud_vat_per)),e.studFeeDetails[i].studBalanceAMT=parseFloat(e.studFeeDetails[i].studBalancePayingAMT)-l);var d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[i].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:e.studFeeDetails[i].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[i].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[i].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[i].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[i].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[i].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:l};o++,s.push(d)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)d={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};s.push(d)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",s).then(function(t){e.refNumbertrans=parseInt(t.data),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):n.get(r.apiUrl+"api/fees/GetAmount_status?doc_no="+e.refNumbertrans).then(function(t){e.amount_total_ppn_new=t.data,e.amount_total_ppn=e.amount_total_ppn_new[0].temp_dd_fee_amount_final,e.amount_totalPPN=parseFloat(e.amount_total_ppn),console.log("$scope.amount_total_ppn",e.amount_totalPPN),e.amount_totalPPN==e.grid.grad_total?setTimeout(function(){e.pay_ful("creditcard")},600):swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200})})})},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.printReportnew=function(t){var a;e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("$scope.rname",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),$("#reportViewer4").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.print_rpt=function(t,a){var o;e.flg_report=!0,e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t,a){var o;e.parameters={fee_rec_no:t,search:a},o="SimsReports.Sims.SIMR51LEAMSOR,SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer3").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:o,parameters:e.parameters}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.grid.grad_total);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","udf2"),n.setAttribute("value","P");var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","email"),i.setAttribute("value",e.pemail);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","enroll"),l.setAttribute("value",e.fe_enroll);var d=document.createElement("input");d.setAttribute("type","submit"),d.setAttribute("value","Submit"),d.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("feeDmcController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||("PGS10001-Success"==d.res||"Y"==d.res?swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id+"Authorization Pending from College",width:480,height:300},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeDmc","_self")}):swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeDmc","_self")})),n.get(r.apiUrl+"api/common/getParentDetails?pid="+a.globals.currentUser.username).then(function(t){t.data.length>0&&(e.pdetails=t.data[0],e.mobile=e.pdetails.pmobile,""==e.pdetails.pemail?e.pemail="info@dmscollege.ac.in":e.pemail=e.pdetails.pemail)}),e.UploadDocument=function(){$("#viewdashDetailsModal").modal({showModal:!0})},e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=l("number")(parseFloat(a)+0*parseFloat(a),0),e.grid.grad_total=l("number")(parseFloat(a)+0*parseFloat(a),0),e.grid.grad_total1=parseFloat(a)+0*parseFloat(a),console.log("$scope.grid.grad_total",e.grid.grad_total)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeLeams?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var o=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var n=0;n0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name)),e.propertyName="sltr_doc_date1",s(function(){$("#fixTable3").tableHeadFixer({top:1})},100)})},e.insert_temp=function(t){t&&n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=installation Charges").then(function(s){if(e.installation_charges=s.data,e.installation_charges.length>0)if(e.str1=t,e.str2=parseFloat(e.installation_charges[0].sims_appl_form_field_value3),e.str2<=e.str1){for(var o=[],i=0,l=0;l0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(t)+parseFloat(e.grid.convence_charge),2)},e.grid.select=function(t){for(var a=0,s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(a)+parseFloat(e.grid.convence_charge),2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:"2020",StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFeeDvps?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName);for(var s=t.data.length,o=0;o0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)l={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:o,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:s[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit};s.push(l)}n.post(r.apiUrl+"api/fees/CUD_fee_doc",s).then(function(t){e.refNumbertrans=parseInt(t.data),console.log(e.refNumbertrans),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):(setTimeout(function(){},600),setTimeout(function(){!function(t,a){var s="BDSKUATY|"+t+"|NA|"+a+"|NA|NA|NA|INR|NA|R|bdskuaty|NA|NA|F|NA|NA|A3|A4|A5|A6|A7|NA";console.log("str1",s);var o=CryptoJS.HmacSHA256(s,"G3eAmyVkAzKp8jFq0fqPEqxF4agynvtJ");o=o.toString().toUpperCase();var n=s+"|"+o;console.log("merchant_data",n),bdPayment.initialize({msg:n,callbackUrl:"https://gateway1.mograsys.com/cesc/Response.php",options:{enableChildWindowPosting:!0,enablePaymentRetry:!0,retry_attempt_count:2}}),document.addEventListener("readystatechange",function(t){if("complete"===t.target.readyState){var a=document.getElementById("pay");a.disabled=!1,a.value="Pay Now",a.classList.remove("disabled"),console.log("Payment Approved"),e.launchMyAppHere("Approved")}else{var a=document.getElementById("pay");a.disabled=!1,a.value="Pay Now",a.classList.remove("disabled"),console.log("Payment cancelled"),e.launchMyAppHere("Cancelled")}})}(e.refNumbertrans,e.grid.total)},600))})},e.launchMyAppHere=function(t){if("Approved"==t){swal({title:"Alert",text:"Payment Completed Successfully. It will be reflected in your account once confirmed by accounts department.",imageUrl:"assets/img/check.png"});var a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"SUCCESS"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else if("Failed"==t){a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Failed"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data}),swal({title:"Alert",text:"Payment Failed. Please try again.",width:380,height:200})}else if("Cancelled"==t){swal({title:"Alert",text:"Payment was Cancelled.",width:380,height:200});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Cancelled"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else{swal({title:"Alert",text:t,imageUrl:"assets/img/check.png"});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"ERROR"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentUser.username).then(function(t){e.transaction_lst=t.data})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),console.log(e.summery.dd_fee_amount_final),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("GetReceipt",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.pay_ful=function(t){e.amt=e.grid.grad_total.replace(/[^\d.]/g,"");var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/"+n.defaults.headers.common.schoolId+"/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.amt);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","udf1"),o.setAttribute("value",e.username);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","udf2"),r.setAttribute("value","P");var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","trackId"),i.setAttribute("value",e.refNumbertrans);var l=document.createElement("input");l.setAttribute("type","submit"),l.setAttribute("value","Submit"),l.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(r),a.appendChild(i),a.appendChild(l),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeVMIIHEController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1;var d=i.search();jQuery.isEmptyObject(d)||(""!=d.temp_dd_fee_transaction_id?swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeVMs","_self")}):swal({title:"Alert",text:d.res},function(e){!0===e&&window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/feeVMs","_self")})),e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),console.log(e.card_charges),e.grid.convence_charge=0,e.card_charges.length>0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(t)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(t)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(t)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(t)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(t)+parseFloat(e.grid.convence_charge),2)},e.grid.select=function(t){for(var a=0,s=0;s1;for(s=0;s0&&"Y"==e.card_charges[0].sims_appl_form_field_value1&&("P"==e.card_charges[0].sims_appl_form_field_value2?e.grid.convence_charge=l("number")(parseFloat(a)*(parseFloat(e.card_charges[0].sims_appl_form_field_value3)/100),2):"A"==e.card_charges[0].sims_appl_form_field_value2&&(e.grid.convence_charge=parseFloat(a)+parseFloat(e.card_charges[0].sims_appl_form_field_value3))),parseFloat(a)>0&&(e.chk_disabled=!1),e.grid.total1=l("number")(100*(parseFloat(a)+parseFloat(e.grid.convence_charge)),2),e.grid.grad_total=l("number")(parseFloat(a)+parseFloat(e.grid.convence_charge),2)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.getFeesDetails=function(t){e.fe_enroll=a.globals.currentStudent.enroll_number;a.globals.currentStudent.enroll_number;e.chk_select_disabled="O"==a.globals.currentStudent.sims_academic_year_status,e.acYearDesc=a.globals.currentStudent.sims_academic_year_description,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Card Payment Charges").then(function(t){e.card_charges=t.data,n.get(r.apiUrl+"api/fees/GetStudentFee_VAT?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0,t.data.length>0&&(e.firstname=t.data[0].parentName,n.get(r.apiUrl+"api/student/getStudentInfo?student_enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.obj=t.data,e.summary_add=e.obj.sims_parent_father_summary_address,e.city="GOA",e.state=e.obj.sims_parent_father_state,e.fname=e.obj.sims_student_passport_first_name_en,e.lname=e.obj.sims_student_passport_last_name_en,e.email=e.obj.sims_parent_father_email,e.mobile=e.obj.sims_parent_father_mobile,console.log(" $scope.obj",e.obj)}));for(var s=t.data.length,o=0;o0&&(i=parseFloat(parseFloat(e.studFeeDetails[o].studBalancePayingAMT)*parseFloat(e.studFeeDetails[o].stud_vat_per))/(100+parseFloat(e.studFeeDetails[o].stud_vat_per)),e.studFeeDetails[o].studBalanceAMT=parseFloat(e.studFeeDetails[o].studBalancePayingAMT)-i);var l={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[o].studEnroll,temp_dd_line_no:s,temp_dd_fee_number:e.studFeeDetails[o].studFeeNumber,temp_dd_fee_code:e.studFeeDetails[o].studFeeCode,temp_dd_fee_period_code:e.studFeeDetails[o].studFeePeriodNo,temp_dd_fee_amount:e.studFeeDetails[o].studBalanceAMT,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.studFeeDetails[o].studBalancePayingAMT,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[o].studAcademic,temp_dd_fee_status:"P",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username,temp_dd_other_charge_amount:e.studFeeDetails[o].stud_vat_calc_amt_n};s++,t.push(l)}if(e.card_charges.length>0){if("Y"==e.card_charges[0].sims_appl_form_field_value1)l={temp_dd_doc_no:"",temp_dd_doc_date:"",temp_dd_enroll_number:e.studFeeDetails[0].studEnroll,temp_dd_line_no:s,temp_dd_fee_number:"",temp_dd_fee_code:e.card_charges[0].sims_appl_form_field_value4,temp_dd_fee_period_code:t[0].temp_dd_fee_period_code,temp_dd_fee_amount:e.grid.convence_charge,temp_dd_fee_amount_discounted:"",temp_dd_fee_amount_final:e.grid.convence_charge,temp_dd_fee_payment_mode:"VC",temp_dd_fee_transaction_id:"",temp_dd_fee_academic_year:e.studFeeDetails[0].studAcademic,temp_dd_fee_status:"N",temp_dd_creation_user:a.globals.currentUser.username,temp_dd_creation_date:"",temp_dd_fee_card_last_number:e.card_last_digit,temp_dd_transaction_type:"C",temp_dd_transaction_from:a.globals.currentUser.username};t.push(l)}n.post(r.apiUrl+"api/fees/CUD_fee_docAsdNew",t).then(function(t){e.refNumbertrans=parseInt(t.data),console.log(e.refNumbertrans),""==t.data?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):(setTimeout(function(){},600),setTimeout(function(){!function(t,a,s,o){var n="VISSASOC|"+t+"|NA|"+a+"|NA|NA|NA|INR|NA|R|vissasoc|NA|NA|F|"+s+"|"+o+"|A3|A4|A5|A6|A7|NA";console.log("str1",n);var r=CryptoJS.HmacSHA256(n,"4sy0adxRciH1yqhFIVYRzYYGx76jRmYY");r=r.toString().toUpperCase();var i=n+"|"+r;console.log("merchant_data",i),bdPayment.initialize({msg:i,callbackUrl:"https://gateway1.mograsys.com/vmsiihe/Response.php",options:{enableChildWindowPosting:!0,enablePaymentRetry:!0,retry_attempt_count:2}}),document.addEventListener("readystatechange",function(t){if("complete"===t.target.readyState){var a=document.getElementById("pay");a.disabled=!1,a.value="Pay Now",a.classList.remove("disabled"),console.log("Payment Approved"),e.launchMyAppHere("Approved")}else{var a=document.getElementById("pay");a.disabled=!1,a.value="Pay Now",a.classList.remove("disabled"),console.log("Payment cancelled"),e.launchMyAppHere("Cancelled")}})}(e.refNumbertrans,e.grid.total,e.email,e.mobile)},600))})},e.launchMyAppHere=function(t){if("Approved"==t){swal({title:"Alert",text:"Payment Completed Successfully. It will be reflected in your account once confirmed by accounts department.",imageUrl:"assets/img/check.png"});var a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"SUCCESS"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else if("Failed"==t){a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Failed"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data}),swal({title:"Alert",text:"Payment Failed. Please try again.",width:380,height:200})}else if("Cancelled"==t){swal({title:"Alert",text:"Payment was Cancelled.",width:380,height:200});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Cancelled"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else{swal({title:"Alert",text:t,imageUrl:"assets/img/check.png"});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"ERROR"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentUser.username).then(function(t){e.transaction_lst=t.data})},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){e.flg_report=!1},e.PreviousFeeDetails=function(){e.show_rpt=!1,e.previous={student_name:a.globals.currentStudent.sims_student_passport_fullname,class1:a.globals.currentStudent.sims_grade_name_en},$("#Pre_report").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/GetPreviousReceiptsNew?ay="+a.globals.currentStudent.sims_acad_yr+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.feesReceiptData=t.data[0],e.feesDisReceiptData=t.data[1],angular.forEach(e.feesDisReceiptData,function(e,t){e.sims_icon="fa fa-minus-circle"}),e.doc_nos=[],angular.forEach(e.feesReceiptData,function(t,a){e.summery.dd_fee_amount_final=parseFloat(e.summery.dd_fee_amount_final)+parseFloat(t.dd_fee_amount_final),e.summery.dd_fee_amount_discounted=parseFloat(e.summery.dd_fee_amount_discounted)+parseFloat(t.dd_fee_amount_discounted),console.log(t)}),console.log(e.summery.dd_fee_amount_final),e.feesReceiptData.push(e.summery)})},e.printReport=function(t){var a;e.show_rpt=!0,e.parameters={fee_rec_no:t},n.get(r.apiUrl+"api/fees/GetReceipt").then(function(t){var o=t.data;console.log("GetReceipt",o),a="SimsReports."+o+",SimsReports";var i=window.location.href,l=(i.substring(0,i.indexOf(":")),r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/");$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:a,parameters:e.parameters}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)})},e.Pre_report_cancel=function(){$("#Pre_report").modal("hide")},e.Pre_report_cancel1=function(){e.show_rpt=!1},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.fees").controller("FeeClaraController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.username=a.globals.currentUser.username,e.grid.chkAll=!1,e.grid.selectAll=function(){for(var t=0,a=0;a0&&(e.chk_disabled=!1),e.grid.total1=parseInt(t)},e.grid.select=function(t){var a=0;if(t.ischecked){for(var s=e.studFeeDetails.length>1,o=0;o0&&(e.chk_disabled=!1),e.grid.total1=l("number")(parseFloat(a)+.02*parseFloat(a),0),e.grid.grad_total=l("number")(parseFloat(a)+.02*parseFloat(a),0)},e.compareArrays=function(e,t){return _.reject(e,function(e){return _.some(t,function(t){return e.studFeeCode===t.sims_fee_code})})},e.term_change=function(t){for(var a=0;a0&&(e.std_term_name=t.data[0].sims_term_desc_en)}),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.acYear=a.globals.currentStudent.sims_acad_yr,e.std_enroll_number=a.globals.currentStudent.enroll_number,e.std_cur_code=a.globals.currentStudent.sims_cur_code,e.grid.chkAll=!1,e.Student=a.globals.currentStudent,e.IP={StudCurr:e.std_cur_code,StudAcademic:e.acYear,StudEnroll:a.globals.currentStudent.enroll_number},n.get(r.apiUrl+"api/fees/GetStudentFeeDvps?data="+JSON.stringify(e.IP)).then(function(t){e.display=!0;var o=t.data.length;e.termwise=[],console.log("fee:",t.data),e.all_Data=t.data;for(var n=0;n0&&(e.studFeeDetails=e.compareArrays(e.studFeeDetails,e.agent_list),e.term_change(e.std_term_name)),e.propertyName="sltr_doc_date1",s(function(){$("#fixTable3").tableHeadFixer({top:1})},100)})},e.insert_temp=function(){for(var t=[],s=0,o=0;o0&&(e.edt={sims_enroll_number:e.SelectedUserLst[0].s_enroll_no,sims_student_name:e.SelectedUserLst[0].name})}),s(function(){r.get(i.apiUrl+"api/TCertificate/getTcTypes").then(function(t){e.TcTypesList=t.data})},1e3),e.Save=function(t){if(0==t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{if(void 0==e.edt.sims_appl_parameter||null==e.edt.sims_appl_parameter)return void swal("","Please provide TC date");if(MyForm){var s=a.globals.currentUser.username,o=[],n={sims_enroll_number:e.edt.sims_enroll_number,sims_tc_certificate_reason:e.edt.sims_tc_certificate_reason,sims_tc_certificate_requested_by:s,sims_tc_certificate_request_date:e.dt.sims_tc_certificate_request_date,sims_tc_certificate_cur_code:a.globals.currentStudent.sims_cur_code,sims_tc_certificate_academic_year:a.globals.currentStudent.sims_acad_yr,sims_appl_parameter:e.edt.sims_appl_parameter,opr:"I"};o.push(n),r.post(i.apiUrl+"api/TCertificate/CUDTccertificaterequiestLeams",o).then(function(t){e.msg1=t.data,void 0!=e.msg1.strMessage?null==e.msg1.strMessage&&""==e.msg1.strMessage&&void 0==e.msg1.strMessage||(swal({title:"Alert",text:e.msg1.strMessage,width:380,height:200}),e.showdata(),e.currentPage=!0):swal({title:"Alert",text:"TC Request Not Sumbited...",showCloseButton:!0,width:380})})}}},e.searched=function(e,t){return _.filter(e,function(e){return function(e,t){return e.sims_tc_certificate_request_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sims_enroll_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sager==t}(e,t)})},e.search=function(){e.todos=e.searched(e.obj,e.searchText),e.totalItems=e.todos.length,e.currentPage="1",""==e.searchText&&(e.todos=e.obj),e.makeTodos()},e.clear=function(){e.edt.sims_tc_certificate_reason="",e.searchText=""},e.Reset=function(){e.clear(),e.tablehide=!1},e.getstudentList=function(){e.edt={sims_student_name:a.globals.currentStudent.sims_student_passport_fullname_new,sims_enroll_number:a.globals.currentStudent.sims_student_enroll_number},r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiest?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,console.log("getTcCertificateRequiest",e.obj),e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?e.tablehide=!1:e.tablehide=!0})},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.certificate").controller("TCCertificateModernController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(e,t,a,s,o,n,r,i){console.clear(),e.tablehide=!1,e.pagesize="5",e.pageindex="1",a.visible_stud=!0,a.chkMulti=!1;var l=n("date")(new Date,"dd-MM-yyyy");e.dt={sims_tc_certificate_request_date:l},r.get(i.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Upload Url").then(function(t){e.upldurl=t.data,console.log(e.upldurl),t.data.length>0&&""!=e.upldurl[0].sims_appl_form_field_value1?e.uploadurl=e.upldurl[0].sims_appl_form_field_value1:e.uploadurl="https://api.mograsys.com/kindoapi/"}),e.size=function(t){e.pagesize=t,e.currentPage=1,e.numPerPage=t,console.log("numPerPage="+e.numPerPage),e.makeTodos()},e.index=function(t){e.pageindex=t,e.currentPage=t,console.log("currentPage="+e.currentPage),e.makeTodos(),main.checked=!1,e.CheckAllChecked()},e.filteredTodos=[],e.currentPage=1,e.numPerPage=5,e.maxSize=5,e.makeTodos=function(){var t=parseInt(e.totalItems%e.numPerPage);e.pagersize="0"==t?parseInt(e.totalItems/e.numPerPage):parseInt(e.totalItems/e.numPerPage)+1;var a=(e.currentPage-1)*e.numPerPage,s=parseInt(a)+parseInt(e.numPerPage);console.log("begin="+a),console.log("end="+s),e.filteredTodos=e.todos.slice(a,s)},e.Show=function(){r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiestNew?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?(swal({title:"Alert",text:"No Record Found...",showCloseButton:!0,width:450,height:200}),e.tablehide=!1):e.tablehide=!0})},e.selectDate=function(t){var a=n("date")(t,"dd-MM-yyyy");e.dt={sims_tc_certificate_request_date:a}},r.get(i.apiUrl+"api/TCertificate/getTcTypes").then(function(t){e.TcTypesList=t.data});var d=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){d.append(t,e)})},e.file_changed=function(t){var s=t.files[0];e.photo_filename=s.type;var o=new FileReader;o.onload=function(t){e.$apply(function(){e.prev_img=t.target.result})},o.readAsDataURL(s);var n=a.globals.currentStudent.enroll_number+"_passbook",i={method:"POST",url:e.uploadurl+"api/file/upload?filename="+n+"&location=images/Passbook/",data:d,headers:{"Content-Type":void 0}};r(i).success(function(t){t.length>0&&(e.filename=t)})},e.Save=function(t){if(0==t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else if(MyForm){var s=a.globals.currentUser.username,o=[],n={sims_enroll_number:e.edt.sims_enroll_number,sims_tc_certificate_reason:e.edt.sims_tc_certificate_reason,sims_tc_certificate_requested_by:s,sims_tc_certificate_request_date:e.dt.sims_tc_certificate_request_date,sims_tc_certificate_cur_code:a.globals.currentStudent.sims_cur_code,sims_tc_certificate_academic_year:a.globals.currentStudent.sims_acad_yr,sims_appl_parameter:"",sims_grade_code:a.globals.currentStudent.sims_grade_code,sims_tc_account_holder_name:e.edt.sims_ac_holder_name,sims_tc_account_number:e.edt.sims_account_number,sims_tc_bank_name:e.edt.sims_bank_name,sims_tc_bank_branch_name:e.edt.sims_branch_name,sims_tc_bank_ifsc_code:e.edt.sims_ifsc_code,sims_tc_bank_passbook_file_name:e.filename,sims_tc_institution_name:e.edt.sims_tc_institution_name,sims_tc_programme_name:e.edt.sims_tc_programme_name,opr:"N"};o.push(n),r.post(i.apiUrl+"api/TCertificate/CUDTccertificaterequiestModernNew",o).then(function(t){e.msg1=t.data,void 0!=e.msg1.strMessage?null==e.msg1.strMessage&&""==e.msg1.strMessage&&void 0==e.msg1.strMessage||(swal({title:"Alert",text:e.msg1.strMessage,width:380,height:200}),e.showdata(),e.currentPage=!0):swal({title:"Alert",text:"TC Request Not Sumbited...",showCloseButton:!0,width:380})})}},e.searched=function(e,t){return _.filter(e,function(e){return function(e,t){return e.sims_tc_certificate_request_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sims_enroll_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sager==t}(e,t)})},e.search=function(){e.todos=e.searched(e.obj,e.searchText),e.totalItems=e.todos.length,e.currentPage="1",""==e.searchText&&(e.todos=e.obj),e.makeTodos()},e.clear=function(){e.edt.sims_tc_certificate_reason="",e.searchText=""},e.Reset=function(){e.clear(),e.tablehide=!1},e.viewFile=function(t){e.passbook_url="https://api.mograsys.com/kindoapi/Content/"+r.defaults.headers.common.schoolId+"/images/Passbook/",window.open(e.passbook_url+t,"_new")},e.getstudentList=function(){e.edt={sims_student_name:a.globals.currentStudent.sims_student_passport_fullname_new,sims_enroll_number:a.globals.currentStudent.sims_student_enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr},r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiestNew?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?e.tablehide=!1:e.tablehide=!0})},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()}),$('*[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";angular.module("sims.module.certificate").controller("TCCertificateIhsoController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$filter","$http","ENV",function(e,t,a,s,o,n,r,i){console.clear(),e.tablehide=!1,e.pagesize="5",e.pageindex="1",a.visible_stud=!0,a.chkMulti=!1,e.disable_btn=!0,"portaldso"==r.defaults.headers.common.schoolId?r.defaults.headers.common.schoolId="iisonlinedso":"portalag"==r.defaults.headers.common.schoolId?r.defaults.headers.common.schoolId="ihsonlineag":"portalom"==r.defaults.headers.common.schoolId&&(r.defaults.headers.common.schoolId="ihsonlineom"),e.school_id=r.defaults.headers.common.schoolId,e.schoolname="https://apiihs.schoolappsuae.com/mograSISAPI/Content/"+r.defaults.headers.common.schoolId+"/Docs/portalReference/term_condition-TC_Certificate.pdf";n("date")(new Date,"yyyy-MM-dd");e.size=function(t){e.pagesize=t,e.currentPage=1,e.numPerPage=t,e.makeTodos()},e.index=function(t){e.pageindex=t,e.currentPage=t,e.makeTodos(),main.checked=!1,e.CheckAllChecked()},e.filteredTodos=[],e.currentPage=1,e.numPerPage=5,e.maxSize=5,e.makeTodos=function(){let t=parseInt(e.totalItems%e.numPerPage);e.pagersize="0"==t?parseInt(e.totalItems/e.numPerPage):parseInt(e.totalItems/e.numPerPage)+1;let a=(e.currentPage-1)*e.numPerPage,s=parseInt(a)+parseInt(e.numPerPage);e.filteredTodos=e.todos.slice(a,s)},$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"}),e.getstudentList=function(){r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiestDate?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?(swal({title:"Alert",text:"No Record Found...",showCloseButton:!0,width:450,height:200}),e.tablehide=!1):e.tablehide=!0})},$(document).on("touch click",'*[data-datepicker="true"] .add-on',function(e){$('input[type="text"]',$(this).parent()).focus()}),e.SearchEnroll=function(){e.global_Search_click(),$("#Global_Search_Modal").modal({backdrop:"static"})},e.$on("global_cancel",function(){e.SelectedUserLst.length>0&&(e.edt={sims_enroll_number:e.SelectedUserLst[0].s_enroll_no,sims_student_name:e.SelectedUserLst[0].name})}),s(function(){r.get(i.apiUrl+"api/TCertificate/getTcTypes").then(function(t){e.TcTypesList=t.data})},1e3),e.Save=function(t){if(!1===t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{if(void 0==e.edt.sims_appl_parameter||null==e.edt.sims_appl_parameter)return void swal("","Please provide TC date");MyForm&&$("#viewdashDetailsModal2").modal({showModal:!0})}},e.Save1=function(t){if(!1===t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{if(void 0==e.edt.sims_appl_parameter||null==e.edt.sims_appl_parameter||""==e.edt.sims_appl_parameter)return void swal("","TC Type");if(void 0==e.edt.sims_tc_certificate_reason||null==e.edt.sims_tc_certificate_reason||""==e.edt.sims_tc_certificate_reason)return void swal("","Please provide TC reason");if(void 0==e.edt.sims_tc_certificate_city_of_new_school||null==e.edt.sims_tc_certificate_city_of_new_school||""==e.edt.sims_tc_certificate_city_of_new_school)return void swal("","Please provide the name of new school");if(void 0==e.edt.sims_tc_certificate_country_of_new_school||null==e.edt.sims_tc_certificate_country_of_new_school||""==e.edt.sims_tc_certificate_country_of_new_school)return void swal("","Please provide the country of new school");if(void 0==e.edt.sims_tc_certificate_request_date||null==e.edt.sims_tc_certificate_request_date||""==e.edt.sims_tc_certificate_request_date)return void swal("","Please provide TC date");if(MyForm){let t=a.globals.currentUser.username,s=[],o={sims_enroll_number:e.edt.sims_enroll_number,sims_tc_certificate_reason:e.edt.sims_tc_certificate_reason,sims_tc_certificate_requested_by:t,sims_tc_certificate_request_date:e.edt.sims_tc_certificate_request_date,sims_tc_certificate_cur_code:a.globals.currentStudent.sims_cur_code,sims_tc_certificate_academic_year:a.globals.currentStudent.sims_acad_yr,sims_appl_parameter:e.edt.sims_appl_parameter,sims_tc_certificate_city_of_new_school:e.edt.sims_tc_certificate_city_of_new_school,sims_tc_certificate_country_of_new_school:e.edt.sims_tc_certificate_country_of_new_school,sims_grade_code:a.globals.currentStudent.sims_grade_code,opr:"I"};s.push(o),r.post(i.apiUrl+"api/TCertificate/CUDTccertificaterequiestIHS",s).then(function(t){e.msg1=t.data,void 0!=e.msg1.strMessage?null==e.msg1.strMessage&&""==e.msg1.strMessage&&void 0==e.msg1.strMessage||(swal({title:"Alert",text:e.msg1.strMessage,width:380,height:200}),e.getstudentList(),e.currentPage=!0):swal({title:"Alert",text:"TC Request Not Sumbited...",showCloseButton:!0,width:380})})}}},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},e.searched=function(e,t){return _.filter(e,function(e){return function(e,t){return e.sims_tc_certificate_request_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sims_enroll_number.toLowerCase().indexOf(t.toLowerCase())>-1||e.sager==t}(e,t)})},e.search=function(){e.todos=e.searched(e.obj,e.searchText),e.totalItems=e.todos.length,e.currentPage="1",""==e.searchText&&(e.todos=e.obj),e.makeTodos()},e.clear=function(){e.edt.sims_tc_certificate_reason="",e.searchText=""},e.Reset=function(){e.clear(),e.tablehide=!1},e.getstudentList=function(){e.edt={sims_student_name:a.globals.currentStudent.sims_student_passport_fullname_new,sims_enroll_number:a.globals.currentStudent.sims_student_enroll_number},r.get(i.apiUrl+"api/TCertificate/getTcCertificateRequiest?enrollno="+e.edt.sims_enroll_number).then(function(t){e.obj=t.data,e.totalItems=e.obj.length,e.todos=e.obj,e.makeTodos(),0==e.obj.length?e.tablehide=!1:e.tablehide=!0})},e.msg=function(){swal({title:"Alert",text:"Processing of Transfer Certificate requires 8 – 10 working days from the last date of attendance and date of payment of all dues.",showCloseButton:!0,width:450,height:200})},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()}),r.get(i.apiUrl+"api/TCertificate/GetRequestInstruction").then(function(t){e.RequestList=t.data})}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ExamController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.iscompulsorysel=!1,e.disablesaveforupdate=!1,e.printreport=!1,e.imageChangedAndSave=!0,e.defaultdisablesave=!1,e.showform=!1,e.totalgroupcount=0,e.totalSelectedgroupcount=0,e.paymentStatus="N",e.paymentSelf="N",e.hallticketstatus="N";var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/Exam","_self"),"Success"==d.res&&e.getstudentList())}),e.getstudentList=function(){if(e.prev_img="",e.uploading_path="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0],console.log("$scope.sem_lst",e.sem_lst)):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.internal_E_click=function(t,a,s){var o=0,n=0,r=new Map;e.fees_lst_backlog.forEach(function(e){r.set(e.sims_subject_code,!0)});for(var i=0;i0&&(d+=Math.round(o*Math.round(.4*parseFloat(e.fees_lst[i].sims_fee_amount1)))),n>0&&(d+=Math.round(n*Math.round(.6*parseFloat(e.fees_lst[i].sims_fee_amount1)))),e.fees_lst[i].sims_fee_amount=Math.round(Math.round(o*Math.round(.4*parseFloat(e.fees_lst[i].sims_fee_amount1)))+Math.round(n*Math.round(.6*parseFloat(e.fees_lst[i].sims_fee_amount1)))),console.log("$scope.fees_lst[i].sims_fee_amount",e.fees_lst[i].sims_fee_amount)):d+=Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=d},e.internal_E_click1=function(){for(var t=0,a=new Map,s=0;s0&&(n+=Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))),t>0&&(n+=Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),e.fees_lst[s].sims_fee_amount=Math.round(Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))+Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),console.log("$scope.fees_lst[i].sims_fee_amount",e.fees_lst[s].sims_fee_amount)):n+=Math.round(parseFloat(e.fees_lst[s].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=n},e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getGroupname?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year).then(function(t){e.Groupcheck=t.data,console.log("$scope.Groupcheck= res.data;",e.Groupcheck=t.data),"Y"==e.Groupcheck[0].sims_checkgroup?e.Groupcheck_box=!0:e.Groupcheck_box=!1}),e.subject_lst=[],n.get(r.apiUrl+"api/parentportal/getExam?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){t.data.length>0?(e.examDetails=t.data,console.log("$scope.examDetails = res.data;",e.examDetails=t.data),e.sims_type=e.examDetails[0].sims_type,e.disablesaveforupdate="N"):(e.examDetails=[],e.disablesaveforupdate="Y",e.fees_lst=[],e.exam.sims_student_exam_form_fee_total_amount=0,"B"==e.sims_term_code.sims_report_card_term_status&&swal({title:"Alert",text:"No Backlog",imageUrl:"assets/img/notification-alert.png"})),e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status,console.log("$scope.disablesaveforupdate",e.disablesaveforupdate),console.log("$scope.iscompulsorysel",e.iscompulsorysel),console.log("$scope.printreport",e.printreport),console.log("$scope.examDetails= res.data;",e.examDetails=t.data),e.fees_lst=[];var s={opr:"KK",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_save_btn=!0:e.hide_save_btn=!1)});var o={opr:"RD",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_reset_btn=!0:e.hide_reset_btn=!1)});var i={opr:"ED",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",i).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_exam_btn=!0:e.hide_exam_btn=!1)});var l={opr:"HD",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};if(n.post(r.apiUrl+"api/parentportal/ExamCommon",l).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_hallticket_btn=!0:e.hide_hallticket_btn=!1)}),e.examDetails.length>0){var d={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",d).then(function(t){if(t.data.table.length>0){e.fees_lst=t.data.table,console.log("fees_lst",e.fees_lst),e.chk_fee=!1,e.exam.sims_student_exam_form_fee_total_amount=0;for(var s=0;s0&&(e.chk_fee=!0),e.exam.sims_student_exam_form_fee_total_amount=e.exam.sims_student_exam_form_fee_total_amount+parseFloat(e.fees_lst[s].sims_fee_amount)}else e.fees_lst=[];if("B"==e.sims_term_code.sims_report_card_term_status){var o={opr:"EB",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){e.fees_lst_backlog=t.data.table,"B"==e.sims_term_code.sims_report_card_term_status&&"1"==e.sims_type&&(e.chk_fee||e.internal_E_click()),"B"==e.sims_term_code.sims_report_card_term_status&&"2"==e.sims_type&&(e.chk_fee||e.internal_E_click1())})}})}}),console.log("$scope.exam",e.exam),n.get(r.apiUrl+"api/parentportal/getprinchalanstatus?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){e.formno=t.data,e.printchalanstatus=e.formno[0].sims_student_exam_form_no,console.log("$scope.printchalanstatus",e.printchalanstatus)});var t={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table,console.log("$scope.disableprint",e.disableprint);var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus));var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus,console.log("$scope.hallticketstatus",e.hallticketstatus))})})}})},e.reset_form=function(){swal({title:"Alert",text:"Do you want to reset form ?",showCancelButton:!0,imageUrl:"assets/img/notification-alert.png",closeOnConfirm:!1},function(t){!0===t&&(console.log(e.examDetails),e.examDetails.length>0&&n.post(r.apiUrl+"api/parentportal/ResetForm?form_no="+e.examDetails[0].sims_student_exam_form_no).then(function(t){t.data?(swal({title:"Alert",text:"Form Reseted Successfully",imageUrl:"assets/img/check.png"}),e.showData()):swal({title:"Alert",text:"Form not reseted",imageUrl:"assets/img/notification-alert.png"})}))})},e.get_student_details=function(){e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.term_change(),n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus,console.log("$scope.allowSubcheck : ",e.allowSubcheck))})):(e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[])})},console.log("$scope.prev_img",e.prev_img),e.save_Form=function(t){if(e.saveBtn=!0,0==t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{var s=[];if("B"==e.exam.sims_student_exam_term.sims_report_card_term_status&&"1"==e.sims_type)for(var o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,"B"==e.exam.sims_student_exam_term.sims_report_card_term_status)s.length>0?e.exam.subject_lst=s:e.exam.subject_lst=[];else if(s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],e.sims_student_exam_term_copy=angular.copy(e.exam.sims_student_exam_term),e.exam.sims_report_card_master_term_code=e.exam.sims_student_exam_term.sims_report_card_master_term_code,e.exam.sims_student_exam_term=e.exam.sims_student_exam_term.sims_term_code,n.post(r.apiUrl+"api/parentportal/ExamSave",e.exam).then(function(t){e.form_no=t.data,""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):console.log("Exam Data",t.data),swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.exam.sims_student_exam_term=e.sims_student_exam_term_copy,e.showData();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?(e.iscompulsorysel=!1,e.defaultdisablesave=!1):(e.iscompulsorysel=!0,e.defaultdisablesave=!0);else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.paymentTransaction_new=function(){console.log("payment array",e.exam),console.log(e.examDetails),e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,console.log(" $scope.refNumbertrans",e.refNumbertrans),console.log(" $scope.grad_total",e.grad_total),console.log(" $scope.fe_enroll",e.fe_enroll),""==e.refNumbertrans?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.paymentTransaction=function(){console.log("payment array",e.exam),console.log(e.examDetails),e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,console.log(" $scope.refNumbertrans",e.refNumbertrans),console.log(" $scope.grad_total",e.grad_total),console.log(" $scope.fe_enroll",e.fe_enroll),""==e.refNumbertrans?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),"Y"==e.paymentStatus?a.setAttribute("action","https://gateway1.mograsys.com/modernself_exam_hdfc/index.php"):a.setAttribute("action","https://gateway1.mograsys.com/Modern_Exam_Hdfc/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.exam.sims_student_exam_form_fee_total_amount);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.exam.sims_student_exam_student_contact_number);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.exam.sims_student_exam_student_email);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.StudnameFull);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.gradename);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.Rev_Save=function(){for(var t=[],a=0;a0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.exam.sims_student_exam_student_type="A",e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"FF",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0],e.sims_report_card_master_term_code=e.sem_lst[0].sims_report_card_master_term_code):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.payment_flag=!1,e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getRevaluation?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){if(e.examDetails_new=t.data,console.log("$scope.examDetails_new= res.data;",e.examDetails_new=t.data),e.examDetails_new.length>0){var s={opr:"S1",sims_student_exam_form_no:e.examDetails_new[0].sims_student_exam_form_no,temp_dd_fee_card_type:"EP"};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(parseInt(t.data.table[0].cnt)>0?e.payment_flag=!0:e.payment_flag=!1)})}t.data.length;n.get(r.apiUrl+"api/parentportal/getRevaluation_new?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){e.getrevaluation_new=t.data;for(var a=0;a0?e.examDetails=t.data:e.examDetails=[],e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status,console.log("$scope.disablesaveforupdate",e.disablesaveforupdate),console.log("$scope.iscompulsorysel",e.iscompulsorysel),console.log("$scope.printreport",e.printreport),console.log("$scope.examDetails= res.data;",e.examDetails=t.data)}),console.log("$scope.exam",e.exam);var s={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table,console.log("$scope.disableprint",e.disableprint);var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus));var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus,console.log("$scope.hallticketstatus",e.hallticketstatus))})})}})},e.get_student_details=function(){n.get(r.apiUrl+"api/parentportal/getRevaluation_flag?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){t.data?e.sims_Revaluation_enroll_number="Y":e.sims_Revaluation_enroll_number="N",console.log("$scope.sims_Revaluation_enroll_number",e.sims_Revaluation_enroll_number)}),e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.term_change(),n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus,console.log("$scope.allowSubcheck : ",e.allowSubcheck))})):(e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[])})},console.log("$scope.prev_img",e.prev_img),e.save_Form=function(t){if(e.saveBtn=!0,0==t||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/default.jpg"==e.prev_img||0==e.imageChangedAndSave||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/"==e.prev_img)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{for(var s=[],o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],n.post(r.apiUrl+"api/parentportal/ExamSave",e.exam).then(function(t){""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):console.log("Exam Data",t.data),swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.getstudentList();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s0)for(s=0;s3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.paymentTransaction_new=function(){for(var t=[],s=0;s0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.exam.sims_student_exam_student_type="A",e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"FF",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0]):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.payment_flag=!1,e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getRevaluationN?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){e.examDetails_new=t.data;t.data.length;if(e.examDetails_new.length>0){var s={opr:"S1",sims_student_exam_form_no:e.examDetails_new[0].sims_student_exam_form_no,temp_dd_fee_card_type:"ER"};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(parseInt(t.data.table[0].cnt)>0?e.payment_flag=!0:e.payment_flag=!1)})}n.get(r.apiUrl+"api/parentportal/getRevaluation_newN?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){e.getrevaluation_new=t.data;for(var a=0;a0?e.examDetails=t.data:e.examDetails=[],e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status});var s={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table;var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status);var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus)})})}})},e.get_student_details=function(){n.get(r.apiUrl+"api/parentportal/getRevaluation_flagN?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code).then(function(t){t.data?e.sims_Revaluation_enroll_number="Y":e.sims_Revaluation_enroll_number="N"}),e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.term_change(),n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus)})):(e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[])})},e.save_Form=function(t){if(e.saveBtn=!0,0==t||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/default.jpg"==e.prev_img||0==e.imageChangedAndSave||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/"==e.prev_img)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{for(var s=[],o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],n.post(r.apiUrl+"api/parentportal/ExamSave",e.exam).then(function(t){""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.getstudentList();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status)}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s0)for(s=0;s3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.paymentTransaction_new=function(){for(var t=[],s=0;s0&&"Y"==t.data[0].sims_appl_parameter&&(e.show_fee_table=!0)}),e.show_application_fee=!1,n.get(r.apiUrl+"api/common/getDataParameter?sims_appl_code=Common&sims_appl_form_field=Re-Registration Application Fee").then(function(t){t.data.length>0&&"Y"==t.data[0].sims_appl_parameter&&(e.show_application_fee=!0)}),e.exam=[];var t={opr:"J",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/re_regi_Common",t).then(function(t){e.fees_lst1=[],t.data.table.length>0&&(e.fees_lst1=t.data.table,e.exam.sims_student_exam_form_fee_total_amount1=e.fees_lst1[0].expected_Fee)});var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)});o={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en):e.exam=[]}),n.post(r.apiUrl+"api/parentportal/re_regi_Common",o).then(function(t){if(t.data.table.length>0){if(e.confirm_lst=t.data.table,e.confirm_lst.length>0&&(e.exam.sims_student_exam_student_email=e.confirm_lst[0].std_email,e.exam.sims_student_exam_student_contact_number=e.confirm_lst[0].std_mobile,e.exam.sims_student_exam_parent_email=e.confirm_lst[0].sims_parent_father_email,e.exam.sims_student_exam_parent_contact_number=e.confirm_lst[0].sims_parent_father_mobile,e.exam.sims_student_attribute6=e.confirm_lst[0].sims_student_attribute6,e.exam.sims_student_national_id=e.confirm_lst[0].sims_student_national_id,e.UploadDocument(),""!=e.confirm_lst[0].sims_subject_group&&(e.exam.sims_cur_level_grade_subcategory_code=e.confirm_lst[0].sims_subject_group,e.exam.sims_cur_level_grade_subcategory_code1=e.confirm_lst[0].sims_subject_group1,e.sub_cat_change()),"7"==e.confirm_lst[0].status||!0===e.show_fee_table)){e.show_fee_table=!0;var s={opr:"G",sims_cur_code:e.confirm_lst[0].sims_cur_code,sims_enroll_number:e.confirm_lst[0].sims_student_enroll_number,sims_academic_year:e.confirm_lst[0].sims_academic_year,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:e.confirm_lst[0].sims_grade_code,sims_section_code:e.confirm_lst[0].next_section_code,sims_subject_fee_category:e.confirm_lst[0].sims_subject_fee_category,fee_partial_payment:"Y"===e.confirm_lst[0].sims_subject_fee_partial_payment?"P1":""};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){if(t.data.table.length>0){var a=new Map;e.fees_lst=[];var s=0;t.data.table.forEach(function(t){if(a.has(t.sims_fee_code))for(var o=0;o0?(e.sub_cat_list=t.data.table,void 0==e.exam.sims_cur_level_grade_subcategory_code&&(e.exam.sims_cur_level_grade_subcategory_code=e.sub_cat_list[0].sims_cur_level_grade_subcategory_code,e.sub_cat_change())):e.sub_cat_list=[]});s={opr:"B",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_term_code:"4"};n.post(r.apiUrl+"api/parentportal/re_regi_Common",s).then(function(t){t.data.table.length>0?(e.sub_cat_list1=t.data.table,void 0==e.exam.sims_cur_level_grade_subcategory_code1&&(e.exam.sims_cur_level_grade_subcategory_code1=e.sub_cat_list1[0].sims_cur_level_grade_subcategory_code)):e.sub_cat_list1=[]})}}),e.UploadDocument=function(t){n.get(r.apiUrl+"api/common/AdmissionDashboard/GetCriteriaNameNEw?academic_year="+e.confirm_lst[0].sims_academic_year+"&grade="+e.confirm_lst[0].next_grade_code+"&enroll="+e.confirm_lst[0].sims_student_enroll_number).then(function(t){e.Upload_doc_datails=t.data;for(var a=0;a0){var a=new Map;e.subject_lstt1=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt1.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&e.sublist.push(t)}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt1.push(t),t.sublist=[],t.sublist.push(t))})}else e.subject_lstt1=[]})},e.sub_cat_change=function(){var t={opr:"Q",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:e.confirm_lst[0].next_grade_code,sims_grade_code_old:a.globals.currentStudent.sims_grade_code,sims_cur_level_grade_subcategory_code:e.exam.sims_cur_level_grade_subcategory_code};n.post(r.apiUrl+"api/parentportal/re_regi_Common",t).then(function(t){if(t.data.table.length>0){var a=new Map;e.subject_lstt=[],t.data.table.forEach(function(t){a.has(t.sims_cl_grade_sc_choicegroup)?e.subject_lstt.forEach(function(e){t.sims_cl_grade_sc_choicegroup==e.sims_cl_grade_sc_choicegroup&&("Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),e.sublist.push(t))}):(a.set(t.sims_cl_grade_sc_choicegroup,!0),e.subject_lstt.push(t),t.sublist=[],"Y"==t.sims_cl_grade_sc_subjectmandatory&&(t.sims_status=!0),1==t.sims_status&&(t.sims_status=!0),t.sublist.push(t))})}else e.subject_lstt=[];e.sub_cat_change_new()})},e.launchMyAppHere=function(t){if("Approved"==t){swal({title:"Alert",text:"Payment Completed Successfully. It will be reflected in your account once confirmed by accounts department.",imageUrl:"assets/img/check.png"});var a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"SUCCESS"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else if("Failed"==t){a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Failed"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data}),swal({title:"Alert",text:"Payment Failed. Please try again.",width:380,height:200})}else if("Cancelled"==t){swal({title:"Alert",text:"Payment was Cancelled.",width:380,height:200});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"Cancelled"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}else{swal({title:"Alert",text:t,imageUrl:"assets/img/check.png"});a={temp_dd_doc_no:e.refNumbertrans,acqresponsecode:"ERROR"};n.post(r.apiUrl+"api/fees/update_doc1",a).then(function(t){e.msg1=t.data})}},e.check_click=function(t,a){for(var s=0,o=0;oparseFloat(t.expected_Fee))swal({title:"",text:"Amount should not less than "+t.sims_fee_installment_min_amount}),t.expected_Fee=t.expected_Fee1;else if(parseFloat(t.expected_Fee1)2097152&&(e.filesize=!1,e.edt1.photoStatus=!1,swal({title:"Alert",text:"File Should Not Exceed 2MB.",imageUrl:"assets/img/notification-alert.png"}))})},e.save=function(t){if(t){for(var s=[],o=0,i=0;i0&&(e.confirm_lst=t.data.table)})}else swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"})})}else swal({title:"Alert",text:"Fill all required field",imageUrl:"assets/img/notification-alert.png"})},$(document).ready(function(){}),e.uploadClick=function(t){e.filesize=!0,e.edt1=t,e.edt1.photoStatus=!0,e.ins=!1,d=new FormData},e.$on("student_change",function(t,a){e.getFeesDetails()}),a.globals.studentsLoaded&&e.getFeesDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ImprovementController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.iscompulsorysel=!1,e.disablesaveforupdate=!1,e.printreport=!1,e.imageChangedAndSave=!0,e.defaultdisablesave=!1,e.showform=!1,e.totalgroupcount=0,e.totalSelectedgroupcount=0,e.paymentStatus="N",e.paymentSelf="N",e.hallticketstatus="N";var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/Exam","_self"),"Success"==d.res&&e.getstudentList())}),e.getstudentList=function(){if(e.prev_img="",e.uploading_path="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.exam.sims_student_exam_student_type="A",e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"D",sims_student_exam_cur_code:e.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ImprovementCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.form_status="",e.term_change=function(){e.form_status="";var t={opr:"C",sims_student_exam_cur_code:e.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code};n.post(r.apiUrl+"api/parentportal/ImprovementCommon",t).then(function(t){if(t.data.table.length>0){e.sims_Revaluation_enroll_number=!1,e.examDetails_new=t.data.table,console.log("$scope.examDetails_new= res.data;",e.examDetails_new);for(var a=0;a0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.term_change(),n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus,console.log("$scope.allowSubcheck : ",e.allowSubcheck))})):(e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[])})},console.log("$scope.prev_img",e.prev_img),e.save_Form=function(t){if(e.saveBtn=!0,0==t||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/default.jpg"==e.prev_img||0==e.imageChangedAndSave||"https://api.mograsys.com/kindoapi/Content/modern/Images/StudentImages/"==e.prev_img)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{for(var s=[],o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],n.post(r.apiUrl+"api/parentportal/ExamSave",e.exam).then(function(t){""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):console.log("Exam Data",t.data),swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.getstudentList();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status,console.log("$scope.paymentStatus",e.paymentStatus))}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s0)for(s=0;s3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.Rev_Save=function(t){if(t){for(var s=[],o=0,i=0;i0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0]):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.internal_E_click=function(t,a,s){var o=0,n=0,r=new Map;e.fees_lst_backlog.forEach(function(e){r.set(e.sims_subject_code,!0)});for(var i=0;i0&&(d+=Math.round(20*o)),n>0&&(d+=Math.round(n*Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1)))),e.fees_lst[i].sims_fee_amount=Math.round(Math.round(20*o)+Math.round(n*Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1))))):d+=Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=d},e.internal_E_click1=function(){for(var t=0,a=new Map,s=0;s0&&(n+=Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))),t>0&&(n+=Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),e.fees_lst[s].sims_fee_amount=Math.round(Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))+Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1))))):n+=Math.round(parseFloat(e.fees_lst[s].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=n},e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getGroupname?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year).then(function(t){e.Groupcheck=t.data,"Y"==e.Groupcheck[0].sims_checkgroup?e.Groupcheck_box=!0:e.Groupcheck_box=!1}),e.subject_lst=[],n.get(r.apiUrl+"api/parentportal/getExamNacs?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status+"&category="+e.exam.sims_cur_level_grade_subcategory_code).then(function(t){if(t.data.length>0?(e.examDetails=t.data,e.sims_type=e.examDetails[0].sims_type,e.disablesaveforupdate="N"):(e.examDetails=[],e.disablesaveforupdate="Y",e.fees_lst=[],e.exam.sims_student_exam_form_fee_total_amount=0,"B"==e.sims_term_code.sims_report_card_term_status&&swal({title:"Alert",text:"No Backlog",imageUrl:"assets/img/notification-alert.png"})),e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status,e.fees_lst=[],e.examDetails.length>0){var s={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0){e.fees_lst=t.data.table,e.chk_fee=!1,e.exam.sims_student_exam_form_fee_total_amount=0;for(var s=0;s0&&(e.chk_fee=!0),e.exam.sims_student_exam_form_fee_total_amount=e.exam.sims_student_exam_form_fee_total_amount+parseFloat(e.fees_lst[s].sims_fee_amount)}else e.fees_lst=[];if("B"==e.sims_term_code.sims_report_card_term_status){var o={opr:"EB",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){e.fees_lst_backlog=t.data.table,"B"==e.sims_term_code.sims_report_card_term_status&&"1"==e.sims_type&&(e.chk_fee||e.internal_E_click()),"B"==e.sims_term_code.sims_report_card_term_status&&"2"==e.sims_type&&(e.chk_fee||e.internal_E_click1())})}})}}),n.get(r.apiUrl+"api/parentportal/getprinchalanstatus?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){e.formno=t.data,e.printchalanstatus=e.formno[0].sims_student_exam_form_no});var t={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table;var s={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status);var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus)})});var o={opr:"RD",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_reset_btn=!0:e.hide_reset_btn=!1)})}})},e.reset_form=function(){swal({title:"Alert",text:"Do you want to reset form ?",showCancelButton:!0,imageUrl:"assets/img/notification-alert.png",closeOnConfirm:!1},function(t){!0===t&&e.examDetails.length>0&&n.post(r.apiUrl+"api/parentportal/ResetForm?form_no="+e.examDetails[0].sims_student_exam_form_no).then(function(t){t.data?(swal({title:"Alert",text:"Form Reseted Successfully",imageUrl:"assets/img/check.png"}),e.showData()):swal({title:"Alert",text:"Form not reseted",imageUrl:"assets/img/notification-alert.png"})})})},e.get_student_details=function(){e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0){if(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Ahmednagar",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.pg_status=e.student_data_lst[0].pg_status,"01"==e.sims_grade_code||"03"==e.sims_grade_code||"Y"==e.pg_status){var o={opr:"P",sims_academic_year:e.sims_academic_year,sims_cl_grade_code:e.sims_grade_code,sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_cl_grade_sc_term_code:e.sims_term_code.sims_term_code,sims_admission_number:e.exam.sims_student_exam_enroll_number,sims_cl_grade_sc_status:"A"};n.post("https://nacasca.appsis.co.in/kindoapi/api/common/SectionScreening/SubcategoryEntryCommon",o).then(function(t){e.sub_cat_list=t.data.table,e.sub_cat_list.length>0&&(e.exam.sims_cur_level_grade_subcategory_code=t.data.table[0].sims_cur_level_grade_subcategory_code),e.term_change()})}else e.term_change();n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus)})}else e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[]})},e.sub_cat_change=function(){e.term_change()},e.save_Form=function(t){if(e.saveBtn=!0,0==t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{var s=[];if("B"==e.exam.sims_student_exam_term.sims_report_card_term_status&&"1"==e.sims_type)for(var o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,"B"==e.exam.sims_student_exam_term.sims_report_card_term_status)s.length>0?e.exam.subject_lst=s:e.exam.subject_lst=[];else if(s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],e.sims_student_exam_term_copy=angular.copy(e.exam.sims_student_exam_term),e.exam.sims_report_card_master_term_code=e.exam.sims_student_exam_term.sims_report_card_master_term_code,e.exam.sims_student_exam_term=e.exam.sims_student_exam_term.sims_term_code,n.post(r.apiUrl+"api/parentportal/ExamSave",e.exam).then(function(t){e.form_no=t.data,""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.exam.sims_student_exam_term=e.sims_student_exam_term_copy,e.showData();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status)}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;sparseInt(t.sims_elective_subject)&&(t.subject_tick=!1);for(o=0;o=a)parseInt(t.sims_compulsory_subject)==a?(e.iscompulsorysel=!1,e.defaultdisablesave=!1):(e.iscompulsorysel=!0,e.defaultdisablesave=!0);else{for(o=0;o=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(o=0;o3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.paymentTransaction_new=function(){e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,""==e.refNumbertrans?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.paymentTransaction=function(){e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,""==e.refNumbertrans?swal({title:"Alert",text:"Exam Form is not saved, first save form and then pay fees..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.pay_ful=function(t){e.amt="100"*parseFloat(e.exam.sims_student_exam_form_fee_total_amount);var a={id:e.amt};n.post(r.apiUrl+"api/fees/ExamSessionid_razorpay_nacs_Exam",a).then(function(t){var a=JSON.parse(t.data);e.oderid=a.id;var s={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_card_last_number:e.oderid};n.post(r.apiUrl+"api/fees/update_docIis_modernExamNew",s).then(function(e){});var o={src:"https://checkout.razorpay.com/v1/checkout.js",key:"rzp_live_iEQSsu9FOKf8J7",amount:"100"*parseFloat(e.exam.sims_student_exam_form_fee_total_amount),name:e.obj1.lic_school_name,description:e.exam.sims_student_exam_enroll_number,image:e.obj1.lic_school_logo,order_id:e.oderid,handler:function(t){alert(t.razorpay_payment_id),e.response_code=t.razorpay_payment_id;var a={temp_dd_doc_no:e.refNumbertrans,temp_dd_fee_transaction_id:t.razorpay_payment_id,temp_dd_error_messsage:t.error_description,temp_dd_fee_acq_response_code:t.status,temp_dd_fee_card_last_number:e.oderid};n.post(r.apiUrl+"api/fees/update_docIis_modernExam",a).then(function(t){""!=e.response_code?(swal({title:"Alert",text:"Payment Done Successfully. Your Transaction Number is "+e.response_code,imageUrl:"assets/img/check.png"}),e.getstudentList()):e.getstudentList()})},notes:{address:e.exam.sims_student_exam_enroll_number},modal:{ondismiss:function(){$("body").css("overflow","auto")}}};new Razorpay(o).open(),new Razorpay(o).open()})},e.Rev_Save=function(){for(var t=[],a=0;a0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0]):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.internal_E_click=function(t,a,s){var o=0,n=0,r=new Map;e.fees_lst_backlog.forEach(function(e){r.set(e.sims_subject_code,!0)});for(var i=0;i0&&(d+=Math.round(20*o)),n>0&&(d+=Math.round(n*Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1)))),e.fees_lst[i].sims_fee_amount=Math.round(Math.round(20*o)+Math.round(n*Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1))))):d+=Math.round(parseFloat(e.fees_lst[i].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=d},e.internal_E_click1=function(){for(var t=0,a=new Map,s=0;s0&&(n+=Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))),t>0&&(n+=Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),e.fees_lst[s].sims_fee_amount=Math.round(Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))+Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1))))):n+=Math.round(parseFloat(e.fees_lst[s].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=n},e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getGroupname?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year).then(function(t){e.Groupcheck=t.data,"Y"==e.Groupcheck[0].sims_checkgroup?e.Groupcheck_box=!0:e.Groupcheck_box=!1}),e.subject_lst=[],n.get(r.apiUrl+"api/parentportal/getExamCombine?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status+"&category="+e.exam.sims_cur_level_grade_subcategory_code).then(function(t){if(t.data.length>0?(e.examDetails=t.data,e.sims_type=e.examDetails[0].sims_type,e.disablesaveforupdate="N"):(e.examDetails=[],e.disablesaveforupdate="Y",e.fees_lst=[],e.exam.sims_student_exam_form_fee_total_amount=0,"B"==e.sims_term_code.sims_report_card_term_status&&swal({title:"Alert",text:"No Backlog",imageUrl:"assets/img/notification-alert.png"})),e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status,e.fees_lst=[],e.examDetails.length>0){var s={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",s).then(function(t){if(t.data.table.length>0){e.fees_lst=t.data.table,e.chk_fee=!1,e.exam.sims_student_exam_form_fee_total_amount=0;for(var s=0;s0&&(e.chk_fee=!0),e.exam.sims_student_exam_form_fee_total_amount=e.exam.sims_student_exam_form_fee_total_amount+parseFloat(e.fees_lst[s].total)}else e.fees_lst=[];if("B"==e.sims_term_code.sims_report_card_term_status){var o={opr:"EB",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){e.fees_lst_backlog=t.data.table,"B"==e.sims_term_code.sims_report_card_term_status&&"1"==e.sims_type&&(e.chk_fee||e.internal_E_click()),"B"==e.sims_term_code.sims_report_card_term_status&&"2"==e.sims_type&&(e.chk_fee||e.internal_E_click1())})}})}}),n.get(r.apiUrl+"api/parentportal/getprinchalanstatus?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){e.formno=t.data,e.printchalanstatus=e.formno[0].sims_student_exam_form_no});var t={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table;var s={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status);var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus)})});var o={opr:"RB",sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",o).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_reset_btn=!0:e.hide_reset_btn=!1)});var i={opr:"SB",sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",i).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_save_btn=!0:e.hide_save_btn=!1)});var l={opr:"CB",sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",l).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_chalan_btn=!0:e.hide_chalan_btn=!1)});var d={opr:"OB",sims_enroll_number:a.globals.currentUser.username,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",d).then(function(t){t.data.table.length>0&&("Y"==t.data.table[0].disable?e.hide_oPayment_btn=!0:e.hide_oPayment_btn=!1)})}})},e.reset_form=function(){swal({title:"Alert",text:"Do you want to reset form ?",showCancelButton:!0,imageUrl:"assets/img/notification-alert.png",closeOnConfirm:!1},function(t){!0===t&&e.examDetails.length>0&&n.post(r.apiUrl+"api/parentportal/ResetForm?form_no="+e.examDetails[0].sims_student_exam_form_no).then(function(t){t.data?(swal({title:"Alert",text:"Form Reseted Successfully",imageUrl:"assets/img/check.png"}),e.showData()):swal({title:"Alert",text:"Form not reseted",imageUrl:"assets/img/notification-alert.png"})})})},e.get_student_details=function(){e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommonNACASCA",t).then(function(t){if(t.data.table.length>0){if(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Ahmednagar",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.exam.sims_student_exam_student_abc_id=e.student_data_lst[0].sims_student_exam_student_abc_id,e.exam.sims_student_exam_student_eligibility_no=e.student_data_lst[0].sims_student_exam_student_eligibility_no,e.pg_status=e.student_data_lst[0].pg_status,"01"==e.sims_grade_code||"03"==e.sims_grade_code||"Y"==e.pg_status){var o={opr:"P",sims_academic_year:e.sims_academic_year,sims_cl_grade_code:e.sims_grade_code,sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_cl_grade_sc_term_code:e.sims_term_code.sims_term_code,sims_admission_number:e.exam.sims_student_exam_enroll_number,sims_cl_grade_sc_status:"A"};n.post("https://nacasca.appsis.co.in/kindoapi/api/common/SectionScreening/SubcategoryEntryCommon",o).then(function(t){e.sub_cat_list=t.data.table,e.sub_cat_list.length>0&&(e.exam.sims_cur_level_grade_subcategory_code=t.data.table[0].sims_cur_level_grade_subcategory_code),e.term_change()})}else e.term_change();n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus)})}else e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[]})},e.sub_cat_change=function(){e.term_change()},e.save_Form=function(t){if(e.saveBtn=!0,e.loaderStatus=!0,0==t)e.loaderStatus=!1,swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{var s=[];if("B"==e.exam.sims_student_exam_term.sims_report_card_term_status&&"1"==e.sims_type)for(var o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,"B"==e.exam.sims_student_exam_term.sims_report_card_term_status)s.length>0?e.exam.subject_lst=s:e.exam.subject_lst=[];else if(s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],e.sims_student_exam_term_copy=angular.copy(e.exam.sims_student_exam_term),e.exam.sims_report_card_master_term_code=e.exam.sims_student_exam_term.sims_report_card_master_term_code,e.exam.sims_student_exam_term=e.exam.sims_student_exam_term.sims_term_code,n.post(r.apiUrl+"api/parentportal/ExamSaveNACS",e.exam).then(function(t){e.form_no=t.data,""==t.data?(e.loaderStatus=!1,e.saveformStatus=!0,swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"})):(e.loaderStatus=!1,e.saveformStatus=!1,swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.exam.sims_student_exam_term=e.sims_student_exam_term_copy),e.showData();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status)}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;sparseInt(t.sims_elective_subject)&&(t.subject_tick=!1);for(o=0;o=a)parseInt(t.sims_compulsory_subject)==a?(e.iscompulsorysel=!1,e.defaultdisablesave=!1):(e.iscompulsorysel=!0,e.defaultdisablesave=!0);else{for(o=0;o=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(o=0;o3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.Rev_Save=function(){for(var t=[],a=0;a0&&(e.term_names1=t.data.table,e.edt.gb_term_code=e.term_names1[0].sims_report_card_term_code,e.getsubject())}),e.getsubject=function(){e.table=!1;for(var t=0;t0&&(e.subject_names1=t.data.table,e.edt.sims_subject_code=e.subject_names1[0],e.getExam())})},e.getExam=function(){e.table=!1;var t={opr:"C",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:a.globals.currentStudent.sims_grade_code,sims_section_code:a.globals.currentStudent.sims_section_code,sims_term_code:e.edt.gb_term_code,sims_subject_code:e.edt.sims_subject_code.sims_subject_code};e.category_names1=[],n.post(r.apiUrl+"api/Gradebook/MarksEntryCommon",t).then(function(t){t.data.table.length>0&&(e.category_names1=t.data.table,e.edt.sims_gb_cat_code=e.category_names1[0])})},e.exam_change=function(){e.table=!1}},e.GetAllGradebookNmae1=function(){if("1"==e.edt.sims_gb_cat_code.disflag||"A"==e.edt.sims_gb_cat_code.sims_config_assign_marks_submit_status)e.table=!1,e.Nodata=!0;else{var t={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_academic_year:a.globals.currentStudent.sims_acad_yr,sims_grade_code:a.globals.currentStudent.sims_grade_code,sims_section_code:a.globals.currentStudent.sims_section_code,sims_term_code:e.edt.gb_term_code,sims_subject_code:e.edt.sims_subject_code.sims_subject_code,sims_gb_number:e.edt.sims_gb_cat_code.gradebook_number,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_attribute_type:e.edt.sims_gb_cat_code.sims_report_card_assign_type,sims_cat_code:e.edt.sims_gb_cat_code.category_code};n.post(r.apiUrl+"api/Gradebook/MarksEntryCommon",t).then(function(t){if(t.data.table.length>0){var a=new Map;e.table=!0,e.Nodata=!1,e.gradebook_data=[],e.gradebook_data_new=[],e.gradebook_data_new=t.data.table,e.gradebook_data_new.forEach(function(t){a.has(t.sims_gb_cat_assign_number)?e.gradebook_data.forEach(function(e){t.sims_gb_cat_assign_number==e.sims_gb_cat_assign_number&&(e.sims_student_assign_received_point=e.sims_student_assign_received_point+t.sims_student_assign_received_point,e.sims_gb_cat_assign_max_point=e.sims_gb_cat_assign_max_point+t.sims_gb_cat_assign_max_point)}):(a.set(t.sims_gb_cat_assign_number,!0),e.gradebook_data.push(t))}),e.gradebook_data.forEach(function(e){""==e.sims_report_card_assign_points_possible?(e.sims_report_card_assign_points_possible=e.sims_gb_cat_assign_max_point,e.percentage_point=e.sims_student_assign_received_point):(void 0==e.percentage_tot&&(e.percentage_tot=0),void 0==e.percentage&&(e.percentage=0),void 0==e.percentage_point&&(e.percentage_point=0),e.percentage_tot=e.percentage_tot+parseFloat(e.sims_student_assign_received_point),e.percentage=e.percentage_tot/e.sims_gb_cat_assign_max_point*100,e.percentage_point=e.percentage*(parseFloat(e.sims_report_card_assign_points_possible)/100))})}else e.table=!1,e.Nodata=!0})}},$(document).ready(function(){e.loaderShow=!1}),e.reset=function(){e.obj="",e.edt.gb_term_code="",e.edt.sims_subject_code="",e.edt.sims_gb_cat_code="",e.edt="",e.temp=[],e.temp.sims_term_code=e.edt.gb_term_code,e.temp.sims_subject_code=e.edt.sims_subject_code,e.temp.sims_gb_cat_code=e.edt.sims_gb_cat_code},e.raplay=function(t){console.log(t);var s={sims_teacher_login_code:t.sims_employee_code,sims_teacher_name:t.sims_teacher_name};e.teacherClick(s),e.newsubject_txt(t.sims_term_desc_en+"-"+t.sims_subject_name_en+"-"+t.sims_gb_cat_name+"-"+t.sims_gb_cat_assign_name+"-"+a.globals.currentStudent.enroll_number)},e.DisplayStudentComment=function(){$("#myCommentModal").modal("show")},e.$on("student_change",function(t,a){e.getTransportDetails()}),a.globals.studentsLoaded&&e.getTransportDetails(),e.contentClick=function(){}}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("StudentTaskCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.grid={},e.hide_fee=!1,e.chk_disabled=!0,e.getMedicalDetails=function(t){e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.username=a.globals.currentUser.username,e.enroll_number=a.globals.currentStudent.enroll_number,e.grade_code=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0]),console.log(t.data)}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/Gradebook/getTerm?cur_code="+a.globals.currentStudent.sims_cur_code+"&academic_year="+t).then(function(t){e.grid=!0,e.term_lst=t.data})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year,console.log(e.obj[0].academic_year)}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.goto_history=function(){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),n.get(r.apiUrl+"api/fees/gettransactiondetail?search="+a.globals.currentStudent.sims_student_enroll_number).then(function(t){e.transaction_lst=t.data,console.log("$scope.transaction_lst",e.transaction_lst)})},e.Getinfo6=function(t){e.btnreport="1"},e.print_rpt=function(t){$("#report_Modal").modal({backdrop:"static",keyboard:!1}),e.flg_report=!0;var o;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-",e.report_name="SimsReports.Gradebook.GBR002AMPS_Task_Student,SimsReports","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)var i="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:e.enroll_number,student_status:"1"},$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:o}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".k-group li:nth-child(1)").css({display:"none"}),$(".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)},e.print_rptnew=function(t){e.flg_report=!1;var o;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-",e.report_name="SimsReports.Gradebook.GBR11to12SISQATAR_term_PP,SimsReports","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)var i="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o={acad_year:e.obj.academic_year,cur_code:a.globals.currentStudent.sims_cur_code,grade_code:e.std.sims_grade_code,section_code:e.std.sims_section_code,term_code:t.sims_term_code,search:e.enroll_number,student_status:"1"},$("#reportViewer3").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer3").data("telerik_ReportViewer").reportSource({report:"SimsReports."+e.report_name+",SimsReports",parameters:o}),$("#reportViewer3").data("telerik_ReportViewer").commands.export.exec("pdf"),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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)},e.report_cancel=function(){$("#report_Modal").modal("hide")},e.report_cancel1=function(){$("#report_Modal").modal("hide")}},e.onlyNumbers=function(e){var t={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(var a in t)if(t.hasOwnProperty(a)&&(e.charCode==t[a]||e.keyCode==t[a]))return;e.preventDefault()},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.student").controller("StudentSubjectController",["$scope","$rootScope","$http","ENV",function(e,t,a,s){e.getstudentList=function(){e.academic_change=function(){var o={opr:"A",sims_academic_year:e.academic_year,sims_enroll_number:t.globals.currentStudent.sims_student_enroll_number};a.post(s.apiUrl+"api/student/StudentSubjectCommon",o).then(function(t){if(e.subject_data_lst=[],t.data.table.length>0)for(var a=0;a0&&(t.data.table[a].sims_status=!0),e.subject_data_lst.push(t.data.table[a])})};a.post(s.apiUrl+"api/student/StudentSubjectCommon",{opr:"B"}).then(function(t){e.objAcademic=[],t.data.table.length>0&&(e.objAcademic=t.data.table,e.academic_year=t.data.table[0].sims_academic_year),e.academic_change()})},t.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.gallery").controller("ViewTargetGradeCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.obj6=[],e.getData=function(){e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=a.globals.currentStudent.sims_acad_yr,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,n.get(r.apiUrl+"api/attendance/getSetTargetGradeMark?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old).then(function(t){e.obj6=t.data,console.log("GetSubject",e.obj6)})},e.$on("student_change",function(t,a){e.getData()}),a.globals.studentsLoaded&&e.getData()}])}(),function(){"use strict";angular.module("sims.module.gallery").controller("ViewTargetGradeExternalCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.obj6=[],e.getData=function(){e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=a.globals.currentStudent.sims_acad_yr,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,n.get(r.apiUrl+"api/attendance/getSetTargetExternalGradeMark?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old).then(function(t){e.obj6=t.data,console.log("GetSubject",e.obj6)})},e.$on("student_change",function(t,a){e.getData()}),a.globals.studentsLoaded&&e.getData()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ExamNewController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.iscompulsorysel=!1,e.disablesaveforupdate=!1,e.printreport=!1,e.imageChangedAndSave=!0,e.defaultdisablesave=!1,e.showform=!1,e.totalgroupcount=0,e.totalSelectedgroupcount=0,e.paymentStatus="N",e.paymentSelf="N",e.hallticketstatus="N";var d=i.search();jQuery.isEmptyObject(d)||swal({title:"Alert",text:d.res+". Your Transaction Number is "+d.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".appsis.co.in/ppn/#/main/ExamNew","_self"),"Success"==d.res&&e.getstudentList())}),e.getstudentList=function(){if(e.prev_img="",e.uploading_path="",!angular.isUndefined(a.pp_url_lst)&&a.pp_url_lst.length>0)for(var t=0;t0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0],console.log("$scope.sem_lst",e.sem_lst)):e.get_student_details()})},e.showData=function(){e.get_student_details(),e.showform=!0};var o={opr:"G"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.gender_lst=t.data.table)});o={opr:"H"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.category_lst=t.data.table)});o={opr:"I"};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){t.data.table.length>0&&(e.instrucation_lst=t.data.table,e.exam.sims_student_exam_instrucation=e.instrucation_lst[0].code)}),e.academic_change=function(){e.sem_lst=[];var t={opr:"F",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0].sims_term_code):e.get_student_details()})},e.internal_E_click=function(t,a,s){for(var o=0,n=0,r=0;r0&&(l+=Math.round(o*Math.round(parseFloat(e.fees_lst[r].sims_fee_amount1)))),n>0&&(l+=Math.round(n*Math.round(parseFloat(e.fees_lst[r].sims_fee_amount1)))),e.fees_lst[r].sims_fee_amount=Math.round(Math.round(o*Math.round(parseFloat(e.fees_lst[r].sims_fee_amount1)))+Math.round(n*Math.round(parseFloat(e.fees_lst[r].sims_fee_amount1)))),console.log("$scope.fees_lst[i].sims_fee_amount",e.fees_lst[r].sims_fee_amount)):l+=Math.round(parseFloat(e.fees_lst[r].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=l},e.internal_E_click1=function(){for(var t=0,a=new Map,s=0;s0&&(n+=Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))),t>0&&(n+=Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),e.fees_lst[s].sims_fee_amount=Math.round(Math.round(t*Math.round(.4*parseFloat(e.fees_lst[s].sims_fee_amount1)))+Math.round(t*Math.round(.6*parseFloat(e.fees_lst[s].sims_fee_amount1)))),console.log("$scope.fees_lst[i].sims_fee_amount",e.fees_lst[s].sims_fee_amount)):n+=Math.round(parseFloat(e.fees_lst[s].sims_fee_amount1));e.exam.sims_student_exam_form_fee_total_amount=n},e.term_change=function(){n.get(r.apiUrl+"api/parentportal/getGroupname?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year).then(function(t){e.Groupcheck=t.data,console.log("$scope.Groupcheck= res.data;",e.Groupcheck=t.data),"Y"==e.Groupcheck[0].sims_checkgroup?e.Groupcheck_box=!0:e.Groupcheck_box=!1}),e.subject_lst=[],n.get(r.apiUrl+"api/parentportal/getExam?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){if(t.data.length>0?(e.examDetails=t.data,console.log("$scope.examDetails = res.data;",e.examDetails=t.data),e.sims_type=e.examDetails[0].sims_type):(e.examDetails=[],e.disablesaveforupdate="Y"),e.examDetails=t.data,e.getsavebuttonstatus(),e.printreport=e.examDetails[0].updateflag,e.paid_status=e.examDetails[0].paid_status,console.log("$scope.disablesaveforupdate",e.disablesaveforupdate),console.log("$scope.iscompulsorysel",e.iscompulsorysel),console.log("$scope.printreport",e.printreport),console.log("$scope.examDetails= res.data;",e.examDetails=t.data),e.fees_lst=[],e.examDetails.length>0){var s={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){if(t.data.table.length>0){e.fees_lst=t.data.table,console.log("fees_lst",e.fees_lst),e.chk_fee=!1,e.exam.sims_student_exam_form_fee_total_amount=0;for(var s=0;s0&&(e.chk_fee=!0),e.exam.sims_student_exam_form_fee_total_amount=e.exam.sims_student_exam_form_fee_total_amount+parseFloat(e.fees_lst[s].sims_fee_amount)}else e.fees_lst=[];if("B"==e.sims_term_code.sims_report_card_term_status){var o={opr:"EB",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",o).then(function(t){e.fees_lst_backlog=t.data.table,"B"==e.sims_term_code.sims_report_card_term_status&&"1"==e.sims_type&&(e.chk_fee||e.internal_E_click()),"B"==e.sims_term_code.sims_report_card_term_status&&"2"==e.sims_type&&(e.chk_fee||e.internal_E_click1())})}})}}),console.log("$scope.exam",e.exam),n.get(r.apiUrl+"api/parentportal/getprinchalanstatus?sims_enroll_number="+a.globals.currentStudent.enroll_number+"&sims_academic_year="+e.sims_academic_year+"&sims_section_term="+e.sims_term_code.sims_term_code+"&sims_report_card_master_term_code="+e.sims_term_code.sims_report_card_master_term_code+"&sims_report_card_term_status="+e.sims_term_code.sims_report_card_term_status).then(function(t){e.formno=t.data,e.printchalanstatus=e.formno[0].sims_student_exam_form_no,console.log("$scope.printchalanstatus",e.printchalanstatus)});var t={opr:"P",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0){e.disableprint=t.data.table,console.log("$scope.disableprint",e.disableprint);var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status);var a={opr:"W",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.hallticketstatus=t.data.table[0].hallticketstatus,console.log("$scope.hallticketstatus",e.hallticketstatus))})})}})},e.reset_form=function(){swal({title:"Alert",text:"Do you want to reset form ?",showCancelButton:!0,imageUrl:"assets/img/notification-alert.png",closeOnConfirm:!1},function(t){!0===t&&(console.log(e.examDetails),e.examDetails.length>0&&n.post(r.apiUrl+"api/parentportal/ResetForm?form_no="+e.examDetails[0].sims_student_exam_form_no).then(function(t){t.data?(swal({title:"Alert",text:"Form Reseted Successfully",imageUrl:"assets/img/check.png"}),e.showData()):swal({title:"Alert",text:"Form not reseted",imageUrl:"assets/img/notification-alert.png"})}))})},e.get_student_details=function(){e.exam.sims_student_exam_academic_year=e.sims_academic_year,e.exam.sims_student_exam_term=e.sims_term_code,e.student_data_lst=[],e.exam.sims_student_exam_course="",e.exam.sims_student_exam_student_name="",e.exam.sims_student_exam_student_mother_name="",e.exam.sims_student_exam_grade_code="",e.exam.sims_student_exam_section_code="",e.exam.sims_student_exam_student_gender="";var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year},s={opr:"O",sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0?(e.student_data_lst=t.data.table,e.exam.sims_student_exam_course=e.student_data_lst[0].course,e.exam.sims_student_exam_student_name=e.student_data_lst[0].sname,e.exam.sims_student_exam_enroll_number=e.student_data_lst[0].sims_student_enroll_number,e.exam.sims_student_exam_student_mother_name=e.student_data_lst[0].sims_parent_mother_first_name,e.exam.sims_student_exam_permanent_student_address=e.student_data_lst[0].sims_student_exam_permanent_student_address,e.exam.sims_student_exam_grade_code=e.student_data_lst[0].sims_grade_code,e.exam.sims_student_exam_section_code=e.student_data_lst[0].sims_section_code,e.exam.sims_student_exam_student_gender=e.student_data_lst[0].sims_student_gender,e.exam.sims_student_exam_date=e.student_data_lst[0].sims_student_exam_date,e.exam.sims_student_exam_student_place="Pune",e.exam.sims_student_exam_student_email=e.student_data_lst[0].comn_user_email,e.exam.sims_student_exam_student_disabled=e.student_data_lst[0].std_disabled,e.exam.sims_student_exam_student_contact_number=e.student_data_lst[0].sims_student_exam_student_contact_number,e.exam.sims_student_exam_student_address=e.student_data_lst[0].sims_student_exam_student_address,e.exam.sims_student_exam_student_category=e.student_data_lst[0].sims_student_exam_student_category,e.exam.sims_exam_student_last_name_en=e.student_data_lst[0].sims_student_passport_last_name_en,e.exam.sims_exam_student_middle_name_en=e.student_data_lst[0].sims_student_passport_middle_name_en,e.exam.sims_exam_student_first_name_en=e.student_data_lst[0].sims_student_passport_first_name_en,e.exam.sims_student_prn_no=e.student_data_lst[0].sims_student_prn_no,e.exam.sims_student_eligibilty_no=e.student_data_lst[0].sims_student_eligibilty_no,e.term_change(),n.post(r.apiUrl+"api/parentportal/ExamCommon",s).then(function(t){t.data.table.length>0&&(e.allowSubcheck=t.data.table[0].checkstatus,console.log("$scope.allowSubcheck : ",e.allowSubcheck))})):(e.student_data_lst=[],e.exam=[],e.fees_lst=[],e.examDetails=[])})},console.log("$scope.prev_img",e.prev_img),e.save_Form=function(t){if(e.saveBtn=!0,0==t)swal({title:"Alert",text:"Please fill all required field's",imageUrl:"assets/img/notification-alert.png"});else{var s=[];if("B"==e.exam.sims_student_exam_term.sims_report_card_term_status)for(var o=0;o0)if("Y"==t.data.table[0].flag)swal({title:"Alert",text:"Form is already filled ",imageUrl:"assets/img/notification-alert.png"});else{if(e.exam.sims_student_exam_enroll_number=a.globals.currentStudent.enroll_number,e.exam.sims_student_exam_created_by=a.globals.currentUser.username,"B"==e.exam.sims_student_exam_term.sims_report_card_term_status)s.length>0?e.exam.subject_lst=s:e.exam.subject_lst=[];else if(s.length>0)if("A"==e.exam.sims_student_exam_student_type)e.exam.subject_lst=s;else{for(var o=[],i=0;i0?e.exam.fees_lst=e.fees_lst:e.exam.fees_lst=[],e.sims_student_exam_term_copy=angular.copy(e.exam.sims_student_exam_term),e.exam.sims_report_card_master_term_code=e.exam.sims_student_exam_term.sims_report_card_master_term_code,e.exam.sims_student_exam_term=e.exam.sims_student_exam_term.sims_term_code,n.post(r.apiUrl+"api/parentportal/ExamSave_puneiat",e.exam).then(function(t){e.form_no=t.data,""==t.data?swal({title:"Alert",text:"Record Not Saved",imageUrl:"assets/img/notification-alert.png"}):console.log("Exam Data",t.data),swal({title:"Alert",text:"Record Saved Successfully Form No is "+t.data,imageUrl:"assets/img/check.png"}),e.exam.sims_student_exam_term=e.sims_student_exam_term_copy,e.showData();var a={opr:"V",sims_student_exam_enroll_number:e.exam.sims_student_exam_enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_student_exam_term:e.sims_term_code.sims_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",a).then(function(t){t.data.table.length>0&&(e.paymentStatus=t.data.table[0].payment_status)}),e.saveBtn=!1})}})}}},e.sb={};e.SubjectGroupClick=function(t){for(var a=0,s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?(e.iscompulsorysel=!1,e.defaultdisablesave=!1):(e.iscompulsorysel=!0,e.defaultdisablesave=!0);else{for(s=0;s=a)parseInt(t.sims_compulsory_subject)==a?e.iscompulsorysel=!1:e.iscompulsorysel=!0;else{for(s=0;s3&&(swal({title:"Alert",text:"Please Select Maximum 3 Subjects or 50% of the Subjects "}),t.ischecked=!1)},e.Cancel=function(){e.Rev_Save=""},e.paymentTransaction_new=function(){console.log("payment array",e.exam),console.log(e.examDetails),e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,console.log(" $scope.refNumbertrans",e.refNumbertrans),console.log(" $scope.grad_total",e.grad_total),console.log(" $scope.fe_enroll",e.fe_enroll),""==e.refNumbertrans?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.paymentTransaction=function(){console.log("payment array",e.exam),console.log(e.examDetails),e.refNumbertrans=e.examDetails[0].sims_student_exam_form_no,e.grad_total=e.exam.sims_student_exam_form_fee_total_amount,e.fe_enroll=e.exam.sims_student_exam_enroll_number,e.mobile=e.exam.sims_student_exam_student_contact_number,e.email=e.exam.sims_student_exam_student_email,e.gradename=e.sims_grade_name,e.StudnameFull=e.exam.sims_exam_student_first_name_en+" "+e.exam.sims_exam_student_middle_name_en+" "+e.exam.sims_exam_student_last_name_en,console.log(" $scope.refNumbertrans",e.refNumbertrans),console.log(" $scope.grad_total",e.grad_total),console.log(" $scope.fe_enroll",e.fe_enroll),""==e.refNumbertrans?swal({title:"Alert",text:"Some Problem in Payment plz try agian..",width:380,height:200}):setTimeout(function(){e.pay_ful("creditcard")},600)},e.pay_ful=function(t){var a=document.createElement("form");a.setAttribute("method","post"),a.setAttribute("action","https://gateway1.mograsys.com/puneiatexam/index.php"),a.setAttribute("name","form2");var s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("name","amount"),s.setAttribute("value",e.exam.sims_student_exam_form_fee_total_amount);var o=document.createElement("input");o.setAttribute("type","text"),o.setAttribute("name","mobile"),o.setAttribute("value",e.exam.sims_student_exam_student_contact_number);var n=document.createElement("input");n.setAttribute("type","text"),n.setAttribute("name","email"),n.setAttribute("value",e.exam.sims_student_exam_student_email);var r=document.createElement("input");r.setAttribute("type","text"),r.setAttribute("name","trackId"),r.setAttribute("value",e.refNumbertrans);var i=document.createElement("input");i.setAttribute("type","text"),i.setAttribute("name","enroll"),i.setAttribute("value",e.exam.sims_student_exam_enroll_number);var l=document.createElement("input");l.setAttribute("type","text"),l.setAttribute("name","studname"),l.setAttribute("value",e.StudnameFull);var d=document.createElement("input");d.setAttribute("type","text"),d.setAttribute("name","grade"),d.setAttribute("value",e.gradename);var _=document.createElement("input");_.setAttribute("type","submit"),_.setAttribute("value","Submit"),_.setAttribute("name","Submit1"),a.appendChild(s),a.appendChild(o),a.appendChild(n),a.appendChild(r),a.appendChild(i),a.appendChild(l),a.appendChild(d),a.appendChild(_),document.getElementById("sss").appendChild(a),document.form2.Submit1.click()},e.Rev_Save=function(){for(var t=[],a=0;a0&&(console.log("src",e.data),$("#schoolCalendar").attr("src",e.data[0].sims_appl_form_field_value1))})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.lms").controller("LMS2Controller",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$sce","ENV",function(e,t,a,s,o,n,r,i){e.display=!1,e.getMedicalDetails=function(){n.get(i.apiUrl+"api/common/getDataParameter?sims_appl_code=Lms001&sims_appl_form_field=LMS URL1").then(function(e){e.data.length>0&&(console.log("src",e.data),$("#schoolCalendar").attr("src",e.data[0].sims_appl_form_field_value1))})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.transport").controller("TransportIHSController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){e.display=!1,e.readonly=!1,e.y=!0,e.n=!1,e.savedata=!0,e.showMessage=!1,e.saveDisable=!1,e.disable_btn=!0,e.applytransport=!1,e.transporttable=!1,e.firstPage=!0,e.obj1=[],e.changdisable_btn=!1,e.canceltransport=!1,e.savebtn=!0,e.feedetail=!0,e.showdata=!0,e.canceldata=!0,e.temp={};n.post(r.apiUrl+"api/transport/TransportInstruction",{opr:"DE"}).then(function(t){e.transportTermUrl=t.data.table,e.termscondition=e.transportTermUrl[0].termUrl}),n.get(r.apiUrl+"api/common/getTransportFlag").then(function(t){t.data.length>0&&("N"==t.data[0].sims_appl_form_field_value2?e.saveDisable=!0:e.saveDisable=!1)});var i={opr:"IN"};n.post(r.apiUrl+"api/transport/TransportInstruction",i).then(function(t){e.instructions=t.data.table});i={opr:"TD"};n.post(r.apiUrl+"api/transport/TransportInstruction",i).then(function(t){e.decimalcur=t.data.table,e.curdecimal=e.decimalcur[0].decimal}),n.get(r.apiUrl+"api/transport/getBusCode").then(function(t){e.BusCode_Data=t.data}),e.declationcheck=function(t){if(t){var a=new Date;e.undertakingdate=moment(a).format("YYYY-MM-DD HH:MM:SS"),e.disable_btn=!1}else e.undertakingdate="",e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the request."})},e.transportcode="6",e.applyTransport=function(){e.getAcademicYear(),e.feedetail=!0,e.temp={};var t={opr:"ED",sims_transport_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/transport/TransportInstruction",t).then(function(t){if(e.applied=t.data.table,e.appliedflag=e.applied[0].alreadyapplied,"true"==e.appliedflag)swal({title:e.applied[0].titlemsg,text:e.applied[0].textmsg,type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes",cancelButtonText:"No",closeOnConfirm:!1,closeOnCancel:!1},function(t){t?(s(function(){e.changebtnClick()},300),swal.close()):swal.close()});else{var a=new Date;e.sims_transport_effective_from=moment(a).format("DD-MM-YYYY"),e.applytransport=!0,e.transporttable=!1,e.firstPage=!1,e.canceltransport=!1,e.savebtn=!0}})},e.check_from_date=function(){var t=$("#effective_from_date").data("kendoDatePicker").value();t.setMonth(t.getMonth()+3),$("#effective_upto_date").kendoDatePicker({format:"dd-MM-yyyy",min:new Date(t),max:new Date(e.yearEndDate),month:{empty:'#= data.value #'}})},e.hidefeedetails=function(){e.feedetail=!0},e.feedetails=function(){if(void 0!=e.temp.sims_transport_academic_year)if(void 0!=e.temp.sims_transport_route_code){var t=moment(e.sims_transport_effective_from,"DD-MM-YYYY").format("YYYY-MM-DD"),s=moment(e.sims_transport_effective_upto,"DD-MM-YYYY").format("YYYY-MM-DD"),o={opr:"FG",sims_transport_academic_year:e.temp.sims_transport_academic_year,sims_transport_route_code:e.temp.sims_transport_route_code,sims_transport_enroll_number:a.globals.currentStudent.enroll_number,sims_transport_effective_from:t,sims_transort_effective_upto:s};n.post(r.apiUrl+"api/transport/TransportInstruction",o).then(function(t){e.transportfee=t.data.table,e.feedetail=!1})}else swal("Select route name to see fee details");else swal("Select academic year to see fee details")},e.changebtnClick=function(){e.feedetail=!0,e.transporttable=!0,e.applytransport=!1,e.firstPage=!1,e.canceltransport=!1,e.savebtn=!0,e.showdata=!0,e.getAcademicYear()},e.cancelTransport=function(){e.getAcademicYear(),e.canceldata=!0,e.transporttable=!1,e.applytransport=!1,e.firstPage=!1,e.canceltransport=!0,e.feedetail=!0},e.academicChange=function(){for(var t=0;e.academics.length>t;t++)e.academics[t].sims_academic_year===e.temp.sims_transport_academic_year&&(e.sims_transport_effective_upto=moment(e.academics[t].sims_academic_year_end_date).format("DD-MM-YYYY"),e.yearEndDate=new Date(e.academics[t].sims_academic_year_end_date),$("#effective_upto_date").kendoDatePicker({format:"dd-MM-yyyy",max:new Date(e.yearEndDate),month:{empty:'#= data.value #'}}),e.getroutebybuscode())},e.routeChange=function(t){n.get(r.apiUrl+"api/transport/GetAllStudRouteDirection?route_code="+t+"&academic_year=2016").then(function(t){e.RouteDirection=t.data}),n.get(r.apiUrl+"api/transport/GetAllStudRouteStop?route_code="+t+"&academic_year=2016").then(function(t){e.RouteStop=t.data})},e.editstud=function(t){e.getAcademicYear(),e.getroutebybuscode(),e.savedata=!1,e.savebtn=!1,e.temp.sims_transport_academic_year=t.sims_transport_academic_year;for(var a=0;e.RouteNameByBusCode_Data.length>a;a++)if(e.RouteNameByBusCode_Data[a].sims_transport_route_code===t.sims_transport_route_code){e.temp.sims_transport_route_code=e.RouteNameByBusCode_Data[a].sims_transport_route_code;break}e.temp.sims_transport_pickup_stop_code=t.sims_transport_pickup_stop_code,e.temp.sims_transport_academic_year=t.sims_transport_academic_year,e.sims_transport_effective_from=t.sims_transport_effective_from,e.sims_transport_effective_upto=t.sims_transport_effective_upto,e.temp.sims_transport_landmark=t.sims_transport_landmark,e.temp.sims_transport_route_student_code=t.sims_transport_route_student_code,e.applytransport=!0,e.transporttable=!1,e.firstPage=!1,e.canceltransport=!1},e.chaneRouteRequest=function(t){var a={opr:"DD",sims_transport_enroll_number:t.sims_transport_enroll_number};n.post(r.apiUrl+"api/transport/TransportInstruction",a).then(function(a){e.change_Date=moment(moment(e.sysdate[0].systemDate,"DD-MM-YYYY").format("YYYY-MM-DD")).add(1,"M").format("DD-MM-YYYY"),e.changerouteflag=a.data.table,$("#change_effective_from_date").kendoDatePicker({value:new Date,format:"dd-MM-yyyy",min:new Date(moment(e.change_Date,"DD-MM-YYYY").format("YYYY-MM-DD")),month:{empty:'#= data.value #'}}),swal(e.changerouteflag[0].mesg),e.showdata=!1,e.getAcademicYear(),e.savedata=!1,e.temp.sims_transport_route_code=t.sims_transport_route_code,e.temp.sims_transport_pickup_stop_code=t.sims_transport_pickup_stop_code,e.temp.sims_transport_academic_year=t.sims_transport_academic_year,e.sims_transport_effective_from=e.change_Date,e.sims_transport_effective_upto=t.sims_transport_effective_upto,e.temp.sims_transport_landmark=t.sims_transport_landmark,e.temp.sims_transport_route_student_code=t.sims_transport_route_student_code,e.applytransport=!1,e.transporttable=!0,e.firstPage=!1,e.canceltransport=!1})},e.trackClick=function(e){window.open(e,"_new")},e.getTransportDetails=function(t){jQuery.isEmptyObject(a.globals.currentStudent)||(e.studentClass=a.globals.currentStudent.sims_grade_name_en+"("+a.globals.currentStudent.sims_section_name_en+")",e.studentfullName=a.globals.currentStudent.sims_student_passport_fullname_new+" "+e.studentClass,e.studentEnroll=a.globals.currentStudent.enroll_number),e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.weburl=a.globals.currentSchool.lic_website_url,e.trackUrl="http://www.mysafetravel.net/l.php?s="+e.transportcode+"&e="+a.globals.currentStudent.enroll_number,n.get(r.apiUrl+"api/transport/GetAllStudRouteCode").then(function(t){e.Route=t.data}),n.get(r.apiUrl+"api/transport/getTransportDetailsNew?enroll_number="+a.globals.currentStudent.enroll_number).then(function(t){e.objold=t.data,e.objold?e.show_no_record=!1:e.show_no_record=!0});var s={opr:"S",sims_transport_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/transport/TransportInstruction",s).then(function(t){e.obj1=t.data.table;for(var a=0;a#= data.value #'}})}),e.getroutebybuscode=function(){var t={opr:"M",sims_transport_academic_year:e.temp.sims_transport_academic_year};n.post(r.apiUrl+"api/transport/TransportInstruction",t).then(function(t){e.RouteNameByBusCode_Data=t.data.table,e.getStopbyRoute()})},e.getStopbyRoute=function(){n.get(r.apiUrl+"api/transport/getDirectionByRouteCodeName?route_code="+e.temp.sims_transport_route_code+"&aca_year="+e.temp.sims_transport_academic_year).then(function(t){e.DirectionName=t.data}),n.get(r.apiUrl+"api/transport/getStopByRoute?route_code="+e.temp.sims_transport_route_code+"&aca_year="+e.temp.sims_transport_academic_year).then(function(t){e.StopByRoute_Data=t.data})},e.cancel=function(){e.applytransport=!1,e.firstPage=!0,e.canceltransport=!1,e.showMessage=!1,e.transporttable=!1,e.savebtn=!0,e.showdata=!0},e.close=function(){e.showMessage=!1,e.message=""},e.save=function(){n.get(r.apiUrl+"api/transport/getInactiveStud?acad_year="+e.temp.sims_transport_academic_year+"&enrollno="+a.globals.currentStudent.enroll_number).then(function(t){if(0==t.data.length||"I"===t.data[0].sims_allocation_status||"0"===t.data[0].sims_allocation_status)swal({title:"Alert",text:"Student is inactive for current year.",imageUrl:"assets/img/notification-alert.png"});else{e.pendingFlag=!1;for(var s=0;e.obj1.length>s;s++)if("P"==e.obj1[s].sims_transport_route_student_status){e.pendingFlag=!0;break}if(e.pendingFlag)swal({title:"",text:"You already have a pending transport request.You may edit the same.",type:"",showCancelButton:!1,confirmButtonColor:"#DD6B55",confirmButtonText:"Ok",closeOnConfirm:!0},function(e){swal.close()});else{for(var o=0;e.RouteNameByBusCode_Data.length>o;o++)if(e.RouteNameByBusCode_Data[o].sims_transport_route_code===e.temp.sims_transport_route_code){e.routeName=e.RouteNameByBusCode_Data[o].routename,e.routedirection=e.RouteNameByBusCode_Data[o].sims_transport_route_direction;break}var i=moment(e.sims_transport_effective_from,"DD-MM-YYYY").format("YYYY-MM-DD"),l=moment(e.sims_transport_effective_upto,"DD-MM-YYYY").format("YYYY-MM-DD");if(void 0!=e.routeName&&""!=e.routeName)if(void 0!=e.temp.sims_transport_pickup_stop_code&&""!=e.temp.sims_transport_pickup_stop_code){e.datasend=[];var d={opr:"I",sims_transport_share_location:e.sims_transport_share_location,sims_transport_route_student_code:e.temp.sims_transport_route_student_code,sims_transport_enroll_number:a.globals.currentStudent.enroll_number,sims_transport_academic_year:e.temp.sims_transport_academic_year,sims_transport_route_code:e.routeName,sims_transport_route_direction:e.routedirection,sims_transport_effective_from:i,sims_transport_effective_upto:l,sims_transport_pickup_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_drop_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_landmark:e.temp.sims_transport_landmark,sims_transport_route_student_request_by:a.globals.currentUser.username,sims_transport_route_student_status:"P"};e.datasend.push(d),e.datasend.length>0&&n.post(r.apiUrl+"api/transport/Insert_updateTransportData",e.datasend).then(function(t){e.othr=t.data,t.data?(e.fb_subject=null,e.fb_msg=null,e.showMessage=!0,e.messageClass="alert-success",e.message="Record Inserted Sucessfully",e.getTransportDetails()):(e.showMessage=!0,e.messageClass="alert-error",e.message="Record Not Inserted")})}else swal("Select pick-up/drop stop");else swal("Select route name")}}})},e.update=function(){for(var t=0;e.RouteNameByBusCode_Data.length>t;t++)if(e.RouteNameByBusCode_Data[t].sims_transport_route_code===e.temp.sims_transport_route_code){e.routeName=e.RouteNameByBusCode_Data[t].routename,e.routedirection=e.RouteNameByBusCode_Data[t].sims_transport_route_direction;break}var s=moment(e.sims_transport_effective_from,"DD-MM-YYYY").format("YYYY-MM-DD"),o=moment(e.sims_transport_effective_upto,"DD-MM-YYYY").format("YYYY-MM-DD");if(void 0!=e.routeName&&""!=e.routeName)if(void 0!=e.temp.sims_transport_pickup_stop_code&&""!=e.temp.sims_transport_pickup_stop_code){e.datasend=[];var i={opr:"UU",sims_transport_route_student_code:e.temp.sims_transport_route_student_code,sims_transport_enroll_number:a.globals.currentStudent.enroll_number,sims_transport_academic_year:e.temp.sims_transport_academic_year,sims_transport_route_code:e.routeName,sims_transport_route_direction:e.routedirection,sims_transport_effective_from:s,sims_transport_effective_upto:o,sims_transport_pickup_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_drop_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_landmark:e.temp.sims_transport_landmark,sims_transport_route_student_request_by:a.globals.currentUser.username,sims_transport_route_student_status:"P"};e.datasend.push(i),n.post(r.apiUrl+"api/transport/Insert_updateTransportData",e.datasend).then(function(t){e.othr=t.data,t.data?(e.fb_subject=null,e.fb_msg=null,e.showMessage=!0,e.messageClass="alert-success",e.message="Updated Sucessfully",e.getTransportDetails()):(e.showMessage=!0,e.messageClass="alert-error",e.message="Not Updated")})}else swal("Select pick-up/drop stop");else swal("Select route name")},e.applyforcancel=function(t){var a={opr:"CD",sims_transport_enroll_number:t.sims_transport_enroll_number};n.post(r.apiUrl+"api/transport/TransportInstruction",a).then(function(a){e.changerouteflag=a.data.table,e.changerouteflag[0].canceltransport,e.blockCanel=e.changerouteflag[0].cancelblock,swal(e.changerouteflag[0].cancelmesg),"true"==e.blockCanel&&(e.canceldata=!1,e.appliedDate=t.sims_transport_effective_from,e.temp.sims_transport_route_code=t.sims_transport_route_code,e.temp.sims_transport_pickup_stop_code=t.sims_transport_pickup_stop_code,e.temp.sims_transport_academic_year=t.sims_transport_academic_year,e.sims_transport_effective_from=t.sims_transport_effective_from,e.sims_transport_effective_upto=t.sims_transport_effective_upto,e.temp.sims_transport_landmark=t.sims_transport_landmark,e.temp.sims_transport_route_student_code=t.sims_transport_route_student_code)})},e.sendChangeRequest=function(){e.changerequestFlag=!1;for(var t=0;e.obj1.length>t;t++)if("R"==e.obj1[t].sims_transport_route_student_status){e.changerequestFlag=!0;break}if(e.changerequestFlag)swal({title:"",text:"You already have a pending change transport request.",type:"",showCancelButton:!1,confirmButtonColor:"#DD6B55",confirmButtonText:"Ok",closeOnConfirm:!0},function(e){swal.close()});else{for(var s=0;e.RouteNameByBusCode_Data.length>s;s++)if(e.RouteNameByBusCode_Data[s].sims_transport_route_code===e.temp.sims_transport_route_code){e.routeName=e.RouteNameByBusCode_Data[s].routename,e.routedirection=e.RouteNameByBusCode_Data[s].sims_transport_route_direction;break}var o=moment(e.sims_transport_effective_from,"DD-MM-YYYY").format("YYYY-MM-DD"),i=moment(e.sims_transport_effective_upto,"DD-MM-YYYY").format("YYYY-MM-DD");e.datasend=[];var l={opr:"CR",sims_transport_share_location:e.sims_transport_share_location,sims_transport_route_student_code:e.temp.sims_transport_route_student_code,sims_transport_enroll_number:a.globals.currentStudent.enroll_number,sims_transport_academic_year:e.temp.sims_transport_academic_year,sims_transport_route_code:e.routeName,sims_transport_route_direction:e.routedirection,sims_transport_effective_from:o,sims_transport_effective_upto:i,sims_transport_pickup_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_drop_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_landmark:e.temp.sims_transport_landmark,sims_transport_route_student_request_by:a.globals.currentUser.username,sims_transport_route_student_status:"P"};e.datasend.push(l),e.datasend.length>0&&n.post(r.apiUrl+"api/transport/Insert_updateTransportData",e.datasend).then(function(t){e.othr=t.data,t.data?(e.fb_subject=null,e.fb_msg=null,e.showMessage=!0,e.messageClass="alert-success",e.message="Record Inserted Sucessfully",e.getTransportDetails()):(e.showMessage=!0,e.messageClass="alert-error",e.message="Record Not Inserted")})}},e.cancel_from_date=function(e){},e.cancelTrans=function(){var t=moment(e.sims_transport_cancel_effective_from,"DD-MM-YYYY").format("YYYY-MM-DD");if(void 0!=e.temp.reason_cancellation){e.datasend=[];var s={opr:"CC",sims_transport_route_student_code:e.temp.sims_transport_route_student_code,sims_transport_enroll_number:a.globals.currentStudent.enroll_number,sims_transport_academic_year:e.temp.sims_transport_academic_year,sims_transport_route_code:e.temp.sims_transport_route_code,sims_transport_pickup_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_drop_stop_code:e.temp.sims_transport_pickup_stop_code,sims_transport_route_student_status:"C",sims_transport_route_cancel_reason:e.temp.reason_cancellation,sims_transport_effective_from:t};e.datasend.push(s),n.post(r.apiUrl+"api/transport/Insert_updateTransportData",e.datasend).then(function(t){e.othr=t.data,t.data?(e.fb_subject=null,e.fb_msg=null,e.showMessage=!0,e.messageClass="alert-success",e.message="Request sent for cancellation",e.getTransportDetails()):(e.showMessage=!0,e.messageClass="alert-error",e.message="Failed to send request for cancellation")})}else swal("Enter reason for cancellation")},e.printUnderTaking=function(t){var o;if(r.AWS.includes(n.defaults.headers.common.schoolId)&&"reports-","tiadxb"==n.defaults.headers.common.schoolId||"tiashj"==n.defaults.headers.common.schoolId||"staging1"==n.defaults.headers.common.schoolId||"staging2"==n.defaults.headers.common.schoolId||"staging3"==n.defaults.headers.common.schoolId||"staging4"==n.defaults.headers.common.schoolId||"aisdxb"==n.defaults.headers.common.schoolId||"tosdxb"==n.defaults.headers.common.schoolId)var i="https://reports.leamseducation.com/"+n.defaults.headers.common.schoolId.toLowerCase()+"/api/reports/";else if("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||"portalag"==n.defaults.headers.common.schoolId||"portalom"==n.defaults.headers.common.schoolId||"portaldso"==n.defaults.headers.common.schoolId){"portalom"==n.defaults.headers.common.schoolId.toLowerCase()&&(e.schoolcode="ihsonlineom"),"portaldso"==n.defaults.headers.common.schoolId.toLowerCase()&&(e.schoolcode="iisonlinedso"),"portalag"==n.defaults.headers.common.schoolId.toLowerCase()&&(e.schoolcode="ihsonlineag");i="https://"+e.schoolcode+".ihsdubai.org/report/api/reports/"}else i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o={acad_year:t.sims_transport_academic_year,enroll:a.globals.currentStudent.enroll_number,route_code:t.sims_transport_route_code},$("#reportViewer1").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer1").data("telerik_ReportViewer").reportSource({report:"SimsReports.Fleet.FLER42IHS1,SimsReports",parameters:o}),setTimeout(function(){$("#reportViewer1").data("telerik_ReportViewer").commands.export.exec("pdf")},1e3),setInterval(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},1e3),s(function(){$(".trv-nav li").css({display:"block"}),$(".trv-nav li:nth-child(3)").css({display:"none"}),$(".trv-nav li:nth-child(4)").css({display:"none"}),$(".trv-side-menu li:eq(3)").css({display:"none"}),$(".trv-side-menu li:eq(4)").css({display:"none"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px","margin-top":"-5px"})},100)},e.$on("student_change",function(t,a){e.getTransportDetails()}),$('*[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()}),a.globals.studentsLoaded&&e.getTransportDetails();var l,d,_,c,m,u,p=document.getElementById("latitude"),g=document.getElementById("longitude");function h(t){p.value=t.coords.latitude,g.value=t.coords.longitude,function(){c=document.getElementById("latitude").value,m=document.getElementById("longitude").value;var t=function(e,t){var a=new XMLHttpRequest;"withCredentials"in a?a.open(e,t,!0):"undefined"!=typeof XDomainRequest?(a=new XDomainRequest).open(e,t):a=null;return a}("POST","http://maps.googleapis.com/maps/api/geocode/json?latlng="+c+","+m+"&sensor=true");t.onload=function(){var a=JSON.parse(t.responseText);if(a.results.length>0){var s=a.results[0].formatted_address,o=s.split(",");u=o.length,l=o[u-1],c=o[u-2],d=o[u-3],_=o[u-4];var n=o[u-5],r=c.split(" "),i=r[r.length-1],c=c.replace(i," ");e.sims_transport_share_location=n+", "+_+", "+d+", "+c+", "+l+", "+i+"."}else document.getElementById("message").innerHTML="No location available for provided details."},t.send()}()}navigator.geolocation&&navigator.geolocation.getCurrentPosition(h),e.obj=null}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardNewController_SkillNew1",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){let i;e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,e.dvhss_flag=!0,e.flg_dvhss=!1,e.showViewButton="N",e.studentDetails=[],e.studentDetails.push({key:"Academic Year",value:a.globals.currentStudent.sims_academic_year_description}),e.studentDetails.push({key:"GR NO.",value:a.globals.currentStudent.sims_student_enroll_number}),e.studentDetails.push({key:"Student Name",value:a.globals.currentStudent.sims_student_passport_fullname_new}),e.studentDetails.push({key:"Class",value:a.globals.currentStudent.sims_grade_name_en+" "+a.globals.currentStudent.sims_section_name_en}),n.get(r.apiUrl+"api/attendance/getShowTrackerStatus").then(function(t){e.showViewButton="Y"==t.data}),e.getMedicalDetails=function(t){e.reportShow=!1,e.brs_rpt=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0])}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.Getinfo6=function(t){n.get(r.apiUrl+"api/reportcardnew/getAllReportCardPdf?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"§ion_code="+e.std.sims_section_code+"&report_level_code=1&report_code="+t.sims_prog_card_config_code+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(a){e.school_id=n.defaults.headers.common.schoolId,"portaldso"==n.defaults.headers.common.schoolId?e.school_id="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?e.school_id="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(e.school_id="ihsonlineom"),"N"==t.sims_report_display_status?(e.hide_iframe=!0,swal({title:"Alert",text:t.sims_report_err_display_msg,imageUrl:"assets/img/notification-alert.png"})):""==a.data?(e.hide_iframe=!0,swal({title:"Alert",text:"File is not found",imageUrl:"assets/img/notification-alert.png"})):"adisw"==n.defaults.headers.common.schoolId?e.docname="https://api.mograsys.com/apierp/Content/adisw/ResultUpload/"+a.data:"portal"==n.defaults.headers.common.schoolId?e.docname="https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data:"https://apiihs.schoolappsuae.com/ppapi/"==r.apiUrl?e.docname="https://"+e.school_id+".ihsdubai.org/report/Content/"+e.school_id+"/ResultUpload/"+a.data:r.AWS.includes(n.defaults.headers.common.schoolId)?e.docname="https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data:e.docname="https://"+n.defaults.headers.common.schoolId+".mograsys.com/report/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data}),n.get(r.apiUrl+"api/attendance/getPt2Param?scheme_code="+t.sims_prog_card_config_code).then(function(t){e.PT2param=t.data})},e.view_pdf=function(){window.open(e.docname,"_new")}},$("#myModal4").modal("hide"),e.view_graph=function(){e.obj.sims_prog_card_config_code.sims_prog_card_config_code==e.PT2param.param2?e.view_graph2():($("#myModal4").modal("show"),e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=e.obj.academic_year,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,i&&i.destroy(),n.get(r.apiUrl+"api/attendance/getSetTargetGradeMarkNew?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old+"&config_code="+e.obj.sims_prog_card_config_code.sims_prog_card_config_code).then(function(t){e.obj6=t.data,e.bargraphdata=e.obj6,console.log("GetSubject",e.obj6),e.bargraphdata.forEach(function(e){function t(e){const t=parseFloat(e);return t%1==0?t.toString():t.toFixed(2)}e.sims_report_card_att5&&(e.sims_report_card_att5=t(e.sims_report_card_att5)),e.sims_report_card_att4&&(e.sims_report_card_att4=t(e.sims_report_card_att4)),e.sims_current_section_average&&(e.sims_current_section_average=t(e.sims_current_section_average)),e.sims_current_grade_average&&(e.sims_current_grade_average=t(e.sims_current_grade_average)),e.sims_report_card_att2&&(e.sims_report_card_att2=t(e.sims_report_card_att2))});const a=e.bargraphdata.map(function(e){return e.subject_name});i=new Chart(document.getElementById("myChart1"),{type:"bar",data:{labels:a,datasets:[{label:"Grade Average",data:e.bargraphdata.map(function(e){return e.sims_current_grade_average}),type:"line",borderColor:"#ffc000",fill:!1,tension:.1},{label:"Class Average",data:e.bargraphdata.map(function(e){return e.sims_current_section_average}),type:"line",borderColor:"#aaaaaa",fill:!1,tension:.1},{label:"Previous Grade Marks",data:e.bargraphdata.map(function(e){return e.sims_report_card_att4}),backgroundColor:"#318CE7",barThickness:40},{label:"Current Grade target",data:e.bargraphdata.map(function(e){return e.sims_report_card_att2}),backgroundColor:"#ed7d31",barThickness:40},{label:"Current Grade Marks ("+e.bargraphdata[0].sims_report_card_category_name+")",data:e.bargraphdata.map(function(e){return e.sims_report_card_att5}),backgroundColor:"#6CB4EE",barThickness:40}]},options:{plugins:{title:{display:!0,text:"Student’s Progress Tracker"},datalabels:{display:!0,formatter:function(e,t){return e.toFixed(2)},color:"black",font:{size:12,weight:"bold"}}},scales:{x:{stacked:!1,display:!0,barPercentage:1,categoryPercentage:1},y:{stacked:!1,max:110}},tooltips:{enabled:!1},animation:{onComplete:function(){var e=this,t=e.ctx;t.font=Chart.helpers.fontString(Chart.defaults.font.size,Chart.defaults.font.style,Chart.defaults.font.family),t.fillStyle=Chart.defaults.color,t.textAlign="center",e.data.datasets.forEach(function(a,s){if("line"!==a.type){e.getDatasetMeta(s).data.forEach(function(e,s){var o=a.data[s];t.fillText(o,e.x,e.y-5)})}else{var o=e.getDatasetMeta(e.data.datasets.length-1);e.getDatasetMeta(s).data.forEach(function(e,t){var a=o.data[t];e.x=a.x})}})}}}})}))},e.view_graph2=function(){$("#myModal5").modal("show"),e.studentDetails=[],e.studentDetails.push({key:"Academic Year",value:a.globals.currentStudent.sims_academic_year_description}),e.studentDetails.push({key:"GR NO.",value:a.globals.currentStudent.sims_student_enroll_number}),e.studentDetails.push({key:"Student Name",value:a.globals.currentStudent.sims_student_passport_fullname_new}),e.studentDetails.push({key:"Class",value:a.globals.currentStudent.sims_grade_name_en+" "+a.globals.currentStudent.sims_section_name_en}),e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=e.obj.academic_year,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,i&&i.destroy(),n.get(r.apiUrl+"api/attendance/getSetTargetGradeMarkNew2?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old+"&config_code="+e.obj.sims_prog_card_config_code.sims_prog_card_config_code+"&grade="+e.grade).then(function(t){e.obj6=t.data,e.bargraphdata=e.obj6,console.log("GetSubject",e.obj6),e.bargraphdata.forEach(function(e){function t(e){if(null===e||void 0===e||""==e)return null;const t=parseFloat(e);return t%1==0?t.toString():t.toFixed(2)}e.sims_report_card_att5=t(e.sims_report_card_att5),e.sims_report_card_att52=t(e.sims_report_card_att52),e.sims_report_card_att53=t(e.sims_report_card_att53),e.sims_report_card_att54=t(e.sims_report_card_att54),e.sims_report_card_att4=t(e.sims_report_card_att4),e.sims_current_section_average=t(e.sims_current_section_average),e.sims_current_grade_average=t(e.sims_current_grade_average),e.sims_report_card_att2=t(e.sims_report_card_att2)});const a=e.bargraphdata.map(function(e){return e.subject_name});function s(e){return e.some(e=>null!==e&&""!==e)}let o=[{label:"Grade Average",data:e.bargraphdata.map(function(e){return e.sims_current_grade_average}),type:"line",borderColor:"#ffc000",fill:!1,tension:.1},{label:"Class Average",data:e.bargraphdata.map(function(e){return e.sims_current_section_average}),type:"line",borderColor:"#aaaaaa",fill:!1,tension:.1},{label:"Previous Grade Marks",data:e.bargraphdata.map(function(e){return e.sims_report_card_att4}),backgroundColor:"#318CE7",barThickness:40},{label:"Current Grade target",data:e.bargraphdata.map(function(e){return e.sims_report_card_att2}),backgroundColor:"#ed7d31",barThickness:40}];const n=e.bargraphdata.map(function(e){return e.sims_report_card_att52});s(n)&&o.push({label:"Current Grade Marks ("+e.bargraphdata[0].exam_term2+")",data:n,backgroundColor:"#87CEEB",barThickness:40});const r=e.bargraphdata.map(function(e){return e.sims_report_card_att53});s(r)&&o.push({label:"Current Grade Marks ("+e.bargraphdata[0].exam_term3+")",data:r,backgroundColor:"#B0E0E6",barThickness:40});const l=e.bargraphdata.map(function(e){return e.sims_report_card_att54});s(l)&&o.push({label:"Current Grade Marks ("+e.bargraphdata[0].exam_term4+")",data:l,backgroundColor:"#6495ED",barThickness:40}),o.push({label:"Current Grade Marks ("+e.bargraphdata[0].sims_report_card_category_name+")",data:e.bargraphdata.map(function(e){return e.sims_report_card_att5}),backgroundColor:"#B9D9EB",barThickness:40}),i=new Chart(document.getElementById("myChart2"),{type:"bar",data:{labels:a,datasets:o},options:{plugins:{title:{display:!0,text:"Student’s Progress Tracker"},datalabels:{display:!0,formatter:function(e,t){return null!==e?e.toFixed(2):""},color:"black",font:{size:12,weight:"bold"}}},scales:{x:{stacked:!1,display:!0,barPercentage:.8,categoryPercentage:.7},y:{stacked:!1,max:110}},tooltips:{enabled:!1},animation:{onComplete:function(){var e=this,t=e.ctx;t.font=Chart.helpers.fontString(Chart.defaults.font.size,Chart.defaults.font.style,Chart.defaults.font.family),t.fillStyle=Chart.defaults.color,t.textAlign="center",e.data.datasets.forEach(function(a,s){if("line"!==a.type){e.getDatasetMeta(s).data.forEach(function(e,s){var o=a.data[s];null!==o&&t.fillText(o,e.x,e.y-5)})}else{var o=e.getDatasetMeta(e.data.datasets.length-1);e.getDatasetMeta(s).data.forEach(function(e,t){var a=o.data[t];e.x=a.x})}})}}}})})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("reportCardNewController_SkillNew1_V2",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){var i;e.grid=!1,e.grid1=!1,e.grid2=!1,e.grid3=!1,e.show=!1,e.gridnew=!0,e.dvhss_flag=!0,e.flg_dvhss=!1,e.getMedicalDetails=function(t){e.reportShow=!1,e.brs_rpt=!1,e.studentName=a.globals.currentStudent.sims_student_passport_fullname,e.academic_change=function(t){n.get(r.apiUrl+"api/reportcardnew/getStudentGradeSection?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){t.data.length>0&&(e.std=t.data[0])}),e.obj.sims_term_code="",n.get(r.apiUrl+"api/reportcardnew/getAllTerms_leams?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+t+"&enroll="+a.globals.currentStudent.enroll_number).then(function(t){e.grid=!0,e.term_lst=t.data,e.obj5=t.data,e.display_msg=e.obj5[0].sims_report_err_display_msg,e.display_status=e.obj5[0].sims_report_display_status,e.config_code=e.obj5[0].sims_prog_card_config_code,e.ScemeName=e.obj5[0].sims_prog_card_congig_code})},n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_change(e.obj[0].academic_year),e.obj.academic_year=e.obj[0].academic_year}),e.reportcardLevelChange=function(t){n.get(r.apiUrl+"api/reportcardnew/getReportCardName1?cur="+a.globals.currentStudent.sims_cur_code+"&academic="+e.obj.academic_year+"&grade="+e.std.sims_grade_code+"§ion="+e.std.sims_section_code+"&level="+t).then(function(t){e.cmbReportcard=t.data})},e.Getinfo6=function(t){n.get(r.apiUrl+"api/reportcardnew/getAllReportCardPdf?cur_code="+a.globals.currentStudent.sims_cur_code+"&acayear="+e.obj.academic_year+"&grade_code="+e.std.sims_grade_code+"§ion_code="+e.std.sims_section_code+"&report_level_code=1&report_code="+t.sims_prog_card_config_code+"&enroll_number="+a.globals.currentStudent.enroll_number).then(function(a){e.school_id=n.defaults.headers.common.schoolId,"portaldso"==n.defaults.headers.common.schoolId?e.school_id="iisonlinedso":"portalag"==n.defaults.headers.common.schoolId?e.school_id="ihsonlineag":"portalom"==n.defaults.headers.common.schoolId&&(e.school_id="ihsonlineom"),"N"==t.sims_report_display_status?(e.hide_iframe=!0,swal({title:"Alert",text:t.sims_report_err_display_msg,imageUrl:"assets/img/notification-alert.png"})):""==a.data?(e.hide_iframe=!0,swal({title:"Alert",text:"File is not found",imageUrl:"assets/img/notification-alert.png"})):"adisw"==n.defaults.headers.common.schoolId?e.docname="https://api.mograsys.com/apierp/Content/adisw/ResultUpload/"+a.data:"portal"==n.defaults.headers.common.schoolId?e.docname="https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data:"https://apiihs.schoolappsuae.com/ppapi/"==r.apiUrl?e.docname="https://"+e.school_id+".ihsdubai.org/report/Content/"+e.school_id+"/ResultUpload/"+a.data:r.AWS.includes(n.defaults.headers.common.schoolId)?e.docname="https://assets.mograsys.com/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data:e.docname="https://"+n.defaults.headers.common.schoolId+".mograsys.com/report/Content/"+n.defaults.headers.common.schoolId+"/ResultUpload/"+a.data})},e.view_pdf=function(){window.open(e.docname,"_new")}},$("#myModal4").modal("hide"),e.view_graph=function(){$("#myModal4").modal("show"),e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=e.obj.academic_year,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,i&&i.destroy(),n.get(r.apiUrl+"api/attendance/getSetTargetGradeMarkNew?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year+"&ac_year_old="+e.ac_year_old+"&config_code="+e.obj.sims_prog_card_config_code.sims_prog_card_config_code).then(function(t){e.obj6=t.data,e.bargraphdata=e.obj6,console.log("GetSubject",e.obj6);const a=e.bargraphdata.map(function(e){return e.subject_name});i=new Chart(document.getElementById("myChart1"),{type:"bar",data:{labels:a,datasets:[{label:"Previous Grade Marks",data:e.bargraphdata.map(function(e){return e.sims_report_card_att4}),backgroundColor:"#dcd9d9",barThickness:40},{label:"Current Grade target",data:e.bargraphdata.map(function(e){return e.sims_report_card_att2}),backgroundColor:"#9ecbed",barThickness:40},{label:"Current Grade Marks("+e.bargraphdata[0].sims_report_card_category_name+")",data:e.bargraphdata.map(function(e){return e.sims_report_card_att5}),backgroundColor:"#3c97da",barThickness:40}]},options:{plugins:{title:{display:!0,text:"Performance Chart"}},scales:{x:{stacked:!1,display:!0,barPercentage:1,categoryPercentage:1},y:{stacked:!1}}}})})},e.$on("student_change",function(t,a){e.getMedicalDetails()}),a.globals.studentsLoaded&&e.getMedicalDetails()}])}(),function(){"use strict";angular.module("sims.module.reportCardNew").controller("ReportCardPerformanceCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV",function(e,t,a,s,o,n,r){let i;e.studentDetails=[],e.studentDetails.push({key:"Academic Year",value:a.globals.currentStudent.sims_acad_yr}),e.studentDetails.push({key:"GR NO.",value:a.globals.currentStudent.sims_student_enroll_number}),e.studentDetails.push({key:"Student Name",value:a.globals.currentStudent.sims_student_passport_fullname_new}),e.studentDetails.push({key:"Class",value:a.globals.currentStudent.sims_grade_name_en+" "+a.globals.currentStudent.sims_section_name_en}),n.get(r.apiUrl+"api/reportcardnew/getAllAcademicYears?cur_code="+a.globals.currentStudent.sims_cur_code).then(function(t){e.grid=!0,e.obj=t.data,e.objAcademic=t.data,e.academic_year=e.obj[0].academic_year,e.academic_change(e.obj[0].academic_year),e.view_graph()}),e.academic_change=function(t){e.studentDetails[0].value=t},e.view_graph=function(){e.enrollno=a.globals.currentStudent.sims_student_enroll_number,e.names=a.globals.currentStudent.sims_student_passport_fullname,e.cur_code=a.globals.currentStudent.sims_cur_code,e.ac_year=e.academic_year,e.ac_year_old=parseInt(e.ac_year)-1,e.grade=a.globals.currentStudent.sims_grade_code,e.section_code=a.globals.currentStudent.sims_section_code,i&&i.destroy(),n.get(r.apiUrl+"api/attendance/getStudentTermMarks?sims_enroll_number="+e.enrollno+"&ac_year="+e.ac_year).then(function(t){e.bargraphdata=t.data,e.bargraphdata.length>0?(e.bargraphdata.sort(function(e,t){return parseInt(e.sims_academic_year)-parseInt(t.sims_academic_year)}),e.transformedData={},angular.forEach(e.bargraphdata,function(t){e.transformedData[t.subject_name]||(e.transformedData[t.subject_name]=[]),e.transformedData[t.subject_name].push(t)}),e.columnHeaders=[],angular.forEach(e.bargraphdata,function(t){-1===e.columnHeaders.indexOf(t.sims_academic_year)&&e.columnHeaders.push(t.sims_academic_year)}),setTimeout(function(){!function(){let t={},a=[],s={};const o=["#4472c4","#ed7d31","#a5a5a5","#ffc000","#5b9bd5"];e.bargraphdata.forEach(function(e){const n=e.sims_academic_year,r=e.subject_name,i=parseFloat(e.sims_subject_marks);s[n]||(s[n]=o[Object.keys(s).length%o.length]),t[n]||(t[n]={}),t[n][r]||(t[n][r]=i),a.includes(r)||a.push(r)});let n=Object.keys(t).map(e=>({label:`Year ${e} Marks`,data:a.map(a=>t[e][a]||0),backgroundColor:s[e],barThickness:30}));i=new Chart(document.getElementById("myChart1"),{type:"bar",data:{labels:a,datasets:n},options:{plugins:{title:{display:!0,text:"Student Academic Tracker"},datalabels:{display:!0,formatter:function(e,t){return e.toFixed(2)},color:"black",font:{size:12,weight:"bold"}}},scales:{x:{stacked:!1,display:!0,barPercentage:1,categoryPercentage:1},y:{stacked:!1,max:110}},tooltips:{enabled:!1},animation:{onComplete:function(){var e=this,t=e.ctx;t.font=Chart.helpers.fontString(Chart.defaults.font.size,Chart.defaults.font.style,Chart.defaults.font.family),t.fillStyle=Chart.defaults.color,t.textAlign="center",e.data.datasets.forEach(function(a,s){if("line"!==a.type){var o=e.getDatasetMeta(s);o.data.forEach(function(e,s){var o=a.data[s];t.fillText(o,e.x,e.y-5)})}})}}}})}()},100)):swal({title:"Alert",text:"No data found",imageUrl:"assets/img/notification-alert.png"})})}}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ItemReqSIACont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$location","$filter","ENV",function(e,t,a,s,o,n,r,i,l){e.display=!1,e.alternative=!1,e.main=!0;var d=a.globals.currentUser.username;e.table_scroll_printblock=!1,e.table_scroll_block=!1,e.table_scroll_checkoutblock=!1,e.table_scroll_viewblock=!1,e.itemselectionbtn=!0,e.disable_btn=!0,e.disable_btn_total=!0,e.payment_mode_grid=!0,e.disable_btn1=!0,e.save_btn=!0,e.grade_code="",e.academic_year="",e.rcbDocType=[],e.Update_btn=!1,e.itemsetsearchbtn=!0,e.itemsetsearchbtnnew=!0,e.display=!1,e.table=!0,e.showPickInvoice=!1,e.old_doc_prov_no_show=!1;e.size_url="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/docs/portalReference/size-chart.pdf",e.term_cond_url="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/docs/portalReference/term-condition.pdf";var _=r.search();jQuery.isEmptyObject(_)||swal({title:"Alert",text:_.res+". Your Transaction Number is "+_.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/itemRequestS","_self"),"Success"==_.res&&e.goto_history())}),e.temp1={im_inv_no:void 0,invs021_sg_name:void 0,im_item_code:void 0,im_desc:void 0,invs021_dep_code:void 0,sec_code:void 0,invs021_sup_code:void 0,im_assembly_ind_s:void 0,category_code:void 0,subcategory_code:void 0},e.itemsPerPage="5",e.currentPage=0,e.obj=[],e.itemList=[],e.temp={},e.paymodeList=[],e.disable_total_dis_per=!1,e.edt={},e.disableOnInvoiceReturn=!1,e.showBtnOnInvoiceReturn=!1,e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0,e.disablePayementMode=!1,e.totalPMAmount=0,e.dept_code_mutiple="",e.showSublegerData=!1,e.showldgr=!0,$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"});var c=new Date;c=("0"+c.getDate()).slice(-2)+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+c.getFullYear(),e.getstudentList=function(){e.table_scroll_block=!1,e.table_scroll_checkoutblock=!1,e.table_scroll_printblock=!1,e.disable_btn=!0,e.table_scroll_viewblock=!1,e.enroll_number=a.globals.currentStudent.enroll_number,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.sims_grade_code=a.globals.currentStudent.sims_grade_code,e.sims_section_code=a.globals.currentStudent.sims_section_code,e.sims_student_passport_fullname_new=a.globals.currentStudent.sims_student_passport_fullname_new,e.temp.enroll=a.globals.currentStudent.enroll_number,n.get(l.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.enroll_number+"-"+e.sims_student_passport_fullname_new+"-"+e.studengrade_name+"-"+e.school_name,e.description="School Uniform Fee",console.log("$scope.school_name",e.school_name)}),"dpsmis"==n.defaults.headers.common.schoolId&&(e.disable_sale=!0),e.tdate=c,e.temp.provDate=c,console.log(" $scope.temp['provDate']",e.temp.provDate),e.temp.paymentMode="CA",e.size=function(t){e.itemsPerPage=t},""!=e.enroll_number&&n.get(l.apiUrl+"api/common/StoreRequest/GetStudentInfo?enrollnum="+e.enroll_number).then(function(t){void 0!=t.data.studentname?(e.temp.name=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,e.studentname=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,console.log("name",e.temp.name),e.grade_code=t.data.grade_code,e.disable_btn=!0):(swal({title:"Alert",text:"Please Enter Correct Student ID."}),e.disable_btn=!0,e.disable_btn1=!0,e.showBtnOnInvoiceReturn=!1,e.grade_code="")}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllSalesType").then(function(t){e.rcbSalesType=t.data,console.log("Customer Type:",e.rcbSalesType),e.rcbSalesType.length>0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(l.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.grid_selectnew=function(t){var a=0;e.total=0;for(var s=0;s0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.enroll_change=function(t){if(""!=t){if("01"==e.temp.sal_type){e.inCustFlg=!0;for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(l.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(void 0==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),parseInt(t.dd_qty)>0||""==t.dd_qty){if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."})),e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}e.grid_select(),e.grid_selectnew()}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(a)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."}))}else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),r=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(r))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(o),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:"Item Quantity should not be Decimal."}))}e.lineDiscountPer(t),e.grid_selectnew()}},e.check_qty_value=function(t){if(parseInt(t.dd_qty)>parseInt(t.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),t.dd_qty=t.invoice_qty),""==t.dd_qty)if(t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(a)+parseFloat(o)).toFixed(2)}e.totalAmtClick()}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var n=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(n))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(o)).toFixed(2)}}},e.lineDiscountPer=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct)if(t.dd_line_discount_pct=0,(isNaN(parseFloat(t.dd_line_discount_amount))||""==t.dd_line_discount_amount||void 0==t.dd_line_discount_amount)&&(t.dd_line_discount_amount=0),0==t.sell_price_inclusiv_vat)void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-parseFloat(t.dd_line_discount_amount))*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2);else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}else if(0==t.sell_price_inclusiv_vat)t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2);else{s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(t.dd_line_discount_amount=parseFloat(parseFloat(s)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,t.sell_price_inclusiv_vat,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.lineDiscountPerInclusiveVat=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct){if(t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);var o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2)}else{if(t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.getitemCode=function(t){console.log("str",t),e.im_item_vat_percentage=t.im_item_vat_percentage,n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.item_dept_code=t.dep_code,e.im_revenue_acno=e.resitem.im_revenue_acno,e.im_cost_acno=e.resitem.im_cost_acno,e.im_vat_sale_profile=e.resitem.im_vat_sale_profile,"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price_including_vat=e.resitem.im_sell_price_including_vat,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0,e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage):(e.temp.qty=1,0==parseFloat(e.resitem.im_sell_price)?(e.sellPriceInclusiveVat=!1,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price_including_vat),e.temp.im_sell_price=e.resitem.im_sell_price_including_vat):(e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price),e.temp.im_sell_price=e.resitem.im_sell_price,e.sellPriceInclusiveVat=!0),e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage),n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:c,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(l.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code,e.temp.totalFinal=0;for(var a=0;a0){e.GetItems=t.data;for(var a=0;a0){e.itemListnew=t.data;for(var a=0;a0){for(t=0;t0)for(var a=0;a0&&(e.edt.consent_code=t.data.table[0].sims_consent_id,e.consent_change())}),e.consent_change=function(){e.single_obj_consent={};for(var t=0;t0&&(e.edt.consent_code=t.data.table[0].sims_consent_id)})}else swal({title:"Alert",text:e.single_obj_consent.save_message_error,imageUrl:"assets/img/notification-alert.png"})})}},e.$on("student_change",function(t,a){e.getCircularDetails()}),a.globals.studentsLoaded&&e.getCircularDetails()}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ItemReqNew_DSCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","$location","$filter","ENV",function(e,t,a,s,o,n,r,i,l){e.display=!1,e.alternative=!1,e.main=!0;var d=a.globals.currentUser.username;e.table_scroll_printblock=!1,e.table_scroll_block=!1,e.table_scroll_checkoutblock=!1,e.table_scroll_viewblock=!1,e.itemselectionbtn=!0,e.disable_btn=!0,e.disable_btn_total=!0,e.payment_mode_grid=!0,e.disable_btn1=!0,e.save_btn=!0,e.grade_code="",e.academic_year="",e.rcbDocType=[],e.Update_btn=!1,e.itemsetsearchbtn=!0,e.itemsetsearchbtnnew=!0,e.display=!1,e.table=!0,e.showPickInvoice=!1,e.old_doc_prov_no_show=!1;e.size_url="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/docs/portalReference/size-chart.pdf",e.term_cond_url="https://api.mograsys.com/kindoapi/Content/"+n.defaults.headers.common.schoolId+"/docs/portalReference/term-condition.pdf";var _=r.search();jQuery.isEmptyObject(_)||swal({title:"Alert",text:_.res+". Your Transaction Number is "+_.temp_dd_fee_transaction_id},function(t){!0===t&&(window.open("https://"+n.defaults.headers.common.schoolId+".mograsys.com/ppn/#/main/itemRequestS","_self"),"Success"==_.res&&e.goto_history())}),e.temp1={im_inv_no:void 0,invs021_sg_name:void 0,im_item_code:void 0,im_desc:void 0,invs021_dep_code:void 0,sec_code:void 0,invs021_sup_code:void 0,im_assembly_ind_s:void 0,category_code:void 0,subcategory_code:void 0},e.itemsPerPage="5",e.currentPage=0,e.obj=[],e.itemList=[],e.temp={},e.paymodeList=[],e.disable_total_dis_per=!1,e.edt={},e.disableOnInvoiceReturn=!1,e.showBtnOnInvoiceReturn=!1,e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0,e.disablePayementMode=!1,e.totalPMAmount=0,e.dept_code_mutiple="",e.showSublegerData=!1,e.showldgr=!0,$('*[data-datepicker="true"] input[type="text"]').datepicker({todayBtn:!0,orientation:"top left",autoclose:!0,todayHighlight:!0,format:"yyyy-mm-dd"});var c=new Date;c=("0"+c.getDate()).slice(-2)+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+c.getFullYear(),e.getstudentList=function(){e.table_scroll_block=!1,e.table_scroll_checkoutblock=!1,e.table_scroll_printblock=!1,e.disable_btn=!0,e.table_scroll_viewblock=!1,e.enroll_number=a.globals.currentStudent.enroll_number,e.studengrade_name=a.globals.currentStudent.sims_grade_name_en,e.sims_cur_code=a.globals.currentStudent.sims_cur_code,e.sims_acad_yr=a.globals.currentStudent.sims_acad_yr,e.sims_grade_code=a.globals.currentStudent.sims_grade_code,e.sims_section_code=a.globals.currentStudent.sims_section_code,e.sims_student_passport_fullname_new=a.globals.currentStudent.sims_student_passport_fullname_new,e.temp.enroll=a.globals.currentStudent.enroll_number,n.get(l.apiUrl+"api/common/getSchoolDetails_new").then(function(t){e.school=t.data,e.school_name=e.school.table[0].lic_school_name,e.dataname=e.enroll_number+"-"+e.sims_student_passport_fullname_new+"-"+e.studengrade_name+"-"+e.school_name,e.description="School Uniform Fee",console.log("$scope.school_name",e.school_name)}),"dpsmis"==n.defaults.headers.common.schoolId&&(e.disable_sale=!0),e.tdate=c,e.temp.provDate=c,console.log(" $scope.temp['provDate']",e.temp.provDate),e.temp.paymentMode="CA",e.size=function(t){e.itemsPerPage=t},""!=e.enroll_number&&n.get(l.apiUrl+"api/common/StoreRequest/GetStudentInfo?enrollnum="+e.enroll_number).then(function(t){void 0!=t.data.studentname?(e.temp.name=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,e.studentname=t.data.studentname+" Class:"+t.data.grade_name+"-"+t.data.section_name,console.log("name",e.temp.name),e.grade_code=t.data.grade_code,e.disable_btn=!0):(swal({title:"Alert",text:"Please Enter Correct Student ID."}),e.disable_btn=!0,e.disable_btn1=!0,e.showBtnOnInvoiceReturn=!1,e.grade_code="")}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllSalesType").then(function(t){e.rcbSalesType=t.data,console.log("Customer Type:",e.rcbSalesType),e.rcbSalesType.length>0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(l.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.grid_selectnew=function(t){var a=0;e.total=0;for(var s=0;s0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.enroll_change=function(t){if(""!=t){if("01"==e.temp.sal_type){e.inCustFlg=!0;for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(l.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(""==t.item_Code);else for(var a=0;a0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_qty)a.dd_sell_value_final1=void 0,a.dd_item_vat_amount1=parseFloat(r).toFixed(2),a.dd_sell_value_line_total1=parseFloat(s)+parseFloat(r),a.dd_sell_value_line_total1=parseFloat(t.dd_sell_value_line_total).toFixed(2);else if(parseInt(t.dd_qty)>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_sell_value_final=parseFloat(s).toFixed(2),t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(s)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2),a.dd_sell_value_final1=parseFloat(s).toFixed(2),a.dd_item_vat_amount1=parseFloat(r).toFixed(2),a.dd_sell_value_line_total1=parseFloat(s)+parseFloat(r),a.dd_sell_value_line_total1=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,a.sell_val_final1=0,a.dd_sell_value_final1=0,a.dd_sell_value_line_total1=0,a.d_item_vat_amount1=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,a.sell_val_final1=0,a.dd_sell_value_final1=0,a.dd_sell_value_line_total1=0,a.d_item_vat_amount1=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."})),e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}e.grid_select(),e.grid_selectnew()}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_sell_value_final=parseFloat(s).toFixed(2),t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(s)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."}))}else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:"Item Quantity should not be Decimal."}))}e.lineDiscountPer(t),e.grid_selectnew()}},e.check_qty_value=function(t,a,s){for(var o=0;o0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:c,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(l.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code,e.temp.totalFinal=0;for(var a=0;a0){e.GetItems=t.data;for(var a=0;a0){e.itemListnew=t.data;for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(t)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(t)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(t)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.qtychangebyM=function(t){if(void 0==t.item_Code||""==t.item_Code)t.dd_qty1=void 0;else{for(var a=[],s=0;s0){for(t=0;t0)for(var a=0;a0&&(e.temp.sal_type="04",e.GetSalesTypeChange(e.temp.sal_type))}),n.get(l.apiUrl+"api/common/StoreRequest/GetAllDocumentType").then(function(t){e.rcbDocType=t.data,console.log("DOC Type",e.rcbDocType),e.rcbDocType.length>0&&(e.temp.doc_type="SR")}),n.get(l.apiUrl+"api/common/StoreRequest/GetSalesType").then(function(t){if(e.GetSalesType=t.data,e.GetSalesType.length>0){"smsm"==n.defaults.headers.common.schoolId?e.temp.payment_type="CR":e.temp.payment_type="CA";for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.grid_selectnew=function(t){var a=0;e.total=0;for(var s=0;s0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(a)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(a)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(a)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.enroll_change=function(t){if(""!=t){if("01"==e.temp.sal_type){e.inCustFlg=!0;for(var a=0;a0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year})):(n.get(l.apiUrl+"api/common/StoreRequest/getGetCompany").then(function(t){e.comp_data=t.data,e.comp_data.length>0&&(e.edt.comp_code=e.comp_data[0].dept_comp_code,e.getLedgerCode(e.edt.comp_code))}),n.get(l.apiUrl+"api/common/StoreRequest/GetCurrentFinYearFromFinsParameter").then(function(t){e.GetCurrentFinYearFromFinsParameter1=t.data,e.fin_year=e.GetCurrentFinYearFromFinsParameter1[0].fin_year}))},e.Scroll=function(){var e=document.getElementById("table_scroll");e.scrollTop=e.scrollHeight-e.clientHeight},e.range=function(){var t,a=[];(t=e.currentPage)>e.pageCount()-5&&(t=e.pageCount()-5+1);for(var s=t;s=0&&a.push(s);return a},e.prevPage=function(){e.currentPage>0&&e.currentPage--},e.prevPageDisabled=function(){return 0===e.currentPage?"disabled":""},e.pageCount=function(){return Math.ceil(e.obj.length/e.itemsPerPage)-1},e.nextPage=function(){e.currentPage0||""==e.temp.qty?(e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick()):(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),e.temp.qty=1,e.temp.finalValue=e.temp.qty*parseFloat(e.temp.im_sell_price),e.totalAmtClick())},e.qtychangeby=function(t){if(parseInt(t.dd_qty)>0||""==t.dd_qty){if(t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_item_vat_per=t.im_item_vat_percentage;var a=t.dd_qty*parseFloat(t.dd_sell_price),s=parseFloat(a)*t.im_item_vat_percentage/100;t.dd_item_vat_amount=parseFloat(s).toFixed(2),t.dd_sell_value_final=parseFloat(a)+parseFloat(s),t.dd_sell_value_final=parseFloat(t.dd_sell_value_final).toFixed(2)}e.totalAmtClick()}else swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price),e.totalAmtClick()},e.qtychangeby1=function(t){if(""==t.item_Code);else for(var a=0;a0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_sell_price&&n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){if(e.resitem=a.data[0],t.dd_qty>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_price=parseFloat(e.resitem.im_sell_price),t.dd_sell_value_final=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);var s=parseInt(t.dd_qty)*parseFloat(e.resitem.im_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_item_vat_amount=parseFloat(s)+parseFloat(r),t.dd_sell_value_final=parseFloat(s)+parseFloat(r)}}else if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){t.dd_sell_price=parseFloat(e.resitem.im_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}}else swal({title:"Alert",text:" Item Quantity should be more than Zero.",imageUrl:"assets/img/notification-alert.png"});n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(t.loc_codes=e.resloc[0].loc_code)})}),""==t.dd_qty)a.dd_sell_value_final1=void 0,a.dd_item_vat_amount1=parseFloat(r).toFixed(2),a.dd_sell_value_line_total1=parseFloat(s)+parseFloat(r),a.dd_sell_value_line_total1=parseFloat(t.dd_sell_value_line_total).toFixed(2);else if(parseInt(t.dd_qty)>0){if(0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_sell_value_final=parseFloat(s).toFixed(2),t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(s)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2),a.dd_sell_value_final1=parseFloat(s).toFixed(2),a.dd_item_vat_amount1=parseFloat(r).toFixed(2),a.dd_sell_value_line_total1=parseFloat(s)+parseFloat(r),a.dd_sell_value_line_total1=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,a.sell_val_final1=0,a.dd_sell_value_final1=0,a.dd_sell_value_line_total1=0,a.d_item_vat_amount1=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,a.sell_val_final1=0,a.dd_sell_value_final1=0,a.dd_sell_value_line_total1=0,a.d_item_vat_amount1=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."})),e.lineDiscountPer(t)}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}e.lineDiscountPer(t)}e.grid_select(),e.grid_selectnew()}else{if(swal({title:"Alert",text:" Item Quantity should be more than Zero."}),t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(s)*parseFloat(t.im_item_vat_percentage),r=parseFloat(o)/100;t.dd_sell_value_final=parseFloat(s).toFixed(2),t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(s)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:" Item Quantity should not be Decimal."}))}else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),i=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(s)/(1+parseFloat(i))).toFixed(2);r=s-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(r).toFixed(2),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(r),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_line_total).toFixed(2)}""==t.dd_qty&&(t.sell_val_final=0,t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0),t.dd_qty!=Math.floor(t.dd_qty)&&(t.dd_sell_value_final=0,t.dd_sell_value_line_total=0,t.d_item_vat_amount=0,swal({title:"Alert",text:"Item Quantity should not be Decimal."}))}e.lineDiscountPer(t),e.grid_selectnew()}},e.check_qty_value=function(t){if(parseInt(t.dd_qty)>parseInt(t.invoice_qty)&&(swal({title:"Alert",text:"Item Quantity should not be more than invoice qty.",imageUrl:"assets/img/notification-alert.png"}),t.dd_qty=t.invoice_qty),""==t.dd_qty)if(t.dd_qty=1,0==t.sell_price_inclusiv_vat){t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);var a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(a)*parseFloat(t.im_item_vat_percentage),o=parseFloat(s)/100;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_final=parseFloat(a).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(a)+parseFloat(o)).toFixed(2)}e.totalAmtClick()}else{t.dd_sell_value_final=t.dd_qty*parseFloat(t.dd_sell_price);a=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var n=parseFloat(t.im_item_vat_percentage)/100;t.dd_sell_value_final=(parseFloat(a)/(1+parseFloat(n))).toFixed(2);o=a-t.dd_sell_value_final;t.dd_item_vat_amount=parseFloat(o).toFixed(2),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(o)).toFixed(2)}}},e.lineDiscountPer=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct)if(t.dd_line_discount_pct=0,(isNaN(parseFloat(t.dd_line_discount_amount))||""==t.dd_line_discount_amount||void 0==t.dd_line_discount_amount)&&(t.dd_line_discount_amount=0),0==t.sell_price_inclusiv_vat)void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-parseFloat(t.dd_line_discount_amount))*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2);else{if(void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price),o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}else if(0==t.sell_price_inclusiv_vat)t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2);else{s=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);if(t.dd_line_discount_amount=parseFloat(parseFloat(s)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){o=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(s)-parseFloat(t.dd_line_discount_amount))/(1+parseFloat(o))).toFixed(2),t.dd_item_vat_amount=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)-parseFloat(a)).toFixed(2)}t.dd_sell_value_line_total=(parseFloat(s)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,t.sell_price_inclusiv_vat,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.lineDiscountPerInclusiveVat=function(t){var a=0;if(isNaN(parseFloat(t.dd_line_discount_pct))&&(t.dd_line_discount_pct=0),parseFloat(t.dd_line_discount_pct)<=100){if(void 0==t.dd_line_discount_pct||""==t.dd_line_discount_pct||0==t.dd_line_discount_pct){if(t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){var s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);var o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2)}else{if(t.dd_line_discount_amount=parseFloat(parseFloat(t.dd_sell_value_final)*parseFloat(t.dd_line_discount_pct)/100).toFixed(2),void 0!=t.im_item_vat_percentage||""!=t.im_item_vat_percentage||null!=t.im_item_vat_percentage){s=parseFloat(t.im_item_vat_percentage)/100;a=((parseFloat(t.dd_sell_value_final)-t.dd_line_discount_amount)/(1+parseFloat(s))).toFixed(2);o=parseInt(t.dd_qty)*parseFloat(t.dd_sell_price);t.dd_item_vat_amount=parseFloat(o)-a}t.dd_sell_value_line_total=parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_line_total)-parseFloat(t.dd_line_discount_amount)).toFixed(2)}e.totalAmtClick()}else t.dd_line_discount_amount=0,t.dd_line_discount_pct=0,void 0==t.im_item_vat_percentage&&""==t.im_item_vat_percentage&&null==t.im_item_vat_percentage||(a=(t.dd_sell_value_final-t.dd_line_discount_amount)*t.im_item_vat_percentage/100,t.dd_item_vat_amount=parseFloat(a).toFixed(2)),t.dd_sell_value_line_total=parseFloat(parseFloat(t.dd_sell_value_final)+parseFloat(t.dd_item_vat_amount)).toFixed(2),swal({title:"Alert",text:"Discount Should not be more than 100%.",imageUrl:"assets/img/notification-alert.png"}),e.totalAmtClick()},e.getitemCode=function(t){console.log("str",t),e.im_item_vat_percentage=t.im_item_vat_percentage,n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeDetails?item_code="+t.im_item_code+"&sg_name="+e.temp.gcode).then(function(a){e.resitem=a.data[0],e.item_dept_code=t.dep_code,e.im_revenue_acno=e.resitem.im_revenue_acno,e.im_cost_acno=e.resitem.im_cost_acno,e.im_vat_sale_profile=e.resitem.im_vat_sale_profile,"02"==e.temp.doc_type?(e.temp.qty=1,e.temp.im_sell_price_including_vat=e.resitem.im_sell_price_including_vat,e.temp.im_sell_price=e.resitem.im_sell_price,e.temp.finalValue=0,e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage):(e.temp.qty=1,0==parseFloat(e.resitem.im_sell_price)?(e.sellPriceInclusiveVat=!1,e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price_including_vat),e.temp.im_sell_price=e.resitem.im_sell_price_including_vat):(e.temp.finalValue=1*parseFloat(e.resitem.im_sell_price),e.temp.im_sell_price=e.resitem.im_sell_price,e.sellPriceInclusiveVat=!0),e.temp.im_item_vat_percentage=e.resitem.im_item_vat_percentage),n.get(l.apiUrl+"api/common/StoreRequest/GetItemCodeLocations?im_inv_no="+t.im_inv_no).then(function(a){e.resloc=a.data,e.resloc.length>0&&(e.temp.loc_code=e.resloc[0].loc_code),e.temp.gcode=t.sg_name,void 0!=e.temp.enroll&&(e.disable_btn1=!1)})})},e.add=function(){var t=0;if(setTimeout(function(){e.Scroll()},700),""==e.im_item_code1.im_inv_no||void 0==e.im_item_code1.im_inv_no);else if(e.totalFinal=0,e.flg=!1,0==e.flg){if(1==e.sellPriceInclusiveVat){var a=parseFloat(e.temp.im_item_vat_percentage)/100,s=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),o=(parseFloat(e.temp.finalValue)/(1+parseFloat(a))).toFixed(2),n=parseFloat(e.temp.finalValue)-s;t=n;var r=parseFloat(parseFloat(s)+parseFloat(n)).toFixed(2)}else{t=parseFloat(e.temp.finalValue*e.temp.im_item_vat_percentage/100);s=parseFloat(e.temp.finalValue).toFixed(2),o=parseFloat(e.temp.finalValue).toFixed(2),r=parseFloat(parseFloat(e.temp.finalValue)+parseFloat(t)).toFixed(2)}if("02"==e.temp.doc_type){var i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}else{i={sg_name:$("#rcbGroup").find("option:selected").text(),sg_desc:$("#rcbGroup").find("option:selected").text(),sg_code:e.temp.gcode,im_inv_no:e.im_item_code1.im_inv_no,im_item_code:e.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:e.temp.loc_code,original_qty:e.resitem.original_qty,dd_qty:e.temp.qty,dd_sell_price:o,dd_sell_value_final:s,doc_remark:e.temp.doc_remark,im_item_vat_percentage:e.temp.im_item_vat_percentage,dd_item_vat_amount:parseFloat(t).toFixed(2),dd_sell_value_line_total:r,dd_line_discount_pct:0,dd_line_discount_amount:0,im_sell_price_including_vat:parseFloat(e.temp.im_sell_price_including_vat).toFixed(2),sell_price_inclusiv_vat:e.sellPriceInclusiveVat,item_dept_code:e.item_dept_code,im_revenue_acno:e.im_revenue_acno,im_cost_acno:e.im_cost_acno,im_vat_sale_profile:e.im_vat_sale_profile};e.itemList.push(i)}}e.totalAmtClick(),e.CancelItem(),document.getElementById("rcbItem").focus(),setTimeout(function(){for(var t=0;t=48&&a<=57||a>=96&&a<=105||190==a)?e.check():t.preventDefault()},e.declationcheck=function(t){t?e.disable_btn=!1:(e.disable_btn=!0,swal({title:"",text:"Please indicate that you have read and agreed to the terms to proceed with the order."}))},e.returnInvoice=function(){e.disableReturnBtn=!0,e.disableSaveReturnBtn=!0;var s={dep_code:e.depCode,doc_prov_no:"",doc_prov_date:e.temp.provDate,dt_code:e.temp.doc_type,sm_code:e.salesman.sm_code,up_name:a.globals.currentUser.username,creation_user:a.globals.currentUser.username,sal_type:e.temp.sal_type,doc_total_amount:e.temp.totalFinal,doc_status:"2",cus_account_no:e.temp.enroll,doc_special_name:e.temp.special_nm,dep_code_caused_by:e.depCode,doc_order_ref_no:e.temp.oderRefNo,doc_other_charge_amount:e.temp.otherCharges,doc_discount_pct:e.temp.overalldis,doc_discount_amount:e.temp.disamt,creation_date:c,doc_date:e.temp.provDate,doc_narration:e.temp.doc_narration,doc_vat_total_amount:e.doc_vat_total_amount,doc_round_value:0,old_doc_prov_no:e.old_doc_prov_no,doc_reference_prov_no:e.old_doc_prov_no};console.log("obj",s),console.log("itemList",e.itemList),n.post(l.apiUrl+"api/common/StoreRequest/Insert_Sale_Documents_Return",s).then(function(a){var s=a.data;e.salesDetails1=[];for(var o=0;o0){for(var s=0;sl?e.store_issue_details[s].sublist1[o].issue_quantity=l:e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0):(e.store_issue_details[s].sublist1[o].inner_disabled=!0,e.store_issue_details[s].sublist1[o].issue_quantity_dis=!0,e.store_issue_details[s].sublist1[o].remarks_dis=!0)}e.totalItems=e.store_issue_details.length,e.todos=e.store_issue_details;for(s=0;s0){e.GetItems=t.data,e.salesmanDeptCode=e.GetItems[0].dep_code,e.temp.totalFinal=0;for(var a=0;a0){e.GetItems=t.data;for(var a=0;a0){e.itemListnew=t.data;for(var a=0;a0&&(e.chk_disabled=!1),e.convence_charge=0,parseFloat(t)>0&&(e.chk_disabled=!1),e.total1=i("number")(100*(parseFloat(t)+parseFloat(e.convence_charge)),2),e.grad_total_new=parseFloat(t)+parseFloat(e.convence_charge),e.temp.totalFinal=parseFloat(e.grad_total_new)},e.qtychangebyM=function(t){if(void 0==t.item_Code||""==t.item_Code)t.dd_qty1=void 0;else{for(var a=[],s=0;s0){for(t=0;t0)for(var a=0;a0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"E",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"R",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"S",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"F1",sims_cur_code:e.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){t.data.table.length>0&&(e.sem_lst=t.data.table,e.exam.sims_student_exam_term=e.sem_lst[0].sims_report_card_master_term_code,e.sims_term_code=e.sem_lst[0],console.log("$scope.sem_lst",e.sem_lst))})},e.showData=function(){var t={opr:"LL",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_enroll_number:a.globals.currentStudent.enroll_number,sims_academic_year:e.sims_academic_year,sims_section_term:e.sims_term_code.sims_term_code,sims_grade_code:e.sims_grade_code,sims_report_card_term_status:e.sims_term_code.sims_report_card_term_status,sims_report_card_master_term:e.sims_term_code.sims_report_card_master_term_code};n.post(r.apiUrl+"api/parentportal/ExamCommon",t).then(function(t){if(t.data.table.length>0)if("Y"==t.data.table[0].disable)swal({title:"Alert",text:t.data.table[0].msg,imageUrl:"assets/img/notification-alert.png"}),e.showrpt=!1;else{e.showrpt=!0;var o,i,l=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";o="SimsReports.Certificate.CERR002HallTicket,SimsReports",i={curr_code:"01",acad_year:e.exam.sims_student_exam_academic_year,grade_code:e.sims_grade_code,section_code:e.sims_section_code,term:e.sims_term_code.sims_report_card_master_term_code,search:a.globals.currentStudent.enroll_number},$("#reportViewer4").telerik_ReportViewer({serviceUrl:l,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:o,parameters:i}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},100)}})}},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.demo").controller("ExamHallTicketVMSController",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$location","$filter",function(e,t,a,s,o,n,r,i,l){e.getstudentList=function(){e.exam={},e.academic_year_lst=[],e.gender_lst=[],e.year=a.globals.currentStudent.sims_acad_yr,e.enroll=a.globals.currentStudent.enroll_number;var t={opr:"A",sims_cur_code:a.globals.currentStudent.sims_cur_code};n.post(r.apiUrl+"api/parentportal/ExamCommonVMS",t).then(function(t){t.data.table.length>0&&(e.curData=t.data.table,e.sims_cur_code=e.curData[0].sims_cur_code,e.getAcademicyear())}),e.getAcademicyear=function(){var t={opr:"B",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number};n.post(r.apiUrl+"api/parentportal/ExamCommonVMS",t).then(function(t){t.data.table.length>0&&(e.academic_year_lst=t.data.table,e.exam.sims_student_exam_academic_year=e.academic_year_lst[0].sims_academic_year,e.sims_academic_year=e.academic_year_lst[0].sims_academic_year,e.getgrades())})},e.getgrades=function(){var t={opr:"C",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year};n.post(r.apiUrl+"api/parentportal/ExamCommonVMS",t).then(function(t){t.data.table.length>0&&(e.gradeData=t.data.table,e.sims_grade_code=e.gradeData[0].sims_grade_code,e.sims_grade_name=e.gradeData[0].sims_grade_name_en,e.getsections())})},e.getsections=function(){var t={opr:"D",sims_cur_code:a.globals.currentStudent.sims_cur_code,sims_student_exam_enroll_number:a.globals.currentStudent.enroll_number,sims_student_exam_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code};n.post(r.apiUrl+"api/parentportal/ExamCommonVMS",t).then(function(t){t.data.table.length>0&&(e.sectionData=t.data.table,e.sims_section_code=e.sectionData[0].sims_section_code,e.get_term())})},e.get_term=function(){e.sem_lst=[];var t={opr:"E",sims_cur_code:e.sims_cur_code,sims_academic_year:e.sims_academic_year,sims_grade_code:e.sims_grade_code,sims_section_code:e.sims_section_code};n.post(r.apiUrl+"api/parentportal/ExamCommonVMS",t).then(function(t){t.data.table.length>0&&(e.sem_lst=t.data.table,e.sims_term_code=e.sem_lst[0].sims_report_card_term_code)})},e.showData=function(){var t,o,i=r.newReportUrl+n.defaults.headers.common.schoolId+"/api/reports/";t="SimsReports.Certificate.Hall_Ticket,SimsReports",o={curr_code:"01",acad_year:e.exam.sims_student_exam_academic_year,grade_code:e.sims_grade_code,section_code:e.sims_section_code,term:e.sims_term_code,search:a.globals.currentStudent.enroll_number},$("#reportViewer4").telerik_ReportViewer({serviceUrl:i,viewMode:telerikReportViewer.ViewModes.INTERACTIVE,scaleMode:telerikReportViewer.ScaleModes.SPECIFIC,scale:1,ready:function(){}}),$("#reportViewer4").data("telerik_ReportViewer").reportSource({report:t,parameters:o}),setInterval(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},1e3),s(function(){$("#k-item k-state-default k-state-disabled").css({display:"block"}),$(".trv-report-viewer input[type=number]").css({"min-height":"0px"}),$(".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"}),$(".trv-nav li:nth-child(13)").css({display:"none"})},100)}},a.globals.studentsLoaded&&e.getstudentList(),e.$on("student_change",function(){e.getstudentList()})}])}(),function(){"use strict";angular.module("sims.module.test").controller("RegistrationInfoCont",["$scope","$state","$rootScope","$timeout","gettextCatalog","$http","ENV","$filter","AuthenticationService",function(e,t,a,s,o,n,r,i,l){e.display=!0,e.readonly=!1,e.y=!0,e.n=!1,e.savedata=!0,e.showMessage=!1,e.saveDisable=!1,e.obj1=[],e.studenttab=!1,e.parenttab=!1,e.button=!1,e.btnH2H=!1,e.apiurlpath=r.apiUrl,e.schoolCode=n.defaults.headers.common.schoolId,e.prev_img=e.obj1.lic_website_url+"Images/ParentImages",e.eid=!0,e.passport=!0,e.tab_click=function(t){if(e.button=!0,e.getReligion(),e.getCountry(),e.getState(),e.getCity(),e.getemiratestatus(),e.getNationality(),e.btnH2H=!0,"Student"==t){e.tab=t,e.eid=!0,e.passport=!0,e.stud_date=!0;for(var s="",o=0;ot;t++)e.academics[t].sims_academic_year==a.globals.currentStudent.sims_acad_yr&&(e.start_academicyear=e.academics[t].sims_academic_year_start_date,e.end_academicyear=e.academics[t].sims_academic_year_end_date,e.setAcademicDatetoDatepicker())})},e.colorCodeArray=["#dbe9fa","#f7f0f5","#f0ffff","#ffe7d8","##efffec","#ffffec","#ffecf3"],e.colorCodeArray1=["#ffe7d8","#efffec","#ffffec","#ffecf3","#dbe9fa","#f7f0f5","#f0ffff"],e.setAcademicDatetoDatepicker=function(){$("#effective_from_date").kendoDatePicker({value:"",format:"yyyy-MM-dd",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}}),$("#effective_upto_date").kendoDatePicker({value:"",format:"yyyy-MM-dd",defaultOption:null,min:new Date(e.start_academicyear),max:new Date(e.end_academicyear),month:{empty:'#= data.value #'}})},e.studentChangetab=function(t){e.obj=[];let a={opr:"AA",username:t};n.post(r.apiUrl+"api/transport/StudentInfo",a).then(function(t){e.obj=t.data.table;for(var a=0;a0){let t=a.results[0].formatted_address,s=t.split(",");p=s.length,d=s[p-1],i=s[p-2],_=s[p-3],c=s[p-4];let o=s[p-5],n=i.split(" "),r=n[n.length-1],i=i.replace(r," ");e.sims_transport_share_location=o+", "+c+", "+_+", "+i+", "+d+", "+r+"."}else document.getElementById("message").innerHTML="No location available for provided details."},t.send()}()}navigator.geolocation&&navigator.geolocation.getCurrentPosition(f),e.obj=null;var b=new FormData;e.getTheFiles=function(e){angular.forEach(e,function(e,t){b.append(t,e)})},e.file_changed=function(t){$("#loader").modal({backdrop:"static",keyboard:!1});var a=t.files[0];e.photo_filename=a.type,e.file_name_en=a.name;var s=new FileReader;s.onload=function(t){e.$apply(function(){e.prev_img=t.target.result,e.uploading_path="/Images/Registration/";var a=new Date,s=e.studentnumber+"_"+e.user_user+"_"+e.eid_pass+"_"+e.file_name_en.replace(/\.[^/.]+$/,"")+"_"+a.getHours()+"_"+a.getMonth()+"_"+a.getSeconds(),o={method:"POST",url:r.kindoApi+"api/file1/uploadDocumentIHS?filename="+s+"&location="+e.uploading_path,data:b,headers:{"Content-Type":void 0}};n(o).success(function(t){if(t){if("1"==e.sho){e.eid=!1,$("#loader").modal("hide"),e.medloading=!1,e.eid_file=t,e.uploadImgClickFShow=!1;for(var a=0;aa||(e.sims_user_national_id_expiry_date="")),"passport"==t&&(e.sims_user_passport_expiry_date>a||(e.sims_user_passport_expiry_date=""))},e.doc_delete=function(e,t,a){"eid"==a&&(e.sims_user_eid_doc_url=""),"passport"==a&&(e.sims_user_passport_doc_url="")}}])}();