?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Sales/ |
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/Sales/editsettarget.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script src="<?php echo base_url(); ?>assets/js/jquery.MultiFile.min.js" type="text/javascript" language="javascript"></script> <script type="text/javascript"> jQuery(document).ready(function () { $('.one').datepick({dateFormat: 'dd-mm-yyyy'}); $('.two').datepick({dateFormat: 'dd-mm-yyyy'}); }); function getperiod(val) { var d = new Date(); var date = d.getDate(); var month = d.getMonth()+1; var year = d.getFullYear(); if(month<10) { month='0'+month; } var sdate='0'+1; var startdate = sdate + "-" + month + "-" + year; month=parseInt(month); if(val=='Monthly') { var ModMonth = month + 1; document.getElementById('enddatewer').style.display = 'none'; } else if(val=='Quarterly') { var ModMonth = month + 3; document.getElementById('enddatewer').style.display = 'none'; } else if(val=='Semi-Annually') { var ModMonth = month + 6; document.getElementById('enddatewer').style.display = 'none'; } else if(val=='Annually') { var ModMonth = month + 12; document.getElementById('enddatewer').style.display = 'none'; } else if(val=='Others') { var ModMonth = month; document.getElementById('enddatewer').style.display = 'block'; } else if(val=='Select') { var ModMonth = month; document.getElementById('enddatewer').style.display = 'block'; } if (ModMonth > 12) { ModMonth = ModMonth-12; year = year + 1; } if(ModMonth<10) { ModMonth='0'+ModMonth; } var newdate = sdate + "-" +ModMonth + "-" + year document.getElementById('startdate').value=startdate; document.getElementById('enddate').value=newdate; } </script> <?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ foreach($viewinfo as $updata) { $settargetid=$updata['id']; $staffid=$updata['staffid']; $startdate = $updata['startdate']; $enddate=$updata['enddate']; $target=$updata['target']; $targettype=$updata['targettype']; $curr_id=$updata['curr_id']; $curr_name= $this->customermodel->getSingleFieldValue('country','currencyname','id',$curr_id); } $startdate = $this->mastermodel->convdatformat($startdate); $enddate = $this->mastermodel->convdatformat($enddate); $options = array( '' => 'Select', 'Monthly' => 'Monthly', 'Quarterly' => 'Quarterly', 'Semi-Annually' => 'Semi-Annually', 'Annually' => 'Annually', 'Others' => 'Others', ); $attri= 'onChange="getperiod(this.value);"'; ?> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loadsettarget('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25" /></label> </div> <fieldset> <legend>Update Staff Target </legend> <?php $attributes = array('id' => 'customForm'); echo form_open('sales/editsettarget',$attributes); echo form_hidden('settargetid',$settargetid); ?> <ul> <?php $stf=$this->mastermodel->get_data_srow('staffpersonaldetails',$staffid,'id'); ?> <li> <label>Employee Name</label> <label class="lbl_title"> <?php echo $stf->name; ?></label></li> <input type="hidden" name="staffid" id="staffid" value="<?php echo $stf->id; ?>"> <?php $stfper=$this->mastermodel->get_data_srow('staffpersonaldetails',$staffid,'id'); $stfemp=$this->mastermodel->get_data_srow('staffemployeedetails',$staffid,'staffid'); $desg = $this->mastermodel->get_data_srow('designation',$stfemp->designationid,'id'); $dept= $this->mastermodel->get_data_srow('department',$stfemp->deptid,'id'); ?> <li id="stfinfodet"> <fieldset><ul><li><label>Employee No</label><label><?=$stfper->employeeid;?></label></li> <li><label>Designation</label><label><?=$desg->designation;?></label></li> <li><label>Department</label><label><?=$dept->departmentname;?></label></li> </ul> </fieldset> </li> <li> <label for="Name">Target Period</label> <?php echo form_dropdown('targettype', $options, $targettype,$attri); ?> </li> <li> <label>Start Date</label> <input class="one" name="startdate" id="startdate" readonly="true" type="text" value="<?php echo $startdate;?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li id="enddatewer"> <label>End Date</label> <input class="two" name="enddate" id="enddate" readonly="true" type="text" value="<?php echo $enddate;?>" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li> <label for="Name">Target Premium</label> <?php echo form_input('target',$target); ?> <span id="targetInfo" class="red_bold">*</span> </li> <li> <label for="currency">Currency</label> <select id="curr_id" name="curr_id"> <?php echo "<option value='". $curr_id."'>". $curr_name."</option>"; foreach($curren as $currency) { if($curr_id!=$currency['id']) { echo "<option value='". $currency['id']."'>". $currency['currencyname']."</option>"; } } ?> </select> </li> <li><label for="submit"> </label> <button type="submit" class="clickimage" id="submit" onclick="return doallthetwo();">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>