?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Policies/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Policies/cancellation.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php $this->load->view('header'); $this->load->view('commonfunctions'); ?> <script type="text/javascript"> $(document).ready(function(){ //Display Loading Image loadcancellation(1,'',''); }); function loadcancellation(pagenum,searchoption,searchtext) { $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#cancellationdiv").load("<?= site_url('policies/ajaxloadnew/viewcancellation/cancellation') ?>/"+pagenum+'/'+searchoption+'/'+searchtext); } function addcancellation(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#cancellationdiv").load("<?= site_url('policies/ajaxload/addcancellation/cancellation') ?>"); } }); } function editcancellation(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#cancellationdiv").load("<?= site_url('policies/edit/editcancellation/cancellation/id/') ?>"+"/" +id); } }); } function searchcancellation(search,selectsearch) { if(selectsearch=='date' ) { search=search.replace(/\//gi,'-') } $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); var pagenum = 1; search = search.replace(/ /g,"~"); search = search.replace(/\//g,"_"); $("#cancellationdiv").load("<?= site_url('policies/ajaxloadnew/viewcancellation/cancellation/') ?>"+"/"+pagenum+"/"+selectsearch +"/"+search+"/"); } function singlecancellation(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#cancellationdiv").load("<?= site_url('policies/single/singlecancellation/cancellation/id/cancellation_files/cancellationid') ?>"+"/" +id); } }); } function addcanpolicy(id) { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/addcanpolicy/') ?>/"+id); $(".endpol").colorbox({width:"35%",height:"45%", inline:true, href:"#polidiv"}); } function addcanpolicyno() { var canid=document.getElementById('canid').value ; var canpolicyno=document.getElementById('canpolicyno').value ; if(validateform('canpolicyno')) { $.ajax({ type: 'POST', url: '<?php echo site_url('policies/addcanpolicyno/'); ?>', data: "canid="+canid+"&canpolicyno="+canpolicyno, success: function(data) { alert(data); $.fn.colorbox.close(); loadcancellation(); } }); } } function showpolidiv() { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/ajaxload/searchpoli/broking_slip/') ?>"); $("#inliexample1").colorbox({width:"75%",height:"70%", inline:true, href:"#polidiv"}); } function searchpolicyno(serctext,seloption) { $("#polilist").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); serctext = serctext.replace(/ /g,"~"); serctext = serctext.replace(/\//g,"_"); $('#polilist').load("<?php echo site_url('policies/listsearchpoli/'); ?>/"+ seloption + "/" + serctext); } function usepoli(polino,poliid,cname,cover,qref) { $("#ck_permission").load("<?= site_url('policies/cancel_count/') ?>"+"/"+poliid,function(data) { if(data<1) { $("input#policyno").val(polino); $("input#policyid").val(poliid); $.fn.colorbox.close(); document.getElementById('enddet').innerHTML="<fieldset><li><label>Customer Name</label>"+cname+"</li>\n\ <li><label>Cover Name</label>"+cover+"</li><li><label>Quotation Reference</label>"+qref+"</li>\n\ <li><label>Cancellation Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='canref' value='"+qref+"'/></li></fieldset>"; } else { alert('This Policy is Cancelled Already'); } }); } function usepolicybynoforclaim(code) { if(code=="") { alert("Please enter the Policy No") return false; } else { code=code.replace(/\//gi,"~"); $.ajax({ type: "POST", url: "<?= site_url('policies/findpolicybyno/') ?>/"+code, success: function(msg){ if(msg=="") { alert("No Policy with policy no "+code) } else { var retresult=msg.split('~'); $("input#policyno").val(retresult[0]); $("input#policyid").val(retresult[1]); $.fn.colorbox.close(); document.getElementById('enddet').innerHTML="<fieldset><li><label>Customer Name</label>"+retresult[2]+"</li>\n\ <li><label>Cover Name</label>"+retresult[4]+"</li><li><label>Quotaion Reference</label>"+retresult[3]+"</li>\n\ <li><label>Claim Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='claimsref' value='"+retresult[3]+"'/></li></fieldset>"; } } }); } } function paginationcancellationsearch(pageNum,search,selectsearch) { $("#cancellationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#cancellationdiv').load("<?php echo site_url('policies/ajaxloadnew/viewcancellation/cancellation/'); ?>"+"/" +pageNum+"/"+selectsearch +"/"+search+"/"); } function canc_polic() { $("#successdiv").load("<?= site_url('policies/cancel_policy/') ?>" ,function(data) { }); } function chek_dat() { var date=document.getElementById('date').value; var poliid=document.getElementById('policyid').value; $("#temp").load("<?= site_url('policies/check_cancel_date/') ?>"+"/"+poliid+"/"+date,function(data) { if(data!=0) { alert('if'); return true; } else { alert('else') return false; } }); } function data_exist(thisone) { $("#temp").load("<?= site_url('accounting/data_exist/') ?>" +"/refs/" + thisone.value,function(data) { if(data>0) { alert("Reference already Exist"); document.getElementById('refs').value=""; return false; } }); } function viewcancpayment(canid,plid) { $("#customtemplate").empty().html(""); $("#paymenttemplate").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $("#paymenttemplate").load("<?= site_url('policies/paymentcancelation/viewcancellationslip/') ?>"+"/" +plid+"/"+canid); } function checkpremium(premiumchange,policyid) { if(!policyid) { alert("Please select policy") $("#premiumchange").val("") } else { $.ajax({ type: "POST", url: "<?= site_url('policies/checkpremium/') ?>/"+policyid+"/"+premiumchange, success: function(msg){ if(msg==1) { alert("Amount is greater than the Premium") $("#premiumchange").val("") return false; } } }); } } </script> <div id="temp" style="display:none"></div> <div id="main"> <?php $this->load->view('menu'); ?> <div id="middle"> <?php $this->load->view('leftbar'); ?> <div id="center-column"> <?php $this->load->view('topbar'); ?> <div class="table"> <div id="successdiv" align="center"></div> <p> </p> <div id="cancellationdiv"> </div> <div style='display:none'> <div id='polidiv' style='padding:10px; background:#fff;'> </div> </div> <div style='display:none'> <div id='inline_example1' style='padding:10px; background:#fff;'> </div> </div> <div id="loading" align="center"></div> </div> </div> </div> <?php $this->load->view('footer'); ?> </div> </body> </html>