?
Current Path : /home1/savoy/public_html/savoyglobal.net/horeitia/application/views/Timesheet/ |
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/horeitia/application/views/Timesheet/add_invoice.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script language="javascript" type="text/javascript"> // jQuery(document).ready(function() { // suggestValues(); // }); function suggestValues(idtag) { $("#"+idtag).autocomplete("<?= site_url()?>/timesheet/all_external_job", { width: 300, selectFirst: false }); } function show_timesheet_info_invoice() { var po_id = $('#id_customer_po_no1').val(); var timesheet_start_date = $('#invoice_start_date').val(); var timesheet_end_date = $('#invoice_end_date').val(); var i=1; var purchase_order_id=''; while($('#id_customer_po_no'+i).length > 0) { purchase_order_id = purchase_order_id+$('#id_customer_po_no'+i).val()+"~"; i++; } if(po_id == "") { alert("Please select Customer Purchase Order No first"); } else if(timesheet_start_date=="") { alert("Please enter Timesheet Start Date"); } else if(timesheet_end_date=="") { alert("Please enter Timesheet End Date"); } else { $.ajax({ type: "POST", url: "<?= site_url('timesheet/check_po_invoice/') ?>/"+purchase_order_id, success: function(msg){ if(msg==0) alert("Purchase orders chosen should be different"); else if(msg == 1) alert("Purchase orders chosen should belong to a single Customer"); else { $("#external_job_info").empty().html('<CENTER><img src="<?=base_url()?>assets/images/loading.gif" class="loading"/></CENTER>'); $("#external_job_info").load("<?=site_url()?>/timesheet/get_timesheet_invoice_info/"+purchase_order_id+"/"+timesheet_start_date+"/"+timesheet_end_date); } } }) } } </script> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('timesheet','viewintimesheetsearch','search_invoice','view_invoice','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Insert Invoice</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('timesheet/addintimesheet/insert_invoice/view_invoice/1',$attributes); ?> <ul> <li> <table class="sort" cellpadding="0" cellspacing="0" width="200px;"> <tr> <th>Customer PO No</th> <th width="20%"> <input style="width:75px;" type="button" style="width:150px;" id="button2" value="Add More" class="addRow" title="Add Row"/> </th> </tr> <tr> <td><input type="text" class="required" onfocus="suggestValues($(this).attr('id'))" id="customer_po_no" name="customer_po_no"> <input type="hidden" id="id_customer_po_no" name="id_customer_po_no"> </td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> </li> <li> <label for="data">Timesheet Start Date</label> <div id="multi"> <input type="text" name="invoice_start_date" value="<?=date('01-m-Y');?>" id="invoice_start_date" class="required medium"> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </li> <li> <label for="data">Timesheet End Date</label> <div id="multi"> <input type="text" name="invoice_end_date" value="<?=date('t-m-Y');?>" id="invoice_end_date" class="required medium"> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </li> <li> <label for="data"></label> <input type="button" value="Load Work Info" onclick="show_timesheet_info_invoice()" style="margin-left: 5px; width: 130px;"/> </li> <div id="external_job_info"> </div> <li> <input type="hidden" name="tab_name" value="payroll_invoice"/> <input type="hidden" name="resfunction" value="search_invoice"/> </li> </ul> <?php echo form_close();?> </fieldset>