diff --git a/app/Controllers/Driver.php b/app/Controllers/Driver.php
index 7ba0e211..6cc47a6d 100755
--- a/app/Controllers/Driver.php
+++ b/app/Controllers/Driver.php
@@ -150,11 +150,12 @@ class Driver extends BaseController
public function loadDriverAttendance()
{
- $input_driver_id = $this->request->getGet('gobal_driver_id');
+ $input_driver_id = $this->request->getGet('drv_id');
// $input_month_year = $this->request->getPost('month_year') ? $this->request->getPost('month_year') : get_date_time_dynamical_format('d-M-Y','d-m-',"01-"+$this->request->getGet('month_year')) ;
- $input_date = $this->request->getGet('date')
- ? $this->request->getGet('date')
- : get_date_time_dynamical_format('d-M-Y','d-m-Y',"01-".$this->request->getGet('month_year'));
+ $input_date = $this->request->getGet('month_year')
+ ? get_date_time_dynamical_format('d-M-Y','d-m-Y',"01-".$this->request->getGet('month_year'))
+ : get_date_time_dynamical_format('Y-m-d','d-m-Y',get_current_date());
+
list($date,$month,$year) = explode('-', $input_date);
@@ -170,9 +171,9 @@ class Driver extends BaseController
$data['page_driver_name'] = $this->driver_model->getDriverName($input_driver_id,0);
$data['invoice_info'] = $this->driver_model->getInvoiceInfo();
$data['datefordropdown'] = $input_date;
- $data['gobal_driver_id'] = $input_driver_id;
- $data['gobal_diesel_amount'] = isset($amount->diesel_amount) ? $amount->diesel_amount : 0 ;
- $data['gobal_shed_amount'] = isset($amount->shed_amount) ? $amount->shed_amount : 0 ;
+ $data['input_driver_id'] = $input_driver_id;
+ $data['input_diesel_amount'] = isset($amount->diesel_amount) ? $amount->diesel_amount : 0 ;
+ $data['input_shed_amount'] = isset($amount->shed_amount) ? $amount->shed_amount : 0 ;
$this->global['pageTitle'] = 'Driver Attendance List';
$this->loadViews("driverAttendance", $this->global, $data, NULL);
@@ -209,8 +210,12 @@ class Driver extends BaseController
$food = $this->request->getPost('food_amount');
$diesel = $this->request->getPost('diesel_amount');
$shed = $this->request->getPost('shed_amount');
+ $ct = $this->request->getPost('category_type');
+ $c = $this->request->getPost('customer');
+ $q = $this->request->getPost('quantity');
+
$data = ['status' => false, 'message' => 'An error occurred while creating driver Trip details'];
- $driver_details = ['date' => $date,'driver_id' =>$driver_id,'invoice_number' =>$inv,'vehicle_number' =>$veh,'load_type' =>$load,'salary_amount' => $sal,'food_amount' =>$food,'diesel_amount'=> $diesel,'shed_amount' => $shed];
+ $driver_details = ['date' => $date,'driver_id' =>$driver_id,'invoice_number' =>$inv,'vehicle_number' =>$veh,'load_type' =>$load,'salary_amount' => $sal,'food_amount' =>$food,'diesel_amount'=> $diesel,'shed_amount' => $shed,'type'=>$ct,'customer'=>$c,'quantity'=>$q];
if ((int)$id == 0) {
log_message('error', 'LAST DriverID : ' . $id);
@@ -239,7 +244,7 @@ class Driver extends BaseController
*/
function deleteDriverAttendance()
{
- $driverId = $this->request->getGet('gobal_driver_id') ? $this->request->getGet('gobal_driver_id') : '';
+ $driverId = $this->request->getGet('drv_id') ? $this->request->getGet('drv_id') : '';
$driverAttendanceId = $this->request->getGet('driverAttendanceId') ? $this->request->getGet('driverAttendanceId') : '';
$monthyear = $this->request->getGet('month_year') ?? date('M-Y');
@@ -253,7 +258,7 @@ class Driver extends BaseController
$this->session->setFlashdata('success', $message);
// return redirect()->to(current_url());
// return redirect()->route('loadDriverAttendance');
- return redirect()->to(base_url('loadDriverAttendance?gobal_driver_id=' . $driverId . '&month_year=' . $monthyear));
+ return redirect()->to(base_url('loadDriverAttendance?drv_id=' . $driverId . '&month_year=' . $monthyear));
}
@@ -261,7 +266,13 @@ class Driver extends BaseController
function gatheredCustAndQty(){
$data = $this->request->getPost();
$invoice = $data['invoiceNumber'];
- $results = $this->driver_model->gatheredCustAndQty($invoice);
+ $type = $data['type'];
+ if($type == 'IGR'){
+ $results = $this->driver_model->gatheredIgrCustAndQty($invoice);
+ }else if($type == 'INVOICE'){
+ $results = $this->driver_model->gatheredInvoiceCustAndQty($invoice);
+ }
+
return $this->response->setJSON($results);
}
diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php
index e62a8164..50d81424 100755
--- a/app/Controllers/Payslip.php
+++ b/app/Controllers/Payslip.php
@@ -515,7 +515,7 @@ class Payslip extends BaseController
// $Incentives = $j['Incentives in ₹'];
$Festival_Bonus = $j['Festival Bonus in ₹'];
$Other_Deductions = $j['TDS Deductions in ₹'];
- $Estimate = $j['Estimate in ₹'];
+ $Estimate = $j['Net Salary ₹'];
$Created_By = $this->session->get('userId');
if (!is_numeric($DaysWorked) || ($DaysWorked > 31) || (strlen((string)$DaysWorked)) > 5) {
@@ -618,7 +618,7 @@ class Payslip extends BaseController
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
$tds_Deductions = isset($j['TDS Deductions in ₹']) ? $j['TDS Deductions in ₹'] : 0.00;
- $Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
+ $Estimate = isset($j['Net Salary ₹']) ? $j['Net Salary ₹'] : 0.00;
$Created_By = $this->session->get('userId');
if($is_driver == 0){
diff --git a/app/Models/Driver_model.php b/app/Models/Driver_model.php
index 601d28a2..fc0d982a 100755
--- a/app/Models/Driver_model.php
+++ b/app/Models/Driver_model.php
@@ -21,7 +21,7 @@ class Driver_model extends Model
{
$this->table = 't_driver_attendance';
$this->primaryKey = 'driver_attendance_id';
- $this->allowedFields = ['driver_attendance_id','date','driver_id','invoice_number','vehicle_number','load_type','salary_amount','food_amount','created_on','created_by','updated_on','updated_by','isactive','diesel_amount','shed_amount'];
+ $this->allowedFields = ['driver_attendance_id','date','driver_id','invoice_number','vehicle_number','load_type','salary_amount','food_amount','created_on','created_by','updated_on','updated_by','isactive','diesel_amount','shed_amount','type','customer','quantity'];
return $this;
}
@@ -92,7 +92,7 @@ class Driver_model extends Model
}
- function gatheredCustAndQty($invoice){
+ function gatheredInvoiceCustAndQty($invoice){
$builder = $this->db->table('ip_invoices')
->select('invoice_number,received_qty as quantity,ip_clients.client_name as customer')
->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id', 'left')
@@ -100,8 +100,29 @@ class Driver_model extends Model
$query = $builder->get();
return $query->getRowArray() ?: [];
}
+
+ function gatheredIgrCustAndQty($igr){
+
+ $builder = $this->db->table('t_igr_master as mstr')
+ ->select('mstr.IGRNO,mstr.DeliveryChellanOrInvoiceNo,sum(dtls.QuantityAsPerInvoice) as quantity,splr.supplierName as customer')
+ ->join('t_igr_details dtls', 'dtls.IGRNO = mstr.IGRNO', 'left')
+ ->join('t_purchaseorder_master pomstr', 'pomstr.PONO = mstr.PONO', 'left')
+ ->join('t_supplierdetailsn splr', 'splr.SupplierID = pomstr.SupplierID', 'left')
+ ->where('mstr.IGRNO', $igr);
+ $query = $builder->get();
+ $result = $query->getRowArray();
+ if (empty($result['IGRNO'])) {
+ return [];
+ }else{
+ return $result ?: [];
+ }
+
+ }
function driverAttendanceForMonthlyPayInputs($from,$to){
+ // list($year,$month,$date) = explode('-', get_current_date());
+ // $new_date_format = "$year-$month-01";
+
$builder = $this->db->table('t_driver_attendance')
->select('t_driver_attendance.driver_id,driver_details.FirstName as driver_name,driver_details.is_driver,COUNT(DISTINCT t_driver_attendance.date) AS unique_days,
DATE_FORMAT(date, "%M-%Y") AS month_year,COUNT(t_driver_attendance.load_type) AS no_of_loads,driver_details.*,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate')
@@ -115,6 +136,7 @@ class Driver_model extends Model
->join('t_loan_history','t_loan_history.Loan_ID = t_loan_master.Loan_ID','Left')
->join('t_driver_monthly_pay_inputs','t_driver_monthly_pay_inputs.driver_id = driver_details.EmpID','Left')
->where('t_driver_attendance.date BETWEEN "'.$from.'" AND "'.$to.'"')
+ // ->where("t_loan_master.Due_Start_Date", $new_date_format)
->groupBy('DATE_FORMAT(t_driver_attendance.date, "%M-%Y"),t_driver_attendance.driver_id');
$query = $builder->get();
// $last_query = $this->db->getLastQuery();
diff --git a/app/Models/Ipinvoice_model.php b/app/Models/Ipinvoice_model.php
index 8d087f7e..0e7e645c 100755
--- a/app/Models/Ipinvoice_model.php
+++ b/app/Models/Ipinvoice_model.php
@@ -26,14 +26,16 @@ class Ipinvoice_model extends Model
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.hsn_or_sac,
ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total
- ,ip_invoice_attachment.file_name , ip_invoices.received_qty')
+ ,ip_invoice_attachment.file_name , ip_invoices.received_qty , VN.invoice_custom_fieldvalue as vehicle_no , DN.invoice_custom_fieldvalue as deiver_name')
->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_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_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_attachment', 'ip_invoices.invoice_id = ip_invoice_attachment.invoice_id and ip_invoice_attachment.is_active = 1' , 'left');
+ ->join('ip_invoice_attachment', 'ip_invoices.invoice_id = ip_invoice_attachment.invoice_id and ip_invoice_attachment.is_active = 1' , 'left')
+ ->join('ip_invoice_custom VN', 'ip_invoices.invoice_id = VN.invoice_id and VN.invoice_custom_fieldid = 8' , 'left')
+ ->join('ip_invoice_custom DN', 'ip_invoices.invoice_id = DN.invoice_id and DN.invoice_custom_fieldid = 58' , 'left');
$builder->where('ip_invoices.invoice_date_created >=', $fromDate );
$builder->where('ip_invoices.invoice_date_created <=', $toDate );
$builder->orderBy('ip_invoices.invoice_number', 'DESC');
diff --git a/app/Views/attendance.php b/app/Views/attendance.php
index 01592c6a..087d0abb 100755
--- a/app/Views/attendance.php
+++ b/app/Views/attendance.php
@@ -366,12 +366,13 @@ $currentday = date('d');
$flag2 = 0;
$todayflag = 0;
} ?>
-
Total Hrs |
- OT Hrs |
- Paid Leave |
+
Days Worked |
Absent |
- Total Sunday |
+ Paid Leave |
+ Sunday |
+ Worked Hrs |
+ OT Hrs |
@@ -460,27 +461,8 @@ $currentday = date('d');
$flag2 = 0;
$todayflag = 0;
} ?>
-
- Total_WHrs)) {
- echo $a->Total_WHrs;
- } else {
- echo "0.00";
- } ?>
- |
-
- Total_OTHrs)) {
- echo $a->Total_OTHrs;
- } else {
- echo "0.00";
- } ?>
- |
-
-
- |
+
+
Days_Worked)) {
echo $a->Days_Worked;
@@ -495,6 +477,13 @@ $currentday = date('d');
echo "0.00";
} ?>
|
+
+
+ |
|
+
+ Total_WHrs)) {
+ echo $a->Total_WHrs;
+ } else {
+ echo "0.00";
+ } ?>
+ |
+
+ Total_OTHrs)) {
+ echo $a->Total_OTHrs;
+ } else {
+ echo "0.00";
+ } ?>
+ |
+
diff --git a/app/Views/driverAttendance.php b/app/Views/driverAttendance.php
index 46ef4d79..78b67715 100755
--- a/app/Views/driverAttendance.php
+++ b/app/Views/driverAttendance.php
@@ -60,7 +60,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
+
@@ -126,7 +126,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
+
@@ -244,7 +244,19 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
+
@@ -354,20 +360,20 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
$("#driver_name").val("");
let urlParams = new URLSearchParams(window.location.search);
- let gobal_driver_id = urlParams.get("gobal_driver_id");
- if (gobal_driver_id !== null) {
- $("#gobal_driver_id").val(gobal_driver_id);
- $("#driver_id").val(gobal_driver_id);
+ let input_driver_id = urlParams.get("drv_id");
+ if (input_driver_id !== null) {
+ $("#drv_id").val(input_driver_id);
+ $("#driver_id").val(input_driver_id);
}
else {
- $("#gobal_driver_id").val("");
- $("#driver_id").val("");
+ $("#drv_id").val("");
+ $("#driver_id").val("");
}
- let gobal_diesel_amount = "";
- let gobal_shed_amount = "";
- if(gobal_diesel_amount != '' || gobal_shed_amount != ''){
- $('input[data-column="diesel_amount"]').val(parseFloat(gobal_diesel_amount) || 0);
- $('input[data-column="shed_amount"]').val(parseFloat(gobal_shed_amount) || 0);
+ let input_diesel_amount = "";
+ let input_shed_amount = "";
+ if(input_diesel_amount != '' || input_shed_amount != ''){
+ $('input[data-column="diesel_amount"]').val(parseFloat(input_diesel_amount) || 0);
+ $('input[data-column="shed_amount"]').val(parseFloat(input_shed_amount) || 0);
calculateTotal();
}
@@ -443,13 +449,16 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
driver_attendance_id:$('#driver_attendance_id').val() ? $('#driver_attendance_id').val() : 0,
date: $('#date').val(),
driver_id: $('#driver_id').val(),
+ category_type: $('#category_type').val(),
+ customer: $('#customer').val(),
+ quantity: $('#quantity').val(),
invoice_number: $('#invoice_number').val(),
vehicle_number: $('#vehicle_number').val(),
load_type: $('#load_type').val(),
salary_amount: $('#salary_amount').val(),
food_amount: $('#food_amount').val(),
- diesel_amount: "",
- shed_amount: ""
+ diesel_amount: "",
+ shed_amount: ""
};
$('#loader').show();
@@ -552,8 +561,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
$(document).on('blur', '.editable', function() {
var column = $(this).data('column'); // Get the column name (diesel or shed)
var value = $(this).val(); // Get the updated value
- let gobal_driver_id = urlParams.get("gobal_driver_id");
- let gobal_date = '';
+ let input_driver_id = urlParams.get("drv_id");
+ let input_date = '';
let param_month_year = urlParams.get("month_year");
let param_date = urlParams.get("date");
@@ -561,10 +570,10 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
if(param_date == ""){
let monthMap = {"Jan": "01", "Feb": "02", "Mar": "03", "Apr": "04","May": "05", "Jun": "06", "Jul": "07", "Aug": "08","Sep": "09", "Oct": "10", "Nov": "11", "Dec": "12"};
let [month, year] = param_month_year.split('-');
- gobal_date = `01-${monthMap[month]}-${year}`;
+ input_date = `01-${monthMap[month]}-${year}`;
}else{
- gobal_date = param_date;
+ input_date = param_date;
}
// Send data to the server using AJAX
@@ -574,8 +583,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
data: {
column: column,
value: value,
- date: gobal_date,
- empid:gobal_driver_id
+ date: input_date,
+ empid:input_driver_id
},
success: function(response) {
console.log('Data saved successfully:', response);
@@ -628,8 +637,10 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
var type = $('#load_type').val();
if (type == 'Load') {
$('#salary_amount').val(1300);
+ $('#food_amount').val(100);
} else if (type == 'Waste Core') {
$('#salary_amount').val(1050);
+ $('#food_amount').val(100);
}
fetchSalary();
}
@@ -643,20 +654,25 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
}
function customerandquantity(){
- if ($('#invoice_number').val() === '') {
+ if ($('#category_type').val() === '') {
+ alert('Please Select the Valid Type');
+ return;
+ }
+ else if ($('#invoice_number').val() === '') {
alert('Please Enter the Valid Invoice Number');
return;
}else{
-
$.ajax({
type: 'POST',
url: "gatheredCustAndQty",
data: {
- invoiceNumber : $('#invoice_number').val()
+ invoiceNumber : $('#invoice_number').val(),
+ type : $('#category_type').val()
},
success: function (data) {
console.log('got the result: ' + data);
+ console.log(data);
if (data) {
if(data == ""){
alert('Please Enter the Valid Invoice Number');
@@ -679,5 +695,11 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
}
});
}
- }
+ }
+
+ function resetthefields(){
+ $('#invoice_number').val("");
+ $('#customer').val("");
+ $('#quantity').val("");
+ }
diff --git a/app/Views/driverListing.php b/app/Views/driverListing.php
index d03a6dca..157abc92 100755
--- a/app/Views/driverListing.php
+++ b/app/Views/driverListing.php
@@ -55,7 +55,7 @@
is_driver){ ?>
-
+
diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php
index 7c160032..3aab43fd 100755
--- a/app/Views/employeeListing.php
+++ b/app/Views/employeeListing.php
@@ -138,7 +138,7 @@
| EmpID ?>
is_driver){ ?>
-
+
diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php
index 41702239..16575911 100755
--- a/app/Views/monthlypayinputs.php
+++ b/app/Views/monthlypayinputs.php
@@ -123,10 +123,11 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
-
+
+
-
+
@@ -233,7 +239,7 @@
| DOJ |
Designation |
Total Days |
- Number Of Trips |
+
Days Worked |
LOP Days |
Paid Leave |
@@ -252,7 +258,7 @@
Auto Loan Due ₹ |
TDS Deductions in ₹ |
Festival Bonus in ₹ |
- Estimate in ₹ |
+ Net Salary ₹ |
@@ -295,7 +301,7 @@
NoofDays; ?> |
- |
+
Key)) {
echo "contenteditable='false';";
@@ -352,11 +358,13 @@
} ?>
|
- TotalSalary; ?> |
+
+ TotalSalary; $totalsalary[] = $record->TotalSalary; ?>
+ |
TotalSalary / $record->NoofDays;
- echo number_format($perDaySalary, 2, '.', ''); ?>
+ echo number_format($perDaySalary, 2, '.', ''); $totalperdaySalary[] = $perDaySalary; ?>
|
@@ -366,30 +374,38 @@
|
+ echo number_format($perHrSalary, 2); $totalperhrSalary[] = $perHrSalary; ?>
|
- |
+
+
+ |
+ echo number_format($basicWorked, 2, '.', ''); $totalbasic[] = $basicWorked; ?>
|
+ echo number_format($hraWorked, 2, '.', ''); $totalhra[] = $hraWorked; ?>
|
-
+
|
- |
+
+
+ |
- |
+
+
+ |
- |
+
+
+ |
is_payslip_generated == 0) { echo "contenteditable='true';"; } ?>
@@ -539,9 +555,9 @@
total_cal_days; ?>
|
-
+
|
unique_days, 2, '.', ''); ?>
@@ -559,14 +575,14 @@
|
-
-
+ |
+
|
total_cal_days ;
- echo number_format($worked_amt, 2, '.', ''); ?>
+ echo number_format($worked_amt, 2, '.', ''); $totalperdaySalary[] = $worked_amt; ?>
|
@@ -575,31 +591,35 @@
|
+ echo number_format($hr_amt, 2, '.', ''); $totalperhrSalary[] = $hr_amt; ?>
|
-
+
|
+ echo number_format($basic_worked, 2, '.', ''); $totalbasic[] = $basic_worked; ?>
|
+ echo number_format($hra_worked, 2, '.', ''); $totalhra[] = $hra_worked; ?>
|
-
+
|
- esi_amount; ?> |
+
+ esi_amount; $totalesi[] = $record->esi_amount; ?>
+ |
- pf_amount; ?> |
+
+ pf_amount; $totalpf[] = $record->pf_amount; ?>
+ |
@@ -683,9 +703,40 @@
|
| | | | |
| | | | |
- | | | | |
- | | | | |
- | Total |
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
|
@@ -722,7 +773,7 @@
-
+
@@ -898,7 +949,8 @@ $(document).ready(function () {
if (data) {
$('#loader').hide();
- alert(data);
+ // alert(data);
+ showMessage(data);
}
}
@@ -1274,6 +1326,75 @@ $(document).ready(function () {
+function openDriverLoad(element) {
+ var empId = $(element).data("empid"); // Get the empid from clicked element
+ var monthYear = $('#monthyear').val();
+ // Convert "03-2025" to "Mar-2025"
+ var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+ var parts = monthYear.split('-');
+ var monthIndex = parseInt(parts[0], 10) - 1; // Convert "03" to index 2 (March)
+ var formattedMonthYear = monthNames[monthIndex] + '-' + parts[1];
+
+ var baseUrl = "= base_url(); ?>"; // Ensure this echoes the correct base URL
+ var requestUrl = baseUrl + "loadDriverAttendance?month_year=" + encodeURIComponent(formattedMonthYear) + "&drv_id=" + encodeURIComponent(empId);
+
+ // Open the URL in a new tab
+ window.open(requestUrl, "_blank");
+}
+
+
+
+
+function toggleDivFullscreen() {
+ let div = document.getElementById("fullscreenDiv");
+ let tableResponsive = document.getElementById("table-responsive"); // Select the table container inside div
+
+
+
+ if (!document.fullscreenElement) {
+ div.requestFullscreen().then(() => {
+ div.style.width = "100vw"; // Full viewport width
+ div.style.height = "100vh"; // Full viewport height
+
+ // If .table-responsive exists, set its height to 90vh
+ if (tableResponsive) {
+ tableResponsive.style.maxHeight = "90vh";
+ tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
+ }
+ }).catch(err => console.log("Error enabling fullscreen:", err));
+ } else {
+ document.exitFullscreen().then(() => {
+ div.style.width = "100%";
+ div.style.height = "100%";
+
+ // Reset .table-responsive height when exiting fullscreen
+ if (tableResponsive) {
+ tableResponsive.style.height = "auto";
+ }
+ }).catch(err => console.log("Error exiting fullscreen:", err));
+ }
+}
+
+
+function showMessage(msg) {
+ let msgBox = document.getElementById("successMessage");
+ msgBox.innerText = msg; // Set API message
+ msgBox.style.display = "block";
+
+ // Hide message after 3 seconds
+ setTimeout(() => {
+ msgBox.style.display = "none";
+ }, 3000);
+}
+
+$("#searchInput").on("keyup", function () {
+ let value = $(this).val().toLowerCase(); // Convert input to lowercase for case-insensitive search
+
+ $("#table-responsive tbody tr").filter(function () {
+ $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
+ });
+});
+
diff --git a/app/Views/sales_invoice.php b/app/Views/sales_invoice.php
index 85469efa..f6fc61ac 100755
--- a/app/Views/sales_invoice.php
+++ b/app/Views/sales_invoice.php
@@ -240,6 +240,8 @@
Client Name |
Product |
HSN |
+ Driver |
+ Vehicle |
Quantity |
Rec Qty |
Rate |
@@ -283,6 +285,8 @@
client_name ?> |
item_name ?> |
hsn_or_sac ?> |
+ deiver_name ?> |
+ vehicle_no ?> |
item_quantity, 2, '.', ',') ?> |
| |