?
Current Path : /home1/savoy/public_html/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/public_html/savoyglobal.net/drafthr/system/application/views/Policies/endorsement.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 loadendorsement(1,'',''); }); function loadendorsement(pagenum,searchoption,searchtext) { $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#endorsementdiv").load("<?= site_url('policies/ajaxloadnew/viewendorsement/endorsement/') ?>/"+pagenum+'/'+searchoption+'/'+searchtext); } function addendorsement(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#endorsementdiv").load("<?= site_url('policies/ajaxload/addendorsement/endorsement') ?>"); } }); } function editendorsement(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#endorsementdiv").load("<?= site_url('policies/edit/editendorsement/endorsement/id/') ?>"+"/" +id); } }); } function searchendorsement(search,selectsearch) { if(selectsearch=='date' ) { search=search.replace(/\//gi,'-') } search = search.replace(/ /g,"~"); search = search.replace(/\//g,"_"); $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); pagenum = 1; $("#endorsementdiv").load("<?= site_url('policies/ajaxloadnew/viewendorsement/endorsement/') ?>"+"/"+pagenum+"/"+selectsearch+"/"+search+"/"); } function singleendorsement(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#endorsementdiv").load("<?= site_url('policies/single/singleendorsement/endorsement/id/endorsement_files/endorsementid') ?>"+"/" +id); } }); } function addendpolicy(id) { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/addendpolicy/') ?>/"+id); $(".endpol").colorbox({width:"35%",height:"45%", inline:true, href:"#polidiv"}); } function addendpolicyno() { var endid=document.getElementById('endid').value ; var endpolicyno=document.getElementById('endpolicyno').value ; if(validateform('endpolicyno')) { $.ajax({ type: 'POST', url: '<?php echo site_url('policies/addendpolicyno/'); ?>', data: "endid="+endid+"&endpolicyno="+endpolicyno, success: function(data) { alert(data); $.fn.colorbox.close(); loadendorsement('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>'); } }); } } 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) { serctext = serctext.replace(/ /g,"~"); serctext = serctext.replace(/\//g,"_"); $("#polilist").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#polilist').load("<?php echo site_url('policies/listsearchpoli/'); ?>/"+ seloption + "/" + serctext); } function usepoli(polino,poliid,cname,cover,qref) { $.ajax({ type: "POST", url: "<?= site_url('policies/cancel_count/') ?>/"+poliid, success: function(msg){ if(msg>0) { alert("Policy has already been cancelled"); return false; } else { $("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>Endorsement Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='endref' value='"+qref+"'/></li></fieldset>"; } } }); } 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 paginationendorsementsearch(pageNum,selectsearch,search) { $("#endorsementdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#endorsementdiv').load("<?php echo site_url('policies/ajaxloadnew/viewendorsement/endorsement/'); ?>"+"/" +pageNum+"/"+selectsearch+"/"+search+"/"); } function viewendpayment(endid,plid) { $("#customtemplate").empty().html(""); $("#paymenttemplate").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $("#paymenttemplate").load("<?= site_url('policies/payment/viewendorsementslip/') ?>"+"/" +plid+"/"+endid); } function checkpremium(premiumchange,policyid,mode) { if(mode=='Deduction') { 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; } } }); } } } function hidepremium(val) { if(val=='No Change in Premium') { $("input#premiumchange").val(""); $("input#policyfeeschange").val(""); $("select#paymethod").val(""); $("input#premiumchange").attr('readonly','readonly'); $("input#policyfeeschange").attr('readonly','readonly'); $("select#paymethod").attr('disabled','disabled'); } else { $("input#premiumchange").removeAttr('readonly'); $("input#policyfeeschange").removeAttr('readonly'); $("select#paymethod").removeAttr('disabled'); } } </script> <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="endorsementdiv"> </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>