?
Current Path : /home1/savoy/www/savoyglobal.net/sgms/application/views/Administration/ |
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/www/savoyglobal.net/sgms/application/views/Administration/tool_box_trade_change.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 = $("#trade_change_date").val(); var shelf_life = $("#1"+item_type+"_shelf_life_"+slno).val(); $.ajax({ type: "POST", url: "<?= site_url('onboarding/calculate_expiry_date/') ?>/"+item_date+"/"+shelf_life, success: function(msg){ $("#1"+item_type+"_expiry_date_"+slno).val(msg); } }) } else { $("#1"+item_type+"_expiry_date_"+slno).val(""); } } </script> <?php $tool_list = $this->mastermodel->get_data('tool_list',$trade_id,'trade_id'); ?> <li> <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="1select_tool_<?=$i;?>" onclick="calc_expiry_date('<?=$i;?>','tool',this)"/></td> <td> <input type="hidden" name="1tool_id_<?=$i;?>" value="<?=$tool['tool_id'];?>"/> <?=$tool['tool_name'];?> </td> <td> <?=$tool['tool_shelf_life'];?> <input type="hidden" value="<?=$tool['tool_shelf_life'];?>" id="1tool_shelf_life_<?=$i;?>"/> </td> <td> <div id="multi"> <input style="width:65px;" type="text" name="1tool_expiry_date_<?=$i;?>" id="1tool_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="1tool_remind_before_<?=$i;?>" id="1tool_remind_before_<?=$i;?>"/> </td> </tr> <?php $i++; } ?> </table> </li>