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

This commit is contained in:
vadivelJ96 2024-12-21 17:46:18 +05:30
commit ac631aa7e5
6 changed files with 128 additions and 33 deletions

View File

@ -144,14 +144,14 @@ class Monthlypay extends BaseController
$publicholidaysarray = $this->monthlypay_model->getPublicHoldays($current); $publicholidaysarray = $this->monthlypay_model->getPublicHoldays($current);
$string = "attendance"; $string = "attendance";
$data['noofsundays'] = $noofsundays; $data['noofsundays'] = $noofsundays;
$data['noofpublicholidays'] = count($publicholidaysarray); $data['noofpublicholidays'] = count($publicholidaysarray) ? count($publicholidaysarray) : 0;
$data['publicholidaysarray'] = $publicholidaysarray; $data['publicholidaysarray'] = $publicholidaysarray;
$data['sundayarray'] = $sundayarray; $data['sundayarray'] = $sundayarray;
$data['monthdays'] = $monthdays; $data['monthdays'] = $monthdays;
$data['datefordropdown'] = $current; $data['datefordropdown'] = $current;
$data['attendance'] = $this->monthlypay_model->monthlyAttendance($current); $data['attendance'] = $this->monthlypay_model->monthlyAttendance($current);
$data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string); $data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string);
// dd($data);
$this->global['pageTitle'] = 'Monthly Attendance'; $this->global['pageTitle'] = 'Monthly Attendance';
$this->loadViews("attendance", $this->global, $data, NULL); $this->loadViews("attendance", $this->global, $data, NULL);
} }

View File

@ -24,16 +24,18 @@ class Ipinvoice_model extends Model
ip_payment_methods.payment_method_name, ip_users.user_name, ip_payment_methods.payment_method_name, ip_users.user_name,
ip_products.product_name, ip_invoice_items.item_price, ip_products.cgst, ip_products.sgst, ip_products.product_name, ip_invoice_items.item_price, ip_products.cgst, ip_products.sgst,
ip_invoice_items.item_quantity, ip_invoice_items.item_price, ip_invoice_items.item_name, ip_invoice_items.item_quantity, ip_invoice_items.item_quantity, ip_invoice_items.item_price, ip_invoice_items.item_name, ip_invoice_items.item_quantity,
ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total') ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total
,ip_invoice_attachment.file_name')
->join('ip_payment_methods', 'ip_invoices.payment_method = ip_payment_methods.payment_method_id', 'left') ->join('ip_payment_methods', 'ip_invoices.payment_method = ip_payment_methods.payment_method_id', 'left')
->join('ip_clients', 'ip_invoices.client_id = ip_clients.client_id', 'left') ->join('ip_clients', 'ip_invoices.client_id = ip_clients.client_id', 'left')
->join('ip_users', 'ip_invoices.user_id = ip_users.user_id', 'left') ->join('ip_users', 'ip_invoices.user_id = ip_users.user_id', 'left')
->join('ip_invoice_items', 'ip_invoices.invoice_id = ip_invoice_items.invoice_id', 'left') ->join('ip_invoice_items', 'ip_invoices.invoice_id = ip_invoice_items.invoice_id', 'left')
->join('ip_products', 'ip_invoice_items.item_product_id = ip_products.product_id', 'left') ->join('ip_products', 'ip_invoice_items.item_product_id = ip_products.product_id', 'left')
->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left'); ->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left')
->join('ip_invoice_attachment', 'ip_invoices.invoice_id = ip_invoice_attachment.invoice_id and ip_invoice_attachment.is_active = 1' , 'left');
$builder->where('ip_invoices.invoice_date_created >=', $fromDate ); $builder->where('ip_invoices.invoice_date_created >=', $fromDate );
$builder->where('ip_invoices.invoice_date_created <=', $toDate ); $builder->where('ip_invoices.invoice_date_created <=', $toDate );
$builder->orderBy('ip_invoices.invoice_date_created', 'DESC'); $builder->orderBy('ip_invoices.invoice_number', 'DESC');
$query = $builder->get(); $query = $builder->get();
$result = $query->getResult(); $result = $query->getResult();

View File

@ -1143,8 +1143,51 @@
document.getElementById('Basic_Pay').value = basic; document.getElementById('Basic_Pay').value = basic;
document.getElementById('HRA_Amount').value = temp; document.getElementById('HRA_Amount').value = temp;
} }
deductionCalculation();
} }
function deductionCalculation()
{
const salaryField = document.getElementById("Total_salary");
const esiCheckbox = document.getElementsByName("esi_applicable")[0];
const pfCheckbox = document.getElementsByName("pf_applicable")[0];
const tdsCheckbox = document.getElementsByName("tds_applicable")[0];
const salary = parseFloat(salaryField.value);
if (!isNaN(salary)) {
// ESI Checkbox: Check and set value
if (salary < 21000) {
esiCheckbox.checked = true;
esiCheckbox.value = "1";
} else {
esiCheckbox.checked = false;
esiCheckbox.value = "0";
}
// PF Checkbox: Check and set value
if (salary > 15000) {
pfCheckbox.checked = true;
pfCheckbox.value = "1";
} else {
pfCheckbox.checked = false;
pfCheckbox.value = "0";
}
// TDS Checkbox: Check and set value
if (salary * 12 > 730000) {
tdsCheckbox.checked = true;
tdsCheckbox.value = "1";
} else {
tdsCheckbox.checked = false;
tdsCheckbox.value = "0";
}
}
}
function removeContact(button) { function removeContact(button) {
$(button).closest('.pad').remove(); $(button).closest('.pad').remove();
$('#filesContainer .a1').hide(); $('#filesContainer .a1').hide();

View File

@ -177,30 +177,30 @@ $currentday = date('d');
padding-right: 30% ! important; padding-right: 30% ! important;
} }
.fht-table th:nth-child(1), .fht-table th:nth-child(1),
.fht-table th:nth-child(2), .fht-table th:nth-child(2),
.fht-table th:nth-child(3) .fht-table th:nth-child(3)
{ {
position: sticky; position: sticky;
left: 0; left: 0;
background-color: #00a65a; background-color: #00a65a;
z-index: 2; z-index: 2;
border-right: 2px solid #ddd; border-right: 2px solid #ddd;
color: #ffffff; color: #ffffff;
} }
.fht-table td:nth-child(1), .fht-table td:nth-child(1),
.fht-table td:nth-child(2), .fht-table td:nth-child(2),
.fht-table td:nth-child(3) .fht-table td:nth-child(3)
{ {
position: sticky; position: sticky;
left: 0; left: 0;
background-color: #ffffff; background-color: #ffffff;
z-index: 2; z-index: 2;
border-right: 2px solid #ddd; border-right: 2px solid #ddd;
color: #0e0b0b; color: #0e0b0b;
} }
</style> </style>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
@ -460,8 +460,8 @@ $currentday = date('d');
} ?> } ?>
</td> </td>
<td class="celda_normal summary" id="<?php echo $row . 'PL'; ?>"> <td class="celda_normal summary" id="<?php echo $row . 'PL'; ?>">
<?php if (!empty($a->Paid_Leave)) { <?php if (!empty($noofpublicholidays)) {
echo number_format($a->Paid_Leave, 2, '.', '.'); echo number_format($noofpublicholidays, 2, '.', '.');
} else { } else {
echo "0.00"; echo "0.00";
} ?> } ?>
@ -831,8 +831,9 @@ $currentday = date('d');
2); // == ''?0:parseFloat(totalworkingHrs)); 2); // == ''?0:parseFloat(totalworkingHrs));
document.getElementById(totalothrsid).textContent = parseFloat(TotalOT).toFixed( document.getElementById(totalothrsid).textContent = parseFloat(TotalOT).toFixed(
2); // == ''?0:parseFloat(totalOTHrs)); 2); // == ''?0:parseFloat(totalOTHrs));
document.getElementById(paidleaveid).textContent = parseFloat(paidleave).toFixed(2); document.getElementById(paidleaveid).textContent = parseFloat(publicholidays).toFixed(2);
document.getElementById(daysworkedid).textContent = parseFloat((totalworkingHrs / 8)).toFixed(2); document.getElementById(daysworkedid).textContent = parseFloat((totalworkingHrs / 8)).toFixed(2);
absent = (absent) ? (absent - publicholidays) : 0;
document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2); document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2);
} }

View File

@ -1754,6 +1754,47 @@ if (!empty($EmpDetails)) {
document.getElementById('Basic_Pay').value = basic; document.getElementById('Basic_Pay').value = basic;
document.getElementById('HRA_Amount').value = temp; document.getElementById('HRA_Amount').value = temp;
} }
deductionCalculation();
}
function deductionCalculation()
{
const salaryField = document.getElementById("Total_salary");
const esiCheckbox = document.getElementsByName("esi_applicable")[0];
const pfCheckbox = document.getElementsByName("pf_applicable")[0];
const tdsCheckbox = document.getElementsByName("tds_applicable")[0];
const salary = parseFloat(salaryField.value);
if (!isNaN(salary)) {
// ESI Checkbox: Check and set value
if (salary < 21000) {
esiCheckbox.checked = true;
esiCheckbox.value = "1";
} else {
esiCheckbox.checked = false;
esiCheckbox.value = "0";
}
// PF Checkbox: Check and set value
if (salary > 15000) {
pfCheckbox.checked = true;
pfCheckbox.value = "1";
} else {
pfCheckbox.checked = false;
pfCheckbox.value = "0";
}
// TDS Checkbox: Check and set value
if (salary * 12 > 730000) {
tdsCheckbox.checked = true;
tdsCheckbox.value = "1";
} else {
tdsCheckbox.checked = false;
tdsCheckbox.value = "0";
}
}
} }
function removeContact(button) { function removeContact(button) {

View File

@ -169,6 +169,7 @@
<tr> <tr>
<th>Invoice Date</th> <th>Invoice Date</th>
<th>Invoice No</th> <th>Invoice No</th>
<th>Received File</th>
<th>Client Name</th> <th>Client Name</th>
<th>Product</th> <th>Product</th>
<th>Quantity</th> <th>Quantity</th>
@ -203,6 +204,13 @@
</a> </a>
<?php } ?> <?php } ?>
</td> </td>
<td style="text-align: center;">
<?php if (!empty($invoice->file_name)) { ?>
<a title="click to preview" href=" <?php echo base_url('public/uploads/images/invoice_files/').$invoice->file_name; ?>">
<i class="fa-solid fa-file-pdf"></i>
</a>
<?php } ?>
</td>
<td><?php echo $invoice->client_name ?></td> <td><?php echo $invoice->client_name ?></td>
<td><?php echo $invoice->item_name ?></td> <td><?php echo $invoice->item_name ?></td>
<td align="right"><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td> <td align="right"><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td>
@ -346,12 +354,12 @@
console.log(JSON.parse(response).invoiceAttachment); console.log(JSON.parse(response).invoiceAttachment);
var list = JSON.parse(response).invoiceAttachment; var list = JSON.parse(response).invoiceAttachment;
var attachmentsHtml = ''; var attachmentsHtml = '';
if(list.length){ $('#day').hide(); }
list.forEach(element => { list.forEach(element => {
console.log(element); console.log(element);
var fileName = element.file_name; var fileName = element.file_name;
var attachmentName = element.attachment_name; var attachmentName = element.attachment_name;
attachmentsHtml += ` attachmentsHtml += ` <br>
<div class="row pad"> <div class="row pad">
<div class="col-md-4"> <div class="col-md-4">
<span>File Name</span> <span>File Name</span>
@ -395,7 +403,6 @@
</div> </div>
<div class="col-md-4" style="margin-top: 23px;"> <div class="col-md-4" style="margin-top: 23px;">
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button> <button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button>
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
</div> </div>
</div>`; </div>`;
@ -474,6 +481,7 @@
console.log(response); console.log(response);
if (response.success) { if (response.success) {
$('#invoiceModal').modal('hide'); $('#invoiceModal').modal('hide');
window.location.reload();
// Handle success // Handle success
} else { } else {
alert(response.message); alert(response.message);