?
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/declaration.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php $this->load->view('header'); $this->load->view('commonfunctions'); $this->load->view('Documents/documentcreation.php'); ?> <script type="text/javascript"> $(document).ready(function(){ //Display Loading Image loaddeclaration(1,'',''); }); function loaddeclaration(pagenum,searchoption,searchtext) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#declarationdiv").load("<?= site_url('policies/ajaxloadnew/viewdeclaration/declaration') ?>/"+pagenum+'/'+searchoption+'/'+searchtext); } function adddeclaration(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#declarationdiv").load("<?= site_url('policies/ajaxload/createdeclaration/declaration') ?>"); } }); } function editdeclaration(rwd,id,declid) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#declarationdiv").load("<?= site_url('policies/edit/editdeclaration/declaration/id/') ?>"+"/" +id+"/"+declid); } }); } function singledeclaration(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#declarationdiv").load("<?= site_url('policies/single/singledeclaration/declaration/id/declaration_files/declaration_id') ?>"+"/" +id); } }); } function searchdeclaration(search,selectsearch) { if(selectsearch=='date' ) { search=search.replace(/\//gi,'-') } $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); var pagenum = 1; $("#declarationdiv").load("<?= site_url('policies/ajaxloadnew/viewdeclaration/declaration/') ?>"+"/"+pagenum+"/"+selectsearch+"/"+search+"/"); } function showpolidiv() { //alert("shan"); $("#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 showpolicynodiv() { //alert("shan"); $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/ajaxload/searchpolicyno/broking_slip/') ?>"); $("#inliexample2").colorbox({width:"75%",height:"70%", inline:true, href:"#polidiv"}); } function searchpolicynodeclaration(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/listsearchpolicyno/'); ?>/"+ seloption + "/" + serctext); } function searchpolicyno(serctext,seloption) { //alert(serctext); 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/listsearchpolidec/'); ?>/"+ seloption + "/" + serctext); } function usepoli(polino,poliid,cname,cover,qref) { $("input#insured").val(cname); $("input#policyno").val(polino); $("input#policyid").val(poliid); $.fn.colorbox.close(); document.getElementById('rendet').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>Declaration Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='decref' value='"+qref+"'/></li></fieldset>"; } function usepolicyno(polino,poliid,cname,cover,qref,coverid,fdatepolicy,todatepolicy,estsuminsured,custid,insid,brok) { $("input#quotation_ref").val(qref); $("input#custid").val(custid); $("input#insured_hidden").val(cname); $("input#policyno_hidden").val(polino); $("input#policyid_hidden").val(poliid); $("input#cover_hidden").val(cover); $("input#coverid_hidden").val(coverid); $("input#fdatepolicyperiod").val(fdatepolicy); $("input#todatepolicyperiod").val(todatepolicy); var policyperiod= fdatepolicy +"To"+todatepolicy; $("input#policyperiodid").val(policyperiod); $("input#estsuminsured_hidden").val(estsuminsured); $("input#insurance_company_id").val(insid); $("input#brokerage_policy").val(brok); $.fn.colorbox.close(); document.getElementById('rendet').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>Declaration Ref. No</label><label>--Auto Generated--</label></li><input type='hidden' name='decref' value='"+qref+"'/></li></fieldset>"; } function paginationdeclarationsearch(pageNum,search,selectsearch) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#declarationdiv').load("<?php echo site_url('policies/ajaxloadnew/viewdeclaration/declaration/'); ?>"+"/" +pageNum+"/"+selectsearch+"/"+search+"/",Hide_Load()); } function showcoverdiv() { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/ajaxload/searchcover/segment_insurances') ?>"); $("#inliexample1").colorbox({width:"67%",height:"70%", inline:true, href:"#polidiv"}); } function searchtemplate(cover_id) { if(cover_id=="") { alert("Please Select Policy No First"); return false; } $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#polidiv').load("<?php echo site_url('policies/viewtemplate/'); ?>/"+ cover_id + "/3"); $("#inliexample3").colorbox({width:"67%",height:"70%", inline:true, href:"#polidiv"}); } function usetemplate(id,cover,cover_id) { $("#templateform").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#templateform').load("<?php echo site_url('policies/edit/loadtemplateform/template/id/') ?>"+"/" +id); $.fn.colorbox.close(); } var voicount=0; var mofccount=0; function addmodeofconveyance(mofconveyance) { if(mofconveyance=="") { alert("You Cannot Leave the field blank"); return false; } else { var newmofc=document.createElement('li'); var mofcid="mofc"+mofccount; newmofc.innerHTML="<label> </label><table><tr><td><input type='text' style='width:250px;' name='modeofconveyance[]' id=modeofconveyance'"+mofccount+"' value='"+mofconveyance+"'>\n\ <img class='clickimage' src='<?=base_url()?>/assets/images/x-icon.png' onClick=\"removeElement('modeaddmore','"+mofcid+"')\"/></td></tr></table>"; newmofc.setAttribute('id',mofcid); document.getElementById('modeaddmore').appendChild(newmofc); $("input#modeofconv").val(""); mofccount++; } } function addvoyage(voyageval) { if(voyageval=="") { alert("You Cannot Leave the field blank"); return false; } else { var newvoyage=document.createElement('li'); var voyid="voyid"+voicount; newvoyage.innerHTML="<label> </label><table><tr><td><input type='text' style='width:250px;' name='voyage[]' id=voyage'"+voicount+"' value='"+voyageval+"'>\n\ <img class='clickimage' src='<?=base_url()?>/assets/images/x-icon.png' onClick=\"removeElement('voyageaddmore','"+voyid+"')\"/></td></tr></table>"; newvoyage.setAttribute('id',voyid); document.getElementById('voyageaddmore').appendChild(newvoyage); $("input#voyageid").val(""); voicount++; } } function viewquotationdeclaration(id) { $("#declarationdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#declarationdiv").load("<?= site_url('policies/viewquotationdeclaration/viewdeclarationquotation/id/') ?>" +"/" +id); } function showdeclarationstatus(id) { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/showstatus/showdeclarationstatus/') ?>"+"/" +id); $(".status").colorbox({width:"70%",height:"70%", inline:true, href:"#polidiv"}); } function vali() { if(!validateform('cover_hidden','insured','quotation_ref','currencytype')) { return false; } else { converttodate('declarationdate'); $('.new1').ajaxForm({ beforeSubmit: showPreloaderform('declarationdiv'), success:function(data) { editdeclaration(1,data,1); } // payment(data); }); } } function valiupdate() { if(!validateform('cover','insured','quotation_ref')) { return false; } else { converttodate('quotationdate'); $('.news').ajaxForm({ beforeSubmit: showPreloaderform('declarationdiv'), success:function(data) { // alert(data) editdeclaration(1,data,1); } // payment(data); }); } } function declpayment(id) { $("#templateform").empty().html(""); $("#payamountform").empty().html(""); $("#paymentform").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $("#paymentform").load("<?= site_url('policies/declpayment/dslippayment/declaration/id/') ?>"+"/" +id); } function viewdeclpayment(id) { $("#customtemplate").empty().html(""); $("#paymamounttemplate").empty().html(""); $("#paymenttemplate").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $("#paymenttemplate").load("<?= site_url('policies/viewpaymentdl/viewdslippayment/declaration/id/') ?>"+"/" +id); } function adddeclcert(id) { $("#polidiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#polidiv").load("<?= site_url('policies/adddeclcert/') ?>/"+id); $(".endpol").colorbox({width:"35%",height:"45%", inline:true, href:"#polidiv"}); } function adddeclcertno() { var decid=document.getElementById('decid').value ; var certno=document.getElementById('certno').value ; if(validateform('certno')) { $.ajax({ type: 'POST', url: '<?php echo site_url('policies/adddeclcertno/'); ?>', data: "decid="+decid+"&certno="+certno, success: function(data) { alert(data); $.fn.colorbox.close(); loaddeclaration(); } }); } } </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="declarationdiv"> </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>