Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
866f497e6c
@ -172,11 +172,27 @@ class Payroll_model extends Model
|
|||||||
function getPayOn()
|
function getPayOn()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// For Employee - old
|
||||||
$builder = $this->db->table('t_monthly_pay_inputs')
|
$builder = $this->db->table('t_monthly_pay_inputs')
|
||||||
->select('DISTINCT(Month_Year)')
|
->select('DISTINCT(Month_Year)')
|
||||||
->orderBy("Month_Year", "desc");
|
->orderBy("Month_Year", "desc");
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
return $query->getResult();
|
$result1 = $query->getResult();
|
||||||
|
|
||||||
|
// For Driver - new
|
||||||
|
$builder = $this->db->table('t_driver_monthly_pay_inputs')
|
||||||
|
->select('DISTINCT(month_year) as Month_Year')
|
||||||
|
->orderBy("month_year", "desc");
|
||||||
|
$query = $builder->get();
|
||||||
|
$result2 = $query->getResult();
|
||||||
|
|
||||||
|
$result = array_merge($result1, $result2);
|
||||||
|
// removed duplicates - refer gpt - gpt solved
|
||||||
|
$unique = array_map("unserialize", array_unique(array_map("serialize", $result)));
|
||||||
|
return $unique;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBankInfo($bank = "")
|
function getBankInfo($bank = "")
|
||||||
|
|||||||
@ -387,9 +387,7 @@ class Requistion_model extends Model
|
|||||||
$this->db->transComplete(); // Complete transaction
|
$this->db->transComplete(); // Complete transaction
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = ($result) ? $result : false;
|
if ($affected_rows > 0) {
|
||||||
if ($result && $affected_rows > 0) {
|
|
||||||
|
|
||||||
$subQuery = 'SELECT ReqNo FROM t_requestion_master ORDER BY CreatedDate DESC LIMIT 1';
|
$subQuery = 'SELECT ReqNo FROM t_requestion_master ORDER BY CreatedDate DESC LIMIT 1';
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
|
|||||||
@ -7240,24 +7240,24 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
if (serviceValidate()) {
|
if (validate()) {
|
||||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||||
// alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
// $('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||||
// alert('Please Enter Other Payable Terms Description');
|
alert('Please Enter Other Payable Terms Description');
|
||||||
// $('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#emergdescofpo').val().trim() == '') {
|
} else if ($('#emergdescofpo').val().trim() == '') {
|
||||||
// alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
// $('#emergdescofpo').focus();
|
$('#emergdescofpo').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 {
|
||||||
// Submit the form using AJAX
|
// Submit the form using AJAX
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
// disableButtons();
|
// disableButtons();
|
||||||
@ -7288,7 +7288,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
// setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7354,20 +7354,20 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
if (revenueValidate()) {
|
if (validate()) {
|
||||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||||
// alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
// $('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
} else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
||||||
// alert('Please Enter Insurance Number..!');
|
alert('Please Enter Insurance Number..!');
|
||||||
|
|
||||||
// return false;
|
return false;
|
||||||
// } else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
} else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
||||||
// alert('Please Enter Other Payment Description..!');
|
alert('Please Enter Other Payment Description..!');
|
||||||
|
|
||||||
// return false;
|
return false;
|
||||||
// } else {
|
} else {
|
||||||
// Submit the form using AJAX
|
// Submit the form using AJAX
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
// disableButtons();
|
// disableButtons();
|
||||||
@ -7393,7 +7393,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
// setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2547,6 +2547,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$("#PaymentMethod").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -5401,9 +5402,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$("#PaymentMethod").change(function() {
|
$("#PaymentMethod").change(function() {
|
||||||
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
if ($('#PaymentMethod').val().trim() == 'PT08') {
|
||||||
$('#otheroptiondiv').show();
|
$('#otheroptiondiv').show();
|
||||||
|
$('#Otherpayment').prop('required', true);
|
||||||
} else {
|
} else {
|
||||||
$('#otheroptiondiv').hide();
|
$('#otheroptiondiv').hide();
|
||||||
$('#Otherpayment').val('');
|
$('#Otherpayment').prop('required', false);
|
||||||
|
$('#Otherpayment').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1191,7 +1191,7 @@ $(document).ready(function () {
|
|||||||
var driverSalaryAdd = driverEarn + Festivals;
|
var driverSalaryAdd = driverEarn + Festivals;
|
||||||
|
|
||||||
var driverSalarySub = current_loan_amt;
|
var driverSalarySub = current_loan_amt;
|
||||||
console.log(current_loan_amt);
|
console.log("current loan amt == ",current_loan_amt);
|
||||||
|
|
||||||
|
|
||||||
var driverMonthSalary = driverSalaryAdd - driverSalarySub
|
var driverMonthSalary = driverSalaryAdd - driverSalarySub
|
||||||
@ -1202,7 +1202,7 @@ $(document).ready(function () {
|
|||||||
document.getElementById("empsal" + sno).innerHTML = cals;
|
document.getElementById("empsal" + sno).innerHTML = cals;
|
||||||
|
|
||||||
// copied from calculategrandtotal() because we need those two only thats why
|
// copied from calculategrandtotal() because we need those two only thats why
|
||||||
var AutoLoanDueIndex = 21;
|
var AutoLoanDueIndex = 22;
|
||||||
var AutoLoanDue = 0;
|
var AutoLoanDue = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
||||||
@ -1210,7 +1210,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#monthloan').text(AutoLoanDue);
|
$('#monthloan').text(AutoLoanDue);
|
||||||
|
|
||||||
var FestivalBonusIndex = 23;
|
var FestivalBonusIndex = 24;
|
||||||
var FestivalBonus = 0;
|
var FestivalBonus = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
||||||
@ -1218,7 +1218,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#fest').text(FestivalBonus);
|
$('#fest').text(FestivalBonus);
|
||||||
|
|
||||||
var EstimateIndex = 24;
|
var EstimateIndex = 25;
|
||||||
var Estimate = 0;
|
var Estimate = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(EstimateIndex).text();
|
var value = $(this).find('td').eq(EstimateIndex).text();
|
||||||
@ -1230,7 +1230,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
function calculategrandtotal()
|
function calculategrandtotal()
|
||||||
{
|
{
|
||||||
var AutoLoanDueIndex = 21;
|
var AutoLoanDueIndex = 22;
|
||||||
var AutoLoanDue = 0;
|
var AutoLoanDue = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
var value = $(this).find('td').eq(AutoLoanDueIndex).text();
|
||||||
@ -1238,7 +1238,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#monthloan').text(AutoLoanDue);
|
$('#monthloan').text(AutoLoanDue);
|
||||||
|
|
||||||
var TDSDeductionsIndex = 22;
|
var TDSDeductionsIndex = 23;
|
||||||
var TDSDeductions = 0;
|
var TDSDeductions = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(TDSDeductionsIndex).text();
|
var value = $(this).find('td').eq(TDSDeductionsIndex).text();
|
||||||
@ -1246,7 +1246,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#other').text(TDSDeductions);
|
$('#other').text(TDSDeductions);
|
||||||
|
|
||||||
var FestivalBonusIndex = 23;
|
var FestivalBonusIndex = 24;
|
||||||
var FestivalBonus = 0;
|
var FestivalBonus = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
var value = $(this).find('td').eq(FestivalBonusIndex).text();
|
||||||
@ -1254,7 +1254,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
$('#fest').text(FestivalBonus);
|
$('#fest').text(FestivalBonus);
|
||||||
|
|
||||||
var EstimateIndex = 24;
|
var EstimateIndex = 25;
|
||||||
var Estimate = 0;
|
var Estimate = 0;
|
||||||
$('#monthlylistings tbody tr').each(function() {
|
$('#monthlylistings tbody tr').each(function() {
|
||||||
var value = $(this).find('td').eq(EstimateIndex).text();
|
var value = $(this).find('td').eq(EstimateIndex).text();
|
||||||
|
|||||||
@ -291,9 +291,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("#PaymentTerms").trigger('change');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
|
|
||||||
var id = $('#drpSupplier').val();
|
var id = $('#drpSupplier').val();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user