?
Current Path : /home1/savoy/public_html/savoyglobal.net/oscardraft/application/views/master/ |
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/oscardraft/application/views/master/edit_fee_collecton.php |
<?php echo form_close(); ?><?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script type="text/javascript"> function get_class_name() { var class_array = ($("#class_room_id").val()).split("~"); $("#class_name_code").val(class_array[1]+'/'+$("#class_name_academic_year").val()); } function get_academics_months(value){ var divid="month_payment_list"; var data=value.split("~"); $("#"+divid).empty().html('<CENTER><img src="<?= base_url() ?>assets/images/loading.gif" class="loading"/></CENTER>'); $("#"+divid).load("<?= site_url() ?>/"+'master'+'/'+'list_payment_months'+'/'+data[0]); } function check_pay_date(){ var pay_term_date=$('#term_date').val(); var acc_date=$('#academic_year').val(); var data=acc_date.split("~"); var dateFrom = data[1]; var dateTo = data[2]; var dateCheck = pay_term_date; var d1 = dateFrom.split("-"); var d2 = dateTo.split("-"); var c = dateCheck.split("-"); var from = new Date(d1[0], d1[1]-1, d1[2]); // -1 because months are from 0 to 11 var to = new Date(d2[0], d2[1]-1, d2[2]); var check = new Date(c[2], c[1]-1, c[0]); if(acc_date!=""){ if(check >= from && check <= to){ addformdata('validateform'); } else{ alert("Select Date Between "+d1[2]+"-"+d1[1]+"-"+d1[0]+" & " +d2[2]+"-"+d2[1]+"-"+d2[0]); return false; } } else{ alert("Select Academic Year"); return false; } } </script> <div class="icons_main"> <div class="icons"> <img src="<?= base_url() ?>assets/images/back.png" title="Back" class="clickimage" onclick="viewdata('master','viewinmastersearch','search_fee_collection','view_fee_collection','<?= $_SESSION['pagenum']; ?>')" alt="Back" align = "center" width="32" height="32" /> </div> <div class="icons_caption"> <h4>Update fee collection dates</h4> </div> </div> <?php $attributes = array('id' => 'validateform', 'class' => 'validate'); echo form_open('master/addinmaster/update_fee_collection/view_fee_collection/1', $attributes); $accademic_year = $this->mastermodel->getdatas('academic_year', 'academic_year_id'); ?> <div class="grid_6"> <div class="box"> <div class="header"> <span></span> </div> <div class="content no-padding"> <div class="section _100"> <label>Academic Year</label> <div class="single_page"> <?php $accademic_details=$this->mastermodel->get_data_srow('academic_year',$viewinfo->fee_collection_academic_year, 'academic_year_year'); echo $viewinfo->fee_collection_academic_year; ?> <input class="required" type="hidden" name="academic_year" id="academic_year" value="<?=$accademic_details->academic_year_id.'~'.$accademic_details->academic_year_start_date.'~'.$accademic_details->academic_year_end_date ?>"/> <!-- <select onchange="get_academics_months(this.value)" class="required chzn-done" name="academic_year" id="academic_year"> <option value="">Select</option> <?php foreach ($accademic_year as $list) { ?> <option <?= ($list['academic_year_year'] == $viewinfo->fee_collection_academic_year) ? "selected" : "" ?> value="<?= $list['academic_year_id'] . '~' . $list['academic_year_start_date'] . '~' . $list['academic_year_end_date'] ?>"><?= $list['academic_year_year'] ?></option> <?php } ?> </select>--> </div> </div> <div class="section _100"> <label>Payment Date (for term wise)</label> <div> <table> <?php $terms=$this->mastermodel->getdatas('term'); $i=0; foreach($terms as $list) { $i++; $term_date=$this->mastermodel->convertdatenormalformat($this->mastermodel->get_single_field_value_two('fee_collection_term', 'fee_collection_term_date', 'fee_collection_id', $viewinfo->fee_collection_id, 'fee_collection_term_id', $list['term_id'])); ?> <tr><td><input type="hidden" style="float:left;" name="term_id_<?=$i;?>" id="term_id_<?=$i;?>" value="<?=$list['term_id'];?>" /><div class="single_page"><?=$list['term_name'];?></div></td> <td><input value="<?=$term_date;?>" type="text" style="float:left;" name="term_date_<?=$i;?>" id="term_date_<?=$i;?>" class="required calfocus medium1" /></td></tr> <?php } ?> </table> </div> </div> <div class="section _100"> <label>Payment Date (for monthly)</label> <div id="month_payment_list"> <?php $month_dates=$this->mastermodel->get_data('fee_collection_details',$viewinfo->fee_collection_id,'fee_collection_id'); $month_pay_date=array(); foreach ($month_dates as $value) { $day= strtotime($value['fee_collection_date_month']); $month_pay_date[date('m-Y',$day)]=date('d',$day); } $start = $accademic_details->academic_year_start_date; $end = $accademic_details->academic_year_end_date; $dt = $accademic_details->academic_year_start_date; $options = " <select> <option></option> </select> "; while (strtotime($dt) <= strtotime($end)) { $month = date('m', strtotime($dt)); $year = date('Y', strtotime($dt)) ?> <label style="float:left;width:80px;margin-top: 5px;"><?= date('M Y', strtotime($dt)) ?></label> <select name="month_date[]" class="required chzn-done" style="width: 50px;clear: right;float: left;margin-bottom:10px;"> <?php for ($i = 1; $i <= $num = cal_days_in_month(CAL_GREGORIAN, $month, $year); $i++) { $day = str_pad($i, 2, 0, STR_PAD_LEFT) ?> <option <?=($i==$month_pay_date[$month.'-'.$year])?"selected":""?> value="<?= $year . '-' . $month . '-' . $day ?>"><?= $day ?></option> <?php } ?> </select> <div class="clear"></div> <?php $dt = date('Y-m-01', strtotime("+1 months", strtotime($dt))); } //echo $end; //echo date('Y-m', strtotime("+1 months", strtotime("09-12-1989"))) ?> </div> </div> </div> <div class="actions"> <?php // ?> <div class="actions-left"> <input type="reset" /> <input type="hidden" name="resfunction" value="search_class_name"/> <input type="hidden" name="tab_name" value="class_name"/> <input type="hidden" name="id" value="<?= $viewinfo->fee_collection_id ?>"/> </div> <div class="actions-right"> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </div> </div> </div> </div> <?php echo form_close(); ?>