Bug fixes - Unwanted Echo and Date Format Report : ps

This commit is contained in:
VE10-Sanjeev 2024-04-05 12:17:14 +05:30
parent 2519f1abae
commit a1606f58b3
3 changed files with 6 additions and 11 deletions

View File

@ -467,7 +467,6 @@ public function editleave()
else else
{ {
echo "else stss";
$all_leave_count = $this->Leave_model->get_by_type( $this->input->post('type') , user()->business_id , "leave_master"); $all_leave_count = $this->Leave_model->get_by_type( $this->input->post('type') , user()->business_id , "leave_master");
$data['leave_bal'] = $all_leave_count[0]->days; $data['leave_bal'] = $all_leave_count[0]->days;
$days['remaining_days'] = $all_leave_count[0]->days; $days['remaining_days'] = $all_leave_count[0]->days;
@ -483,12 +482,10 @@ public function editleave()
} }
$get_from_date = $this->Leave_model->get_from_date($emp_id, $this->input->post('from_date_new'), $this->input->post('to_date_new')); $get_from_date = $this->Leave_model->get_from_date($emp_id, $this->input->post('from_date_new'), $this->input->post('to_date_new'));
// echo "<pre>";
if($get_from_date == 0) if($get_from_date == 0)
{ {
echo"update fun:";
$table="leave_list"; $table="leave_list";
$update_leave = $this->MY_Model->edit_option($action,$id,$table); $update_leave = $this->MY_Model->edit_option($action,$id,$table);

View File

@ -30,7 +30,7 @@ public function get_all_leave_data($business_id) {
YEAR(IF(A.from_date_new is not null, A.from_date_new ,A.perm_date_new)) as final_date_year, YEAR(IF(A.from_date_new is not null, A.from_date_new ,A.perm_date_new)) as final_date_year,
GROUP_CONCAT( GROUP_CONCAT(
CASE CASE
WHEN A.from_date_new IS NOT NULL THEN CONCAT(' (',A.from_date_new, ' to ', A.to_date_new,') ') WHEN A.from_date_new IS NOT NULL THEN CONCAT(' (',DATE_FORMAT(A.from_date_new, '%d-%m-%Y'), ' to ', DATE_FORMAT(A.to_date_new, '%d-%m-%Y'),') ')
ELSE '' ELSE ''
END END
) AS date_range, ) AS date_range,

View File

@ -171,9 +171,9 @@
</select> </select>
</div> </div>
<label class="control-label col-md-1 col-sm-1 " for="first-name" id="balance" > Balance</label> <label class="control-label col-md-1 col-sm-1 balance" for="balance" > Balance</label>
<div class="col-md-1 col-sm-1 "> <div class="col-md-1 col-sm-1 ">
<input type="text" id="leave_bal" name="" value="" style="width:90px;" class="form-control " readonly> <input type="text" id="leave_bal" name="" value="" style="width:90px;" class="form-control balance" readonly>
</div> </div>
</div> </div>
@ -398,8 +398,7 @@ function get_all_count(id) {
if( selectedOptionId === 'permission'){ if( selectedOptionId === 'permission'){
$('#hidedate').hide(); $('#hidedate').hide();
$('#balance').hide(); $('.balance').hide();
$('#leave_bal').hide();
$('#fromdate').removeAttr('required'); $('#fromdate').removeAttr('required');
$('#todate').removeAttr('required'); $('#todate').removeAttr('required');
$('#perm_id').prop('required', true); $('#perm_id').prop('required', true);
@ -416,8 +415,7 @@ function get_all_count(id) {
$('#hidedate').show(); $('#hidedate').show();
$('#showtime').hide(); $('#showtime').hide();
$('#showdate').hide(); $('#showdate').hide();
$('#balance').show(); $('.balance').show();
$('#leave_bal').show();
$('#fromdate').prop('required', true); $('#fromdate').prop('required', true);
$('#todate').prop('required', true); $('#todate').prop('required', true);
} }