Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2025-03-06 16:00:58 +05:30
commit 7f722ceef9
15 changed files with 1867 additions and 1815 deletions

View File

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

View File

@ -3068,7 +3068,6 @@ class Purchaseorder extends BaseController
$this->purchaseorder_model->insertlogpo($logpo); $this->purchaseorder_model->insertlogpo($logpo);
} }
} }
// print_r($this->request->getPost());die;
for ($i = 1; $i <= $RowCount; $i++) { for ($i = 1; $i <= $RowCount; $i++) {
$MaterialCode = $this->request->getPost('materialCode' . $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.*') $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('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('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') // ->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_employee_details Emp', 'Pay.driver_id = Emp.EmpID')
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode') ->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); box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
} }
.save-btn, .cancel-btn { .save-btn,
.cancel-btn {
border: none; border: none;
background: none; background: none;
cursor: pointer; cursor: pointer;
@ -93,7 +94,9 @@
// Hide the edit container and show the <a> tag // Hide the edit container and show the <a> tag
$editContainer.hide(); $editContainer.hide();
$link.show(); $link.show();
});});</script> });
});
</script>
<?php <?php
$insuranceStatus = array( $insuranceStatus = array(
array("name" => "NO", "value" => "0"), array("name" => "NO", "value" => "0"),
@ -148,6 +151,7 @@ if (!empty($MaxPODate)) {
$MaxPoDate = $date->PODate; $MaxPoDate = $date->PODate;
} }
} }
if (!empty($POMaster)) { if (!empty($POMaster)) {
foreach ($POMaster as $Req) { foreach ($POMaster as $Req) {
@ -279,8 +283,6 @@ if (!empty($getlogpodtl)) {
}); });
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
$('#otherdescription').hide(); $('#otherdescription').hide();
var insuranceOpt = '<?php echo $InsuranceOptions; ?>'; var insuranceOpt = '<?php echo $InsuranceOptions; ?>';
@ -388,6 +390,7 @@ if (!empty($getlogpodtl)) {
} }
}); });
</script> </script>
<script> <script>
var RequistQuantity = ''; var RequistQuantity = '';
var AvilBudAmt = ''; var AvilBudAmt = '';
@ -482,8 +485,6 @@ if (!empty($getlogpodtl)) {
}); });
$('#MaterialCode').change(function() { $('#MaterialCode').change(function() {
var id = $('#MaterialCode').val(); var id = $('#MaterialCode').val();
RequistQuantity = ''; RequistQuantity = '';
@ -500,6 +501,7 @@ if (!empty($getlogpodtl)) {
$("#ItemName").val(obj.MaterialName); $("#ItemName").val(obj.MaterialName);
$("#UOM").val(obj.UOM); $("#UOM").val(obj.UOM);
$("#Quantity").val(obj.Quantity); $("#Quantity").val(obj.Quantity);
$("#Rate").val(obj.material_rate);
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
var materialn = obj.MaterialName; var materialn = obj.MaterialName;
@ -510,6 +512,10 @@ if (!empty($getlogpodtl)) {
$('#OtheritemDescription').val(obj.MaterialDescription); $('#OtheritemDescription').val(obj.MaterialDescription);
} }
if (obj.material_rate != 0) {
Ratechange();
}
} }
}); });
@ -536,6 +542,7 @@ if (!empty($getlogpodtl)) {
} }
}); });
$('#EditMaterialCode').change(function() { $('#EditMaterialCode').change(function() {
var id = $('#EditMaterialCode').val(); var id = $('#EditMaterialCode').val();
@ -844,6 +851,7 @@ if (!empty($getlogpodtl)) {
RequistQuantity = ''; RequistQuantity = '';
} }
$(document).ready(function() { $(document).ready(function() {
$("#PaymentTerms").select2(); $("#PaymentTerms").select2();
@ -859,6 +867,7 @@ if (!empty($getlogpodtl)) {
}); });
}); });
</script> </script>
<style> <style>
.num { .num {
text-align: right; text-align: right;
@ -908,6 +917,7 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
<!-- end page title --> <!-- end page title -->
<!-- Form row --> <!-- Form row -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@ -1035,7 +1045,6 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
@ -1274,7 +1283,8 @@ if (!empty($getlogpodtl)) {
<td style="text-align:left !important;"><?php echo $index; ?></td> <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: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 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) { ?> <td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<a href="#" <a href="#"
class="editable-field" class="editable-field"
@ -1286,7 +1296,10 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button> <button class="save-btn"></button>
<button class="cancel-btn"></button> <button class="cancel-btn"></button>
</div> </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 style="text-align:left !important;"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td> <td><?php echo $record->UOM ?></td>
@ -1593,8 +1606,7 @@ if (!empty($getlogpodtl)) {
} }
?> ?>
</tbody> </tbody>
<?php } else { <?php } else {} ?>
} ?>
</table> </table>
</div> </div>
</div> </div>
@ -1696,10 +1708,10 @@ if (!empty($getlogpodtl)) {
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
</div><!-- end col--> </div><!-- end col-->
</div> </div><!-- end form row -->
</div> <!-- container --> </div> <!-- end container-fluid -->
</div> <!-- content --> </div> <!-- end content -->
</div> </div><!-- end content-page -->
<!-- Model for servicepo --> <!-- Model for servicepo -->
<div id="SERVICE" class="modal fade" tabindex="-1" role="dialog" <div id="SERVICE" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
@ -2627,7 +2639,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button> <button class="save-btn"></button>
<button class="cancel-btn"></button> <button class="cancel-btn"></button>
</div></td>`; </div></td>`;
}else{ rowHtml += `<td>-</td>`; } } else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td align="right">${quantity}</td> rowHtml += `<td align="right">${quantity}</td>
<td align="left">${uom}</td> <td align="left">${uom}</td>
<td align="right">${itemRate}</td> <td align="right">${itemRate}</td>
@ -3165,12 +3179,10 @@ if (!empty($getlogpodtl)) {
if (serviceValidate()) { if (serviceValidate()) {
// if (document.getElementById('ServiceTable').rows.length < 2) if (document.getElementById('ServiceTable').rows.length < 2) {
// { alert('Atleast One Line needed');
// alert('Please Select Line item to Create PO'); return false;
// $('#Deliverydt').focus(); }
// return false;
// }
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// return false; // return false;
@ -3179,11 +3191,11 @@ if (!empty($getlogpodtl)) {
// alert('Please Enter Payable Terms'); // alert('Please Enter Payable Terms');
// $('#Otherpayment').focus(); // $('#Otherpayment').focus();
// return false; // return false;
// } else if ($('#editdescofpo').val().trim() == '') { else if ($('#editdescofpo').val().trim() == '') {
// alert('Please Enter Description Of Service'); alert('Please Enter Description Of Service');
// $('#editdescofpo').focus(); $('#editdescofpo').focus();
// return false; return false;
// } else { } else {
// $('#content').loader('show'); // $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]); var formData = new FormData($('.ServicePO')[0]);
$('#loader').show(); $('#loader').show();
@ -3230,7 +3242,7 @@ if (!empty($getlogpodtl)) {
} }
}); });
// } }
} }
} }
@ -3253,9 +3265,6 @@ if (!empty($getlogpodtl)) {
}); });
function calculateCgstTax(varBasicValue, Cgst) { function calculateCgstTax(varBasicValue, Cgst) {
var basicValue = parseFloat(varBasicValue); var basicValue = parseFloat(varBasicValue);
@ -3427,6 +3436,7 @@ if (!empty($getlogpodtl)) {
id = ''; id = '';
}); });
$(document).ready(function() { $(document).ready(function() {
$("#EDITSERVICE").on("shown.bs.modal", function(e) { $("#EDITSERVICE").on("shown.bs.modal", function(e) {
@ -3641,6 +3651,7 @@ if (!empty($getlogpodtl)) {
}); });
}); });
$("#insuranceStatus").change(function() { $("#insuranceStatus").change(function() {
var InsNo = '<?php echo $InsuranceNumber; ?>'; var InsNo = '<?php echo $InsuranceNumber; ?>';
@ -3653,11 +3664,6 @@ if (!empty($getlogpodtl)) {
} }
}); });
function splpoupdate() { function splpoupdate() {
// alert(); // alert();
var formData = new FormData(); var formData = new FormData();
@ -3710,8 +3716,6 @@ if (!empty($getlogpodtl)) {
} }
function filecheck() { function filecheck() {
var sizef = document.getElementById('imag').files[0].size; var sizef = document.getElementById('imag').files[0].size;
var file = $('#imag').val(); var file = $('#imag').val();
@ -3762,10 +3766,6 @@ if (!empty($getlogpodtl)) {
}); });
} }
var counter = 0; var counter = 0;
var counterConstant = 0; var counterConstant = 0;
@ -3810,10 +3810,6 @@ if (!empty($getlogpodtl)) {
}); });
//}
function addRow() { function addRow() {
//alert(); //alert();
@ -3853,8 +3849,7 @@ if (!empty($getlogpodtl)) {
$("#maint_filename" + number).val(name); $("#maint_filename" + number).val(name);
} }
} }
</script>
<script>
$('#IsOpenOrder').change(function() { $('#IsOpenOrder').change(function() {
if (this.checked) { if (this.checked) {
$('#ServiceQuantity').val(0); $('#ServiceQuantity').val(0);

View File

@ -1838,9 +1838,17 @@ if (!empty($INRSYMBOL)) {
function showsubmit() { function showsubmit() {
var isChecked = $('#IsOpenOrder').is(':checked'); var isChecked = $('#IsOpenOrder').is(':checked');
// alert("isChecked: " + isChecked); console.log("Step 1 = SS");
var PO = $('#POType').val(); var PO = $('#POType').val();
if (PO == 'SERVICE') {
if ($('#emergdescofpo').val().trim() == '') {
alert('Please Enter Description Of Service');
$('#emergdescofpo').focus();
return false;
}
}
if (isChecked) { if (isChecked) {
if (PO == 'REVENUE') { if (PO == 'REVENUE') {
//alert('normalemergency'); //alert('normalemergency');
@ -6335,6 +6343,7 @@ if (!empty($INRSYMBOL)) {
}); });
} }
$("#PaymentMethod").trigger('change');
}); });
$(document).ready(function () { $(document).ready(function () {
@ -6406,6 +6415,18 @@ if (!empty($INRSYMBOL)) {
} }
}); });
//If others is the payment terms to display mandatory field
$("#PaymentMethod").change(function () {
if ($('#PaymentMethod').val().trim() == 'PT08') {
$('#otheroptiondiv').show();
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
});
/*get cost center name using department*/ /*get cost center name using department*/
var CostArray = ''; var CostArray = '';
$('#DepartmentName').change(function () { $('#DepartmentName').change(function () {
@ -8018,17 +8039,6 @@ if (!empty($INRSYMBOL)) {
} }
//If others is the payment terms to display mandatory field
$("#PaymentMethod").change(function () {
if ($('#PaymentMethod').val().trim() == 'PT08') {
$('#otheroptiondiv').show();
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
});
// set default null value // set default null value
function clearTotalItemValues() { function clearTotalItemValues() {

View File

@ -123,6 +123,18 @@
$('#editpackagingcalmodel').on('hidden.bs.modal', function() { $('#editpackagingcalmodel').on('hidden.bs.modal', function() {
$('#editpackagingcalmodel').css('z-index', ''); // Reset to default $('#editpackagingcalmodel').css('z-index', ''); // Reset to default
}); });
//If others is the payment terms to display mandatory field
$("#PaymentMethod").change(function() {
if ($('#PaymentMethod').val().trim() == 'PT08') {
$('#otheroptiondiv').show();
$('#Otherpayment').prop('required', true);
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').prop('required', false);
$('#Otherpayment').val('');
}
});
}); });
</script> </script>
<?php <?php
@ -703,7 +715,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label for="payablefrom">Payable Terms </label> <label for="payablefrom">Payable Terms<span class="text-danger">*</span> </label>
<?php <?php
$options1 = array("0" => 'Select Payment method'); $options1 = array("0" => 'Select Payment method');
@ -722,7 +734,7 @@ if (!empty($INRSYMBOL)) {
?> ?>
</div> </div>
<div class="form-group col-md-3" id="otheroptiondiv" style="display:none;"> <div class="form-group col-md-3" id="otheroptiondiv" style="display:none;">
<label>Description of Payable Terms</label> <label>Description of Payable Terms<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true'); $data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true');
@ -2740,6 +2752,11 @@ if (!empty($INRSYMBOL)) {
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')'); $('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/Ton)'); $('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/Ton)');
if(obj.material_rate != 0){
Ratechange();
calculateFreight(3);
calculateFreightlocaddper();
}
} }
@ -4581,6 +4598,7 @@ if (!empty($INRSYMBOL)) {
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide();
// $('#content').loader('hide'); // $('#content').loader('hide');
alert("Error"); alert("Error");
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
@ -4588,6 +4606,7 @@ if (!empty($INRSYMBOL)) {
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
$('#loader').hide();
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
@ -5398,17 +5417,6 @@ if (!empty($INRSYMBOL)) {
return TAXval; // $('#AfterServiceTax').val(TAXval); return TAXval; // $('#AfterServiceTax').val(TAXval);
} }
//If others is the payment terms to display mandatory field
$("#PaymentMethod").change(function() {
if ($('#PaymentMethod').val().trim() == 'PT08') {
$('#otheroptiondiv').show();
$('#Otherpayment').prop('required', true);
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').prop('required', false);
$('#Otherpayment').val('');
}
});
function clearTotalItemValues() { function clearTotalItemValues() {
$('#txtTotCgst').val(''); $('#txtTotCgst').val('');

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;">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> <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>
<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> </tbody>
</table> </table>
</td> </td>
@ -71,39 +85,27 @@
<table style="border-collapse: collapse;border-top:#fff;" cellpadding="0" cellspacing="0" border="1" width="100%" > <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><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> <tr>
<td width="25%;">&nbsp;Basic</td> <td width="25%;">&nbsp;BASIC</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->monthly_salary_amount; ?>&nbsp;</td> <td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->BASIC; ?>&nbsp;</td>
<td width="25%;">&nbsp;PF</td> <td width="25%;">&nbsp;PF</td>
<td width="30%;" style="text-align: right;" ><?php echo $pf_amount; ?>&nbsp;</td> <td width="30%;" style="text-align: right;" ><?php echo $pf_amount; ?>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td width="25%;">&nbsp;Diesel</td> <td width="25%;">&nbsp;HRA</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->diesel_amount; ?>&nbsp;</td> <td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->HRA; ?>&nbsp;</td>
<td>&nbsp;ESI</td> <td>&nbsp;ESI</td>
<td style="text-align: right;"> <?php echo $esi_amount ?>&nbsp;</td> <td style="text-align: right;"> <?php echo $esi_amount ?>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td width="25%;">&nbsp;Shed Duty Amount</td> <td width="25%;">&nbsp;Bonus</td>
<td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->shed_amount; ?>&nbsp;</td> <td width="20%;" style="text-align: right;" ><?php echo $PayDetails[0]->Festival_Bonus; ?>&nbsp;</td>
<td>&nbsp;Salary Advance</td> <td>&nbsp;Salary Advance</td>
<td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?>&nbsp;</td> <td style="text-align: right;"> <?php echo $PayDetails[0]->Advance ?>&nbsp;</td>
</tr> </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> <tr><th nowrap>&nbsp;Total Earning (Rounded)</th>
<td style="text-align: right;"> <td style="text-align: right;">
<?php <?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) echo number_format(round($totEarning),2)
?> ?>
&nbsp;</td> &nbsp;</td>

View File

@ -3935,6 +3935,7 @@ if (!empty($getlogpodtl)) {
$("#CPUOM").val(''); $("#CPUOM").val('');
$("#CPQuantity").val(''); $("#CPQuantity").val('');
$("#CPTotalAmount").val(''); $("#CPTotalAmount").val('');
$("#CPRate").val('');
RequistQuantity = ''; RequistQuantity = '';
clearTaxField(); clearTaxField();
if (id != '0') { if (id != '0') {
@ -3946,12 +3947,16 @@ if (!empty($getlogpodtl)) {
$("#CapitalItemName").val(obj.MaterialName); $("#CapitalItemName").val(obj.MaterialName);
$("#CPUOM").val(obj.UOM); $("#CPUOM").val(obj.UOM);
$("#CPQuantity").val(obj.Quantity); $("#CPQuantity").val(obj.Quantity);
$("#CPRate").val(obj.material_rate);
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
var CPUOMDisplay = obj.UOM; var CPUOMDisplay = obj.UOM;
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')'); $('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')'); $('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
if(obj.material_rate != 0){
Ratechange();calculateFreight(3);calculateFreightlocaddper();
}
@ -4779,12 +4784,12 @@ if (!empty($getlogpodtl)) {
// ReceivedQuantity: 0, // ReceivedQuantity: 0,
// PendingQuantity: quantity // PendingQuantity: quantity
// })); // }));
PONOStatus = <?php echo $PONOStatus; ?> var PONOStatus = "<?php echo $PONOStatus; ?>";
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName; var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
var rowHtml = ` var rowHtml = `
<tr id="${temp}"> <tr id="${temp}">
<td align="left">${temp}</td> <td align="left">${temp}</td>
<td align="left">${Reqnumber}</td> <td align="center">${Reqnumber}</td>
<td align="left">${materialCode}</td> <td align="left">${materialCode}</td>
<td align="left">${shorten}</td>`; <td align="left">${shorten}</td>`;
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") { if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {

View File

@ -541,6 +541,10 @@ if (!empty($getlogpodtl)) {
$("#ItemName").val(obj.MaterialName); $("#ItemName").val(obj.MaterialName);
$("#UOM").val(obj.UOM); $("#UOM").val(obj.UOM);
$("#Quantity").val(obj.Quantity); $("#Quantity").val(obj.Quantity);
$("#Rate").val(obj.material_rate);
if(obj.material_rate != 0){
change();
}
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
} }
}); });

View File

@ -20,7 +20,8 @@
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
} }
.save-btn, .cancel-btn { .save-btn,
.cancel-btn {
border: none; border: none;
background: none; background: none;
cursor: pointer; cursor: pointer;
@ -93,7 +94,9 @@
// Hide the edit container and show the <a> tag // Hide the edit container and show the <a> tag
$editContainer.hide(); $editContainer.hide();
$link.show(); $link.show();
});});</script> });
});
</script>
<?php <?php
$AvlAmount = 0; $AvlAmount = 0;
$ReqType = ''; $ReqType = '';
@ -456,9 +459,10 @@ if (!empty($getlogpodtl)) {
<div class="content"> <div class="content">
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <div class="container-fluid">
<!-- start page title --> <!-- start first row -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<!-- start page title -->
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?> <?php if ($parentPO == '') { ?>
<h4><?= "Edit Import Purchase Order - $PONO "; ?></h4> <h4><?= "Edit Import Purchase Order - $PONO "; ?></h4>
@ -466,26 +470,20 @@ if (!empty($getlogpodtl)) {
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4> <h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
<?php } ?> <?php } ?>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a> <a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
</div> </div><!-- end page title -->
</div> </div><!-- end col-->
</div> </div><!-- end first row -->
<!-- end page title -->
<!-- Form row --> <!-- second row -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body p-4"> <div class="card-body p-4">
<?php <?php
$attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); $attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data');
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Requistion No</label> <label>Requistion No</label>
@ -550,7 +548,6 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Currency Type<span class="text-danger">*</span></label> <label>Currency Type<span class="text-danger">*</span></label>
@ -615,7 +612,6 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <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> 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 class="form-group col-md-3">
</div> </div>
</div> </div>
<div class="form-row" align="right"> <div class="form-row" align="right">
<div class="col-md-4"> <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 style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
<!-- <th>Received Qty</th> <!-- <th>Received Qty</th>
<th>Rejected Qty</th> <th>Rejected Qty</th>
<th>Pending Qty</th> --> <th>Pending Qty</th>
<!-- <th>Tax Amount</th> <th>Tax Amount</th>
<th>Total Order Amount</th> --> <th>Total Order Amount</th> -->
<th>Action</th> <th>Action</th>
</tr> </tr>
@ -876,27 +873,24 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button> <button class="save-btn"></button>
<button class="cancel-btn"></button> <button class="cancel-btn"></button>
</div> </div>
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?> <?php } else {
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
} ?>
</td> </td>
<td align="right"><?php echo $record->Quantity ?></td> <td align="right"><?php echo $record->Quantity ?></td>
<td align="left"><?php echo $record->UOM ?></td> <td align="left"><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td> <td align="right"><?php echo $record->Rate ?></td>
<td align="right"><?php echo $record->BasicValue ?></td> <td align="right"><?php echo $record->BasicValue ?></td>
<!-- <td><?php echo $record->ReceivedQuantity ?></td> --> <!-- <td><?php echo $record->ReceivedQuantity ?></td>
<!-- <td><?php echo $record->QuantityRejected ?></td> --> <td><?php echo $record->QuantityRejected ?></td>
<!-- <td><?php echo $record->PendingQty ?></td> --> <td><?php echo $record->PendingQty ?></td>
<!-- <td><?php echo $record->Taxamount ?></td> <td><?php echo $record->Taxamount ?></td>
<td><?php echo $record->TotalOrderValue ?></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 '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 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index <!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $record->AvlBudAmt ; ?>" /> -->
?>" 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 '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; ?>" /> <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 '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 '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 '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 '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; ?>" /> <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; ?>" /> <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 '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; ?>" /> <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 '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; ?>" /> <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> </table>
</div> </div>
</div> </div>
</div>
</div>
<br><br> <br><br>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
@ -1269,7 +1259,6 @@ if (!empty($getlogpodtl)) {
</table> </table>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
@ -1283,9 +1272,7 @@ if (!empty($getlogpodtl)) {
</div> </div>
</div> </div>
</div> </div> <!-- ends box-body -->
<div class="form-row px-4"> <div class="form-row px-4">
<label>Select Purchase Order File</label> <label>Select Purchase Order File</label>
@ -1391,10 +1378,10 @@ if (!empty($getlogpodtl)) {
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
</div><!-- end col--> </div><!-- end col-->
</div> </div><!-- end second row -->
</div> <!-- container --> </div> <!-- end container fluid -->
</div> <!-- content --> </div> <!-- end Content -->
</div> </div> <!-- end content-page -->
<div align="center"> <div align="center">
<div id="importpomodel" class="modal fade" tabindex="-1" role="dialog" <div id="importpomodel" class="modal fade" tabindex="-1" role="dialog"
@ -1545,7 +1532,8 @@ if (!empty($getlogpodtl)) {
</div> </div>
<div class="form-group col-md-3"> <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> <div>
<?php <?php
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange(),validateExceedLimit(),calculateFreight(0)'); $data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange(),validateExceedLimit(),calculateFreight(0)');
@ -3375,6 +3363,12 @@ if (!empty($getlogpodtl)) {
$("#ItemName").val(obj.MaterialName); $("#ItemName").val(obj.MaterialName);
$("#UOM").val(obj.UOM); $("#UOM").val(obj.UOM);
$("#Quantity").val(obj.Quantity).trigger('change'); $("#Quantity").val(obj.Quantity).trigger('change');
$("#Rate").val(obj.material_rate);
if (obj.material_rate != 0) {
Ratechange();
validateExceedLimit();
calculateFreight(0);
}
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
reqq = RequistQuantity; reqq = RequistQuantity;
//RequistQuantity=parseFloat($('#Quantity').val()); //RequistQuantity=parseFloat($('#Quantity').val());
@ -4288,7 +4282,7 @@ if (!empty($getlogpodtl)) {
var rowHtml = ` var rowHtml = `
<tr id="${temp}"> <tr id="${temp}">
<td align="left">${temp}</td> <td align="left">${temp}</td>
<td align="left">${Reqnumber}</td> <td align="center">${Reqnumber}</td>
<td align="left">${materialCode}</td> <td align="left">${materialCode}</td>
<td align="left">${shorten}</td>`; <td align="left">${shorten}</td>`;
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") { if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
@ -4300,7 +4294,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button> <button class="save-btn"></button>
<button class="cancel-btn"></button> <button class="cancel-btn"></button>
</div></td>`; </div></td>`;
}else{ rowHtml += `<td>-</td>`; } } else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td align="left">${quantity}</td> rowHtml += `<td align="left">${quantity}</td>
<td align="left">${uom}</td> <td align="left">${uom}</td>
<td align="left">${itemRate}</td> <td align="left">${itemRate}</td>

View File

@ -2274,6 +2274,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
}); });
} }
$("#PaymentTerms").trigger('change');
}); });
@ -2393,10 +2394,16 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
$("#ItemName").val(obj.MaterialName); $("#ItemName").val(obj.MaterialName);
$("#UOM").val(obj.UOM); $("#UOM").val(obj.UOM);
$("#Quantity").val(obj.Quantity); $("#Quantity").val(obj.Quantity);
$("#Rate").val(obj.material_rate);
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
unit = obj.UOM; unit = obj.UOM;
// document.getElementById("labelPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit; // document.getElementById("labelPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
// document.getElementById("labelEditPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit; // document.getElementById("labelEditPurchaseRate").innerHTML ='purchase rate [Basic]/'+unit;
if(obj.material_rate != 0){
Ratechange();
validateExceedLimit();
calculateFreight(0);
}
} }
}); });
@ -4198,7 +4205,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
formData.append('txtDeletedRow', txtDeletedRow); formData.append('txtDeletedRow', txtDeletedRow);
formData.append('textStatus', stat); formData.append('textStatus', stat);
// disableButtons(); // disableButtons();
$('#loader').show();
$.ajax({ $.ajax({
// data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat, // data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus, //data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
@ -4208,6 +4215,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
processData: false, processData: false,
contentType: false, contentType: false,
success: function(data) { success: function(data) {
$('#loader').hide();
if (data) { if (data) {
// $('#content').loader('hide'); // $('#content').loader('hide');
alert(data); alert(data);
@ -4219,6 +4227,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide();
alert("Error"); alert("Error");
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }

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

View File

@ -434,6 +434,9 @@ if (!empty($INRSYMBOL)) {
$("#Quantity").val(obj.Quantity); $("#Quantity").val(obj.Quantity);
$("#Rate").val(obj.material_rate); $("#Rate").val(obj.material_rate);
RequistQuantity = obj.Quantity; RequistQuantity = obj.Quantity;
if(obj.material_rate != 0){
change();
}
} }
}); });
} }
@ -2103,7 +2106,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label for="payablefrom">Payable Terms</label> <label for="payablefrom">Payable Terms<span class="text-danger">*</span></label>
<?php <?php
if (!empty($Payment)) { if (!empty($Payment)) {
$options6 = array("0" => 'Select Payment Terms '); $options6 = array("0" => 'Select Payment Terms ');
@ -3946,7 +3949,7 @@ if (!empty($INRSYMBOL)) {
// else { // else {
var formData = new FormData($('.CreatePO')[0]); var formData = new FormData($('.CreatePO')[0]);
// disableButtons(); $('#loader').show();
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -3955,6 +3958,7 @@ if (!empty($INRSYMBOL)) {
processData: false, processData: false,
contentType: false, contentType: false,
success: function(data) { success: function(data) {
$('#loader').hide();
if (data) { if (data) {
alert(data); alert(data);
@ -3973,6 +3977,7 @@ if (!empty($INRSYMBOL)) {
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
$('#loader').hide();
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);

View File

@ -208,6 +208,7 @@ if (!empty($INRSYMBOL)) {
}); });
} }
$("#PaymentTerms").trigger('change');
}); });
document.getElementById("Date").checked = true; document.getElementById("Date").checked = true;
@ -369,6 +370,10 @@ if (!empty($INRSYMBOL)) {
$('#otherdescription').show(); $('#otherdescription').show();
$('#OtheritemDescription').val(obj.MaterialDescription); $('#OtheritemDescription').val(obj.MaterialDescription);
} }
if(obj.material_rate != 0){
Ratechange();
}
} }
}); });
} }
@ -1047,7 +1052,7 @@ if (!empty($INRSYMBOL)) {
</div><!-- 6. form-row div closed here --> </div><!-- 6. form-row div closed here -->
<div class="form-row"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;"> <table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important;">SNo</th> <th style="white-space: nowrap !important;">SNo</th>
@ -1066,7 +1071,7 @@ if (!empty($INRSYMBOL)) {
</thead> </thead>
<tbody id='ServiceAppend'> <tbody id='ServiceAppend'>
</tbody> </tbody>
</table><!-- serviceTax table closed here --> </table><!-- ServiceTable table closed here -->
</div> </div>
</div><!-- 7. form-row div closed here --> </div><!-- 7. form-row div closed here -->
@ -2096,7 +2101,7 @@ if (!empty($INRSYMBOL)) {
function populateValueMainFormForEditServiceTax() { function populateValueMainFormForEditServiceTax() {
var rows = $('#serviceTax tbody tr').length; var rows = $('#ServiceTable tbody tr').length;
var TotCgst = 0; var TotCgst = 0;
var TotSgst = 0; var TotSgst = 0;
@ -2380,10 +2385,10 @@ if (!empty($INRSYMBOL)) {
var AvlBudAmt = '<?php echo $AvlAmount ?>'; var AvlBudAmt = '<?php echo $AvlAmount ?>';
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val(); var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if (serviceValidate()) { if (serviceValidate()) {
// if (document.getElementById('serviceTax').rows.length < 2) { if (document.getElementById('ServiceTable').rows.length < 1) {
// alert('Please Select Line item to Create PO'); alert('Atleast One Line needed');
// return false; return false;
// } }
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
// return false; // return false;
@ -2392,17 +2397,17 @@ if (!empty($INRSYMBOL)) {
// alert('Please Enter Other Payable Terms Description'); // alert('Please Enter Other Payable Terms Description');
// $('#Otherpayment').focus(); // $('#Otherpayment').focus();
// return false; // return false;
// } else if ($('#descofpo').val().trim() == '') { } else if ($('#descofpo').val().trim() == '') {
// alert('Please Enter Description Of Service'); alert('Please Enter Description Of Service');
// $('#descofpo').focus(); $('#descofpo').focus();
// return false; return false;
// } else if ($('#PoTypeOptions').val() == "0") { // } else if ($('#PoTypeOptions').val() == "0") {
// alert('Please Select POType'); // alert('Please Select POType');
// $('#PoTypeOptions').focus(); // $('#PoTypeOptions').focus();
// return false; // return false;
// } else { } else {
var formData = new FormData($('.ServicePO')[0]); var formData = new FormData($('.ServicePO')[0]);
// disableButtons(); $('#loader').show();
console.log("inside add service purchase order view page"); console.log("inside add service purchase order view page");
console.log(formData); console.log(formData);
@ -2415,6 +2420,7 @@ if (!empty($INRSYMBOL)) {
processData: false, processData: false,
contentType: false, contentType: false,
success: function(data) { success: function(data) {
$('#loader').hide();
if (data) { if (data) {
alert(data); alert(data);
$('#txtRowCount').val(''); $('#txtRowCount').val('');
@ -2424,6 +2430,7 @@ if (!empty($INRSYMBOL)) {
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide();
alert("Error"); alert("Error");
// setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }

View File

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