GWM : loan details
This commit is contained in:
parent
e21817e222
commit
c8a8e1a329
File diff suppressed because it is too large
Load Diff
@ -231,7 +231,7 @@ class Driver_model extends Model
|
|||||||
->select('CONCAT_WS(" ", driver.FirstName, driver.LastName) AS FullName')
|
->select('CONCAT_WS(" ", driver.FirstName, driver.LastName) AS FullName')
|
||||||
->select('MonthlyPay.*,driver.BankAccountNo , driver.PFNO , driver.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
->select('MonthlyPay.*,driver.BankAccountNo , driver.PFNO , driver.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
||||||
->join('t_employee_details as driver', 'driver.EmpID = MonthlyPay.driver_id and driver.is_driver = 1', 'left')
|
->join('t_employee_details as driver', 'driver.EmpID = MonthlyPay.driver_id and driver.is_driver = 1', 'left')
|
||||||
->join('t_loan_master as L', 'MonthlyPay.driver_id = L.EmpID and L.is_Active = 1', 'left')
|
->join('t_loan_master as L', 'MonthlyPay.driver_id = L.EmpID and L.is_Active = 1 and L.Remaining_Due != 0', 'left')
|
||||||
->where('MonthlyPay.driver_id', $driver_id)
|
->where('MonthlyPay.driver_id', $driver_id)
|
||||||
->where('MonthlyPay.month_year', $PayOn);
|
->where('MonthlyPay.month_year', $PayOn);
|
||||||
|
|
||||||
|
|||||||
@ -513,7 +513,7 @@ class Payroll_model extends Model
|
|||||||
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
||||||
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
||||||
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
||||||
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left')
|
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1 and L.Remaining_Due != 0', 'left')
|
||||||
->where('MonthlyPay.EmpID', $EmpId)
|
->where('MonthlyPay.EmpID', $EmpId)
|
||||||
->where('MonthlyPay.Month_Year', $PayOn);
|
->where('MonthlyPay.Month_Year', $PayOn);
|
||||||
|
|
||||||
|
|||||||
@ -338,15 +338,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="margin-top: 23px;">
|
<div class="modal-body" style="margin-top: 23px;">
|
||||||
<div class="col-md-4">
|
|
||||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day">
|
|
||||||
Add New File
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div id="filesContainer">
|
|
||||||
<!-- Rows will be dynamically appended here -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (isset($invoice_data)) {
|
<?php if (isset($invoice_data)) {
|
||||||
foreach ($invoice_data as $key => $value) { ?>
|
foreach ($invoice_data as $key => $value) { ?>
|
||||||
|
|
||||||
@ -372,6 +363,16 @@
|
|||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
} ?>
|
} ?>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day">
|
||||||
|
Add New File
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="filesContainer">
|
||||||
|
<!-- Rows will be dynamically appended here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
@ -631,19 +632,36 @@ $(document).ready(function () {
|
|||||||
var invoiceId = $('#invoice_id_set').val();
|
var invoiceId = $('#invoice_id_set').val();
|
||||||
formData.append('invoice_id', invoiceId);
|
formData.append('invoice_id', invoiceId);
|
||||||
|
|
||||||
|
var hasFiles = false;
|
||||||
// Append files
|
// Append files
|
||||||
$('input[name="emp_file[]"]').each(function(index, input) {
|
$('input[name="emp_file[]"]').each(function(index, input) {
|
||||||
var files = $(input)[0].files;
|
var files = $(input)[0].files;
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
formData.append('emp_file[]', files[0]);
|
formData.append('emp_file[]', files[0]);
|
||||||
|
hasFiles = true; // At least one file is selected
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (!hasFiles) {
|
||||||
|
alert('Please select file.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var hasFileName = true;
|
||||||
// Append other fields
|
// Append other fields
|
||||||
$('input[name="file_name[]"]').each(function(index, input) {
|
$('input[name="file_name[]"]').each(function(index, input) {
|
||||||
|
var fileName = $(input).val().trim();
|
||||||
|
if (!fileName) {
|
||||||
|
hasFileName = false;
|
||||||
|
}
|
||||||
formData.append('file_name[]', $(input).val());
|
formData.append('file_name[]', $(input).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!hasFileName) {
|
||||||
|
alert('Please enter a file name for selected files.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user