?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/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/sgms/application/views/Sales/add_branch_target.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script language="javascript" type="text/javascript"> 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" class="clickimage" onclick="viewdata('sales','viewinsalessearch','search_branch_target','view_branch_target','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Inserting branch target</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('sales/addinsales/insert_branch_target/view_branch_target/1',$attributes); $options = array( 'Select' => 'Select', 'Monthly' => 'Monthly', 'Quarterly' => 'Quarterly', 'Semi-Annually' => 'Semi-Annually', 'Annually' => 'Annually', 'Others' => 'Others', ); $attri= 'onChange="getperiod(this.value);" id="target_period",class="required"'; $curren = $this->mastermodel->getdatas('currency'); $branch = $this->mastermodel->getdatas('branch'); ?> <ul> <li> <label for="data">Branch Name</label> <select id="branch_id" name="branch_id"> <?php foreach($branch as $list) { echo "<option value='". $list['branch_id']."'>". $list['branch_name']."</option>"; } ?> </select> </li> <li> <label for="Name">Target Period</label> <?php echo form_dropdown('target_type', $options, 'Select',$attri); ?><span id="fromInfo" class="red_bold"></span> </li> <li> <label>Start Date</label> <input class ="required calfocus" name="start_date" id="startdate" type="text"> </li> <li id="enddatewer"> <label>End Date</label> <input class ="calfocus" name="end_date" type="text" id="enddate" > </li> <li> <label for="Name">Target Amount</label> <input class ="required auto" name="target" id="target" type="text"> </li> <li> <label for="currency">Currency</label> <select id="currency_id" name="currency_id"> <?php foreach($curren as $currency) { echo "<option value='". $currency['currency_id']."'>". $currency['currency_name']."</option>"; } ?> </select> </li> <li> <label for="data">Remarks</label> <?php $data = array( 'name' => 'remarks', 'id' => 'remarks', ); echo form_textarea($data).form_error($data); ?> <input type="hidden" name="tab_name" value="branch_target"/> <input type="hidden" name="resfunction" value="search_branch_target"/> </li> <li> <label for="submit"> </label> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>