Fixes : ps

This commit is contained in:
VE10-Sanjeev 2025-03-06 07:14:45 +00:00
parent ebb6265626
commit bdcfe0c01e
10 changed files with 1777 additions and 1784 deletions

View File

@ -801,10 +801,10 @@ class Payslip extends BaseController
$loan = $Balance_Amount;
}
$empSalaryAdd = $final_salary_amount+$shed+$diesel;
$empSalaryAdd = $final_salary_amount;
$empSalarySub = $loan;
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
$load_driver_data[$i]->driver_final_payment = $salaryInCurrentday;
// $salaryInCurrentday = $empSalaryAdd - $empSalarySub;
// $load_driver_data[$i]->driver_final_payment = $salaryInCurrentday;
$load_driver_data[$i]->payroll_id = $monthly_pay_array[$driver_id]->payroll_id;
$load_driver_data[$i]->Festival_Bonus = $monthly_pay_array[$driver_id]->Festival_Bonus;
@ -871,8 +871,8 @@ class Payslip extends BaseController
$empSalaryAdd = $final_salary_amount;
$empSalarySub = $loan;
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
$load_driver_data[$i]->driver_final_payment = $salaryInCurrentday+$shed+$diesel;
// $salaryInCurrentday = $empSalaryAdd - $empSalarySub;
// $load_driver_data[$i]->driver_final_payment = $salaryInCurrentday+$shed+$diesel;
$load_driver_data[$i]->total_cal_days = $get_last_date_of_the_month;
}
@ -1236,6 +1236,7 @@ class Payslip extends BaseController
'total_shed_amount'=>$Shed,
'monthly_salary_amount'=>($Basic+$Food),
'final_payment'=>$Estimate,
'BASIC'=>$Basic,
'HRA'=>$HRA,
'ESI'=>$ESI,
'PF'=>$PF,
@ -1421,8 +1422,10 @@ class Payslip extends BaseController
$currentDayBasic = isset($Data['PayDetails'][0]->monthly_salary_amount) ? $Data['PayDetails'][0]->monthly_salary_amount : 0;
$PF_Rate = $Data['PayDetails'][0]->PF_Rate;
$ESI_Rate = $Data['PayDetails'][0]->ESI_Rate;
$Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $currentDayBasic * $ESI_Rate / 100 : 0;
$Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $currentDayBasic * $PF_Rate / 100 : 0;
// $Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $currentDayBasic * $ESI_Rate / 100 : 0;
// $Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $currentDayBasic * $PF_Rate / 100 : 0;
$Data['esi_amount'] = ($Data['PayDetails'][0]->esi_applicable == 1) ? $Data['PayDetails'][0]->ESI : 0;
$Data['pf_amount'] = ($Data['PayDetails'][0]->pf_applicable == 1) ? $Data['PayDetails'][0]->PF : 0;
$html = view("driverPayslipGeneratePrint", $Data);
}else{
//echo "EmpID" . $EmpID;

View File

@ -3068,7 +3068,6 @@ class Purchaseorder extends BaseController
$this->purchaseorder_model->insertlogpo($logpo);
}
}
// print_r($this->request->getPost());die;
for ($i = 1; $i <= $RowCount; $i++) {
$MaterialCode = $this->request->getPost('materialCode' . $i);

View File

@ -285,7 +285,7 @@ class Driver_model extends Model
$builder = $this->db->table('t_driver_payroll Pay')->select('Pay.*')
->select('Emp.EmpID,CONCAT_WS(" ", Emp.FirstName, Emp.LastName) as driver_name,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.BankAccountNo as BankAccountNumber,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.AadharNo,Emp.Designation as Designation,Dep.DepartmentName as DeptName,Emp.esi_applicable,Emp.pf_applicable')
->select('t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate')
->select('month.Festival_Bonus,month.HRA,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
->select('month.Festival_Bonus,month.BASIC,month.HRA,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
// ->select('month.monthly_salary_amount,month.monthly_food_amount,month.Festival_Bonus,month.final_payment,month.HRA,month.ESI,month.PF,month.Loan_Recovered,month.total_diesel_amount,month.total_shed_amount')
->join('t_employee_details Emp', 'Pay.driver_id = Emp.EmpID')
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode')

View File

@ -20,7 +20,8 @@
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}
.save-btn, .cancel-btn {
.save-btn,
.cancel-btn {
border: none;
background: none;
cursor: pointer;
@ -53,8 +54,8 @@
}
</style>
<script>
$(document).ready(function () {
$(document).on('click', '.editable-field', function (e) {
$(document).ready(function() {
$(document).on('click', '.editable-field', function(e) {
e.preventDefault();
const $link = $(this);
const value = $link.text().trim();
@ -67,7 +68,7 @@
});
// Handle click on the tick (save) button
$(document).on('click', '.save-btn', function (e) {
$(document).on('click', '.save-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -84,7 +85,7 @@
});
// Handle click on the close (cancel) button
$(document).on('click', '.cancel-btn', function (e) {
$(document).on('click', '.cancel-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -93,7 +94,9 @@
// Hide the edit container and show the <a> tag
$editContainer.hide();
$link.show();
});});</script>
});
});
</script>
<?php
$insuranceStatus = array(
array("name" => "NO", "value" => "0"),
@ -148,6 +151,7 @@ if (!empty($MaxPODate)) {
$MaxPoDate = $date->PODate;
}
}
if (!empty($POMaster)) {
foreach ($POMaster as $Req) {
@ -279,8 +283,6 @@ if (!empty($getlogpodtl)) {
});
</script>
<script type="text/javascript">
$('#otherdescription').hide();
var insuranceOpt = '<?php echo $InsuranceOptions; ?>';
@ -294,7 +296,7 @@ if (!empty($getlogpodtl)) {
$(document).ready(function() {
$(document).on('click', '.editable-field', function (e) {
$(document).on('click', '.editable-field', function(e) {
e.preventDefault();
const $link = $(this);
const value = $link.text().trim();
@ -307,7 +309,7 @@ if (!empty($getlogpodtl)) {
});
// Handle click on the tick (save) button
$(document).on('click', '.save-btn', function (e) {
$(document).on('click', '.save-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -324,7 +326,7 @@ if (!empty($getlogpodtl)) {
});
// Handle click on the close (cancel) button
$(document).on('click', '.cancel-btn', function (e) {
$(document).on('click', '.cancel-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -388,6 +390,7 @@ if (!empty($getlogpodtl)) {
}
});
</script>
<script>
var RequistQuantity = '';
var AvilBudAmt = '';
@ -415,7 +418,7 @@ if (!empty($getlogpodtl)) {
//minDate : d,
maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
}); */
}); */
$('#drpSupplier').change(function() {
var cd = $("#drpSupplier option:selected").text();
@ -482,8 +485,6 @@ if (!empty($getlogpodtl)) {
});
$('#MaterialCode').change(function() {
var id = $('#MaterialCode').val();
RequistQuantity = '';
@ -511,7 +512,7 @@ if (!empty($getlogpodtl)) {
$('#OtheritemDescription').val(obj.MaterialDescription);
}
if(obj.material_rate != 0){
if (obj.material_rate != 0) {
Ratechange();
}
@ -541,6 +542,7 @@ if (!empty($getlogpodtl)) {
}
});
$('#EditMaterialCode').change(function() {
var id = $('#EditMaterialCode').val();
@ -849,6 +851,7 @@ if (!empty($getlogpodtl)) {
RequistQuantity = '';
}
$(document).ready(function() {
$("#PaymentTerms").select2();
@ -864,6 +867,7 @@ if (!empty($getlogpodtl)) {
});
});
</script>
<style>
.num {
text-align: right;
@ -913,6 +917,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<!-- end page title -->
<!-- Form row -->
<div class="row">
<div class="col-12">
@ -1040,7 +1045,6 @@ if (!empty($getlogpodtl)) {
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
@ -1279,11 +1283,12 @@ if (!empty($getlogpodtl)) {
<td style="text-align:left !important;"><?php echo $index; ?></td>
<td style="text-align:center !important;"><?php echo $record->ReqNo ?></td>
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "..."); echo $shortName; ?></td>
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
echo $shortName; ?></td>
<td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<a href="#"
class="editable-field"
data-id ="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
</a>
<div class="edit-container" style="display:none;">
@ -1291,7 +1296,10 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div>
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?></td>
<?php } else {
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
} ?>
</td>
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
@ -1598,8 +1606,7 @@ if (!empty($getlogpodtl)) {
}
?>
</tbody>
<?php } else {
} ?>
<?php } else {} ?>
</table>
</div>
</div>
@ -1701,10 +1708,10 @@ if (!empty($getlogpodtl)) {
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
</div><!-- end form row -->
</div> <!-- end container-fluid -->
</div> <!-- end content -->
</div><!-- end content-page -->
<!-- Model for servicepo -->
<div id="SERVICE" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
@ -2632,7 +2639,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div></td>`;
}else{ rowHtml += `<td>-</td>`; }
} else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td align="right">${quantity}</td>
<td align="left">${uom}</td>
<td align="right">${itemRate}</td>
@ -2999,7 +3008,7 @@ if (!empty($getlogpodtl)) {
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
success: function(data) {
$('#loader').hide();
(data) ? alert(response) : alert("Error");
(data) ? alert(response): alert("Error");
}
});
}
@ -3170,12 +3179,10 @@ if (!empty($getlogpodtl)) {
if (serviceValidate()) {
// if (document.getElementById('ServiceTable').rows.length < 2)
// {
// alert('Please Select Line item to Create PO');
// $('#Deliverydt').focus();
// return false;
// }
if (document.getElementById('ServiceTable').rows.length < 2) {
alert('Atleast One Line needed');
return false;
}
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// return false;
@ -3184,11 +3191,11 @@ if (!empty($getlogpodtl)) {
// alert('Please Enter Payable Terms');
// $('#Otherpayment').focus();
// return false;
// } else if ($('#editdescofpo').val().trim() == '') {
// alert('Please Enter Description Of Service');
// $('#editdescofpo').focus();
// return false;
// } else {
else if ($('#editdescofpo').val().trim() == '') {
alert('Please Enter Description Of Service');
$('#editdescofpo').focus();
return false;
} else {
// $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
$('#loader').show();
@ -3204,13 +3211,13 @@ if (!empty($getlogpodtl)) {
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
// newWindow.document.write("<html><head><title>Response</title></head><body>");
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
// newWindow.document.write("</body></html>");
// newWindow.document.close();
// newWindow.moveTo(0, 0);
// newWindow.resizeTo(screen.width, screen.height);
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
// newWindow.document.write("<html><head><title>Response</title></head><body>");
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
// newWindow.document.write("</body></html>");
// newWindow.document.close();
// newWindow.moveTo(0, 0);
// newWindow.resizeTo(screen.width, screen.height);
if (data) {
$('#loader').hide();
alert(data);
@ -3235,7 +3242,7 @@ if (!empty($getlogpodtl)) {
}
});
// }
}
}
}
@ -3258,9 +3265,6 @@ if (!empty($getlogpodtl)) {
});
function calculateCgstTax(varBasicValue, Cgst) {
var basicValue = parseFloat(varBasicValue);
@ -3304,7 +3308,7 @@ if (!empty($getlogpodtl)) {
}
//If others is the payment terms to display mandatory field
$(document).ready(function () {
$(document).ready(function() {
$("#PaymentTerms").change(function() {
var otherPayment = '<?php echo $otherPayment; ?>';
if ($('#PaymentTerms').val().trim() == 'PT08') {
@ -3432,6 +3436,7 @@ if (!empty($getlogpodtl)) {
id = '';
});
$(document).ready(function() {
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
@ -3646,6 +3651,7 @@ if (!empty($getlogpodtl)) {
});
});
$("#insuranceStatus").change(function() {
var InsNo = '<?php echo $InsuranceNumber; ?>';
@ -3658,11 +3664,6 @@ if (!empty($getlogpodtl)) {
}
});
function splpoupdate() {
// alert();
var formData = new FormData();
@ -3715,8 +3716,6 @@ if (!empty($getlogpodtl)) {
}
function filecheck() {
var sizef = document.getElementById('imag').files[0].size;
var file = $('#imag').val();
@ -3767,10 +3766,6 @@ if (!empty($getlogpodtl)) {
});
}
var counter = 0;
var counterConstant = 0;
@ -3796,7 +3791,7 @@ if (!empty($getlogpodtl)) {
'<input type="file" name="browseFiles" id="images' + counter + '" onchange="Copyfilename(this.name); "><br>' +
'<button class="btn btn-success btn-sm add add_this" id="addbtn" onclick="addRow()">ADD</button>'
'</div>' +
'</div>'+
'</div>' +
$('#newdiv').append(div);
@ -3815,10 +3810,6 @@ if (!empty($getlogpodtl)) {
});
//}
function addRow() {
//alert();
@ -3858,8 +3849,7 @@ if (!empty($getlogpodtl)) {
$("#maint_filename" + number).val(name);
}
}
</script>
<script>
$('#IsOpenOrder').change(function() {
if (this.checked) {
$('#ServiceQuantity').val(0);

View File

@ -63,6 +63,20 @@
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Loan Balance </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ':&nbsp;Rs&nbsp;'.$PayDetails[0]->BalanceAdvance ?></td>
</tr>
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"> </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"><?php echo '&nbsp;' ?></td>
<td><?= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Diesel </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ':&nbsp;Rs&nbsp;'.$PayDetails[0]->diesel_amount; ?></td>
</tr>
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"> </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;"><?php echo '&nbsp;'; ?></td>
<td><?= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;">Shed Duty Amount </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ; white-space: nowrap;" ><?php echo ':&nbsp;Rs&nbsp;'.$PayDetails[0]->shed_amount; ?></td>
</tr>
</tbody>
</table>
</td>
@ -71,39 +85,27 @@
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr><th>Earnings</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">&#8377;</span></th><th>Deductions</th><th>Amount <span style="font-family: DejaVu Sans; sans-serif;">&#8377;</span></th></tr>
<tr>
<td width="25%;">&nbsp;Basic</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->monthly_salary_amount; ?>&nbsp;</td>
<td width="25%;">&nbsp;BASIC</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->BASIC; ?>&nbsp;</td>
<td width="25%;">&nbsp;PF</td>
<td width="30%;" style="text-align: right;" ><?php echo $pf_amount; ?>&nbsp;</td>
</tr>
<tr>
<td width="25%;">&nbsp;Diesel</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->diesel_amount; ?>&nbsp;</td>
<td width="25%;">&nbsp;HRA</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->HRA; ?>&nbsp;</td>
<td>&nbsp;ESI</td>
<td style="text-align: right;"> <?php echo $esi_amount ?>&nbsp;</td>
</tr>
<tr>
<td width="25%;">&nbsp;Shed Duty Amount</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->shed_amount; ?>&nbsp;</td>
<td width="25%;">&nbsp;Bonus</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Festival_Bonus; ?>&nbsp;</td>
<td>&nbsp;Salary Advance</td>
<td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?>&nbsp;</td>
</tr>
<tr>
<td width="25%;">&nbsp;Bonus</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Festival_Bonus; ?>&nbsp;</td>
<td width="25%;">&nbsp;</td>
<td width="30%;" style="text-align: right;" >&nbsp;</td>
</tr>
<tr><th nowrap>&nbsp;Total Earning (Rounded)</th>
<td style="text-align: right;">
<?php
$totEarning = $PayDetails[0]->monthly_salary_amount + $PayDetails[0]->Festival_Bonus + $PayDetails[0]->diesel_amount + $PayDetails[0]->shed_amount;
$totEarning = $PayDetails[0]->BASIC + $PayDetails[0]->Festival_Bonus + $PayDetails[0]->HRA ;
echo number_format(round($totEarning),2)
?>
&nbsp;</td>

View File

@ -4784,12 +4784,12 @@ if (!empty($getlogpodtl)) {
// ReceivedQuantity: 0,
// PendingQuantity: quantity
// }));
PONOStatus = <?php echo $PONOStatus; ?>
var PONOStatus = "<?php echo $PONOStatus; ?>";
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
var rowHtml = `
<tr id="${temp}">
<td align="left">${temp}</td>
<td align="left">${Reqnumber}</td>
<td align="center">${Reqnumber}</td>
<td align="left">${materialCode}</td>
<td align="left">${shorten}</td>`;
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {

View File

@ -20,7 +20,8 @@
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}
.save-btn, .cancel-btn {
.save-btn,
.cancel-btn {
border: none;
background: none;
cursor: pointer;
@ -53,8 +54,8 @@
}
</style>
<script>
$(document).ready(function () {
$(document).on('click', '.editable-field', function (e) {
$(document).ready(function() {
$(document).on('click', '.editable-field', function(e) {
e.preventDefault();
const $link = $(this);
const value = $link.text().trim();
@ -67,7 +68,7 @@
});
// Handle click on the tick (save) button
$(document).on('click', '.save-btn', function (e) {
$(document).on('click', '.save-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -84,7 +85,7 @@
});
// Handle click on the close (cancel) button
$(document).on('click', '.cancel-btn', function (e) {
$(document).on('click', '.cancel-btn', function(e) {
e.preventDefault();
const $btn = $(this);
const $editContainer = $btn.closest('.edit-container');
@ -93,7 +94,9 @@
// Hide the edit container and show the <a> tag
$editContainer.hide();
$link.show();
});});</script>
});
});
</script>
<?php
$AvlAmount = 0;
$ReqType = '';
@ -456,9 +459,10 @@ if (!empty($getlogpodtl)) {
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<!-- start first row -->
<div class="row">
<div class="col-12">
<!-- start page title -->
<div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?>
<h4><?= "Edit Import Purchase Order - $PONO "; ?></h4>
@ -466,26 +470,20 @@ if (!empty($getlogpodtl)) {
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
<?php } ?>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
<!-- end page title -->
<!-- Form row -->
</div><!-- end page title -->
</div><!-- end col-->
</div><!-- end first row -->
<!-- second row -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body p-4">
<?php
$attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data');
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<div class="form-row">
<div class="form-group col-md-3">
<label>Requistion No</label>
@ -550,7 +548,6 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<label>Currency Type<span class="text-danger">*</span></label>
@ -615,7 +612,6 @@ if (!empty($getlogpodtl)) {
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
Check Today's Foreign Exchange value <a href="http://www.xe.com/" target="_blank"><u>(Click here)</u></a>
@ -809,6 +805,7 @@ if (!empty($getlogpodtl)) {
<div class="form-group col-md-3">
</div>
</div>
<div class="form-row" align="right">
<div class="col-md-4">
@ -842,8 +839,8 @@ if (!empty($getlogpodtl)) {
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
<!-- <th>Received Qty</th>
<th>Rejected Qty</th>
<th>Pending Qty</th> -->
<!-- <th>Tax Amount</th>
<th>Pending Qty</th>
<th>Tax Amount</th>
<th>Total Order Amount</th> -->
<th>Action</th>
</tr>
@ -868,7 +865,7 @@ if (!empty($getlogpodtl)) {
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<a href="#"
class="editable-field"
data-id ="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
</a>
<div class="edit-container" style="display:none;">
@ -876,27 +873,24 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div>
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
<?php } else {
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
} ?>
</td>
<td align="right"><?php echo $record->Quantity ?></td>
<td align="left"><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td>
<td align="right"><?php echo $record->BasicValue ?></td>
<!-- <td><?php echo $record->ReceivedQuantity ?></td> -->
<!-- <td><?php echo $record->QuantityRejected ?></td> -->
<!-- <td><?php echo $record->PendingQty ?></td> -->
<!-- <td><?php echo $record->Taxamount ?></td>
<!-- <td><?php echo $record->ReceivedQuantity ?></td>
<td><?php echo $record->QuantityRejected ?></td>
<td><?php echo $record->PendingQty ?></td>
<td><?php echo $record->Taxamount ?></td>
<td><?php echo $record->TotalOrderValue ?></td> -->
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
?>" id="<?php //echo 'AvlBudAmt'.$index
?>" value="<?php //echo $record->AvlBudAmt ;
?>" /> -->
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $record->AvlBudAmt ; ?>" /> -->
<input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
@ -936,8 +930,8 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" />
<input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" /> -->
<!-- <input type="hidden" name="<?php echo 'QuantityKG' . $index ?>" id="<?php echo 'QuantityKG' . $index ?>" value="<?php echo $record->QuantityKG; ?>" />-->
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'QuantityKG' . $index ?>" id="<?php // echo 'QuantityKG' . $index ?>" value="<?php // echo $record->QuantityKG; ?>" />-->
<input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
@ -947,7 +941,7 @@ if (!empty($getlogpodtl)) {
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" />-->
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" />-->
<input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" />
@ -955,10 +949,10 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
<!-- <input type="hidden" name="<?php echo 'AfterCustomEDcess' . $index ?>" id="<?php echo 'AfterCustomEDcess' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'AfterCustomEDcess' . $index ?>" id="<?php // echo 'AfterCustomEDcess' . $index ?>" value="<?php // echo $record->AfterCustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php echo 'CustomEDcess' . $index ?>" id="<?php echo 'CustomEDcess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'CustomEDcess' . $index ?>" id="<?php // echo 'CustomEDcess' . $index ?>" value="<?php // echo $record->CustomEdCess; ?>" /> -->
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" />
@ -973,7 +967,7 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<!-- <input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'AfterFreightValue' . $index ?>" id="<?php // echo 'AfterFreightValue' . $index ?>" value="<?php // echo $record->AfterFreightValue; ?>" /> -->
<input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" />
@ -1081,13 +1075,9 @@ if (!empty($getlogpodtl)) {
</table>
</div>
</div>
</div>
</div>
<br><br>
<div class="form-row">
<div class="form-group col-md-4">
@ -1196,8 +1186,8 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="txttot" id="txttot" value=<?php echo $totalhidden ?>>
<!--################################################################## -->
<?php if (!empty($update)){ ?>
<!-- ################################################################## -->
<?php if (!empty($update)) { ?>
<div class="form-row" id="editpodiv">
<div class="form-group col-md-12"><label>Editable POScreen</label>
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
@ -1269,7 +1259,6 @@ if (!empty($getlogpodtl)) {
</table>
</div>
</div>
<?php } ?>
@ -1283,9 +1272,7 @@ if (!empty($getlogpodtl)) {
</div>
</div>
</div>
</div> <!-- ends box-body -->
<div class="form-row px-4">
<label>Select Purchase Order File</label>
@ -1357,7 +1344,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="form-row px-4 ">
<div class="form-group col-md-12" align="left" >
<div class="form-group col-md-12" align="left">
<label>Request On :</label><?php echo $Reqon; ?><br />
<label>Request By :</label><?php echo $RequesterName; ?><br />
@ -1391,16 +1378,16 @@ if (!empty($getlogpodtl)) {
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
</div><!-- end second row -->
</div> <!-- end container fluid -->
</div> <!-- end Content -->
</div> <!-- end content-page -->
<div align="center">
<div id="importpomodel" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-full-width " >
<div class="modal-content" style="width:1060px;" >
<div class="modal-dialog modal-full-width ">
<div class="modal-content" style="width:1060px;">
<div class="modal-header">
<h4 class="modal-title">Add Import Purchase Order Item</h4>
<button type="button" class="close" data-dismiss="modal"
@ -1545,7 +1532,8 @@ if (!empty($getlogpodtl)) {
</div>
<div class="form-group col-md-3">
<!-- <P id=labelRate> --> <label id=labelRate><?php echo "Rate in"; ?> <span class="text-danger">*</span></label><!-- </P> -->
<!-- <P id=labelRate> -->
<label id=labelRate><?php echo "Rate in"; ?> <span class="text-danger">*</span></label><!-- </P> -->
<div>
<?php
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange(),validateExceedLimit(),calculateFreight(0)');
@ -2006,8 +1994,8 @@ if (!empty($getlogpodtl)) {
<div align="center">
<div id="editimportpomodel" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-full-width " >
<div class="modal-content" style="width:1060px;" >
<div class="modal-dialog modal-full-width ">
<div class="modal-content" style="width:1060px;">
<div class="modal-header">
<h4 class="modal-title">Edit Import Purchase Order Item</h4>
<button type="button" class="close" data-dismiss="modal"
@ -2209,7 +2197,7 @@ if (!empty($getlogpodtl)) {
<br>
<div class="form-row" style="border:1px solid black;">
<br/>
<br />
<div class="form-group col-md-6 p-2 mt-1" style="padding:0px;">
<div class="form-row">
<div class="form-group col-md-4">
@ -3376,7 +3364,7 @@ if (!empty($getlogpodtl)) {
$("#UOM").val(obj.UOM);
$("#Quantity").val(obj.Quantity).trigger('change');
$("#Rate").val(obj.material_rate);
if(obj.material_rate != 0){
if (obj.material_rate != 0) {
Ratechange();
validateExceedLimit();
calculateFreight(0);
@ -4294,7 +4282,7 @@ if (!empty($getlogpodtl)) {
var rowHtml = `
<tr id="${temp}">
<td align="left">${temp}</td>
<td align="left">${Reqnumber}</td>
<td align="center">${Reqnumber}</td>
<td align="left">${materialCode}</td>
<td align="left">${shorten}</td>`;
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
@ -4306,7 +4294,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div></td>`;
}else{ rowHtml += `<td>-</td>`; }
} else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td align="left">${quantity}</td>
<td align="left">${uom}</td>
<td align="left">${itemRate}</td>
@ -5346,7 +5336,7 @@ if (!empty($getlogpodtl)) {
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
success: function(data) {
$('#loader').hide();
(data) ? alert(response) : alert("Error");
(data) ? alert(response): alert("Error");
}
});
}

View File

@ -371,17 +371,17 @@
<td style="max-width:80px;text-align:right;"><?php echo number_format($workedSalary, 2, '.', ''); ?></td>
<td style="max-width:80px;text-align:right;">
<td id="bassalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php $basicWorked = $workedSalary * 70 / 100;
echo number_format($basicWorked, 2, '.', ''); ?>
</td>
<td style="max-width:80px;text-align:right;">
<td id="hrasalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php $hraWorked = $workedSalary * 30 / 100;
echo number_format($hraWorked, 2, '.', ''); ?>
</td>
<td style="max-width:80px;text-align:right;">
<td id="grosalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php echo number_format($basicWorked + $hraWorked, 2, '.', ''); ?>
</td>
@ -583,17 +583,17 @@
<?php echo number_format($sum_of_amount, 2, '.', ''); ?>
</td>
<td style="max-width:80px;text-align:right;">
<td id="bassalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
<?php
echo number_format($basic_worked, 2, '.', ''); ?>
</td>
<td style="max-width:80px;text-align:right;">
<td id="hrasalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
<?php
echo number_format($hra_worked, 2, '.', ''); ?>
</td>
<td style="max-width:80px;text-align:right;">
<td id="grosalary<?php echo $inx ?>" style="max-width:80px;text-align:right;">
<?php echo number_format($basic_worked + $hra_worked, 2, '.', ''); ?>
</td>
@ -653,11 +653,11 @@
<?php if (!empty($record->payroll_id)) { ?> title="Payslip Calculated"
style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>>
<?php if (!empty($record->driver_final_payment)) {
echo $record->driver_final_payment;
$estTotal[] = $record->driver_final_payment;
echo ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
$estTotal[] = ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
} else {
echo $empSalary[$i];
$estTotal[] = $empSalary[$i];
echo ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
$estTotal[] = ($basic_worked + $hra_worked + $record->Festival_Bonus)-($record->Monthly_Due+$record->esi_amount+$record->pf_amount);
}
?>
</td>
@ -1144,10 +1144,16 @@ $(document).ready(function () {
// console.log(sno);return true;
var driverEarn = parseFloat(document.getElementById('ttlsalary' + sno).textContent);
var grosssalary = parseFloat(document.getElementById('grosalary' + sno).textContent);
var basicsalary = parseFloat(document.getElementById('bassalary' + sno).textContent);
var hrasalary = parseFloat(document.getElementById('hrasalary' + sno).textContent);
var Festivals = parseFloat(document.getElementById('Festival' + sno).textContent);
totalfestival[sno] = Festivals;
var ESI = parseFloat(document.getElementById('esiAmt' + sno).textContent);
var PF = parseFloat(document.getElementById('pfAmt' + sno).textContent);
var element = document.getElementById('loanatm' + sno);
var loanamt = parseFloat(element.value);
@ -1171,6 +1177,7 @@ $(document).ready(function () {
var current_loan_amt = 0;
var autoLoan = parseFloat(monthDue);
console.log(autoLoan,"autoLoan");
var Balance_Amount = loanamt - paidamt;
if (autoLoan > Balance_Amount) {
@ -1181,21 +1188,21 @@ $(document).ready(function () {
current_loan_amt = autoLoan;
}
if (isNaN(driverEarn)) { driverEarn = 0; }
if (isNaN(basicsalary)) { basicsalary = 0; }
if (isNaN(hrasalary)) { hrasalary = 0; }
var driverSalaryAdd = basicsalary + hrasalary + Festivals;
console.log('bas + hra + bon ',driverSalaryAdd);
var driverSalaryAdd = driverEarn + Festivals;
var driverSalarySub = current_loan_amt;
console.log("current loan amt == ",current_loan_amt);
var driverSalarySub = current_loan_amt+ESI + PF ;
console.log("L + E + P ",current_loan_amt);
var driverMonthSalary = driverSalaryAdd - driverSalarySub
var driverSalary = Math.round(driverMonthSalary);
console.log("Sal ",driverSalary);
var cals = (driverSalary).toFixed(0);

View File

@ -2385,10 +2385,10 @@ if (!empty($INRSYMBOL)) {
var AvlBudAmt = '<?php echo $AvlAmount ?>';
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if (serviceValidate()) {
// if (document.getElementById('serviceTax').rows.length < 2) {
// alert('Please Select Line item to Create PO');
// return false;
// }
if (document.getElementById('ServiceTable').rows.length < 1) {
alert('Atleast One Line needed');
return false;
}
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// return false;
@ -2397,15 +2397,15 @@ if (!empty($INRSYMBOL)) {
// alert('Please Enter Other Payable Terms Description');
// $('#Otherpayment').focus();
// return false;
// } else if ($('#descofpo').val().trim() == '') {
// alert('Please Enter Description Of Service');
// $('#descofpo').focus();
// return false;
} else if ($('#descofpo').val().trim() == '') {
alert('Please Enter Description Of Service');
$('#descofpo').focus();
return false;
// } else if ($('#PoTypeOptions').val() == "0") {
// alert('Please Select POType');
// $('#PoTypeOptions').focus();
// return false;
// } else {
} else {
var formData = new FormData($('.ServicePO')[0]);
$('#loader').show();
console.log("inside add service purchase order view page");

View File

@ -145,14 +145,16 @@ function serviceValidate(){
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
}else if ($('#ServiceTable tbody tr').length < 1) {
alert('Atleast One Line needed');
return false;
} else if ($('#descofpo').val().trim() == '') {
alert('Please Enter Description Of Service');
$('#descofpo').focus();
return false;
}else {
}
// else if ($('#ServiceTable tbody tr').length < 1) {
// alert('Atleast One Line needed');
// return false;
// } else if ($('#descofpo').val().trim() == '') {
// alert('Please Enter Description Of Service');
// $('#descofpo').focus();
// return false;
// }
else {
return true;
}
}