0byt3m1n1
Path:
/
home
/
k74ns2xygros
/
www
/
globetech
/
cms
/
salary
/
[
Home
]
File: 1111.php
<?php session_start(); error_reporting(0); set_time_limit(0); $admin_cid = $_SESSION['admin_cid']; $admin_name = $_SESSION['name']; $company_id = $_SESSION['company_id']; include '../assets/config.php'; $user = new User(); $all_admin = $user->select_all_admin(); $zone = $_REQUEST['sal_zone']; $sengg = $_REQUEST['sal_edc']; $exngg = $_REQUEST['sal_edd']; $electry = $_REQUEST['sal_substation']; $sal_txn_no = $_REQUEST['sal_txn_no']; $select_year = $_REQUEST['sal_year']; $select_month = $_REQUEST['sal_month']; // $mon_pre = $mon_sel = ''; // foreach ($select_month as $mon) { // $mon_sel .= $mon_pre . '"' . $mon . '"'; // $mon_pre = ', '; // } $mon_sel = $select_month; // $mon_sel = implode($select_month, ','); // $work_type = $_POST['work_type']; // $authority_name = $_POST['authority_name']; $cnd = ''; $area_name = ''; $url = ''; if ($zone) { $cnd .= " AND sal_zone='$zone'"; $area_name = $zone; } else if ($zone == '') { $cnd .= ""; $url .= ""; $area_name = 'All Zones'; } if ($sengg) { $cnd .= " AND sal_edc='$sengg'"; $area_name = $sengg; } if ($exngg) { // $prefix1 = $ex_locations = ''; // foreach ($exngg as $location1) { // $ex_locations .= $prefix1 . '"' . $location1 . '"'; //// $ex_locations .= $prefix1.$location1; // $prefix1 = ', '; // } // $cnd .= " AND sal_edd IN ($ex_locations)"; $cnd .= " AND sal_edd IN ('$exngg')"; $area_name = $exngg; } //if ($electry) { //// $cnd .= " AND electrycity_zone='$electry'"; // $prefix = $electry_locations = ''; // foreach ($electry as $location) { // $electry_locations .= $prefix . '"' . $location . '"'; // $prefix = ', '; // } // $cnd .= " AND sal_substation in ($electry_locations)"; // $area_name = $electry_locations; //} if ($work_type) { $cnd .= " AND work_type='$work_type'"; } if ($area_name == "") { $area_name = 'ALL ZONES'; } else { $area_name; } $sql_authority = "SELECT count(*) as total_approved,SUM(total_amount) as total_sum_amount, salary_table_combined.* FROM `salary_table_combined` WHERE sal_pay_checked_authority='yes' AND salary_status='pay_authority' AND sal_month='$select_month' AND sal_year='$select_year' AND `sal_txn_no`='$sal_txn_no'"; $result_authority = $user->select_custom_query($sql_authority); $sql = "SELECT * FROM `salary_table_combined` WHERE `sal_txn_no`='$sal_txn_no' AND salary_checked='yes' AND sal_month='$select_month' AND sal_year='$select_year' $cnd ORDER BY `sal_substation` asc,`emp_work_type` asc,`emp_category` desc"; $result = $user->select_custom_query($sql); //print_r($result); $rows_count = mysqli_num_rows(mysqli_query($user->conn, $sql)); if ($rows_count > 0) { $gsalary_skilled = $_POST['gsalary_skilled']; $gsalary_semiskilled = $_POST['gsalary_semiskilled']; $gsalary_unskilled = $_POST['gsalary_unskilled']; $da_skilled = $_POST['da_skilled']; $da_semiskilled = $_POST['da_semiskilled']; $da_unskilled = $_POST['da_unskilled']; $total_gross_wages_skilled = $gsalary_skilled + $da_skilled; $total_gross_wages_semiskilled = $gsalary_semiskilled + $da_semiskilled; $total_gross_wages_unskilled = $gsalary_unskilled + $da_unskilled; $present_sal = $_POST['present_sal']; $leave_sal = $_POST['leave_sal']; $absent_sal = $_POST['absent_sal']; $total_days_sal = $_POST['total_days_sal']; $present_epf = $_POST['present_epf']; $leave_epf = $_POST['leave_epf']; $absent_epf = $_POST['absent_epf']; $total_days_epf = $_POST['total_days_epf']; $date_to = $result[0]['paid_to_date']; $emp_share_epf = $result[0]['emp_share_epf_p']; $empr_share_epf_er = $result[0]['empr_share_epf_er_p']; $empr_share_epf_eps = $result[0]['empr_share_epf_eps_p']; $empr_share_epf_edli = $result[0]['empr_share_epf_edli_p']; $empr_share_epf_ad = $result[0]['empr_share_epf_ad_p']; $emp_share_esi = $result[0]['emp_share_esi_p']; $empr_share_esi = $result[0]['empr_share_esi_p']; $salary_status = $result[0]['salary_status']; $checked_by_id = $result[0]['pay_sign_authority_by']; $salary_ok_by_aao = $result[0]['salary_ok_by_authority']; $pay_sign_authority_date = $result[0]['pay_sign_authority_date']; $transaction_date_real = $result[0]['salary_transaction_date']; $sal_remit_acc_no = $result[0]['sal_remit_acc_no']; $salary_account_edd_id = $result[0]['salary_account_edd_id']; $sal_remit_ifsc = $result[0]['sal_remit_ifsc']; $sal_remit_branch_code = $result[0]['sal_remit_branch_code']; $sal_remit_acc_holder_name = $result[0]['sal_remit_acc_holder_name']; $remit_table_name = $result[0]['remit_table_name']; $cheque_no = $result[0]['cheque_no']; $salary_subject = $result[0]['salary_subject']; $salary_bank_name = $result[0]['salary_bank_name']; $salary_bank_branch = $result[0]['salary_bank_branch']; } include '../assets/head.php'; //include '../assets/left_nav.php'; ?> <script src="../build/js/ajax.js" type="text/javascript"></script> <title>Sign on Salary Detail</title> <link href="../vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet"> <style> select { width:200px!important; height:35px; border:2px solid #456879; /*border-radius:10px;*/ } @media print { .header_fixed1, #heading-title,.x_title,#btnprint,#btnback,#filter_zone, .attachments,.nav_menu { display: none; } #printarea { display: block; } @page { size: landscape; } a[href]:after { content: none !important; } #datatable-checkbox{ width: 100%; } } .center { text-align:center; } .table>tbody>tr>th { padding: 2px auto; line-height: 0; vertical-align: middle; /*border: 1px solid #000; border-width: 1 2;*/ } .table>tfoot>tr>th , .table>thead>tr>th { padding: 2px auto; line-height: 0; vertical-align: middle; font-size: 14; text-align: center; color: #333; /*border: 2px solid #000;*/ /*border-top: 2px solid #000;*/ /*border-width: 2 2;*/ } table, th, td { border-collapse: collapse; height: 22.2px; } .table>tbody>tr>td , .table>tfoot>tr>td , .table>thead>tr>td { padding: 2px auto; line-height: 0; vertical-align: middle; /*border: 1px solid #000; border-width: 1 2;*/ } .x_content h4 { font-size:22px!important; } /* .table-bordered { border: 2px solid #000; }*/ .dataTables_length,.dataTables_filter,#datatable-checkbox_info,#datatable-checkbox_paginate{ display: none;} .table > tfoot > tr > th, .table > thead > tr > th { line-height: 1; } .x_content { overflow: inherit; } #datatable-checkbox{ width: 100%; } /*.btn-danger { background-color: unset; }*/ .form-control { border-radius: unset; } .heading-h h5{ text-align: left;} #emergency_row{ color:royalblue;} #emergency_row a{ color:royalblue;} .x_panel{ background-color: #FFD760;color: black; } </style> <script src="../vendors/jquery/dist/jquery.min.js"></script> <body> <div class="right_col" role="main" style="padding-top: 10px;text-transform: uppercase;"> <div class="row" style="margin:10px;"> <!--<div class="col-md-10 col-md-offset-1 col-sm-10 col-sm-offset-1 col-xs-12">--> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_title"> <h2>Sign On Generated Salary/EPF/ESIC</h2> <ul class="nav navbar-right panel_toolbox"> <!-- <li> <div class="dropdown bulk-actions" style="display: none;margin-right:5px;margin-top:5px;"> <a data-toggle="dropdown" href="javascript:void(0);" style="color:blue;"> Bulk actions <span class="total-checked"></span> <i class="fa fa-chevron-down"></i> <ul class="dropdown-menu" role="menu"> <li> <a href="javascript:void(0);" onclick="print_bulk_detail('salary')">PRINT SALARY DETAILS</a> </li> </ul> </a> </div> </li>--> <li><button class="close-link btn btn-xs btn-info" onclick='self.close();'>BACK</button> </li> <!--<li><a onclick="window.history.back()" class="close-link"><i class="fa fa-close"></i></a> </li>--> </ul> <div class="clearfix"></div> </div> <div class="row" id="tdata"> <div class="x_panel"> <!--<form method='post' action="post.php" onsubmit="self.close();">--> <!--<form method='post' >--> <div class="x_content" id="content"> <div class="row" id="printarea"> <br> <input type="hidden" id="area_name" name="area_name" value='<?php echo $area_name; ?>'> <input type="hidden" id="zone" name="zone" value="<?php echo $zone; ?>"> <input type="hidden" id="s_engineer" name="s_engineer" value="<?php echo $sengg; ?>"> <input type="hidden" id="ex_engineer" name="ex_engineer" value='<?php echo $ex_locations; ?>'> <input type="hidden" id="electry_city" name="electry_city" value='<?php echo $electry_locations ?>'> <!-- <input type="hidden" id="cheque_no" name="cheque_no" value="<?php echo $cheque_no; ?>"> <input type="hidden" id="salary_subject" name="salary_subject" value="<?php echo $salary_subject; ?>"> <input type="hidden" id="salary_bank_branch" name="salary_bank_branch" value="<?php echo $salary_bank_branch; ?>">--> <input type="hidden" id="emp_share_esi" name="emp_share_esi" value="<?php echo $emp_share_esi; ?>"> <input type="hidden" id="empr_share_esi" name="empr_share_esi" value="<?php echo $empr_share_esi; ?>"> <input type="hidden" id="total_share_esi" name="total_share_esi" value="<?php echo ($emp_share_esi + $empr_share_esi); ?>"> <input type="hidden" id="work_type" name="work_type" value="<?php echo $work_type ?>"> <input type="hidden" id="present_salary" name="present_salary" value="<?php echo $present_sal; ?>"> <input type="hidden" id="leave_salary" name="leave_salary" value="<?php echo $leave_sal; ?>"> <input type="hidden" id="absent_salary" name="absent_salary" value="<?php echo $absent_sal; ?>"> <input type="hidden" id="total_days_salary" name="total_days_salary" value="<?php echo $total_days_sal; ?>"> <input type="hidden" id="present_epf" name="present_epf" value="<?php echo $present_epf; ?>"> <input type="hidden" id="leave_epf" name="leave_epf" value="<?php echo $leave_epf; ?>"> <input type="hidden" id="absent_epf" name="absent_epf" value="<?php echo $absent_epf; ?>"> <input type="hidden" id="total_days_epf" name="total_days_epf" value="<?php echo $total_days_epf; ?>"> <input type="hidden" id="emp_share_epf" name="emp_share_epf" value="<?php echo $emp_share_epf; ?>"> <input type="hidden" id="empr_share_epf_er" name="empr_share_epf_er" value="<?php echo $empr_share_epf_er; ?>"> <input type="hidden" id="empr_share_epf_eps" name="empr_share_epf_eps" value="<?php echo $empr_share_epf_eps; ?>"> <input type="hidden" id="empr_share_epf_edli" name="empr_share_epf_edli" value="<?php echo $empr_share_epf_edli; ?>"> <input type="hidden" id="empr_share_epf_ad" name="empr_share_epf_ad" value="<?php echo $empr_share_epf_ad; ?>"> <input type="hidden" id="total_share_epf" name="total_share_epf" value="<?php echo ($emp_share_epf + $empr_share_epf_er + $empr_share_epf_eps + $empr_share_epf_edli + $empr_share_epf_ad); ?>"> <input type="hidden" id="basic_skilled" name="basic_skilled" value="<?php echo $gsalary_skilled; ?>"> <input type="hidden" id="basic_semiskilled" name="basic_semiskilled" value="<?php echo $gsalary_semiskilled; ?>"> <input type="hidden" id="basic_unskilled" name="basic_unskilled" value="<?php echo $gsalary_unskilled; ?>"> <input type="hidden" id="da_skilled" name="da_skilled" value="<?php echo $da_skilled; ?>"> <input type="hidden" id="da_semiskilled" name="da_semiskilled" value="<?php echo $da_semiskilled; ?>"> <input type="hidden" id="da_unskilled" name="da_unskilled" value="<?php echo $da_unskilled; ?>"> <input type="hidden" id="total_gross_wages_skilled" name="total_gross_wages_skilled" value="<?php echo $total_gross_wages_skilled; ?>"> <input type="hidden" id="total_gross_wages_semiskilled" name="total_gross_wages_semiskilled" value="<?php echo $total_gross_wages_semiskilled; ?>"> <input type="hidden" id="total_gross_wages_unskilled" name="total_gross_wages_unskilled" value="<?php echo $total_gross_wages_unskilled; ?>"> <input type="hidden" id="date_to_old" name="date_to_old" value="<?php echo $date_to ?>"> <input type="hidden" id="select_month" name="select_month" value="<?php echo $mon_sel ?>"> <input type="hidden" id="select_year" name="select_year" value="<?php echo $select_year ?>"> <input type="hidden" id="att_reason" name="att_reason" value="<?php echo $att_reason ?>"> <input type="hidden" id="att_remark" name="att_remark" value="<?php echo $att_remark ?>"> <input type="hidden" id="lessamount_all" name="lessamount_all" value="<?php echo $lessamount_all ?>"> <input type="hidden" id="advanceamount_all" name="advanceamount_all" value="<?php echo $advanceamount_all ?>"> <input type="hidden" id="less_adv_reason" name="less_adv_reason" value="<?php echo $less_adv_reason ?>"> <input type="hidden" id="less_adv_remark" name="less_adv_remark" value="<?php echo $less_adv_remark ?>"> <!--<input type="hidden" id="authority_name" name="authority_name" value="<?php echo $authority_name ?>">--> <input type="hidden" id="admin_cid" name="admin_cid" value="<?php echo $admin_cid ?>"> <input type="hidden" id="sal_txn_no" name="sal_txn_no" value="<?php echo $sal_txn_no; ?>"> <div class="col-md-3 col-sm-3 col-xs-6 text-right"> <img src="../build/images/GLOBEINDIA.png" width="100" style="margin-right:-60px;"/> </div> <div class="col-md-7 col-sm-7 col-xs-6 text-center" style="color: #333;"> <span style=""> <h4 style="font-weight: bold;">GLOBETECH CREATIONS PRIVATE LIMITED</h4> <h5 style="font-weight: bold;">GOPAL NAGAR, SISWA BAZAAR, MAHARAJGANJ (UP)</h5> <h5 style="font-weight: bold;">Locations : <?php echo $area_name; ?></h5> <!--<h5 class="pull-right" style="font-weight: bold;"> <?php echo date('d-m-Y', strtotime($date_to)); ?> </h5>--> </span> <?php if ($salary_status == 'pay_authority') { ?> <?php if ($_SESSION['subadmin_admin'] == 1 || $_SESSION['subadmin_sign'] == 1 || $checked_by_id == $admin_cid) { ?> <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#myModal_delete" style="font-weight: bold;">SALARY SHEET REAPPROVE</button> <button type="button" class="btn btn-dark btn-xs" data-toggle="modal" data-target="#myModal_transaction_date" style="font-weight: bold;">CHANGE TRANSACTION DATE</button> <?php } ?> <?php } else if ($salary_status == 'pay_cashier') { ?> <?php if ($_SESSION['subadmin_admin'] == 1 || $_SESSION['subadmin_sign'] == 1 || $checked_by_id == $admin_cid) { ?> <button type="button" class="btn btn-warning btn-xs" data-toggle="modal" data-target="#myModal_delete" style="font-weight: bold;">BACK TO CASHIER</button> <?php } ?> <div class="modal fade in" id="myModal_delete" role="dialog" style="padding-right: 17px;"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Back this Salary to Cashier End.</h4> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Are you sure you want to Back this salary. </p> <p style="font-size: 14px;color:peru;">Total Qty. : <?php echo $rows_count; ?> Approved Date : <?php echo date('d-m-Y H:i:s', strtotime($date_to)); ?></p> <br> <div class="modal-footer" style="text-align: center;"> <button class="btn btn-danger btn-xs" data-dismiss="modal" onclick="delete_salary('<?php echo $select_year; ?>', '<?php echo $select_month; ?>', '<?php echo $zone ?>', '<?php echo $sengg ?>', '<?php echo $exngg; ?>', '<?php echo $sal_txn_no ?>', 'back_salary_authority')">Yes</button> <button class="btn btn-warning btn-xs" data-dismiss="modal">No</button> </div> </div> </div> </div> </div> <?php } ?> <div class="modal fade in" id="myModal_delete" role="dialog" style="padding-right: 17px;"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Reapprove this Salary</h4> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Are you sure you want to reapprove this salary. </p> <p style="font-size: 14px;color:peru;">Total Qty. : <?php echo $rows_count; ?> Approved Qty. : <?php echo $result_authority[0]['total_approved']; ?> Approved Date : <?php echo date('d-m-Y H:i:s', strtotime($pay_sign_authority_date)); ?></p> <br> <div class="modal-footer" style="text-align: center;"> <button class="btn btn-danger btn-xs" data-dismiss="modal" onclick="delete_salary('<?php echo $select_year; ?>', '<?php echo $select_month; ?>', '<?php echo $zone ?>', '<?php echo $sengg ?>', '<?php echo $exngg; ?>', '<?php echo $sal_txn_no ?>', 'delete_salary_authority')">Yes</button> <button class="btn btn-warning btn-xs" data-dismiss="modal">No</button> </div> </div> </div> </div> </div> <div class="modal fade in" id="myModal_transaction_date" role="dialog" style="padding-right: 17px;"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Change Value Date of this SALARY</h4> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Are you sure you want change Value date of this SALARY. </p> <div class="form-group"> <label class="control-label col-md-3 col-sm-3 col-xs-4">Value Date</label> <div class="col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <?php if ($transaction_date_real == '0000-00-00 00:00:00') { $transaction_date = date('Y-m-d H:i:s'); } else { $transaction_date = $transaction_date_real; } ?> <input type="date" name="transaction_date" id="transaction_date" class="form-control" placeholder="Set Transaction Date" value="<?php echo date('Y-m-d', strtotime($transaction_date)); ?>" style="width: 180px;" required> </div> </div> </div> <br><br> <div class="modal-footer" style="text-align: center;"> <button class="btn btn-danger btn-xs" data-dismiss="modal" onclick="delete_salary('<?php echo $select_year; ?>', '<?php echo $select_month; ?>', '<?php echo $zone ?>', '<?php echo $sengg ?>', '<?php echo $exngg; ?>', '<?php echo $sal_txn_no ?>', 'change_salary_transaction_date')">Yes</button> <button class="btn btn-warning btn-xs" data-dismiss="modal">No</button> </div> </div> </div> </div> </div> </div> <div class="col-md-2 col-sm-2 text-center" style="color: #333;"> </div> <br> </div> <?php if ($rows_count > 0) { ?> <div class="row form-inline text-center"> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Branch Code</h5> <input type="text" name="salary_branch_code" id="salary_branch_code" class="form-control" value="2637" placeholder="Set Branch Code" value="<?php echo $sal_remit_branch_code; ?>" required=""> </div> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Bank Branch</h5> <input type="text" name="salary_bank_branch" id="salary_bank_branch" class="form-control" placeholder="Set Bank Branch" value="<?php echo $salary_bank_branch; ?>" required=""> </div> <div class="form-group col-xs-3 col-sm-2"> <?php // $acc_query = "select * from `company_account_numbers` order by account_no asc"; // $acc_res = $user->select_custom_query($acc_query); $emp_provider_query = "SELECT * FROM `employee_providers` WHERE company_id='$company_id'"; $emp_provider_res = $user->select_custom_query($emp_provider_query); ?> <h5 style="font-weight:bold;">Select Account No.</h5> <input list="account_no" name="account_no_input" id="account_no_input" class="form-control" onkeyup="add_account_no(this.value)" placeholder="Enter Account Number" required=""/> <datalist id="account_no" name="account_no"> <!--<select name="account_no" id="account_no" class="form-dropdown form-control" required>--> <option value="">-Select Account No.-</option> <?php foreach ($emp_provider_res as $value) { // $edd_detail = $user->edd_details($value['ep_id']); $ep_display_type = json_decode($value['ep_display_type']); if (in_array(2, $ep_display_type)) { ?> <option value="<?php echo $value['ep_account_no']; ?>" edd_id="<?php echo $value['ep_id'] ?>" bank_name="<?php echo $value['ep_bank_name'] ?>" bank_ifsc="<?php echo $value['ep_ifsc_code'] ?>" account_holder_name="<?php echo $value['ep_name'] ?>" contact_no="<?php echo $value['ep_contact_no'] ?>" address="<?php echo $value['ep_address'] ?>" account_no="<?php echo $value['ep_account_no']; ?>" account_table_name="employee_providers"> <?php echo $value['ep_account_no'] . ' '; echo ' ' . $value['ep_name'] . ' '; // echo 'Contacting Person : ' . $value['ep_contact_person'] . ' <br>'; // echo 'Account No. : ' . $value['ep_account_no'] . ' '; // echo 'Contact No. : ' . $value['ep_contact_no']; // echo ' ' . $edd_detail['ep_name']; // echo ' ' . $value['ep_name']; ?> </option> <?php } } ?> <!--</select>--> </datalist> <input type="hidden" name="account_edd_id" id="account_edd_id" value="<?php echo $salary_account_edd_id; ?>"> <input type="hidden" name="bank_ifsc" id="bank_ifsc" value="<?php echo $sal_remit_ifsc ?>"> <input type="hidden" name="bank_name" id="bank_name" value="<?php echo $salary_bank_name ?>"> <input type="hidden" name="account_holder_name" id="account_holder_name" value="<?php echo $sal_remit_acc_holder_name ?>"> <input type="hidden" class="form-control" name="address" id="address" value="<?php echo $address; ?>"> <input type="hidden" class="form-control" name="contact_no" id="contact_no" value="<?php echo $contact_no; ?>"> <input type="hidden" class="form-control" name="acc_no" id="acc_no" value="<?php echo $sal_remit_acc_no; ?>"> <input type="hidden" class="form-control" name="account_table_name" id="account_table_name" value="<?php echo $remit_table_name; ?>"> <h5 style="font-weight:bold;" id="selected_account"><?php echo $sal_remit_acc_holder_name ?></h5> </div> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Cheque No.</h5> <input type="text" name="cheque_no" id="cheque_no" class="form-control" minlength="6" maxlength="6" placeholder="Set Cheque No." value="<?php echo $cheque_no; ?>" required1=""> </div> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Transaction Subject</h5> <input type="text" name="salary_subject" id="salary_subject" class="form-control" placeholder="Set Salary Subject" value="<?php echo $salary_subject; ?>" required=""> </div> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Date To Paid</h5> <input type="date" name="date_to" id="date_to" class="form-control" placeholder="Set End Date" value="<?php echo $date_to ?>" style="width: 180px;" required> </div> </div> <!-- <div class="row form-inline"> <div class="form-group col-xs-3 col-sm-2"> <h5 style="font-weight:bold;">Transaction Date</h5> <?php // if ($pay_sign_authority_date == '0000-00-00 00:00:00') { // $transaction_date = date('Y-m-d H:i:s'); // } else { // $transaction_date = $pay_sign_authority_date; // } ?> <input type="date" name="transaction_date" id="transaction_date" class="form-control" placeholder="Set Transaction Date" value="<?php echo date('Y-m-d', strtotime($transaction_date)); ?>" style="width: 180px;" required> </div> </div>--> <?php } ?> <?php if ($salary_status == 'pay_cashier') { ?> <?php if ($_SESSION['subadmin_admin'] == 1 || $_SESSION['subadmin_sign'] == 1) { ?> <div class="row text-center"> <div class="form-group" style="margin-top:35px;"> <input type="hidden" name="row_count" id="row_count" value="<?php echo $rows_count; ?>"> <!--<button type="submit" name="Gen_sal" id="Gen_sal" value="Gen_sal" class="btn btn-info">GENERATE SALARY</button>--> <!--<button name="Gen_sal" id="Gen_sal" onclick="save_record()" class="btn btn-primary">PAY SALARY</button>--> <a href="../inventory/view_bank_voucher_employee_wages.php?txn_no=<?php echo $sal_txn_no ?>" class="btn btn-info" target="_target">VIEW VOUCHER</a> <button name="Gen_sal" id="Gen_sal" onclick="save_record()" class="btn btn-danger" <?php if ($_SESSION['admin_cid'] != $checked_by_id || $salary_ok_by_aao != 'yes') { ?> disabled="" <?php } ?>>APPROVE SALARY</button> <?php if ($_SESSION['admin_cid'] != $checked_by_id) { ?> <br><br> <p>Admin Details do not match. please modify some details in voucher.</p> <script> $("input").prop('disabled', true); $("select").prop('disabled', true); </script> <?php } else if ($salary_ok_by_aao != 'yes') { ?> <br><br> <p>Check the Voucher Details First.</p> <script> $("input").prop('disabled', true); $("select").prop('disabled', true); </script> <?php } ?> </div> </div> <?php } ?> <?php } ?> <h5 class="pull-right" style="font-weight: bold;"> <?php echo ' Transaction Date:' . date('d-m-Y', strtotime($transaction_date_real)); ?> </h5> <h5 class="pull-right" style="font-weight: bold;"> <?php echo ' Wages Month : ' . date("F", mktime(0, 0, 0, $select_month, 10)) . ',' . $select_year; ?> <?php echo 'Payment Date:' . date('d-m-Y', strtotime($date_to)); ?> </h5> <br><br> <center class="table-responsive"> <table id="datatable-checkbox" class="table table-bordered bulk_action result_table" style="text-transform: uppercase;white-space: nowrap;background-color: #fff;"> <thead> <tr style="background-color: coral;"> <th rowspan="2" style='width:1%;'> <input type="checkbox" id="checkall" onclick="check_all(this.checked)"> <!--<input type="checkbox" id="checkall" onclick="check(this.checked)">--> </th> <th rowspan="2" style='width:1%;'>SN</th> <th rowspan="2" style='width:24%;'>Sub Station</th> <th rowspan="2" style='width:24%;'>Employee Name</th> <th rowspan="2" style='width:6%;'>Account No.</th> <!--<th rowspan="2" style='width:15%;'>Account Name</th>--> <th rowspan="2" style='width:10%;'>Bank Name</th> <th rowspan="2" style='width:6%;'>IFSC Code</th> <th rowspan="2" style='width:13%;white-space: initial;'>EMP. STATUS</th> <th colspan="4" style='width:5%;'>Attendence For Salary</th> <th rowspan="2" style='width:5%;'>Basic</th> <th rowspan="2" style='width:5%;'>DA</th> <th rowspan="2" style='width:5%;white-space: initial;'>Gross WAGES</th> <!-- <th colspan="4" style='width:5%;background-color: coral;'>Attendence Detail For EPF</th> <th colspan="5" style='width:4%;background-color: burlywood;'>Employee & Employer Share for EPF</th>--> <!--<th colspan="2" style='width:5%;background-color: darkkhaki;'>ESIC Share</th>--> <th rowspan="2" style='width:5%;white-space: initial;'>Total ESIC <?php echo ($emp_share_esi + $empr_share_esi); ?>%</th> <th rowspan="2" style='width:5%;white-space: initial;'>Total EPF <?php echo ($emp_share_epf + $empr_share_epf_er + $empr_share_epf_eps + $empr_share_epf_edli + $empr_share_epf_ad); ?>%</th> <th rowspan="2" style='width:5%;white-space: initial;'>Gross Total</th> <th rowspan="2" style='width:5%;white-space: initial;'>Less EPF & ESI</th> <th rowspan="2" style='width:13%;white-space: initial;'>Ledger AMOUNT</th> <th rowspan="2" style='width:6%;white-space: initial;'>PAY</th> <th rowspan="2" style='width:2%;'>Other</th> <th rowspan="2" style='width:2%;'>NET PAY</th> <th rowspan="2" style='width:13%;white-space: initial;'>Due Amount</th> <?php if ($salary_status == 'pay_cashier') { ?> <th rowspan="2" style='width:2%;'>Action</th> <?php } ?> <th rowspan="2" style='width:3%;white-space: initial;'>Hold/Release Reason</th> <th rowspan="2" style='width:13%;'>Reason</th> <th rowspan="2" style='width:13%;'>Message</th> </tr> <tr style="background-color: coral;"> <!-- <th style='width:4%;background-color: coral;'>P</th> <th style='width:5%;background-color: coral;'>L</th> <th style='width:5%;background-color: coral;'>A</th> <th style='width:6%;background-color: coral;'>T</th> <th style='width:5%;background-color: burlywood;'>Emp <?php echo $emp_share_epf; ?>%</th> <th style='width:5%;background-color: burlywood;'>ER <?php echo $empr_share_epf_er; ?>%</th> <th style='width:5%;background-color: burlywood;'>EPS <?php echo $empr_share_epf_eps; ?>%</th> <th style='width:5%;background-color: burlywood;'>EDLI <?php echo $empr_share_epf_edli; ?>%</th> <th style='width:5%;background-color: burlywood;'>EPF.AD <?php echo $empr_share_epf_ad; ?>%</th> --> <!--<th style='width:6%;'>Shift</th>--> <th style='width:4%;'>P</th> <th style='width:4%;'>L</th> <th style='width:4%;'>A</th> <th style='width:4%;'>T</th> <!-- <th style='width:5%;background-color: darkkhaki;'>Emp <?php echo $emp_share_esi; ?>%</th> <th style='width:5%;background-color: darkkhaki;'>Empr <?php echo $empr_share_esi; ?>%</th> --> <!--<th style='width:6%;background-color: chocolate;'>Basic Sal</th>--> <!--<th style='width:6%;background-color: chocolate;'>Salary Pay</th>--> </tr> </thead> <tbody> <?php $j = 1; if ($rows_count > 0) { foreach ($result as $row) { $emp_cid = $row['emp_id']; $skilled = $row['emp_category']; $work_type = $row['emp_work_type']; $other_amount = $row['other_amount']; $other_amount_type = $row['other_amount_type']; $working_gross_rs = $row['total_amount']; $working_gross_rs_skilled = $row['total_amount']; $working_gross_rs_semiskilled = $row['total_amount']; $working_gross_rs_unskilled = $row['total_amount']; if ($other_amount_type == 'CREDIT') { $type_short_name = 'CR'; $other_amount_type = 'CREDIT'; $working_gross_other_amount_skilled = ($working_gross_rs_skilled + $other_amount); $working_gross_other_amount_semiskilled = ($working_gross_rs_semiskilled + $other_amount); $working_gross_other_amount_unskilled = ($working_gross_rs_unskilled + $other_amount); $working_gross_plus_other_amount = ($working_gross_rs + $other_amount); } else if ($other_amount_type == 'DEBIT') { $type_short_name = 'DR'; $other_amount_type = 'DEBIT'; $working_gross_other_amount_skilled = ($working_gross_rs_skilled - $other_amount); $working_gross_other_amount_semiskilled = ($working_gross_rs_semiskilled - $other_amount); $working_gross_other_amount_unskilled = ($working_gross_rs_unskilled - $other_amount); $working_gross_plus_other_amount = ($working_gross_rs - $other_amount); } ?> <!--<tr class="tr_<?php echo $j; ?>" id="<?php if ($skilled == 'Skilled') { ?>skilled_row<?php } else if ($skilled == 'Semi Skilled') { ?>semiskilled_row<?php } else if ($skilled == 'Non Skilled') { ?>nonskilled_row<?php } ?>">--> <?php if ($row['emp_status'] == 'emergency') { ?> <tr class="tr_<?php echo $j; ?>" id="emergency_row"> <?php } else { ?> <tr class="tr_<?php echo $j; ?>" id="<?php if ($skilled == 'Skilled') { ?>skilled_row<?php } else if ($skilled == 'Semi Skilled') { ?>semiskilled_row<?php } else if ($skilled == 'Non Skilled') { ?>nonskilled_row<?php } ?>"> <?php } ?> <td> <input type="checkbox" name="checkboxes" id='checkboxes<?php echo $emp_cid; ?>' class='checkboxes' onclick="bulk_user(this.checked)" value="<?php echo $emp_cid; ?>" <?php if ($row['salary_checked_pay'] == 'yes') { ?> checked="" <?php } else { ?> <?php } ?>> <input type="hidden" name="mycheckboxes<?php echo $emp_cid; ?>" class='mycheckboxes' id="mycheckboxes<?php echo $emp_cid; ?>" <?php if ($row['salary_checked_pay'] == 'yes') { ?> value="yes" <?php } else { ?> value="" <?php } ?> > </td> <td> <input type="hidden" name="emp_id<?php echo $emp_cid; ?>" id="emp_id<?php echo $emp_cid; ?>" class="emp_id<?php echo $j; ?>" value="<?php echo $emp_cid; ?>"> <input type="hidden" name="emp_category<?php echo $emp_cid; ?>" id="emp_category<?php echo $emp_cid; ?>" value="<?php echo $skilled; ?>"> <input type="hidden" name="emp_application_status<?php echo $emp_cid; ?>" id="emp_application_status<?php echo $emp_cid; ?>" value="<?php echo $row['application_status']; ?>"> <?php echo $j; ?> </td> <td> <input type="hidden" name="emp_hold_reason<?php echo $emp_cid; ?>" id="emp_hold_reason<?php echo $emp_cid; ?>" value="<?php if ($row['reason'] == '' || $row['reason'] == 'undefined') { echo 'No reason'; } else { echo $row['reason']; } ?>"> <input type="hidden" name="emp_hold_remark<?php echo $emp_cid; ?>" id="emp_hold_remark<?php echo $emp_cid; ?>" value="<?php if ($row['remark'] == '' || $row['reason'] == 'undefined') { echo 'No remark'; } else { echo $row['remark']; } ?>"> <?php $Full_substation = $row['sal_substation']; $work_type_detail = $user->get_work_type_detail($work_type); $work_type_short = $work_type_detail['short_post_name']; echo $work_type_short . ' ' . $Full_substation; ?> </td> <td> <!--<a href="../lists/view_employee_status.php?q=<?php echo $emp_cid; ?>" target="_blank"><?php echo $Full_name = $row['emp_name']; ?></a>--> <a href="../lists/view_employee_status_monthwise.php?q=<?php echo $emp_cid; ?>&month=<?php echo $select_month; ?>&year=<?php echo $select_year; ?>" target="_blank"><?php echo $Full_name = $row['emp_name']; ?></a> <input type="hidden" name="emp_category<?php echo $emp_cid; ?>" id="emp_category<?php echo $emp_cid; ?>" value="<?php echo $skilled; ?>"> </td> <td><?php // echo $row['sal_acc_no']; if ($row['sal_hold_rel_status'] == 'hold' || $row['wages_hold_rel_status'] == 'hold') { $acc_no = substr_replace($row['sal_acc_no'], '7722', -7, 3); } else { // if ($row['emp_status'] == 'accepted' || $row['emp_status'] == 'pro_accepted') { if ($row['emp_status'] == 'accepted' || $row['emp_status'] == 'pro_accepted' || $row['emp_status'] == 'retired' || $row['emp_status'] == 'discharge' || $row['emp_status'] == 'termination') { $acc_no = $row['sal_acc_no']; } else { $acc_no = substr_replace($row['sal_acc_no'], '7722', -7, 3); } } echo $acc_no; ?></td> <td> <?php // echo $row['sal_bank_name']; ?> <?php $sal_bank_name = $row['sal_bank_name']; $str_length = strlen($sal_bank_name); if ($str_length > 22) { echo substr($sal_bank_name, 0, 22) . '.'; } else { echo $sal_bank_name; } ?> </td> <td><?php echo $row['sal_ifsc_code']; ?></td> <td> <?php if ($row['emp_status'] == 'accepted') { ?> <span class="label label-success"> Accepted </span> <?php } else if ($row['emp_status'] == 'unaccepted') { ?> <span class="label label-warning">New</span> <?php } else if ($row['emp_status'] == 'waiting') { ?> <span class="label label-info"> Waiting </span> <?php } else if ($row['emp_status'] == 'rejected') { ?> <span class="label label-default" style="background-color: saddlebrown;color:#fff;"> Hold </span> <?php } else if ($row['emp_status'] == 'deleted') { ?> <span class="label label-danger">Delete</span> <?php } else if ($row['emp_status'] == 'pro_accepted') { ?> <span class="label label-default" style="background-color: forestgreen;color:#fff;">Pro Accepted</span> <?php } else if ($row['emp_status'] == 'extra_emp') { ?> <span class="label label-dark btn-dark"> Extra </span> <?php } else if ($row['emp_status'] == 'emergency') { ?> <span class="label label-dark btn-danger"> Emergency </span> <?php } else if ($row['emp_status'] == 'retired') { ?> <span class="label btn-default" style="background-color: hotpink;color:#fff;"> Retired </span> <?php } else if ($row['emp_status'] == 'termination') { ?> <span class="label label-default" style="background-color: darkmagenta;color:#fff;">Terminated</span> <?php } else if ($row['emp_status'] == 'discharge') { ?> <span class="label label-default" style="background-color: sandybrown;color:#fff;">Discharged</span> <?php } ?> </td> <td style="display: none;"> <select name="work_shift<?php echo $emp_cid; ?>" id="work_shift<?php echo $emp_cid; ?>" class="form-dropdown form-control" style="text-transform:uppercase;width: 100px!important;" required=""> <option value="" >-Shift-</option> <option value="Morning" <?php $shift = $row['shift']; if ($shift == 'Morning') { echo 'selected'; } ?>>Morning</option> <option value="Evening" <?php if ($shift == 'Evening') { echo 'selected'; } ?>>Evening</option> <option value="Night" <?php if ($shift == 'Night') { echo 'selected'; } ?>>Night</option> <option value="Backup" <?php if ($shift == 'Backup') { echo 'selected'; } ?>>Backup/Other</option> </select> </td> <td style="text-align: center;"> <input type="hidden" id="present_days_sal<?php echo $emp_cid; ?>" name="present_days_sal<?php echo $emp_cid; ?>" class="form-control present_days present_days_sal" style="width:40;height:25px;" onkeyup="get_total_days_sal('<?php echo $emp_cid; ?>', '<?php echo $j; ?>')" value="<?php echo $row['present_days']; ?>" placeholder="Set Attendence" ><?php echo $row['present_days']; ?></td> <td style="text-align: center;"> <input type="hidden" id="leave_days_sal<?php echo $emp_cid; ?>" name="leave_days_sal<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" onkeyup="get_total_days_sal('<?php echo $emp_cid; ?>', '<?php echo $j; ?>')" value="<?php echo $row['leave_sal_days']; ?>" placeholder="Set Attendence" ><?php echo $row['leave_sal_days']; ?></td> <td style="text-align: center;"> <input type="hidden" id="absent_days_sal<?php echo $emp_cid; ?>" name="absent_days_sal<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" value="<?php echo $row['absent_sal_days']; ?>" placeholder="Set Attendence" readonly=""><?php echo $row['absent_sal_days']; ?></td> <td style="text-align: center;"> <input type="hidden" id="no_of_days_sal<?php echo $emp_cid; ?>" name="no_of_days_sal<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" value="<?php echo $row['total_sal_days']; ?>" placeholder="Set Attendence" readonly=""><?php echo $row['total_sal_days']; ?></td> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="basic_salary_skilled<?php echo $emp_cid; ?>" id="basic_salary_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['basic_salary']; ?>"> <span><?php echo $row['basic_salary']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="da_skilled<?php echo $emp_cid; ?>" id="da_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['da']; ?>"> <span><?php echo $row['da']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="total_gross_wages<?php echo $emp_cid; ?>" id="total_gross_wages<?php echo $emp_cid; ?>" value="<?php echo $row['gross_salary']; ?>"> <span id="total_gross_wages"><?php echo $row['gross_salary']; ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="basic_salary_semiskilled<?php echo $emp_cid; ?>" id="basic_salary_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['basic_salary']; ?>"> <span><?php echo $row['basic_salary']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="da_semiskilled<?php echo $emp_cid; ?>" id="da_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['da']; ?>"> <span><?php echo $row['da']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="total_gross_wages<?php echo $emp_cid; ?>" id="total_gross_wages<?php echo $emp_cid; ?>" value="<?php echo $row['gross_salary']; ?>"> <span id="total_gross_wages"> <?php echo $row['gross_salary']; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="basic_salary_unskilled<?php echo $emp_cid; ?>" id="basic_salary_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['basic_salary']; ?>"> <span><?php echo $row['basic_salary']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="da_unskilled<?php echo $emp_cid; ?>" id="da_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['da']; ?>"> <span><?php echo $row['da']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="total_gross_wages<?php echo $emp_cid; ?>" id="total_gross_wages<?php echo $emp_cid; ?>" value="<?php echo $row['gross_salary']; ?>"> <span id="total_gross_wages"> <?php echo $row['gross_salary']; ?></span> </td> <?php } ?> <!-- <td> <input type="text" id="present_days_epf<?php echo $emp_cid; ?>" name="present_days_epf<?php echo $emp_cid; ?>" class="form-control present_days_epf" style="width:40;height:25px;" onkeyup="get_total_days_epf('<?php echo $emp_cid; ?>', '<?php echo $j; ?>')" value="<?php echo $row['present_days_epf']; ?>" placeholder="Set Attendence" ></td> <td> <input type="text" id="leave_days_epf<?php echo $emp_cid; ?>" name="leave_days_epf<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" onkeyup="get_total_days_epf('<?php echo $emp_cid; ?>', '<?php echo $j; ?>')" value="<?php echo $row['leave_days_epf']; ?>" placeholder="Set Attendence" ></td> <td> <input type="text" id="absent_days_epf<?php echo $emp_cid; ?>" name="absent_days_epf<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" value="<?php echo $row['absent_days_epf']; ?>" placeholder="Set Attendence" readonly=""></td> <td> <input type="text" id="no_of_days_epf<?php echo $emp_cid; ?>" name="no_of_days_epf<?php echo $emp_cid; ?>" class="form-control" style="width:40;height:25px;" value="<?php echo $row['total_epf_days']; ?>" placeholder="Set Attendence" readonly=""></td>--> <?php if ($skilled == 'Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_epf_skilled<?php echo $emp_cid; ?>" class="empshare_epf_skilled" id="empshare_epf_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_epf_rs']; ?>"> <span id="emp_share_epf_skilled<?php echo $emp_cid; ?>" name="emp_share_epf_skilled<?php echo $emp_cid; ?>" class="emp_share_epf_skilled"><?php echo $row['emp_share_epf_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_er_skilled<?php echo $emp_cid; ?>" class="emprshare_epf_er_skilled" id="emprshare_epf_er_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_er_rs']; ?>"> <span id="empr_share_epf_er_skilled<?php echo $emp_cid; ?>" name="empr_share_epf_er_skilled<?php echo $emp_cid; ?>" class="empr_share_epf_er_skilled"><?php echo $row['empr_share_epf_er_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_eps_skilled<?php echo $emp_cid; ?>" class="emprshare_epf_eps_skilled" id="emprshare_epf_eps_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_eps_rs']; ?>"> <span id="empr_share_epf_eps_skilled<?php echo $emp_cid; ?>" name="empr_share_epf_eps_skilled<?php echo $emp_cid; ?>" class="empr_share_epf_eps_skilled"><?php echo $row['empr_share_epf_eps_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_edli_skilled<?php echo $emp_cid; ?>" class="emprshare_epf_edli_skilled" id="emprshare_epf_edli_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_edli_rs']; ?>"> <span id="empr_share_epf_edli_skilled<?php echo $emp_cid; ?>" name="empr_share_epf_edli_skilled<?php echo $emp_cid; ?>" class="empr_share_epf_edli_skilled"><?php echo $row['empr_share_epf_edli_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_ad_skilled<?php echo $emp_cid; ?>" class="emprshare_epf_ad_skilled" id="emprshare_epf_ad_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_ad_rs']; ?>"> <span id="empr_share_epf_ad_skilled<?php echo $emp_cid; ?>" name="empr_share_epf_ad_skilled<?php echo $emp_cid; ?>" class="empr_share_epf_ad_skilled"><?php echo $row['empr_share_epf_ad_rs']; ?></span> </td>--> <?php } else if ($skilled == 'Semi Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_epf_semiskilled<?php echo $emp_cid; ?>" class="empshare_epf_semiskilled" id="empshare_epf_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_epf_rs']; ?>"> <span id="emp_share_epf_semiskilled<?php echo $emp_cid; ?>" name="emp_share_epf_semiskilled<?php echo $emp_cid; ?>" class="emp_share_epf_semiskilled"><?php echo $row['emp_share_epf_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_er_semiskilled<?php echo $emp_cid; ?>" class="emprshare_epf_er_semiskilled" id="emprshare_epf_er_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_er_rs']; ?>"> <span id="empr_share_epf_er_semiskilled<?php echo $emp_cid; ?>" name="empr_share_epf_er_semiskilled<?php echo $emp_cid; ?>" class="empr_share_epf_er_semiskilled">0.00</span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_eps_semiskilled<?php echo $emp_cid; ?>" class="emprshare_epf_eps_semiskilled" id="emprshare_epf_eps_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_eps_rs']; ?>"> <span id="empr_share_epf_eps_semiskilled<?php echo $emp_cid; ?>" name="empr_share_epf_eps_semiskilled<?php echo $emp_cid; ?>" class="empr_share_epf_eps_semiskilled"><?php echo $row['empr_share_epf_eps_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_edli_semiskilled<?php echo $emp_cid; ?>" class="emprshare_epf_edli_semiskilled" id="emprshare_epf_edli_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_edli_rs']; ?>"> <span id="empr_share_epf_edli_semiskilled<?php echo $emp_cid; ?>" name="empr_share_epf_edli_semiskilled<?php echo $emp_cid; ?>" class="empr_share_epf_edli_semiskilled"><?php echo $row['empr_share_epf_edli_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_ad_semiskilled<?php echo $emp_cid; ?>" class="emprshare_epf_ad_semiskilled" id="emprshare_epf_ad_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_ad_rs']; ?>"> <span id="empr_share_epf_ad_semiskilled<?php echo $emp_cid; ?>" name="empr_share_epf_ad_semiskilled<?php echo $emp_cid; ?>" class="empr_share_epf_ad_semiskilled"><?php echo $row['empr_share_epf_ad_rs']; ?></span> </td> --> <?php } else if ($skilled == 'Non Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_epf_unskilled<?php echo $emp_cid; ?>" class="empshare_epf_unskilled" id="empshare_epf_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_epf_rs']; ?>"> <span id="emp_share_epf_unskilled<?php echo $emp_cid; ?>" name="emp_share_epf_unskilled<?php echo $emp_cid; ?>" class="emp_share_epf_unskilled"><?php echo $row['emp_share_epf_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_er_unskilled<?php echo $emp_cid; ?>" class="emprshare_epf_er_unskilled" id="emprshare_epf_er_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_er_rs']; ?>"> <span id="empr_share_epf_er_unskilled<?php echo $emp_cid; ?>" name="empr_share_epf_er_unskilled<?php echo $emp_cid; ?>" class="empr_share_epf_er_unskilled"><?php echo $row['empr_share_epf_er_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_eps_unskilled<?php echo $emp_cid; ?>" class="emprshare_epf_eps_unskilled" id="emprshare_epf_eps_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_eps_rs']; ?>"> <span id="empr_share_epf_eps_unskilled<?php echo $emp_cid; ?>" name="empr_share_epf_eps_unskilled<?php echo $emp_cid; ?>" class="empr_share_epf_eps_unskilled"><?php echo $row['empr_share_epf_eps_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_edli_unskilled<?php echo $emp_cid; ?>" class="emprshare_epf_edli_unskilled" id="emprshare_epf_edli_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_edli_rs']; ?>"> <span id="empr_share_epf_edli_unskilled<?php echo $emp_cid; ?>" name="empr_share_epf_edli_unskilled<?php echo $emp_cid; ?>" class="empr_share_epf_edli_unskilled"><?php echo $row['empr_share_epf_edli_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_epf_ad_unskilled<?php echo $emp_cid; ?>" class="emprshare_epf_ad_unskilled" id="emprshare_epf_ad_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_epf_ad_rs']; ?>"> <span id="empr_share_epf_ad_unskilled<?php echo $emp_cid; ?>" name="empr_share_epf_ad_unskilled<?php echo $emp_cid; ?>" class="empr_share_epf_ad_unskilled"><?php echo $row['empr_share_epf_ad_rs']; ?></span> </td>--> <?php } ?> <!-- <td> <input type="text" id="present_days<?php echo $emp_cid; ?>" name="present_days<?php echo $emp_cid; ?>" class="form-control present_days" style="width:40;height:25px;" onkeyup="calculate(<?php echo $emp_cid; ?>);" value="<?php echo $present_sal; ?>" placeholder="Set Attendence" ></td> <td> <input type="text" id="present_days<?php echo $emp_cid; ?>" name="present_days<?php echo $emp_cid; ?>" class="form-control present_days" style="width:40;height:25px;" onkeyup="calculate(<?php echo $emp_cid; ?>);" value="<?php echo $leave_sal; ?>" placeholder="Set Attendence" ></td> <td> <input type="text" id="present_days<?php echo $emp_cid; ?>" name="present_days<?php echo $emp_cid; ?>" class="form-control present_days" style="width:40;height:25px;" onkeyup="calculate(<?php echo $emp_cid; ?>);" value="<?php echo $absent_sal; ?>" placeholder="Set Attendence" ></td> <td> <input type="text" id="present_days<?php echo $emp_cid; ?>" name="present_days<?php echo $emp_cid; ?>" class="form-control present_days" style="width:40;height:25px;" onkeyup="calculate(<?php echo $emp_cid; ?>);" value="<?php echo $total_days_sal; ?>" placeholder="Set Attendence" ></td>--> <?php if ($skilled == 'Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_esi_skilled<?php echo $emp_cid; ?>" class="empshare_esi_skilled" id="empshare_esi_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_esi_rs']; ?>"> <span id="emp_share_esi_skilled<?php echo $emp_cid; ?>" name="emp_share_esi_skilled<?php echo $emp_cid; ?>" class="emp_share_esi_skilled"><?php echo $row['emp_share_esi_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_esi_skilled<?php echo $emp_cid; ?>" class="emprshare_esi_skilled" id="emprshare_esi_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_esi_rs']; ?>"> <span id="empr_share_esi_skilled<?php echo $emp_cid; ?>" name="empr_share_esi_skilled<?php echo $emp_cid; ?>" class="empr_share_esi_skilled"><?php echo $row['empr_share_esi_rs']; ?></span> </td> --> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_esi_skilled<?php echo $emp_cid; ?>" class="totalshare_esi_skilled" id="totalshare_esi_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_esi_rs']; ?>"> <span id="total_share_esi_skilled<?php echo $emp_cid; ?>" name="total_share_esi_skilled<?php echo $emp_cid; ?>" class="total_share_esi_skilled"><?php echo $row['total_share_esi_rs']; ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_esi_semiskilled<?php echo $emp_cid; ?>" class="empshare_esi_semiskilled" id="empshare_esi_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_esi_rs']; ?>"> <span id="emp_share_esi_semiskilled<?php echo $emp_cid; ?>" name="emp_share_esi_semiskilled<?php echo $emp_cid; ?>" class="emp_share_esi_semiskilled"><?php echo $row['emp_share_esi_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_esi_semiskilled<?php echo $emp_cid; ?>" class="emprshare_esi_semiskilled" id="emprshare_esi_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_esi_rs']; ?>"> <span id="empr_share_esi_semiskilled<?php echo $emp_cid; ?>" name="empr_share_esi_semiskilled<?php echo $emp_cid; ?>" class="empr_share_esi_semiskilled"><?php echo $row['empr_share_esi_rs']; ?></span> </td> --> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_esi_semiskilled<?php echo $emp_cid; ?>" class="totalshare_esi_semiskilled" id="totalshare_esi_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_esi_rs']; ?>"> <span id="total_share_esi_semiskilled<?php echo $emp_cid; ?>" name="total_share_esi_semiskilled<?php echo $emp_cid; ?>" class="total_share_esi_semiskilled"><?php echo $row['total_share_esi_rs']; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="empshare_esi_unskilled<?php echo $emp_cid; ?>" class="empshare_esi_unskilled" id="empshare_esi_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['emp_share_esi_rs']; ?>"> <span id="emp_share_esi_unskilled<?php echo $emp_cid; ?>" name="emp_share_esi_unskilled<?php echo $emp_cid; ?>" class="emp_share_esi_unskilled"><?php echo $row['emp_share_esi_rs']; ?></span> </td> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="emprshare_esi_unskilled<?php echo $emp_cid; ?>" class="emprshare_esi_unskilled" id="emprshare_esi_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['empr_share_esi_rs']; ?>"> <span id="empr_share_esi_unskilled<?php echo $emp_cid; ?>" name="empr_share_esi_unskilled<?php echo $emp_cid; ?>" class="empr_share_esi_unskilled"><?php echo $row['empr_share_esi_rs']; ?></span> </td>--> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_esi_unskilled<?php echo $emp_cid; ?>" class="totalshare_esi_unskilled" id="totalshare_esi_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_esi_rs']; ?>"> <span id="total_share_esi_unskilled<?php echo $emp_cid; ?>" name="total_share_esi_unskilled<?php echo $emp_cid; ?>" class="total_share_esi_unskilled"><?php echo $row['total_share_esi_rs']; ?></span> </td> <?php } ?> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_epf_skilled<?php echo $emp_cid; ?>" class="totalshare_epf_skilled" id="totalshare_epf_skilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_epf_rs']; ?>"> <span id="total_share_epf_skilled<?php echo $emp_cid; ?>" name="total_share_epf_skilled<?php echo $emp_cid; ?>" class="total_share_epf_skilled"><?php echo $row['total_share_epf_rs']; ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_epf_semiskilled<?php echo $emp_cid; ?>" class="totalshare_epf_semiskilled" id="totalshare_epf_semiskilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_epf_rs']; ?>"> <span id="total_share_epf_semiskilled<?php echo $emp_cid; ?>" name="total_share_epf_semiskilled<?php echo $emp_cid; ?>" class="total_share_epf_semiskilled"><?php echo $row['total_share_epf_rs']; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="totalshare_epf_unskilled<?php echo $emp_cid; ?>" class="totalshare_epf_unskilled" id="totalshare_epf_unskilled<?php echo $emp_cid; ?>" value="<?php echo $row['total_share_epf_rs']; ?>"> <span id="total_share_epf_unskilled<?php echo $emp_cid; ?>" name="total_share_epf_unskilled<?php echo $emp_cid; ?>" class="total_share_epf_unskilled"><?php echo $row['total_share_epf_rs']; ?></span> </td> <?php } ?> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="grossepf_esi_skilled<?php echo $emp_cid; ?>" id="grossepf_esi_skilled<?php echo $emp_cid; ?>" class="grossepf_esi_skilled" value="<?php echo $row['total_wages_epf_esi']; ?>"> <span name="gross_epf_esi_skilled<?php echo $emp_cid; ?>" id="gross_epf_esi_skilled<?php echo $emp_cid; ?>" class="gross_epf_esi_skilled"><?php echo $row['total_wages_epf_esi']; ?></span> <!-- </td> --> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="grossepf_esi_semiskilled<?php echo $emp_cid; ?>" id="grossepf_esi_semiskilled<?php echo $emp_cid; ?>" class="grossepf_esi_semiskilled" value="<?php echo $row['total_wages_epf_esi']; ?>"> <span name="gross_epf_esi_semiskilled<?php echo $emp_cid; ?>" id="gross_epf_esi_semiskilled<?php echo $emp_cid; ?>" class="gross_epf_esi_semiskilled"><?php echo $row['total_wages_epf_esi']; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="grossepf_esi_unskilled<?php echo $emp_cid; ?>" id="grossepf_esi_unskilled<?php echo $emp_cid; ?>" class="grossepf_esi_unskilled" value="<?php echo $row['total_wages_epf_esi']; ?>"> <span name="gross_epf_esi_unskilled<?php echo $emp_cid; ?>" id="gross_epf_esi_unskilled<?php echo $emp_cid; ?>" class="gross_epf_esi_unskilled"><?php echo $row['total_wages_epf_esi']; ?></span> </td> <?php } ?> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="g_minus_empshare_skilled<?php echo $emp_cid; ?>" id="g_minus_empshare_skilled<?php echo $emp_cid; ?>" class="g_minus_empshare_skilled" value="<?php echo $row['deducted_wages_epf_esi']; ?>"> <span name="gross_minus_empshare_skilled<?php echo $emp_cid; ?>" id="gross_minus_empshare_skilled<?php echo $emp_cid; ?>" class="gross_minus_empshare_skilled"><?php echo $row['deducted_wages_epf_esi']; ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="g_minus_empshare_semiskilled<?php echo $emp_cid; ?>" id="g_minus_empshare_semiskilled<?php echo $emp_cid; ?>" class="g_minus_empshare_semiskilled" value="<?php echo $row['deducted_wages_epf_esi']; ?>"> <span name="gross_minus_empshare_semiskilled<?php echo $emp_cid; ?>" id="gross_minus_empshare_semiskilled<?php echo $emp_cid; ?>" class="gross_minus_empshare_semiskilled"><?php echo $row['deducted_wages_epf_esi']; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="g_minus_empshare_unskilled<?php echo $emp_cid; ?>" id="g_minus_empshare_unskilled<?php echo $emp_cid; ?>" class="gross_minus_empshare_unskilled" value="<?php echo $row['deducted_wages_epf_esi']; ?>"> <span name="gross_minus_empshare_unskilled<?php echo $emp_cid; ?>" id="gross_minus_empshare_unskilled<?php echo $emp_cid; ?>" class="gross_minus_empshare_unskilled"><?php echo $row['deducted_wages_epf_esi']; ?></span> </td> <?php } ?> <?php if ($skilled == 'Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="bsalary_skilled<?php echo $emp_cid; ?>" id="bsalary_skilled<?php echo $emp_cid; ?>" class="bsalary_skilled"> <span name="basic_salary_skilled<?php echo $emp_cid; ?>" id="basic_salary_skilled<?php echo $emp_cid; ?>" class="basic_salary_skilled">0.00</span> </td> --> <?php } else if ($skilled == 'Semi Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="bsalary_semiskilled<?php echo $emp_cid; ?>" id="bsalary_semiskilled<?php echo $emp_cid; ?>" class="bsalary_semiskilled"> <span name="basic_salary_semiskilled<?php echo $emp_cid; ?>" id="basic_salary_semiskilled<?php echo $emp_cid; ?>" class="basic_salary_semiskilled">0.00</span> </td> --> <?php } else if ($skilled == 'Non Skilled') { ?> <!-- <td style="text-align:right;padding-right:.5%;"> <input type="hidden" name="bsalary_unskilled<?php echo $emp_cid; ?>" id="bsalary_unskilled<?php echo $emp_cid; ?>" class="bsalary_unskilled"> <span name="basic_salary_unskilled<?php echo $emp_cid; ?>" id="basic_salary_unskilled<?php echo $emp_cid; ?>" class="basic_salary_unskilled">0.00</span> </td> --> <?php } ?> <td style="text-align:right;"><span id="led_bal<?php echo $emp_cid; ?>"> <?php // $ledger_details = $user->get_ledger_details($emp_cid); $ledger_details = $user->get_ledger_details_salary($emp_cid); $credit_balance = $ledger_details['credit_balance']; $debit_balance = $ledger_details['debit_balance']; // echo $payable_balance=$credit_balance+$debit_balance; $payable_balance = $ledger_details['payable_balance']; // echo $total_payable_balance = ($payable_balance + $row['total_amount']); echo $total_payable_balance = $payable_balance; if ($total_payable_balance > 0) { echo ' Cr'; } else { echo ' Dr'; } ?> </span> <input type="hidden" name="led_bal_input<?php echo $emp_cid; ?>" class="led_bal_input form-control" id="led_bal_input<?php echo $emp_cid; ?>" value="<?php echo $total_payable_balance; ?>" style="width:70px;"> </td> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="text" name="working_gross<?php echo $emp_cid; ?>" class="wg_skilled wg_gross wg_gross<?php echo $emp_cid; ?> form-control" id="wg_skilled<?php echo $emp_cid; ?>" onkeyup="calculateTotal(this, '<?php echo $emp_cid; ?>', '<?php echo $j; ?>', '<?php echo $skilled; ?>')" value="<?php echo $row['total_amount']; ?>" style="width:70px;font-weight: bold;text-align:right;" > <!--<span id="working_gross_skilled<?php echo $emp_cid; ?>" name="working_gross_skilled<?php echo $emp_cid; ?>" class="working_gross_skilled"><?php echo $row['total_amount']; ?></span>--> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="text" name="working_gross<?php echo $emp_cid; ?>" class="wg_semiskilled wg_gross wg_gross<?php echo $emp_cid; ?> form-control" id="wg_semiskilled<?php echo $emp_cid; ?>" onkeyup="calculateTotal(this, '<?php echo $emp_cid; ?>', '<?php echo $j; ?>', '<?php echo $skilled; ?>')" value="<?php echo $row['total_amount']; ?>" style="width:70px;font-weight: bold;text-align:right;"> <!--<span id="working_gross_semiskilled<?php echo $emp_cid; ?>" name="working_gross_semiskilled<?php echo $emp_cid; ?>" class="working_gross_semiskilled"><?php echo $row['total_amount']; ?></span>--> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;padding-right:.5%;"> <input type="text" name="working_gross<?php echo $emp_cid; ?>" class="wg_unskilled wg_gross wg_gross<?php echo $emp_cid; ?> form-control" id="wg_unskilled<?php echo $emp_cid; ?>" onkeyup="calculateTotal(this, '<?php echo $emp_cid; ?>', '<?php echo $j; ?>', '<?php echo $skilled; ?>')" value="<?php echo $row['total_amount']; ?>" style="width:70px;font-weight: bold;text-align:right;"> <!--<span id="working_gross_unskilled<?php echo $emp_cid; ?>" name="working_gross_unskilled<?php echo $emp_cid; ?>" class="working_gross_unskilled"><?php echo $row['total_amount']; ?></span>--> </td> <?php } ?> <?php if ($row['salary_checked_pay'] == 'yes') { $t_net_pay .= $row['total_amount'] . "+"; } else { } ?> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="other_amount_type_skilled_<?php echo $emp_cid; ?>" class="other_amount_type other_amount_type_<?php echo $emp_cid; ?> form-control" id="other_amount_type_skilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" value="<?php echo $other_amount_type; ?>"> <input type="hidden" name="other_amount_skilled_<?php echo $emp_cid; ?>" class="other_amount other_amount_<?php echo $emp_cid; ?> form-control" id="other_amount_skilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" onkeyup="do_other_cal(<?php echo $kk; ?>)" value="<?php echo sprintf('%.2f', $other_amount); ?>"> <span id="other_amount_skilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $other_amount) . ' ' . $type_short_name; ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="other_amount_type_semiskilled_<?php echo $emp_cid; ?>" class="other_amount_type other_amount_type_<?php echo $emp_cid; ?> form-control" id="other_amount_type_skilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" value="<?php echo $other_amount_type; ?>"> <input type="hidden" name="other_amount_semiskilled_<?php echo $emp_cid; ?>" class="other_amount other_amount_<?php echo $emp_cid; ?> form-control" id="other_amount_semiskilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" onkeyup="do_other_cal(<?php echo $kk; ?>)" value="<?php echo sprintf('%.2f', $other_amount); ?>"> <span id="other_amount_semiskilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $other_amount) . ' ' . $type_short_name; ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="other_amount_type_unskilled_<?php echo $emp_cid; ?>" class="other_amount_type other_amount_type_<?php echo $emp_cid; ?> form-control" id="other_amount_type_unskilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" value="<?php echo $other_amount_type; ?>"> <input type="hidden" name="other_amount_unskilled_<?php echo $emp_cid; ?>" class="other_amount other_amount_<?php echo $emp_cid; ?> form-control" id="other_amount_unskilled_<?php echo $emp_cid; ?>" style="width:70px;text-align:right;" onkeyup="do_other_cal(<?php echo $kk; ?>)" value="<?php echo sprintf('%.2f', $other_amount); ?>"> <span id="other_amount_unskilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $other_amount) . ' ' . $type_short_name; ?></span> </td> <?php } ?> <?php if ($skilled == 'Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="working_gross_other_amount_skilled_<?php echo $emp_cid; ?>" class="working_gross_other_amount working_gross_other_amount_<?php echo $emp_cid; ?> form-control" id="working_gross_other_amount_skilled_<?php echo $emp_cid; ?>" style="width:70px;" value="<?php echo sprintf('%.2f', $working_gross_other_amount_skilled); ?>"> <span id="working_gross_other_amount_skilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $working_gross_other_amount_skilled); ?></span> </td> <?php } else if ($skilled == 'Semi Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="working_gross_other_amount_semiskilled_<?php echo $emp_cid; ?>" class="working_gross_other_amount working_gross_other_amount_<?php echo $emp_cid; ?> form-control" id="working_gross_other_amount_semiskilled_<?php echo $emp_cid; ?>" style="width:70px;" value="<?php echo sprintf('%.2f', $working_gross_other_amount_semiskilled); ?>"> <span id="working_gross_other_amount_semiskilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $working_gross_other_amount_semiskilled); ?></span> </td> <?php } else if ($skilled == 'Non Skilled') { ?> <td style="text-align:right;"> <input type="hidden" name="working_gross_other_amount_unskilled_<?php echo $emp_cid; ?>" class="working_gross_other_amount working_gross_other_amount_<?php echo $emp_cid; ?> form-control" id="working_gross_other_amount_unskilled_<?php echo $emp_cid; ?>" style="width:70px;" value="<?php echo sprintf('%.2f', $working_gross_other_amount_unskilled); ?>"> <span id="working_gross_other_amount_unskilled_span_<?php echo $emp_cid; ?>"><?php echo sprintf('%.2f', $working_gross_other_amount_unskilled); ?></span> </td> <?php } ?> <td style="text-align: right"> <span id="led_bal_payable<?php echo $emp_cid; ?>"><?php $remaining_payable_balance = ($total_payable_balance - $working_gross_plus_other_amount); echo $remaining_payable_balance = number_format($remaining_payable_balance, 2); ?></span> <span id="led_bal_type<?php echo $emp_cid; ?>"><?php if ($remaining_payable_balance >= 0) { echo ' Cr'; } else { echo ' Dr'; } ?> </span> <input type="hidden" name="led_bal_payable_input<?php echo $emp_cid; ?>" class="led_bal_payable_input form-control" id="led_bal_payable_input<?php echo $emp_cid; ?>" value="<?php echo $remaining_payable_balance; ?>" style="width:70px;"> </td> <!-- <td> <button class="btn btn-xs btn-Primary save_btn_disabled save_btn_<?php echo $j; ?>" id="save_btn_<?php echo $emp_cid; ?>" name="save_btn" onclick="add_emp_salary('<?php echo $j; ?>', '<?php echo $emp_cid; ?>')" style="margin-top: 5;" disabled="disabled">SAVE</button> <button class="btn btn-xs btn-success approve_btn_<?php echo $j; ?>" id="approve_btn_<?php echo $emp_cid; ?>" name="approve_btn" style="margin-top: 5;">CHECK</button> <button class="btn btn-xs btn-danger reject_btn_<?php echo $j; ?>" id="reject_btn_<?php echo $emp_cid; ?>" name="reject_btn" style="margin-top: 5;">REJECT</button> </td>--> <?php if ($salary_status == 'pay_cashier') { ?> <td id="hold_rel_td<?php echo $emp_cid; ?>"> <?php if ($row['sal_hold_rel_status'] == 'hold') { ?> <!--<button class="btn btn-xs btn-Success" id="sal_rel_btn_<?php echo $emp_cid; ?>" name="sal_rel_btn" onclick="hold_rel_salary('<?php echo $j; ?>', '<?php echo $emp_cid; ?>', 'release')" style="margin-top: 5;">RELEASE</button>--> <button class="btn btn-xs btn-Success sal_rel_btn" id="sal_rel_btn_<?php echo $emp_cid; ?>" name="sal_rel_btn" style="margin-top: 5;" value="<?php echo $emp_cid; ?>" value="<?php echo $emp_cid; ?>">RELEASE</button> <?php } else { ?> <!--<button class="btn btn-xs btn-default" id="sal_hold_btn_<?php echo $emp_cid; ?>" name="sal_hold_btn" onclick="hold_rel_salary('<?php echo $j; ?>', '<?php echo $emp_cid; ?>', 'hold')" style="margin-top: 5;background-color: brown;color:#fff;">HOLD</button>--> <button class="btn btn-xs btn-default sal_hold_btn" id="sal_hold_btn_<?php echo $emp_cid; ?>" name="sal_hold_btn" style="margin-top: 5;background-color: brown;color:#fff;" value="<?php echo $emp_cid; ?>">HOLD</button> <?php } ?> <!--<button class="btn btn-xs btn-Primary save_btn_disabled save_btn_<?php echo $j; ?>" id="save_btn_<?php echo $emp_cid; ?>" name="save_btn" onclick="add_emp_salary('<?php echo $j; ?>', '<?php echo $emp_cid; ?>')" style="margin-top: 5;" disabled="disabled">SAVE</button>--> </td> <?php } ?> <td><span id="hold_rel_reason<?php echo $emp_cid; ?>"><?php // echo $row['hold_rel_reason']; ?> <?php if ($row['pay_checked_reason'] != '') { echo $row['pay_checked_reason']; } else if ($row['pay_approved_reason'] != '') { echo $row['pay_approved_reason']; } else if ($row['pay_cashier_reason'] != '') { echo $row['pay_cashier_reason']; } else if ($row['pay_approved_reason'] != '') { echo $row['pay_approved_reason']; } else if ($row['sal_hold_reason'] != '') { echo $row['sal_hold_reason']; } ?> </span></td> <td><span id="uncheck_reason<?php echo $emp_cid; ?>"><?php echo $row['pay_cashier_reason']; ?></span></td> <td><span id="result_message<?php echo $emp_cid; ?>"></span></td> </tr> <div class="modal fade" id="add_reason_remark_for_uncheck<?php echo $emp_cid; ?>" data-backdrop="static" data-keyboard="false" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h5 class="modal-title" style="text-align: left;">Add Reason For Not Generating Wages</h5> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Employee Name : <?php echo $row['emp_name']; ?></p> <!--<form method="post">--> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Reason</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="reason_uncheck<?php echo $emp_cid; ?>" id="reason_uncheck<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Reason" required1=""> </div> </div> </div> <br> <!-- <br> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Remark</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="remark_less_adv_ind<?php echo $emp_cid; ?>" id="remark_less_adv_ind<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Remark" required1=""> </div> </div> </div> --> <!--</form>--> </div><br> <div class="modal-footer"> <button class="btn btn-danger btn-xs" style="background-color: #c9302c;" onclick="check_input_value('<?php echo $emp_cid; ?>', 'uncheck')">Add</button> </div> </div> </div> </div> <div class="modal fade" id="add_reason_remark_for_check<?php echo $emp_cid; ?>" data-backdrop="static" data-keyboard="false" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h5 class="modal-title" style="text-align: left;">Add Reason For Generating Wages</h5> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Employee Name : <?php echo $row['emp_name']; ?></p> <!--<form method="post">--> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Reason</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="reason_check<?php echo $emp_cid; ?>" id="reason_check<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Reason" required1=""> </div> </div> </div> <br> <!-- <br> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Remark</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="remark_less_adv_ind<?php echo $emp_cid; ?>" id="remark_less_adv_ind<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Remark" required1=""> </div> </div> </div> --> <!--</form>--> </div><br> <div class="modal-footer"> <button class="btn btn-danger btn-xs" style="background-color: #c9302c;" onclick="check_input_value('<?php echo $emp_cid; ?>', 'check')">Add</button> </div> </div> </div> </div> <div class="modal fade" id="add_reason_remark_for_hold_release<?php echo $emp_cid; ?>" data-backdrop="static" data-keyboard="false" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background-color:peru;color: #fff"> <button type="button" class="close" data-dismiss="modal">×</button> <h5 class="modal-title" style="text-align: left;">Add Reason For Hold/Release Salary</h5> </div> <div class="modal-body"> <p style="font-size: 14px;color:peru;">Employee Name : <?php echo $row['emp_name']; ?></p> <!--<form method="post">--> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Reason</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="reason_hold_rel<?php echo $emp_cid; ?>" id="reason_hold_rel<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Reason" required1=""> </div> </div> </div> <br> <!-- <br> <div class="form-group"> <label class="control-label col-md-2 col-sm-2 col-xs-4">Remark</label> <div class=" col-md-9 col-sm-9 col-xs-8"> <div class="form-input"> <input type="text" name="remark_less_adv_ind<?php echo $emp_cid; ?>" id="remark_less_adv_ind<?php echo $emp_cid; ?>" class="form-control" placeholder="Set Remark" required1=""> </div> </div> </div> --> <!--</form>--> </div><br> <div class="modal-footer"> <button class="btn btn-danger btn-xs" style="background-color: #c9302c;" id="add_btn<?php echo $emp_cid; ?>" onclick="hold_rel_salary('<?php echo $j; ?>', '<?php echo $emp_cid; ?>', this.value)">Add</button> </div> </div> </div> </div> <?php $j++; } ?> <?php } else { ?> <tr> <td colspan="27" style="text-align:center;">No Record Found</td> </tr> <?php } ?> </tbody> <tfoot> <tr style="color:#000;"> <?php $t_net_pay1 = (explode("+", $t_net_pay)); $arr_num = array_sum($t_net_pay1); $total_net_pay = number_format($arr_num, 2, '.', ''); $total_net_pay_words = $user->getIndianCurrency($total_net_pay); ?> <th colspan="20" style="text-align:right;" class="total_net_pay_words">TOTAL NET PAY( <?php echo $total_net_pay_words; ?> )</th> <th colspan="1" style="text-align:center;" class="total_net_pay"> <?php echo $total_net_pay; ?> </th> <th colspan="1" style="text-align:right;" class="total_other_amount">0.00</th> <th colspan="1" style="text-align:right;" class="total_net_pay_plus_other_amount">0.00</th> <?php if ($salary_status == 'pay_cashier') { ?> <th colspan="1"></th> <?php } ?> <th colspan="4"></th> </tr> </tfoot> </table> </center> </div> <!--</form>--> </div> </div> </div> </div> </div> </div> <?php include '../assets/foot.php'; ?> <script type="text/javascript"> $('.save_btn_1').attr('disabled', false); $(document).ready(function () { // doCal(); // $(window).on('load', function () { // // var company_id = 1;// $('#company_name').val() != "" ? $('#company_name').val() : ""; // // alert(company_id); // // var dataString = 'type=company_account&company_account=' + company_id; // $("#account_no").find('option').remove(); // // $.ajax({ // url: '../inventory/get_company_account_number.php', // data: {'type': 'company_account', 'company_id': company_id}, // type: 'POST', // cache: false, // success: function (html) { // // alert(html); // $("#account_no").html(html); // } // }); // }); }); function check_input_value(cid, status) { var reason_full = $('#reason_' + status + cid).val(); // alert(reason); var admin_name = '<?php echo $admin_name; ?>'; var reason = reason_full + ' By ' + admin_name; if (reason_full) { $('#hold_rel_reason' + cid).text(reason); if (status == 'uncheck') { $("#add_reason_remark_for_uncheck" + cid).modal('hide'); } else { $("#add_reason_remark_for_check" + cid).modal('hide'); } } else { if (status == 'uncheck') { alert('Enter Resaon for Uncheck Salary'); $("#add_reason_remark_for_uncheck" + cid).modal(); // $('#hold_rel_td' + cid).load(document.URL + ' #hold_rel_td' + cid); } else { alert('Enter Resaon for Check Salary'); $("#add_reason_remark_for_check" + cid).modal(); } } } $('.sal_hold_btn').click(function () { var myId = $(this).attr('id'); // alert(myId);// id name var myId_value = $(this).val(); // alert(myId_value); $('#add_btn' + myId_value).val('hold'); $("#add_reason_remark_for_hold_release" + myId_value).modal(); }); $('.sal_rel_btn').click(function () { var myId = $(this).attr('id'); // alert(myId);// id name var myId_value = $(this).val(); // alert(myId_value); $('#add_btn' + myId_value).val('release'); $("#add_reason_remark_for_hold_release" + myId_value).modal(); }); function hold_rel_salary(row_id, cid, status) { var select_month = $('#select_month').val(); var select_year = $('#select_year').val(); var sal_txn_no = $('#sal_txn_no').val(); var reason_full = $('#reason_hold_rel' + cid).val(); // var admin_name = '<?php // echo $admin_name; ?>'; // var reason = reason_full + ' By ' + admin_name; var reason = reason_full; // alert(reason); if (reason_full) { $("#add_reason_remark_for_hold_release" + cid).modal('hide'); $.ajax({ url: '../include/hold_rel_salary_pay.php', data: {'type': 'hold_rel_salary', 'row_id': row_id, 'cid': cid, 'status': status, 'select_month': select_month, 'select_year': select_year, 'sal_txn_no': sal_txn_no, 'reason': reason}, type: 'POST', cache: false, success: function (res) { // if (row_count == row_id) { // alert(res); // } $('#hold_rel_td' + cid).load(document.URL + ' #hold_rel_td' + cid); $('#hold_rel_reason' + cid).text(reason); $('#result_message' + cid).text(res); } }); } else { alert('Enter Resaon for Hold Salary'); $("#add_reason_remark_for_hold_release" + cid).modal(); } } function save_record() { var emp_id = $(".emp_id1").val(); $('#Gen_sal').attr("disabled", true); add_emp_salary(1, emp_id); } function add_emp_salary(row_id, cid) { // alert(cid+row_id); $('.btn').attr("disabled", true); var next_row_id = Number(row_id) + 1; var next_emp_id = $('.emp_id' + next_row_id).val(); var emp_category = $("#emp_category" + cid).val(); if (emp_category == 'Skilled') { var category = 'skilled'; } else if (emp_category == 'Semi Skilled') { var category = 'semiskilled'; } else if (emp_category == 'Non Skilled') { var category = 'unskilled'; } var cat_cid = category + cid; var checkedValue = document.querySelector('#mycheckboxes' + cid).value; // alert(checkedValue); // var lfckv = document.getElementById("checkboxes" + cid).checked; // alert(lfckv); // if (checkedValue == 'yes') { var wages_doc = $('#cheque_doc_upload_hidden').val(); var shift = $('#work_shift' + cid).val(); // if (wages_doc) { if (shift) { $('.save_btn_' + next_row_id).attr("disabled", false); var present_days_sal = $('#present_days_sal' + cid).val(); var leave_days_sal = $('#leave_days_sal' + cid).val(); var absent_days_sal = $('#absent_days_sal' + cid).val(); var no_of_days_sal = $('#no_of_days_sal' + cid).val(); var gross_wages = $('#total_gross_wages' + cid).val(); var basic_sal = $('#basic_salary_' + cat_cid).val(); var da = $('#da_' + cat_cid).val(); var working_gross = $('#wg_' + cat_cid).val(); var date_to = $('#date_to').val(); var transaction_date = $('#transaction_date').val(); var select_month = $('#select_month').val(); var select_year = $('#select_year').val(); var work_type = $("work_type").val(); var reason = $('#reason_uncheck' + cid).val(); var reason_check = $('#reason_check' + cid).val(); var remark = $('#remark').val(); var row_count = $('#row_count').val(); var authority_name = $('#authority_name').val(); var authority_id = $('#authority_name option:selected').attr('authority'); var emp_id = $('#emp_id' + cid).val(); /* hold salary start */ var emp_application_status = $('#emp_application_status' + cid).val(); var emp_hold_reason = $('#emp_hold_reason' + cid).val(); var emp_hold_remark = $('#emp_hold_remark' + cid).val(); /* hold salary end */ var sal_txn_no = $('#sal_txn_no').val(); var emp_share_esi_p = $("#emp_share_esi").val(); var emp_share_esi_rs = $("#empshare_esi_" + cat_cid).val(); var empr_share_esi_p = $("#empr_share_esi").val(); var empr_share_esi_rs = $("#emprshare_esi_" + cat_cid).val(); var total_share_esi_p = $("#empr_share_esi").val(); var total_share_esi_rs = $("#totalshare_esi_" + cat_cid).val(); var emp_share_epf_p = $("#emp_share_epf").val(); var emp_share_epf_rs = $("#empshare_epf_" + cat_cid).val(); var empr_share_epf_er_p = $("#empr_share_epf_er").val(); var empr_share_epf_er_rs = $("#emprshare_epf_er_" + cat_cid).val(); var empr_share_epf_eps_p = $("#empr_share_epf_eps").val(); var empr_share_epf_eps_rs = $("#emprshare_epf_eps_" + cat_cid).val(); var empr_share_epf_edli_p = $("#empr_share_epf_edli").val(); var empr_share_epf_edli_rs = $("#emprshare_epf_edli_" + cat_cid).val(); var empr_share_epf_ad_p = $("#empr_share_epf_ad").val(); var empr_share_epf_ad_rs = $("#emprshare_epf_ad_" + cat_cid).val(); var totalshare_epf_p = $("#total_share_epf").val(); var totalshare_epf_rs = $("#totalshare_epf_" + cat_cid).val(); var present_days_epf = $('#present_days_epf' + cid).val(); var leave_days_epf = $('#leave_days_epf' + cid).val(); var absent_days_epf = $('#absent_days_epf' + cid).val(); var no_of_days_epf = $('#no_of_days_epf' + cid).val(); var total_wages_epf_esi = $('#grossepf_esi_' + cat_cid).val(); // alert(total_wages_epf_esi); var deducted_wages_epf_esi = $('#g_minus_empshare_' + cat_cid).val(); var cheque_no = $('#cheque_no').val(); var salary_subject = $('#salary_subject').val(); var salary_bank_branch = $('#salary_bank_branch').val(); var salary_branch_code = $('#salary_branch_code').val(); // var account_no = $('#account_no').val(); // var account_edd_id = $('#account_no option:selected').attr('edd_id'); // var bank_ifsc = $('#account_no option:selected').attr('bank_ifsc'); // var bank_name = $('#account_no option:selected').attr('bank_name'); // var account_holder_name = $('#account_no option:selected').attr('account_holder_name'); var account_no = $('#acc_no').val(); var account_edd_id = $('#account_edd_id').val(); var bank_ifsc = $('#bank_ifsc').val(); var bank_name = $('#bank_name').val(); var account_holder_name = $('#account_holder_name').val(); var account_table_name = $('#account_table_name').val(); var account_edd_id_other = $("#account_edd_id_other").val(); var account_holder_name_other = $("#account_holder_name_other").val(); var acc_no_other = $("#acc_no_other").val(); var account_table_name_other = $("#account_table_name_other").val(); var other_amount_type = $('.other_amount_type_' + cid).val(); var other_amount = $('.other_amount_' + cid).val(); // alert(deducted_wages_epf_esi); // var result = confirm("Are you sure to generate this month salary?"); // if (result) { if (!emp_id) { alert('Please select Employee to approve Salary.'); } else if (!salary_branch_code) { alert('Please enter salary branch code to approve Salary.'); } else if (!salary_bank_branch) { alert('Please enter salary bank branch to approve Salary.'); } else if (!bank_name) { alert('Please select Account no to approve Salary.'); } else if (!cheque_no) { alert('Please enter cheque no to approve Salary.'); } else if (!salary_subject) { alert('Please enter salary subject to approve Salary.'); } else { $.ajax({ url: '../include/authority_pay_emp_salary_in_substation_bulk.php', data: {'type': 'check_emp_salary', 'row_id': row_id, 'cid': cid, 'next_row_id': next_row_id, 'present_days_sal': present_days_sal, 'leave_days_sal': leave_days_sal, 'absent_days_sal': absent_days_sal, 'no_of_days_sal': no_of_days_sal, 'present_days_epf': present_days_epf, 'leave_days_epf': leave_days_epf, 'absent_days_epf': absent_days_epf, 'no_of_days_epf': no_of_days_epf, 'work_type': work_type, 'gross_wages': gross_wages, 'basic_sal': basic_sal, 'da': da, 'working_gross': working_gross, 'shift': shift, 'date_to': date_to, 'transaction_date': transaction_date, 'select_month': select_month, 'select_year': select_year, 'reason': reason, 'reason_check': reason_check, 'remark': remark, 'row_count': row_count, 'authority_name': authority_name, 'authority_id': authority_id, 'emp_id': emp_id, 'emp_application_status': emp_application_status, 'emp_hold_reason': emp_hold_reason, 'emp_hold_remark': emp_hold_remark, 'sal_txn_no': sal_txn_no, 'emp_share_esi_p': emp_share_esi_p, 'emp_share_esi_rs': emp_share_esi_rs, 'empr_share_esi_p': empr_share_esi_p, 'empr_share_esi_rs': empr_share_esi_rs, 'total_share_esi_p': total_share_esi_p, 'total_share_esi_rs': total_share_esi_rs, 'emp_share_epf_p': emp_share_epf_p, 'emp_share_epf_rs': emp_share_epf_rs, 'empr_share_epf_er_p': empr_share_epf_er_p, 'empr_share_epf_er_rs': empr_share_epf_er_rs, 'empr_share_epf_eps_p': empr_share_epf_eps_p, 'empr_share_epf_eps_rs': empr_share_epf_eps_rs, 'empr_share_epf_edli_p': empr_share_epf_edli_p, 'empr_share_epf_edli_rs': empr_share_epf_edli_rs, 'empr_share_epf_ad_p': empr_share_epf_ad_p, 'empr_share_epf_ad_rs': empr_share_epf_ad_rs, 'totalshare_epf_p': totalshare_epf_p, 'totalshare_epf_rs': totalshare_epf_rs, 'total_wages_epf_esi': total_wages_epf_esi, 'deducted_wages_epf_esi': deducted_wages_epf_esi, 'checkedValue': checkedValue, 'cheque_no': cheque_no, 'salary_subject': salary_subject, 'salary_bank_branch': salary_bank_branch, 'salary_branch_code': salary_branch_code, 'account_no': account_no, 'account_edd_id': account_edd_id, 'bank_ifsc': bank_ifsc, 'bank_name': bank_name, 'account_holder_name': account_holder_name, 'account_table_name': account_table_name, 'account_edd_id_other': account_edd_id_other, 'account_holder_name_other': account_holder_name_other, 'acc_no_other': acc_no_other, 'account_table_name_other': account_table_name_other, 'other_amount_type': other_amount_type, 'other_amount': other_amount}, type: 'POST', cache: false, success: function (res) { if (row_count == row_id) { // alert(res); location.reload(); } $('#result_message' + cid).text(res); // $('#result_message' + cid).text("hello"); // $('#result_message' + cid).append("hello"); $('.save_btn_' + next_row_id).attr("disabled", false); // $(".s_engineer").html(data); $(".tr_" + row_id).css({"background-color": "#d0ddbc"}); add_emp_salary(next_row_id, next_emp_id); } }); } // } else { // alert('Clicked on Cancel Button.'); // } } else { alert("Select shift for row no " + row_id); } // } else { // alert("Upload Cheque Document First"); // } // } else { //// alert("Select an employee to generate Salary, EPF, ESIC..."); // $('#result_message' + cid).text('Salary not verified as employee checkbox is not selected'); // $(".tr_" + row_id).css({"background-color": "#ffafaf"}); // add_emp_salary(next_row_id, next_emp_id); // } } $(".present_days").bind('keyup mouseup', function () { var id = this.id; var cid = id.match(/\d+/)[0]; calculate(cid); }); $(".less_amount_emp").bind('keyup mouseup', function () { var id = this.id; var cid = id.match(/\d+/)[0]; calculate(cid); }); $(".advance_amount_emp").bind('keyup mouseup', function () { var id = this.id; var cid = id.match(/\d+/)[0]; calculate(cid); }); $(".present_days_sal").bind('keyup mouseup', function () { var id = this.id; var cid = id.match(/\d+/)[0]; calculate(cid); }); $(".present_days_epf").bind('keyup mouseup', function () { var id = this.id; var cid = id.match(/\d+/)[0]; calculate(cid); }); function calculate_1(id) { var total_gross_wages_skilled = $('#total_gross_wages' + id).val(); var total_gross_wages_semiskilled = $('#total_gross_wages' + id).val(); var total_gross_wages_unskilled = $('#total_gross_wages' + id).val(); var attendence_skilled = $('#present_days_sal' + id).val(); var attendence_semiskilled = $('#present_days_sal' + id).val(); var attendence_unskilled = $('#present_days_sal' + id).val(); var working_gross_skilled = (total_gross_wages_skilled / 26) * attendence_skilled; var working_gross_semiskilled = (total_gross_wages_semiskilled / 26) * attendence_semiskilled; var working_gross_unskilled = (total_gross_wages_unskilled / 26) * attendence_unskilled; var employee_pesic = $('#emp_share_esi').val(); var employer_pesic = $('#empr_share_esi').val(); var total_pesic = parseFloat(employer_pesic) + parseFloat(employee_pesic); var employee_pay_esic_skilled = working_gross_skilled * (employee_pesic / 100); var employee_pay_esic_semiskilled = working_gross_semiskilled * (employee_pesic / 100); var employee_pay_esic_unskilled = working_gross_unskilled * (employee_pesic / 100); var employer_pay_esic_skilled = working_gross_skilled * (employer_pesic / 100); var employer_pay_esic_semiskilled = working_gross_semiskilled * (employer_pesic / 100); var employer_pay_esic_unskilled = working_gross_unskilled * (employer_pesic / 100); var deposit_pay_esic_skilled = working_gross_skilled * (total_pesic / 100); var deposit_pay_esic_semiskilled = working_gross_semiskilled * (total_pesic / 100); var deposit_pay_esic_unskilled = working_gross_unskilled * (total_pesic / 100); var attendence_skilled_epf = $('#present_days_epf' + id).val(); var attendence_semiskilled_epf = $('#present_days_epf' + id).val(); var attendence_unskilled_epf = $('#present_days_epf' + id).val(); var working_gross_skilled_epf = (total_gross_wages_skilled / 26) * attendence_skilled_epf; var working_gross_semiskilled_epf = (total_gross_wages_semiskilled / 26) * attendence_semiskilled_epf; var working_gross_unskilled_epf = (total_gross_wages_unskilled / 26) * attendence_unskilled_epf; var employee_pepf = $('#emp_share_epf').val(); var employer_pepf_er = $('#empr_share_epf_er').val(); var employer_pepf_eps = $('#empr_share_epf_eps').val(); var employer_pepf_edli = $('#empr_share_epf_edli').val(); var employer_pepf_ad = $('#empr_share_epf_ad').val(); var total_pepf = parseFloat(employee_pepf) + parseFloat(employer_pepf_er) + parseFloat(employer_pepf_eps) + parseFloat(employer_pepf_edli) + parseFloat(employer_pepf_ad); var employee_pay_epf_skilled = working_gross_skilled_epf * (employee_pepf / 100); var employee_pay_epf_semiskilled = working_gross_semiskilled_epf * (employee_pepf / 100); var employee_pay_epf_unskilled = working_gross_unskilled_epf * (employee_pepf / 100); var employer_pay_epf_er_skilled = working_gross_skilled_epf * (employer_pepf_er / 100); var employer_pay_epf_er_semiskilled = working_gross_semiskilled_epf * (employer_pepf_er / 100); var employer_pay_epf_er_unskilled = working_gross_unskilled_epf * (employer_pepf_er / 100); var employer_pay_epf_eps_skilled = working_gross_skilled_epf * (employer_pepf_eps / 100); var employer_pay_epf_eps_semiskilled = working_gross_semiskilled_epf * (employer_pepf_eps / 100); var employer_pay_epf_eps_unskilled = working_gross_unskilled_epf * (employer_pepf_eps / 100); var employer_pay_epf_edli_skilled = working_gross_skilled_epf * (employer_pepf_edli / 100); var employer_pay_epf_edli_semiskilled = working_gross_semiskilled_epf * (employer_pepf_edli / 100); var employer_pay_epf_edli_unskilled = working_gross_unskilled_epf * (employer_pepf_edli / 100); var employer_pay_epf_ad_skilled = working_gross_skilled_epf * (employer_pepf_ad / 100); var employer_pay_epf_ad_semiskilled = working_gross_semiskilled_epf * (employer_pepf_ad / 100); var employer_pay_epf_ad_unskilled = working_gross_unskilled_epf * (employer_pepf_ad / 100); var deposit_pay_epf_skilled = working_gross_skilled_epf * (total_pepf / 100); var deposit_pay_epf_semiskilled = working_gross_semiskilled_epf * (total_pepf / 100); var deposit_pay_epf_unskilled = working_gross_unskilled_epf * (total_pepf / 100); $('#emp_share_epf_skilled' + id).text(employee_pay_epf_skilled.toFixed(2)); $('#emp_share_epf_semiskilled' + id).text(employee_pay_epf_semiskilled.toFixed(2)); $('#emp_share_epf_unskilled' + id).text(employee_pay_epf_unskilled.toFixed(2)); $('#empr_share_epf_er_skilled' + id).text(employer_pay_epf_er_skilled.toFixed(2)); $('#empr_share_epf_er_semiskilled' + id).text(employer_pay_epf_er_semiskilled.toFixed(2)); $('#empr_share_epf_er_unskilled' + id).text(employer_pay_epf_er_unskilled.toFixed(2)); $('#empr_share_epf_eps_skilled' + id).text(employer_pay_epf_eps_skilled.toFixed(2)); $('#empr_share_epf_eps_semiskilled' + id).text(employer_pay_epf_eps_semiskilled.toFixed(2)); $('#empr_share_epf_eps_unskilled' + id).text(employer_pay_epf_eps_unskilled.toFixed(2)); $('#empr_share_epf_edli_skilled' + id).text(employer_pay_epf_edli_skilled.toFixed(2)); $('#empr_share_epf_edli_semiskilled' + id).text(employer_pay_epf_edli_semiskilled.toFixed(2)); $('#empr_share_epf_edli_unskilled' + id).text(employer_pay_epf_edli_unskilled.toFixed(2)); $('#empr_share_epf_ad_skilled' + id).text(employer_pay_epf_ad_skilled.toFixed(2)); $('#empr_share_epf_ad_semiskilled' + id).text(employer_pay_epf_ad_semiskilled.toFixed(2)); $('#empr_share_epf_ad_unskilled' + id).text(employer_pay_epf_ad_unskilled.toFixed(2)); $('#total_share_epf_skilled' + id).text(deposit_pay_epf_skilled.toFixed(2)); $('#total_share_epf_semiskilled' + id).text(deposit_pay_epf_semiskilled.toFixed(2)); $('#total_share_epf_unskilled' + id).text(deposit_pay_epf_unskilled.toFixed(2)); $('#empshare_epf_skilled' + id).val(employee_pay_epf_skilled.toFixed(2)); $('#empshare_epf_semiskilled' + id).val(employee_pay_epf_semiskilled.toFixed(2)); $('#empshare_epf_unskilled' + id).val(employee_pay_epf_unskilled.toFixed(2)); $('#emprshare_epf_er_skilled' + id).val(employer_pay_epf_er_skilled.toFixed(2)); $('#emprshare_epf_er_semiskilled' + id).val(employer_pay_epf_er_semiskilled.toFixed(2)); $('#emprshare_epf_er_unskilled' + id).val(employer_pay_epf_er_unskilled.toFixed(2)); $('#emprshare_epf_eps_skilled' + id).val(employer_pay_epf_eps_skilled.toFixed(2)); $('#emprshare_epf_eps_semiskilled' + id).val(employer_pay_epf_eps_semiskilled.toFixed(2)); $('#emprshare_epf_eps_unskilled' + id).val(employer_pay_epf_eps_unskilled.toFixed(2)); $('#emprshare_epf_edli_skilled' + id).val(employer_pay_epf_edli_skilled.toFixed(2)); $('#emprshare_epf_edli_semiskilled' + id).val(employer_pay_epf_edli_semiskilled.toFixed(2)); $('#emprshare_epf_edli_unskilled' + id).val(employer_pay_epf_edli_unskilled.toFixed(2)); $('#emprshare_epf_ad_skilled' + id).val(employer_pay_epf_ad_skilled.toFixed(2)); $('#emprshare_epf_ad_semiskilled' + id).val(employer_pay_epf_ad_semiskilled.toFixed(2)); $('#emprshare_epf_ad_unskilled' + id).val(employer_pay_epf_ad_unskilled.toFixed(2)); $('#totalshare_epf_skilled' + id).val(deposit_pay_epf_skilled.toFixed(2)); $('#totalshare_epf_semiskilled' + id).val(deposit_pay_epf_semiskilled.toFixed(2)); $('#totalshare_epf_unskilled' + id).val(deposit_pay_epf_unskilled.toFixed(2)); $('#emp_share_esi_skilled' + id).text(employee_pay_esic_skilled.toFixed(2)); $('#emp_share_esi_semiskilled' + id).text(employee_pay_esic_semiskilled.toFixed(2)); $('#emp_share_esi_unskilled' + id).text(employee_pay_esic_unskilled.toFixed(2)); $('#empr_share_esi_skilled' + id).text(employer_pay_esic_skilled.toFixed(2)); $('#empr_share_esi_semiskilled' + id).text(employer_pay_esic_semiskilled.toFixed(2)); $('#empr_share_esi_unskilled' + id).text(employer_pay_esic_unskilled.toFixed(2)); $('#total_share_esi_skilled' + id).text(deposit_pay_esic_skilled.toFixed(2)); $('#total_share_esi_semiskilled' + id).text(deposit_pay_esic_semiskilled.toFixed(2)); $('#total_share_esi_unskilled' + id).text(deposit_pay_esic_unskilled.toFixed(2)); $('#empshare_esi_skilled' + id).val(employee_pay_esic_skilled.toFixed(2)); $('#empshare_esi_semiskilled' + id).val(employee_pay_esic_semiskilled.toFixed(2)); $('#empshare_esi_unskilled' + id).val(employee_pay_esic_unskilled.toFixed(2)); $('#emprshare_esi_skilled' + id).val(employer_pay_esic_skilled.toFixed(2)); $('#emprshare_esi_semiskilled' + id).val(employer_pay_esic_semiskilled.toFixed(2)); $('#emprshare_esi_unskilled' + id).val(employer_pay_esic_unskilled.toFixed(2)); $('#totalshare_esi_skilled' + id).val(deposit_pay_esic_skilled.toFixed(2)); $('#totalshare_esi_semiskilled' + id).val(deposit_pay_esic_semiskilled.toFixed(2)); $('#totalshare_esi_unskilled' + id).val(deposit_pay_esic_unskilled.toFixed(2)); var grossepf_esi_skilled = parseFloat(total_gross_wages_skilled) + (parseFloat(deposit_pay_epf_skilled) - parseFloat(employee_pay_epf_skilled) + parseFloat(employer_pay_esic_skilled)); var grossepf_esi_semiskilled = parseFloat(total_gross_wages_semiskilled) + (parseFloat(deposit_pay_epf_semiskilled) - parseFloat(employee_pay_epf_semiskilled) + parseFloat(employer_pay_esic_semiskilled)); var grossepf_esi_unskilled = parseFloat(total_gross_wages_unskilled) + (parseFloat(deposit_pay_epf_unskilled) - parseFloat(employee_pay_epf_unskilled) + parseFloat(employer_pay_esic_unskilled)); $('#grossepf_esi_skilled' + id).val(grossepf_esi_skilled.toFixed(2)); $('#grossepf_esi_semiskilled' + id).val(grossepf_esi_semiskilled.toFixed(2)); $('#grossepf_esi_unskilled' + id).val(grossepf_esi_unskilled.toFixed(2)); $('#gross_epf_esi_skilled' + id).text(grossepf_esi_skilled.toFixed(2)); $('#gross_epf_esi_semiskilled' + id).text(grossepf_esi_semiskilled.toFixed(2)); $('#gross_epf_esi_unskilled' + id).text(grossepf_esi_unskilled.toFixed(2)); // var gross_minus_empshare_skilled = parseFloat(total_gross_wages_skilled) - (parseFloat(employee_pay_epf_skilled) + parseFloat(employee_pay_esic_skilled)); // var gross_minus_empshare_semiskilled = parseFloat(total_gross_wages_semiskilled) - (parseFloat(employee_pay_epf_semiskilled) + parseFloat(employee_pay_esic_semiskilled)); // var gross_minus_empshare_unskilled = parseFloat(total_gross_wages_unskilled) - (parseFloat(employee_pay_epf_unskilled) + parseFloat(employee_pay_esic_unskilled)); var gross_minus_empshare_skilled_for_sal = parseFloat(total_gross_wages_skilled) - (parseFloat(employee_pay_epf_skilled) + parseFloat(employee_pay_esic_skilled)); var gross_minus_empshare_semiskilled_for_sal = parseFloat(total_gross_wages_semiskilled) - (parseFloat(employee_pay_epf_semiskilled) + parseFloat(employee_pay_esic_semiskilled)); var gross_minus_empshare_unskilled_for_sal = parseFloat(total_gross_wages_unskilled) - (parseFloat(employee_pay_epf_unskilled) + parseFloat(employee_pay_esic_unskilled)); var gross_minus_empshare_skilled = parseFloat(deposit_pay_epf_skilled) + parseFloat(deposit_pay_esic_skilled); var gross_minus_empshare_semiskilled = parseFloat(deposit_pay_epf_semiskilled) + parseFloat(deposit_pay_esic_semiskilled); var gross_minus_empshare_unskilled = parseFloat(deposit_pay_epf_unskilled) + parseFloat(deposit_pay_esic_unskilled); $('#g_minus_empshare_skilled' + id).val(gross_minus_empshare_skilled.toFixed(2)); $('#g_minus_empshare_semiskilled' + id).val(gross_minus_empshare_semiskilled.toFixed(2)); $('#g_minus_empshare_unskilled' + id).val(gross_minus_empshare_unskilled.toFixed(2)); $('#gross_minus_empshare_skilled' + id).text(gross_minus_empshare_skilled.toFixed(2)); $('#gross_minus_empshare_semiskilled' + id).text(gross_minus_empshare_semiskilled.toFixed(2)); $('#gross_minus_empshare_unskilled' + id).text(gross_minus_empshare_unskilled.toFixed(2)); // var bsalary_skilled = parseFloat(total_gross_wages_skilled) - (parseFloat(deposit_pay_epf_skilled) + parseFloat(deposit_pay_esic_skilled)); // var bsalary_semiskilled = parseFloat(total_gross_wages_semiskilled) - (parseFloat(deposit_pay_epf_semiskilled) + parseFloat(deposit_pay_esic_semiskilled)); // var bsalary_unskilled = parseFloat(total_gross_wages_unskilled) - (parseFloat(deposit_pay_epf_unskilled) + parseFloat(deposit_pay_esic_unskilled)); var bsalary_skilled = parseFloat(total_gross_wages_skilled); var bsalary_semiskilled = parseFloat(total_gross_wages_semiskilled); var bsalary_unskilled = parseFloat(total_gross_wages_unskilled); // var gross_salary_skilled = (bsalary_skilled / 26) * attendence_skilled; // var gross_salary_semiskilled = (bsalary_semiskilled / 26) * attendence_semiskilled; // var gross_salary_unskilled = (bsalary_unskilled / 26) * attendence_unskilled; var gross_salary_skilled = (gross_minus_empshare_skilled_for_sal / 26) * attendence_skilled; var gross_salary_semiskilled = (gross_minus_empshare_semiskilled_for_sal / 26) * attendence_semiskilled; var gross_salary_unskilled = (gross_minus_empshare_unskilled_for_sal / 26) * attendence_unskilled; $('#bsalary_skilled' + id).val(bsalary_skilled.toFixed(2)); $('#basic_salary_skilled' + id).text(bsalary_skilled.toFixed(2)); $('#bsalary_semiskilled' + id).val(bsalary_semiskilled.toFixed(2)); $('#basic_salary_semiskilled' + id).text(bsalary_semiskilled.toFixed(2)); $('#bsalary_unskilled' + id).val(bsalary_unskilled.toFixed(2)); $('#basic_salary_unskilled' + id).text(bsalary_unskilled.toFixed(2)); $('#working_gross_skilled' + id).text(gross_salary_skilled.toFixed(2)); $('#working_gross_semiskilled' + id).text(gross_salary_semiskilled.toFixed(2)); $('#working_gross_unskilled' + id).text(gross_salary_unskilled.toFixed(2)); $('#wg_skilled' + id).val(gross_salary_skilled.toFixed(2)); $('#wg_semiskilled' + id).val(gross_salary_semiskilled.toFixed(2)); $('#wg_unskilled' + id).val(gross_salary_unskilled.toFixed(2)); } function add_other_amount(id) { var wg_skilled = $('#wg_skilled' + id).val(); var gross_salary_skilled = wg_skilled; var wg_semiskilled = $('#wg_semiskilled' + id).val(); var gross_salary_semiskilled = wg_semiskilled; var wg_unskilled = $('#wg_unskilled' + id).val(); var gross_salary_unskilled = wg_unskilled; var other_amount_type = $('.other_amount_type_' + id).val(); // var other_amount_type_skilled = $('#other_amount_type_skilled_' + id).val(); // var other_amount_type_semiskilled = $('#other_amount_type_semiskilled_' + id).val(); // var other_amount_type_unskilled = $('#other_amount_type_unskilled_' + id).val(); var other_amount_skilled = $('#other_amount_skilled_' + id).val(); var other_amount_semiskilled = $('#other_amount_semiskilled_' + id).val(); var other_amount_unskilled = $('#other_amount_unskilled_' + id).val(); // alert(other_amount_type_skilled+other_amount_type_semiskilled+other_amount_type_unskilled); // var working_gross_other_amount_skilled = parseFloat(gross_salary_skilled) + parseFloat(other_amount_skilled); // var working_gross_other_amount_semiskilled = parseFloat(gross_salary_semiskilled) + parseFloat(other_amount_semiskilled); // var working_gross_other_amount_unskilled = parseFloat(gross_salary_unskilled) + parseFloat(other_amount_unskilled); if (other_amount_type == 'CREDIT' || other_amount_skilled == '0.00') { var working_gross_other_amount_skilled = parseFloat(gross_salary_skilled) + parseFloat(other_amount_skilled); } else if (other_amount_type == 'DEBIT') { var working_gross_other_amount_skilled = parseFloat(gross_salary_skilled) - parseFloat(other_amount_skilled); } if (other_amount_type == 'CREDIT' || other_amount_semiskilled == '0.00') { var working_gross_other_amount_semiskilled = parseFloat(gross_salary_semiskilled) + parseFloat(other_amount_semiskilled); } else if (other_amount_type == 'DEBIT') { var working_gross_other_amount_semiskilled = parseFloat(gross_salary_semiskilled) - parseFloat(other_amount_semiskilled); } if (other_amount_type == 'CREDIT' || other_amount_unskilled == '0.00') { var working_gross_other_amount_unskilled = parseFloat(gross_salary_unskilled) + parseFloat(other_amount_unskilled); } else if (other_amount_type == 'DEBIT') { var working_gross_other_amount_unskilled = parseFloat(gross_salary_unskilled) - parseFloat(other_amount_unskilled); } $('#working_gross_other_amount_skilled_' + id).val(working_gross_other_amount_skilled.toFixed(2)); $('#working_gross_other_amount_skilled_span_' + id).text(working_gross_other_amount_skilled.toFixed(2)); $('#working_gross_other_amount_semiskilled_' + id).val(working_gross_other_amount_semiskilled.toFixed(2)); $('#working_gross_other_amount_semiskilled_span_' + id).text(working_gross_other_amount_semiskilled.toFixed(2)); $('#working_gross_other_amount_unskilled_' + id).val(working_gross_other_amount_unskilled.toFixed(2)); $('#working_gross_other_amount_unskilled_span_' + id).text(working_gross_other_amount_unskilled.toFixed(2)); } function get_total_days_sal(cid, row_id) { var present = $("#present_days_sal" + cid).val(); var leave = $("#leave_days_sal" + cid).val(); var no_of_days = $("#no_of_days_sal" + cid).val(); var absent = Number(no_of_days) - (Number(leave) + Number(present)); if (parseInt(absent) < 0) { // $("#present_sal").val(''); $("#leave_days_sal" + cid).val(''); $("#absent_days_sal" + cid).val(''); $('#save_btn_' + cid).attr('disabled', true); // $('#error_div_for_days').html('Total days( ' + no_of_days + ' ) should be equal to selected months and years '); alert('Total days( ' + no_of_days + ' ) should be equal to selected months and years at row ' + row_id + ' in Salary Attendence.'); } else { $("#absent_days_sal" + cid).val(absent); $('#save_btn_' + cid).attr('disabled', false); } } function get_total_days_epf(cid, row_id) { var present = $("#present_days_epf" + cid).val(); var leave = $("#leave_days_epf" + cid).val(); var no_of_days = $("#no_of_days_epf" + cid).val(); var absent = Number(no_of_days) - (Number(leave) + Number(present)); if (parseInt(absent) < 0) { // $("#present_epf").val(''); $("#leave_days_epf" + cid).val(''); $("#absent_days_epf" + cid).val(''); $('#save_btn_' + cid).attr('disabled', true); // $('#error_div_for_days').html('Total days( ' + no_of_days + ' ) should be equal to selected months and years '); alert('Total days( ' + no_of_days + ' ) should be equal to selected months and years at row ' + row_id + ' in EPF Attendence.'); } else { $("#absent_days_epf" + cid).val(absent); $('#save_btn_' + cid).attr('disabled', false); } } $('.checkboxes').click(function () { var myId = $(this).attr('id'); var myId_value = $(this).val(); // alert(myId_value); if ($('#' + myId).is(':checked')) { // $('#mycheckboxes' + myId_value).val(myId_value); $('#mycheckboxes' + myId_value).val('yes'); $("#add_reason_remark_for_check" + myId_value).modal(); } else if (!$('#' + myId).is(':checked')) { $('#mycheckboxes' + myId_value).val(''); $("#add_reason_remark_for_uncheck" + myId_value).modal(); } calculateTotal($(this), myId_value, '', ''); }); // check_all(true); function check_all(isChecked) { if (isChecked) { $('input[type="checkbox"]').each(function () { this.checked = true; $('.mycheckboxes').val('yes'); $(".bulk-actions").show(); }); } else { $('input[type="checkbox"]').each(function () { this.checked = false; $('.mycheckboxes').val(''); $(".bulk-actions").hide(); }); } calculateTotal($(this), '', '', ''); } calculateTotal('', '', '', ''); function calculateTotal(src, cid, row_id, skilled_type) { // alert(src + cid +skilled_type+ row_id); $('.checkboxes').each(function () { var cid = this.value; // alert(cid); add_other_amount(cid); }); var count = 0; var sum = 0; var other = 0; var sum_plus_other = 0; $('input[type="checkbox"]:checked').each(function () { cid = this.value; // add_other_amount(cid); var wg_gross = $('.wg_gross' + cid).val(); var other_amount = $('.other_amount_' + cid).val(); var working_gross_other_amount = $('.working_gross_other_amount_' + cid).val(); if (!isNaN(this.value) && this.value.length != 0) { // count += parseInt($(this).val()); sum += parseFloat(wg_gross); } if (!isNaN(this.value) && this.value.length != 0) { // count += parseInt($(this).val()); other += parseFloat(other_amount); } if (!isNaN(this.value) && this.value.length != 0) { // count += parseInt($(this).val()); sum_plus_other += parseFloat(working_gross_other_amount); } }); $(".total_net_pay").html(sum.toFixed(2)); // var total_net_pay_Words = NumInWords(sum.toFixed(2)); var total_net_pay_Words = number2text(sum.toFixed(2)); $(".total_net_pay_words").text('TOTAL NET PAY(' + total_net_pay_Words + ')'); $(".total_other_amount").html(other.toFixed(2)); // var total_net_pay_plus_other_amount = parseFloat(sum) + parseFloat(other); $(".total_net_pay_plus_other_amount").html(sum_plus_other.toFixed(2)); } $(".wg_gross").bind('keyup mouseup', function () { var id = this.id; // alert(id); var cid = id.match(/\d+/)[0]; // alert(cid); // calculate(cid); cal_ledger_amount(cid); }); function cal_ledger_amount(cid) { // cid = this.value; var wg_gross = $('.wg_gross' + cid).val(); var led_bal_input = $('#led_bal_input' + cid).val(); var other_amount_type = $('.other_amount_type_' + cid).val(); var other_amount = $('.other_amount_' + cid).val(); if (other_amount_type == 'CREDIT' || other_amount == '0.00') { var led_bal_payable_input = parseFloat(led_bal_input) - (parseFloat(wg_gross) + parseFloat(other_amount)); } else if (other_amount_type == 'DEBIT') { var led_bal_payable_input = parseFloat(led_bal_input) - (parseFloat(wg_gross) - parseFloat(other_amount)); } $('#led_bal_payable' + cid).text(Math.abs(led_bal_payable_input.toFixed(2))); $('#led_bal_payable_input' + cid).val(led_bal_payable_input.toFixed(2)); if (Math.sign(parseInt(led_bal_payable_input)) == 1) { $('#led_bal_type' + cid).text('Cr'); } else if (Math.sign(parseInt(led_bal_payable_input)) == 0) { $('#led_bal_type' + cid).text('Cr'); } else if (Math.sign(parseInt(led_bal_payable_input)) == -1) { $('#led_bal_type' + cid).text('Dr'); } } $(function () { $('#account_no_input').change(function () { var account_no = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('account_no');//$('#account_no').val(); // alert(account_no); var account_table_name = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('account_table_name'); var account_edd_id = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('edd_id'); var bank_ifsc = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('bank_ifsc'); var bank_name = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('bank_name'); var account_holder_name = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('account_holder_name'); var contact_no = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('contact_no'); var address = $('#account_no option[value=' + $('#account_no_input').val() + ']').attr('address'); $("#account_table_name").val(account_table_name); $("#account_edd_id").val(account_edd_id); $("#bank_ifsc").val(bank_ifsc); $("#bank_name").val(bank_name); $("#account_holder_name").val(account_holder_name); $("#contact_no").val(contact_no); $("#address").val(address); $('#acc_no').val(account_no); // alert(contact_no); $('#mob_no').val(contact_no); }); }); function delete_salary(select_year, select_month, zone, sengg, exngg, sal_txn_no, sal_type) { // alert(select_year+ select_month+ zone+ sengg+ exngg + sal_txn_no+sal_type); var transaction_date = $('#transaction_date').val(); $.ajax({ url: "../include/delete_this_salary.php", type: "get", data: {'type': sal_type, 'zone': zone, 'sengg': sengg, 'exngg': exngg, 'select_year': select_year, 'select_month': select_month, 'sal_txn_no': sal_txn_no, 'transaction_date': transaction_date}, success: function (data) { alert(data); // $('#content').html(''); // $('#content').html(data); location.reload(); } }); } </script>