?
Current Path : /home1/savoy/www/savoyglobal.net/sibs_draft/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/www/savoyglobal.net/sibs_draft/system/application/views/Sales/editbranchtarget.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']; $branchid=$updata['branch']; $startdate = $updata['startdate']; $enddate=$updata['enddate']; $target=$updata['target']; $target_income=$updata['target_income']; $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);" id="target_type"'; ?> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loadbranchtarget('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25" /></label> </div> <fieldset> <legend>Update Branch Target </legend> <?php $attributes = array('id' => 'customForm'); echo form_open('sales/editbranchtarget',$attributes); echo form_hidden('settargetid',$settargetid); ?> <ul> <li> <?php $bra=$this->mastermodel->get_data_srow('ourbranch',$branchid,'id'); ?> <?php echo " <label>Branch</label><select name='branch' id='branch'><option value='$branchid'>$bra->branchname</option>"; $stat=$this->mastermodel->getdatas('ourbranch'); foreach($stat as $sta) { if($sta['id']!=$branchid) { echo "<option value='". $sta['id'] . "'>" . $sta['branchname'] . "</option>"; } } echo "</select>"; ?><span id="branchInfo" class="red_bold"></span></li> <li> <label for="Name">Target Period</label> <?php echo form_dropdown('targettype', $options, $targettype,$attri); ?> <span id="target_typeInfo" class="red_bold"></span> </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);"> <span id="startdateInfo" class="red_bold">*</span> </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); ?> </li> <li> <label for="Name">Target Income</label> <?php echo form_input('target_income',$target_income); ?> <span id="target_incomeInfo" 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();">Update</button> </li> </ul> <?php echo form_close();?> </fieldset>