?
Current Path : /home1/savoy/public_html/savoyglobal.net/horeitia/application/views/Onboarding/ |
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/Onboarding/item_box.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script type="text/javascript"> function calc_expiry_date(slno,item_type,status) { if(status.checked== true) { var item_date = $("#item_allotment_date").val(); var shelf_life = $("#"+item_type+"_shelf_life_"+slno).val(); $.ajax({ type: "POST", url: "<?= site_url('onboarding/calculate_expiry_date/') ?>/"+item_date+"/"+shelf_life, success: function(msg){ $("#"+item_type+"_expiry_date_"+slno).val(msg); } }) } else { $("#"+item_type+"_expiry_date_"+slno).val(""); } } </script> <?php $emp_info = $this->onboardingmodel->get_emp_info($employee_no); $tool_list = $this->mastermodel->get_data('tool_list',$emp_info->emp_non_trade_id,'trade_id'); $item_list = $this->mastermodel->getdatas('general_item','item_name'); ?> <li> <label for="data">Employee No</label> <div class="record_entry"> <?php echo $emp_info->emp_non_no; ?> </div> </li> <li> <label for="data">Joining Date</label> <div class="record_entry"> <?php echo $this->mastermodel->convertdatenormalformat($emp_info->emp_non_date_joining); ?> </div> </li> <li> <label for="data">Trade</label> <div class="record_entry"> <?php echo $emp_info->trade_name; ?> </div> <li> <li> <input type="hidden" name="employee_id" value="<?=$emp_info->emp_non_id;?>"/> <table class="sort"> <caption>Available Trade Tools</caption> <tr> <th align="center">Select</th> <th align="center">Trade Tools</th> <th align="center">Shelf Life (in Days)</th> <th align="center">Expiry Date</th> <th align="center">Remind before (in Days)</th> </tr> <?php $i=1; foreach($tool_list as $tool) { ?> <tr> <td><input style="width:15px;" type="checkbox" name="select_tool_<?=$i;?>" onclick="calc_expiry_date('<?=$i;?>','tool',this)"/></td> <td> <input type="hidden" name="tool_id_<?=$i;?>" value="<?=$tool['tool_id'];?>"/> <?=$tool['tool_name'];?> </td> <td> <?=$tool['tool_shelf_life'];?> <input type="hidden" value="<?=$tool['tool_shelf_life'];?>" id="tool_shelf_life_<?=$i;?>"/> </td> <td> <div id="multi"> <input style="width:65px;" type="text" name="tool_expiry_date_<?=$i;?>" id="tool_expiry_date_<?=$i;?>"/> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </td> <td> <input style="width:65px;" type="text" value="<?=$tool['tool_remind_before'];?>" name="tool_remind_before_<?=$i;?>" id="tool_remind_before_<?=$i;?>"/> </td> </tr> <?php $i++; } ?> </table> </li> <li> <label for="data">Tool Remarks</label> <?php $data = array( 'name' => 'tool_remarks', 'id' => 'tool_remarks' ); echo form_textarea($data).form_error($data); ?> </li> <li> <table class="sort"> <caption>Available General Items</caption> <tr> <th align="center">Select</th> <th align="center">General Items</th> <th align="center">Size</th> <th align="center">Shelf Life (in Days)</th> <th align="center">Expiry Date</th> <th align="center">Remind before (in Days)</th> </tr> <?php $i=1; foreach($item_list as $item) { ?> <tr> <td><input style="width:15px;" type="checkbox" name="select_item_<?=$i;?>" onclick="calc_expiry_date('<?=$i;?>','item',this)"/></td> <td> <input type="hidden" name="item_id_<?=$i;?>" value="<?=$item['item_id'];?>"/> <?=$item['item_name'];?> </td> <td> <?php $size_list=$this->mastermodel->get_data('general_item_size',$item['item_id'],'item_id'); if(!empty ($size_list)) { ?> <select name="item_size_<?=$i;?>" id="item_size_<?=$i;?>"> <option value="">Select</option> <?php foreach ($size_list as $size) { ?> <option value="<?=$size['size'];?>"><?=$size['size'];?></option> <?php } ?> </select> <?php } ?> </td> <td> <?=$item['item_shelf_life'];?> <input type="hidden" value="<?=$item['item_shelf_life'];?>" id="item_shelf_life_<?=$i;?>"/> </td> <td> <div id="multi"> <input style="width:65px;" type="text" name="item_expiry_date_<?=$i;?>" id="item_expiry_date_<?=$i;?>"/> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </td> <td> <input style="width:65px;" type="text" value="<?=$item['item_remind_before'];?>" name="item_remind_before_<?=$i;?>" id="item_remind_before_<?=$i;?>"/> </td> </tr> <?php $i++; } ?> </table> </li> <li> <label for="data">Item Remarks</label> <?php $data = array( 'name' => 'item_remarks', 'id' => 'item_remarks' ); echo form_textarea($data).form_error($data); ?> </li> <?php if($_SESSION['modename']=="Onboarding") { ?> <li> <table class="sort"> <caption>Send Alert for trade training (if required) to</caption> <tr> <th align="center">Select</th> <th align="center">Username</th> <th align="center">Designation</th> </tr> <?php $i=1; $user_list = $this->mastermodel->get_alert_users('12'); foreach ($user_list as $user) { ?> <tr> <td style="width:15px;" > <input type="checkbox" name="select_user_<?=$i;?>" checked /> </td> <td> <input type="hidden" name="user_id_<?=$i;?>" value="<?=$user['id'];?>"/> <?=$user['username'];?> </td> <td> <?=$user['designation_name'];?> </td> </tr> <?php $i++; } ?> </table> </li> <?php } ?> <li> <input type="hidden" name="tab_name" value="item_allotment"/> <input type="hidden" name="resfunction" value="search_item_allotment"/> </li> <li> <label for="submit"> </label> <button type="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </li>