?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Documents/ |
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/Documents/brokingslip.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php $this->load->view('header'); $this->load->view('Documents/documentcreation'); $this->load->view('commonfunctions'); ?> <style type="text/css"> .tbspacer { padding-bottom: 3px; padding-top: 3px; } .cke_contents { height: 500px !important; } </style> <script type="text/javascript" src="<?=base_url()?>ckeditor/ckeditor.js"></script> <script src="<?=base_url()?>ckeditor/sample.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ //Display Loading Image viewbrokingslip('quotation_ref~broking_slip','1',''); }); function loadbrokingslip(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#bslipdiv").load("<?= site_url('documents/ajaxload/createbslip/broking_slip') ?>"); } }); } function viewbrokingslip(searchoption,pagenum,searchtext) { $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#bslipdiv').load("<?php echo site_url('documents/search_brokingslip/viewbrokingslip/'); ?>/"+searchoption+'/'+pagenum+'/'+searchtext); } function showcustdiv() { if(!document.getElementById('unknown')) { alert("Select Template First"); return false; } else { $("#inline_example1").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#inline_example1").load("<?= site_url('documents/ajaxload/searchcustomer/customers/') ?>"); $("#inliexample2").colorbox({width:"65%",height:"70%", inline:true, href:"#inline_example1"}); } } function searchCust(serctext,seloption,page) { $("#custlist").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#custlist').load("<?php echo site_url('documents/listSearchcustomer/'); ?>/"+ seloption + "/" +page+ "/" +serctext ); } function usecust(code,insured,phone,email,business,id) { $("input#insured").val(insured); $("input#business").val(business); document.getElementById('custdet').innerHTML="<table class='sort'><tr><th colspan='2'></th></tr><tr><td>Customer Name</td><td>"+insured+"</td></tr>\n\ <tr><td>Customer Code</td><td>"+code+"</td></tr><tr><td>Office Phone</td><td>"+phone+"</td></tr><tr><td>\n\ Email</td><td>"+email+"<input type='hidden' name='cust_id' value='"+id+"'/></td></tr></table>"; $.fn.colorbox.close(); } function showcoverdiv() { $("#inline_example1").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#inline_example1").load("<?= site_url('documents/ajaxload/searchcover/segment_insurances') ?>"); $("#inliexample1").colorbox({width:"67%",height:"70%", inline:true, href:"#inline_example1"}); } function searchtemplate(cover_id,pageno) { $("#templatelist").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#templatelist').load("<?php echo site_url('documents/viewtemplate/'); ?>/"+ cover_id + "/1" + "/"+ pageno); } function usetemplate(id,cover,cover_id) { var cover=cover.replace("~","'"); $("#templateform").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#templateform').load("<?php echo site_url('documents/edit/loadtemplateform/template/id/') ?>"+"/" +id); $("input#cover").val(cover); $("input#coverid").val(cover_id); $.fn.colorbox.close(); } function usetemplatefromcover(cover_id) { if(cover_id=="") { alert("Please enter the cover code") return false; } else { $.ajax({ type: "POST", url: "<?= site_url('documents/checktemplateexist/') ?>/"+cover_id, success: function(msg){ if(msg==0) { $("#tempdet").html(""); $("#templateform").empty().html(); alert("No template created"); } else if(msg>1) { $("#templateform").empty().html(); $("#tempdet").load("<?php echo site_url('documents/viewtemplate/'); ?>/"+ cover_id + "/1"); } else { $("#templateform").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#templateform').load("<?php echo site_url('documents/edit/loadtemplateform/template/cover_id/') ?>"+"/" +cover_id); $("input#coverid").val(cover_id); $('#covertypedet').load("<?php echo site_url('documents/loadcovertypedet/') ?>"+"/" +cover_id); $("#tempdet").html(""); } } }); } } function findcustomerbycode(code) { if(code=="") { alert("Please enter the customer code") return false; } else { if(!document.getElementById('unknown')) { alert("Select Template First"); return false; } else { $.ajax({ type: "POST", url: "<?= site_url('documents/findcustomerbycode/') ?>/"+code, success: function(msg){ if(msg=="") { alert("No Customer with code "+code) } else { var retresult=msg.split('~'); $("input#insured").val(retresult[0]); $("input#business").val(retresult[1]); document.getElementById('custdet').innerHTML="<table class='sort'><tr><th colspan='2' align='center'>Customer Detail</th></tr><tr><td>Customer Name</td><td>"+retresult[0]+"</td></tr>\n\ <tr><td>Customer Code</td><td>"+code+"<input type='hidden' name='cust_id' value='"+retresult[2]+"'/></td></tr></table>"; } } }); } } } function updateheader(id) { $('label').removeClass("selected"); $("#"+id).addClass("selected").html('<input type="text" id="headerlabel" name="headerlabel[]" class="edit" value="">'); } function viewquotationbrokingslip(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#bslipdiv").load("<?= site_url('documents/viewquotationbrokingslip/viewbrokingslipquotation/id/') ?>" +"/" +id); $("#inline_example1").load("<?= site_url('documents/ckedit/htmleditbrokingslip/id/') ?>"+"/" +id); } }); } function search_brokingslip(seloption,serctext) { if(seloption=='quotation_date~broking_slip' ) { serctext=serctext.replace(/\//gi,'-') } serctext = serctext.replace(/ /g,"~"); serctext = serctext.replace(/\//g,"_"); $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $('#bslipdiv').load("<?php echo site_url('documents/search_brokingslip/viewbrokingslip/'); ?>/"+ seloption + "/" +1+ "/"+serctext); } function editbrokingslip(rwd,id) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading" /></CENTER>'); $("#bslipdiv").load("<?= site_url('documents/edit/editbrokingslip/broking_slip/id/') ?>"+"/" +id); } }); } function paginationdatasearch(pageNum,seloption,serctext) { serctext = serctext.replace(/ /g,"~"); serctext = serctext.replace(/\//g,"_"); $("#bslipdiv").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#bslipdiv').load("<?php echo site_url('documents/search_brokingslip/viewbrokingslip/'); ?>/"+ seloption + "/" +pageNum+ "/"+serctext); } function showbrokingslipstatus(id) { $("#inline_example1").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $("#inline_example1").load("<?= site_url('documents/showstatus/showbrokingslipstatus/') ?>"+"/" +id); $(".status").colorbox({width:"70%",height:"70%", inline:true, href:"#inline_example1"}); } </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> <div id="searchdiv"> <label>Search For</label> <input type="text" name="searchtext" id="searchtext"> In <select name="searchopt" id="searchopt"> <option value="quotation_ref~broking_slip" >All</option> <option value="insured~customers" >Customer Name</option> <option value="quotation_date~broking_slip">Date</option> <option value="quotation_ref~broking_slip">Quotation Ref</option> <option value="cover~covers~cover_id~id">Cover</option> </select> <input type="button" name="search" onClick="search_brokingslip(document.getElementById('searchopt').value,document.getElementById('searchtext').value)" value="Search"/> </div> <p> </p> <div id="bslipdiv" > </div> <div id="printpreviewdiv" style="padding-top:50px;" > </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>