?
Current Path : /home1/savoy/public_html/savoyglobal.net/eldertree/application/views/student/ |
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/eldertree/application/views/student/edit_student_fee.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $stud = array(0); $index = 0; $user_right = $this->mastermodel->get_single_field_value('user', 'user_fee_right', 'user_id', $_SESSION['user_id']); if($user_right==1) $readonly = ''; else $readonly = 'readonly'; ?> <script> function getFeeParticularAmount(fee_details_id,payment_type,index,sibling){ $('#new_first_month_div_'+index).hide(); $('#new_pay_amount_'+index).show(); $.ajax({ type: "POST", dataType:"json", url: "<?= site_url() ?>/student/get_fee_details/"+fee_details_id+"/"+payment_type, success: function(msg) { if(payment_type=="monthly"){ $('#new_first_month_div_'+index).show(); $('#new_pay_amount_'+index).hide(); fee_amount = msg.fee_month_amount; // to add sibling discount if (sibling) { fee_amount = fee_amount - (msg.fee_month_amount*msg.sibling_discount/100); } $('.new_pay_amount_'+index).val(fee_amount); $('#new_pay_amount_'+index).val(0); // $('.calfocus').datepick({dateFormat: 'dd-mm-yyyy'}); } else{ $('#new_first_month_div_'+index).hide(); $('#new_pay_amount_'+index).show(); $('.new_pay_amount_'+index).val(0); fee_amount = msg.fee_term_amount; // to add sibling discount if (sibling) { fee_amount = fee_amount - (msg.fee_term_amount*msg.sibling_discount/100); } $('#new_pay_amount_'+index).val(fee_amount); } } }); } </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Update <?= $class_details->first_name; ?> 's Fee Details</div> <div class="tools"> <a href="#" onclick="student_class_details('student','student_class_details','<?= $class_details->class_name_id; ?>','class_name_id','edit_student_class')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('student/update_student_fee', $attributes); ?> <h3 class="form-section">Class Room Details</h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Student Name</label> <div class="controls"> <span class="text bold"> <?= $class_details->first_name." ".$class_details->last_name; ?></span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Reg No </label> <div class="controls"> <span class="text bold"> <?= $class_details->reg_no; ?></span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Term</label> <div class="controls"> <span class="text bold"> <?= $this->mastermodel->get_single_field_value('term', 'term_name', 'term_id', $class_details->term_id); ?></span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Date of Allotment</label> <div class="controls"> <input class="calfocus required span12" type="text" name="class_allocation_date" value="<?= $this->mastermodel->convertdatenormalformat($class_details->class_allocation_date) ?>" id="class_allocation_date"/> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">No Of Days</label> <div class="controls"> <?php $no_of_days = $this->mastermodel->getdatas('no_sessions'); ?> <select id="no_of_days" name="no_of_days" class="required span12"> <?php foreach ($no_of_days as $list) { echo '<option value="' . $list['no_sessions'] . '"'; if ($class_details->no_of_days == $list['no_sessions']) { echo "selected"; } echo' >' . $list['no_sessions'] . '</option>'; } ?> </select> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Days Of the week</label> <div class="controls"> <?php $week = array(); if ($class_details->student_class_days != "") { $week = explode(',', $class_details->student_class_days); } ?> <input type="checkbox" name="student_class_days[]" value="0" <?= (in_array(0, $week)) ? "checked" : "" ?>/>Sunday <input type="checkbox" name="student_class_days[]" value="1" <?= (in_array(1, $week)) ? "checked" : "" ?>/>Monday <input type="checkbox" name="student_class_days[]" value="2" <?= (in_array(2, $week)) ? "checked" : "" ?>/>Tuesday <input type="checkbox" name="student_class_days[]" value="3" <?= (in_array(3, $week)) ? "checked" : "" ?>/>Wednesday <input type="checkbox" name="student_class_days[]" value="4" <?= (in_array(4, $week)) ? "checked" : "" ?>/>Thursday <input type="checkbox" name="student_class_days[]" value="5" <?= (in_array(5, $week)) ? "checked" : "" ?>/>Friday <input type="checkbox" name="student_class_days[]" value="6" <?= (in_array(6, $week)) ? "checked" : "" ?>/>Saturday </div> </div> </div> </div> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-check"></i>Student Fee Details</div> </div> <div class="portlet-body"> <div class="row-fluid"> <div class="control-group"> <table class="table table-striped table-hover table-bordered" id="tbl1" style="background-color: white;"> <thead id="stud_sub_head"> <tr> <th>Sl</th> <th>Fee Particulars</th> <th>Payment Period </th> <th> Amount</th> </tr> </thead> <tbody> <?php $i = 0; $term_academic_details = $this->mastermodel->get_data_dual_srow('term_academic_details', $term, 'term_id', $academic_year_id, 'academic_year_id'); foreach ($student_fee_details as $list) { $start = $term_academic_details->term_start_date; $end = $term_academic_details->term_end_date; $dt = $term_academic_details->term_start_date; $student_month_fee = 0; $i++; ?> <tr> <td><?= $i ?></td> <td> <?= $list['fee_particular_name'] ?> <input type="hidden" class="calfocus" value="<?= $list['fee_particular_id'] ?>" name="particular_id_<?= $i ?>" id="particular_id_<?= $i ?>"/> </td> <td> <?= ($list['payment_type'] == "monthly") ? "Monthly" : "Termwise"; ?> <input name="payment_type_<?= $i ?>" id="payment_type_<?= $i ?>" value="<?= $list['payment_type'] ?>" type="hidden"/> </td> <td> <div id="first_month_div_<?= $i ?>" style="width: 400px;float: right"> <?php if ($list['payment_type'] == "monthly") { $j = 1; ?> <label style="display: block;width: 200px;float: left;">WEF Date</label> <label style="display: block;width: 200px;float: right;text-align: right;">Amount</label> <?php if (isset($student_monthly_fee_details[$list['student_class_fee_id']])) { // if ($j == 1) { ?> <?php //} foreach ($student_monthly_fee_details[$list['student_class_fee_id']] as $month_fee) { ?> <input style="float: left;" type="text" readonly="" class="span6"value="<?= date('M-Y', strtotime($month_fee['fee_wef_date'])) ?>"/> <input type="text" class="span6" <?=$readonly;?> pay_amount<?= $i ?>" name="pay_amount_<?= $i . '_' . $j ?>" style="float: right; clear: right;text-align: right" value="<?= $month_fee['amount'] ?>"/> <input name="wef_date_<?= $i . '_' . $j ?>" type="hidden" value="<?= date('Y-m-01', strtotime($month_fee['fee_wef_date'])) ?>"> <div class="clear"></div> <?php $j++; } } } ?> </div> <!-- </td> <td>--> <?php if ($list['payment_type'] == "term") { ?> <input name="pay_amount_<?= $i ?>" <?=$readonly;?> id="pay_amount_<?= $i ?>" class="required span12" type="text" value="<?= $list['fee_amount'] ?>"/> <?php } ?> <input type="hidden" name="fee_details_id_<?= $i ?>" id="fee_details_id_<?= $i ?>" value="<?= $list['student_class_fee_id'] ?>" /> </td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="student_class_id" value="<?= $student_class_id; ?>"/> <input type="hidden" name="class_name_id" value="<?= $class_details->class_name_id; ?>"/> <input id="index" name="index" value="<?= $i ?>" type="hidden"/> <input id="student_id" name="student_id" value="<?= $class_details->student_id ?>" type="hidden"/> </div> </div> </div> </div> <?php $parent_id = $this->mastermodel->get_single_field_value('parent_student', 'parent_id', 'student_id', $class_details->student_id ); if (count($this->mastermodel->get_sibling_details($parent_id, $class_details->student_id )) > 0) { $sibling = 1; } else { $sibling = 0; } $session = $class_details->class_session; $no_sessions = $class_details->no_of_days; $term = $class_details->term_id; $fee_deatils = $this->studentmodel->load_student_fee_details($academic_year_id, $session, $no_sessions, $term, $sibling); ?> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-check"></i>Add Fee Particular</div> </div> <div class="portlet-body"> <div class="row-fluid"> <div class="control-group"> <table class="table table-striped table-hover table-bordered" id="tbl1" style="background-color: white;"> <thead id="stud_sub_head"> <tr> <th>Select</th> <th>Fee Particulars</th> <th>No of Days</th> <th>Payment Period</th> <th>Amount</th> </tr> </thead> <tbody> <?php $i = 0; foreach ($fee_deatils as $list) { $i++; ?> <tr> <td><input type="checkbox" name="add_new_fee_particular[]" value="<?= $i ?>"/></td> <td> <?= $list['fee_particular_name'] ?> <input type="hidden" value="<?= $list['fee_particular_id'] ?>" name="new_particular_id_<?= $i ?>" id="new_particular_id_<?= $i ?>"/> </td> <td> <?= $list['fee_term_no_of_days'] ?> </td> <td> <select class="chosen medium1" name="new_payment_type_<?= $i ?>" id="new_payment_type_<?= $i ?>" onchange="getFeeParticularAmount(<?= $list['id'] ?>,this.value,<?= $i ?>,<?= $sibling ?>)"> <option value="">Select</option> <option value="monthly">Monthly</option> <option value="term">TermWise</option> </select> </td> <td> <div class="clear"></div> <div id="new_first_month_div_<?= $i ?>" style="display: none;"> <?php $j = 1; $start = $term_academic_details->term_start_date; $end = $term_academic_details->term_end_date; $dt = $term_academic_details->term_start_date; while (strtotime($dt) <= strtotime($end)) { $month = date('M', strtotime($dt)); $year = date('Y', strtotime($dt)) ?> <input style="float: left;" type="text" class="span6" readonly="" value="<?= date('F -Y', strtotime($dt)) ?>"/> <input type="text" <?=$readonly;?> name="new_pay_amount_<?= $i . '_' . $j ?>" class="span6 new_pay_amount_<?= $i ?>" style="float: right; clear: right;text-align: right;" value="0"/> <input name="new_wef_date_<?= $i . '_' . $j ?>" type="hidden" value="<?= $year . '-' . $month . '-01' ?>"> <div class="clear"></div> <?php $dt = date('Y-m-01', strtotime("+1 months", strtotime($dt))); $j++; } ?> </div> <input type="text" <?=$readonly;?> style="float: right; clear: right;text-align: right" name="new_pay_amount_<?= $i ?>" id="new_pay_amount_<?= $i ?>" class="span12" /> <input type="hidden" name="new_fee_details_id_<?= $i ?>" id="new_fee_details_id_<?= $i ?>" value="<?= $list['id'] ?>" /> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <div class="grid_12 " id="stud" > <div class="form-actions"> <button type="submit" onclick="addformdata('validateform')" class="btn blue"><i class="icon-ok"></i> Process</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div>