?
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/addbranchtarget.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <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> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" onclick="loadbranchtarget('<?=$_SESSION['pagenum']?>','<?=$_SESSION['searchoption']?>','<?=$_SESSION['searchtxt']?>')" alt="Back" align = "center" width="25" height="25"/></label> </div> <fieldset> <legend>Add Branch - Target</legend> <?php $attributes = array('id' => 'customForm'); echo form_open('sales/addbranchtarget',$attributes);?> <?php $options = array( '' => 'Select', 'Monthly' => 'Monthly', 'Quarterly' => 'Quarterly', 'Semi-Annually' => 'Semi-Annually', 'Annually' => 'Annually', 'Others' => 'Others', ); $attri= 'onChange="getperiod(this.value);" id="target_type"'; ?> <ul> <li> <?php echo " <label>Branch</label><select name='branch' id='branch'>"; $stat=$this->mastermodel->getdatas('ourbranch'); foreach($stat as $sta) { 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, 'Select',$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" 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" type="text" id="enddate" readonly="true" style="background-image: url(../../../../assets/images/datefocus.gif);"> </li> <li> <label for="Name">Target Premium</label> <?php echo form_input('target'); ?><span id="targetInfo" class="red_bold">*</span> </li> <li> <label for="currency">Currency</label> <select id="curr_id" name="curr_id"> <?php foreach($curren as $currency) { 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>