?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Claims/ |
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/Claims/claim.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 loadclaim(1,'',''); }); function loadclaim(pagenum,searchoption,searchtext) { $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#claimdiv").load("<?= site_url('claims/ajaxloadnew/viewclaim/claim') ?>/"+pagenum+'/'+searchoption+'/'+searchtext); } function addclaim(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#claimdiv").load("<?= site_url('claims/ajaxload/addclaim/claim') ?>"); } }); } function editclaim(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#claimdiv").load("<?= site_url('claims/edit/editclaim/claim/id/') ?>"+"/" +id); } }); } function searchclaim(search,selectsearch) { if(selectsearch=='dateofloss' ) { search=search.replace(/\//gi,'-') } $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); pagenum = 1; search = search.replace(/ /g,"~"); search = search.replace(/\//g,"_"); $("#claimdiv").load("<?= site_url('claims/ajaxloadnew/viewclaim/claim/') ?>"+"/"+pagenum+"/"+selectsearch+"/"+search +"/"); } function singleclaim(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#claimdiv").load("<?= site_url('claims/single/singleclaim/claim/id/claim_files/claimid') ?>"+"/" +id); } }); } 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) { $("input#policyno").val(polino); $("input#policyid").val(poliid); document.getElementById('enddet').innerHTML="<fieldset><li><label>Customer Name</label>"+cname+"</li>\n\ <li><label>Cover Name</label>"+cover+"</li><li><label>Quotaion Reference</label>"+qref+"</li>\n\ <li><label>Claim Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='claimsref' value='"+qref+"'/></li></fieldset>"; $.fn.colorbox.close(); } 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 paginationclaimsearch(pageNum,search,selectsearch) { $("#claimdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#claimdiv').load("<?php echo site_url('claims/ajaxloadnew/viewclaim/claim/'); ?>"+"/" +pageNum+"/"+selectsearch+"/"+search+"/"); } function doallthethree() { if(validateform('policyno','currency','date','dateofloss','intimationdate')) { if((!checkdate('dateofloss'))) return false; if((!checkdate('intimationdate'))) return false; var str1 = document.getElementById('dateofloss').value; var str2 = document.getElementById('intimationdate').value; var dt1 = parseInt(str1.substring(0,2),10); var mon1 = parseInt(str1.substring(3,5),10); var yr1 = parseInt(str1.substring(6,10),10); var dt2 = parseInt(str2.substring(0,2),10); var mon2 = parseInt(str2.substring(3,5),10); var yr2 = parseInt(str2.substring(6,10),10); var date1 = new Date(yr1, mon1, dt1); var date2 = new Date(yr2, mon2, dt2); if(date1>date2) { alert('Date of Loss cannot be greater than Intimation Date') return false; } converttodate('date','dateofloss','intimationdate'); } else { return false; } } function addclaimpolicy(id) { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('claims/addclaimpolicy/') ?>/"+id); $(".endpol").colorbox({width:"35%",height:"45%", inline:true, href:"#polidiv"}); } function addclaimpolicyno() { var endid=document.getElementById('endid').value ; var endpolicyno=document.getElementById('endpolicyno').value ; if(validateform('endpolicyno')) { $.ajax({ type: 'POST', url: '<?php echo site_url('claims/addclaimpolicyno/'); ?>', data: "endid="+endid+"&endpolicyno="+endpolicyno, success: function(data) { alert(data); $.fn.colorbox.close(); loadclaim(1,'',''); } }); } } </script> <body > <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="claimdiv"> </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>