MERGE_remove_conflict_and_push:ss
This commit is contained in:
commit
bc24ba9e45
@ -63,6 +63,7 @@ $routes->post("get_models", "Products::get_models");
|
||||
$routes->get("get_makes", "Products::get_makes");
|
||||
$routes->post("save_make", "Products::save_make");
|
||||
$routes->post("save_model", "Products::save_model");
|
||||
$routes->post("save_manufacturer", "Products::save_manufacturer");
|
||||
$routes->get("product_list_for_service", "Products::product_list_for_service");
|
||||
//end products//
|
||||
|
||||
@ -111,6 +112,7 @@ $routes->post("add_vehicle", "Vehicle::add_vehicle");
|
||||
$routes->get("new_vehicle/(:any)", "Vehicle::new_vehicle/$1");
|
||||
$routes->get("delete_vehicle/(:any)", "Vehicle::delete_vehicle/$1");
|
||||
$routes->post("get_models_vehicle", "Vehicle::get_models");
|
||||
$routes->post("checkRegisterNo", "Vehicle::checkRegisterNo");
|
||||
//end Vehicle
|
||||
|
||||
|
||||
@ -157,6 +159,8 @@ $routes->get('dashboard', 'Users::dashboard');
|
||||
//Spare manufacturer//
|
||||
$routes->get('spare_manufacturer_index', 'Manufacturer::index');
|
||||
$routes->post('create_manufacturer/(:any)', 'Manufacturer::create_manufacturer/$1');
|
||||
$routes->post('create_manufacture_product_form', 'Manufacturer::create_manufacture_product_form');
|
||||
|
||||
//Spare manufacturer End's//
|
||||
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ class Make extends BaseController
|
||||
];
|
||||
if (!$make_id) {
|
||||
try {
|
||||
$data['business_id'] = $this->session->get('logged_user_business_id');
|
||||
$inserted = $BikemakeModel->insert($data);
|
||||
} catch (\CodeIgniter\Database\Exceptions\DatabaseException $e) {
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class Manufacturer extends BaseController
|
||||
if(!$this->session->has('logged_user')) { return redirect()->to(base_url()); }
|
||||
|
||||
$ManufacturerModel = new ManufacturerModel();
|
||||
$spare_manufacturer = $ManufacturerModel->findAll();
|
||||
$spare_manufacturer = $ManufacturerModel->where('business_id',$this->session->get('logged_user_business_id'))->findAll();
|
||||
$data['manufacturer']=$spare_manufacturer;
|
||||
|
||||
return view('manufacturer_list',$data);
|
||||
@ -45,12 +45,13 @@ class Manufacturer extends BaseController
|
||||
];
|
||||
|
||||
if (!$manufacturer_id) {
|
||||
$data['business_id'] = $this->session->get('logged_user_business_id');
|
||||
$inserted = $ManufacturerModel->insert($data);
|
||||
if ($inserted) {
|
||||
$result = $data;
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||
} else {
|
||||
$result = "No Match's";
|
||||
$result = "Duplicate Match!";
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404);
|
||||
}
|
||||
} else {
|
||||
@ -70,4 +71,40 @@ class Manufacturer extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function create_manufacture_product_form()
|
||||
{
|
||||
try {
|
||||
$manufacturer_name = $this->request->getPost('manufacturername');
|
||||
$quality = $this->request->getPost('quality');
|
||||
$ManufacturerModel = new ManufacturerModel();
|
||||
$data = [
|
||||
'manufacturer_name' => $manufacturer_name,
|
||||
'quality' => $quality,
|
||||
];
|
||||
|
||||
$data['business_id'] = $this->session->get('logged_user_business_id');
|
||||
|
||||
$manufacturer_find = $ManufacturerModel->where('manufacturer_name',$manufacturer_name)->first();
|
||||
|
||||
if (!$manufacturer_find) {
|
||||
$inserted = $ManufacturerModel->insert($data);
|
||||
if ($inserted) {
|
||||
$manufacturer = $ManufacturerModel->where('manufacturer_id',$inserted)->first();
|
||||
echo json_encode($manufacturer);
|
||||
}
|
||||
}else{
|
||||
$result = "Duplicate Match!";
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
echo json_encode($e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -391,6 +391,39 @@ class Products extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function save_manufacturer(){
|
||||
$response = [];
|
||||
$ManufacturerModel = new ManufacturerModel();
|
||||
|
||||
$manufacturer_name = $this->request->getPost('manufacturer_name');
|
||||
$quality = $this->request->getPost('quality');
|
||||
if (!empty($manufacturer_name) && !empty($quality)) {
|
||||
$modelData = [
|
||||
'manufacturer_name' => $manufacturer_name,
|
||||
'quality' => $quality,
|
||||
'business_id'=> $this->session->get('logged_user_business_id')
|
||||
];
|
||||
|
||||
|
||||
$manufacturer_id = $ManufacturerModel->insert($modelData);
|
||||
|
||||
$modelData = $ManufacturerModel->where('business_id', $this->session->get('logged_user_business_id'))->orderBy('manufacturer_name')->findAll();
|
||||
|
||||
|
||||
$response['success'] = true;
|
||||
$response['manufacturer_id'] = $manufacturer_id;
|
||||
$response['quality'] = $quality;
|
||||
$response['modelData'] = $modelData;
|
||||
} else {
|
||||
|
||||
$response['success'] = false;
|
||||
}
|
||||
|
||||
|
||||
return $this->response->setJSON($response);
|
||||
}
|
||||
|
||||
public function product_list_for_service(){
|
||||
$ProductModel = new ProductModel();
|
||||
$products = $ProductModel->where('branch_id',$this->session->get('logged_user_branch_id'))->findAll();
|
||||
|
||||
@ -155,6 +155,9 @@ public function add_sales()
|
||||
$sales_order_id = $this->request->getPost('sales_order_id');
|
||||
if (!empty($sales_order_id)) {
|
||||
// print_r("hello");die;
|
||||
if ($this->request->getPost('status') === "Paid") {
|
||||
$data['mode_of_payment'] = $this->request->getPost('mode_of_payment');
|
||||
}
|
||||
$SalesOrderModel->update($sales_order_id, $data);
|
||||
} else {
|
||||
$SalesOrderModel->insert($data);
|
||||
|
||||
@ -152,5 +152,18 @@ class Vehicle extends BaseController
|
||||
|
||||
return $this->response->setJSON($formatted_models);
|
||||
}
|
||||
|
||||
public function checkRegisterNo(){
|
||||
|
||||
// if(!$this->session->has('logged_user')) { return redirect()->to(base_url()); }
|
||||
$VehicleModel = new VehicleModel();
|
||||
|
||||
$reg_no = $this->request->getPost('register_number');
|
||||
|
||||
$register_find = $VehicleModel->where('reg_no',$reg_no)->first();
|
||||
|
||||
|
||||
return json_encode($register_find);
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,7 +5,7 @@ class SalesOrderModel extends Model
|
||||
{
|
||||
protected $table = 'sales_order';
|
||||
protected $primaryKey = 'sales_order_id';
|
||||
protected $allowedFields = ['sales_order_id','client_name','vehicle_id','order_number','branch_id','status','mobile_no','billing_address','billing_city','billing_state','billing_country','billing_postal_code','total','tax','subtotal','discount','terms_condition','isactive'];
|
||||
protected $allowedFields = ['sales_order_id','client_name','vehicle_id','order_number','branch_id','status','mode_of_payment','mobile_no','billing_address','billing_city','billing_state','billing_country','billing_postal_code','total','tax','subtotal','discount','terms_condition','isactive'];
|
||||
//
|
||||
public function getSalesPdf($sales_order_id){
|
||||
return $this->db->table('sales_order')
|
||||
@ -44,10 +44,13 @@ class SalesOrderModel extends Model
|
||||
$result = $this->db->table('sales_order_product')
|
||||
->where('sales_order_product.sales_order_id', $sales_order_id)
|
||||
->join('products', 'products.product_id = sales_order_product.product_id')
|
||||
->select('sales_order_product.*, products.product_name')
|
||||
->select('sales_order_product.*, products.product_name, products.per, products.ml')
|
||||
->get()
|
||||
->getResult();
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($result);die;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<a href="#" data-toggle="modal" data-target="#bike_model_login-modal_1" class="btn btn-primary waves-effect" onclick="clearDetials(this)">
|
||||
<i class="ri-add-line"></i>
|
||||
Add Model
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
@ -21,7 +21,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;text-align: center;width: 100%;">
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;text-align: center;width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Model Name</th>
|
||||
@ -60,7 +60,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Start Bike Model Create Pop-UP -->
|
||||
<div id="bike_model_login-modal_1" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
@ -69,7 +68,6 @@
|
||||
<div class="text-center mt-2 mb-4">
|
||||
<h4 id="form_add_edit">Add Models</h4>
|
||||
</div>
|
||||
|
||||
<form id="model_form_data" class="px-3">
|
||||
|
||||
<div class="form-group">
|
||||
@ -96,16 +94,13 @@
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function submitModels(params) {
|
||||
console.log( $('#modelname').val());
|
||||
var formData = {
|
||||
make_id: $('#make_id').val(),
|
||||
modelname: $('#modelname').val()
|
||||
};
|
||||
|
||||
var edit_model_id = $('#edit_model_id').val();
|
||||
|
||||
if (!edit_model_id) {
|
||||
edit_model_id =0;
|
||||
}
|
||||
@ -239,4 +234,54 @@
|
||||
$('#modelname').val('');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Bike_Model', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Bike_Model', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Bike_Model', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -1,21 +1,19 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name ?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name ?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="<?= base_url() . "edit_branch_form/". session()->get('logged_user_branch_id'); ?>" method="post">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
@ -50,5 +48,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
@ -1,143 +1,130 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Branch List - <?php echo $business_name;?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="#" data-toggle="modal" data-target="#bike_make_login-modal" class="btn btn-primary waves-effect">
|
||||
<i class="ri-add-line"></i>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Branch List - <?php echo $business_name;?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="#" data-toggle="modal" data-target="#bike_make_login-modal" class="btn btn-primary waves-effect">
|
||||
Add Branch
|
||||
</a>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Branch Name</th>
|
||||
<th>Address</th>
|
||||
<th>City</th>
|
||||
<th>State</th>
|
||||
<th>Postal Code</th>
|
||||
<th>Mobile No</th>
|
||||
<th>Active</th>
|
||||
<th>User List</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($branch as $value) :
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $value['branch_name']; ?></td>
|
||||
<td><?= $value['address']; ?></td>
|
||||
<td><?= $value['city']; ?></td>
|
||||
<td><?= $value['state']; ?></td>
|
||||
<td><?= $value['postal_code']; ?></td>
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td>
|
||||
<?php if ($value['isactive'] == 0): ?>
|
||||
<span style="color: red;">Inactive</span>
|
||||
<?php else: ?>
|
||||
<span style="color: green;">Active</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= base_url("user_list/" . $value['branch_id']) ?>" style="margin-left: 15px;">View</a>
|
||||
</td>
|
||||
<td>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Branch Name</th>
|
||||
<th>Address</th>
|
||||
<th>City</th>
|
||||
<th>State</th>
|
||||
<th>Postal Code</th>
|
||||
<th>Mobile No</th>
|
||||
<th>Active</th>
|
||||
<th>User List</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($branch as $value) :
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $value['branch_name']; ?></td>
|
||||
<td><?= $value['address']; ?></td>
|
||||
<td><?= $value['city']; ?></td>
|
||||
<td><?= $value['state']; ?></td>
|
||||
<td><?= $value['postal_code']; ?></td>
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td>
|
||||
<?php if ($value['isactive'] == 0): ?>
|
||||
<span style="color: red;">Inactive</span>
|
||||
<?php else: ?>
|
||||
<span style="color: green;">Active</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= base_url("user_list/" . $value['branch_id']) ?>" style="margin-left: 15px;">View</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<a data-toggle="modal" data-target="#bike_make_login-modal" value="<?= $value['branch_id']; ?>" onclick="editBranch(this)" class="edit-button"><i
|
||||
class="ri-pencil-line" style="margin-right: 5px;"></i></a>
|
||||
|
||||
<a data-toggle="modal" data-target="#bike_make_login-modal" value="<?= $value['branch_id']; ?>" onclick="editBranch(this)" class="edit-button"><i
|
||||
class="ri-pencil-line" style="margin-right: 5px;"></i></a>
|
||||
|
||||
<a href="<?= base_url("delete_branch/".$value['branch_id']); ?>"
|
||||
class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
</td>
|
||||
<a href="<?= base_url("delete_branch/".$value['branch_id']); ?>"
|
||||
class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
</td>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
|
||||
|
||||
<!-- Start Bike Make Create Pop-UP -->
|
||||
<div id="bike_make_login-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="text-center mt-2 mb-4">
|
||||
<h4>Add Branch - <?php echo $business_name;?></h4>
|
||||
<!-- Start Bike Make Create Pop-UP -->
|
||||
<div id="bike_make_login-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="text-center mt-2 mb-4">
|
||||
<h4>Add Branch - <?php echo $business_name;?></h4>
|
||||
</div>
|
||||
<form id="model_form_data" class="px-3">
|
||||
|
||||
<input type="text" id="business_id" value="<?php echo $business_id; ?>" hidden>
|
||||
<input type="text" id="branch_id" hidden>
|
||||
<div class="form-group">
|
||||
<label for="branchname">Branch Name </label>
|
||||
<input class="form-control" name="branch_name" type="text" id="branch_name" required="" placeholder="Branch Name....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address">Address </label>
|
||||
<input class="form-control" name="address" type="text" id="address" required="" placeholder="Address....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="city">City </label>
|
||||
<input class="form-control" name="city" type="text" id="city" required="" placeholder="City....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="state">State </label>
|
||||
<input class="form-control" name="state" type="text" id="state" required="" placeholder="State....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pincode">Pin Code </label>
|
||||
<input class="form-control" name="postal_code" type="text" id="postal_code" required="" placeholder="Pin Code....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mobilenumber">Mobile Number </label>
|
||||
<input class="form-control" name="mobile_no" type="text" id="mobile_no" required="" placeholder="Mobile Number....">
|
||||
</div>
|
||||
|
||||
<form id="model_form_data" class="px-3">
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitBranch(this)">Submit</button>
|
||||
</div>
|
||||
|
||||
<input type="text" id="business_id" value="<?php echo $business_id; ?>" hidden>
|
||||
<input type="text" id="branch_id" hidden>
|
||||
<div class="form-group">
|
||||
<label for="branchname">Branch Name </label>
|
||||
<input class="form-control" name="branch_name" type="text" id="branch_name" required="" placeholder="Branch Name....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address">Address </label>
|
||||
<input class="form-control" name="address" type="text" id="address" required="" placeholder="Address....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="city">City </label>
|
||||
<input class="form-control" name="city" type="text" id="city" required="" placeholder="City....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="state">State </label>
|
||||
<input class="form-control" name="state" type="text" id="state" required="" placeholder="State....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pincode">Pin Code </label>
|
||||
<input class="form-control" name="postal_code" type="text" id="postal_code" required="" placeholder="Pin Code....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mobilenumber">Mobile Number </label>
|
||||
<input class="form-control" name="mobile_no" type="text" id="mobile_no" required="" placeholder="Mobile Number....">
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitBranch(this)">Submit</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- End Bike Make Create Pop-UP -->
|
||||
</form>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- End Bike Make Create Pop-UP -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function submitBranch(params) {
|
||||
|
||||
if ($('#branch_id').val()) {
|
||||
@ -186,7 +173,6 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editBranch(params) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
@ -210,6 +196,55 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Branch', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Branch', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Branch', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -1,24 +1,19 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name ?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
|
||||
</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name ?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="<?= base_url() . "add_business"; ?>" method="post">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Business List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_business/0"; ?>" class="btn btn-primary waves-effect"> <i class="ri-add-line"></i></a>
|
||||
</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
<li class=""> <a href="<?= base_url() . "new_business/0"; ?>" class="btn btn-primary waves-effect">Add Business</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -20,12 +18,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
|
||||
@ -76,10 +69,58 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Business', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Business', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Business', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -1,27 +1,22 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name?></h4>
|
||||
<div class="page-title-right">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $page_name?></h4>
|
||||
<div class="page-title-right">
|
||||
<a href="<?= base_url() . "client_index"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||
<ol class="breadcrumb m-0">
|
||||
|
||||
</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
<ol class="breadcrumb m-0">
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card-body">
|
||||
<form action="<?= base_url() . "add_client"; ?>" method="post">
|
||||
<h4 class="header-title">Client Details :</h4>
|
||||
<h4 class="header-title">Client Details :</h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="inputEmail4" class="col-form-label">Client Name<span class="text-danger">*</span></label>
|
||||
@ -78,9 +73,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include('layout/footer.php'); ?>
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
function onlyNumbers(event){
|
||||
var charcode;
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Clilent List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_client/0"; ?>" class="btn btn-primary waves-effect"> <i class="ri-add-line"></i></a>
|
||||
</li>
|
||||
|
||||
<li class=""> <a href="<?= base_url() . "new_client/0"; ?>" class="btn btn-primary waves-effect"> Add Client</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -19,12 +17,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
|
||||
@ -41,27 +34,74 @@
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($client as $value) :
|
||||
if ($value['isactive'] == 1) : ?>
|
||||
<tr>
|
||||
<td><?= $value['client_name']; ?></td>
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td><?= $value['email']; ?></td>
|
||||
<td>
|
||||
<a href="<?= "new_client/" . $value['client_id']; ?>" class="edit-button"><i class="ri-pencil-line" style="font-size: 20px;"></i></a>
|
||||
<a href="<?= "delete_client/" . $value['client_id']; ?>" class="delete-button"><i class="ri-delete-bin-line" style="font-size: 20px;"></i></a>
|
||||
</td>
|
||||
|
||||
<?php endif?>
|
||||
<?php endforeach; ?>
|
||||
if ($value['isactive'] == 1) : ?>
|
||||
<tr>
|
||||
<td><?= $value['client_name']; ?></td>
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td><?= $value['email']; ?></td>
|
||||
<td>
|
||||
<a href="<?= "new_client/" . $value['client_id']; ?>" class="edit-button"><i class="ri-pencil-line" style="font-size: 20px;"></i></a>
|
||||
<a href="<?= "delete_client/" . $value['client_id']; ?>" class="delete-button"><i class="ri-delete-bin-line" style="font-size: 20px;"></i></a>
|
||||
</td>
|
||||
|
||||
<?php endif?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Client', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Client', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Client', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -6,7 +6,7 @@
|
||||
<h4 class="page-title">Complaints List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="#" data-toggle="modal" data-target="#complaint-add-modal" class="btn btn-primary waves-effect" onclick="clearDetials(this)"> <i class="ri-add-line"></i></a></li>
|
||||
<li class=""> <a href="#" data-toggle="modal" data-target="#complaint-add-modal" class="btn btn-primary waves-effect" onclick="clearDetials(this)"> Add Complaint</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -16,7 +16,7 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
@ -86,6 +86,7 @@
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
@ -120,7 +121,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function editComplaint(params) {
|
||||
var complaint_id = $(params).data('value');
|
||||
$.ajax({
|
||||
@ -152,9 +152,57 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function clearDetials(params) {
|
||||
$('#form_add_edit').text('Add Complaint');
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Complaint', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Complaint', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Complaint', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -5,11 +5,6 @@
|
||||
<h4 class="page-title"><?php echo 'Dashboard' ?></h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
|
||||
|
||||
</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -10,165 +10,145 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="card text-center">
|
||||
<div class="card-body">
|
||||
<h4 class="mt-3 mb-0"><?php echo $users['name']; ?></h4>
|
||||
<p class="text-muted">@<?php echo $role['roles']; ?></p>
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="card text-center">
|
||||
<div class="card-body">
|
||||
<h4 class="mt-3 mb-0"><?php echo $users['name']; ?></h4>
|
||||
<p class="text-muted">@<?php echo $role['roles']; ?></p>
|
||||
<div class="text-left mt-3" style=" margin-bottom: 16px;">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Full Name :</th>
|
||||
<td class="text-muted"><?php echo $users['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Mobile :</th>
|
||||
<td class="text-muted"><?php echo $users['mobile_no']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email :</th>
|
||||
<td class="text-muted"><?php echo $users['email']; ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<div class="text-left mt-3" style=" margin-bottom: 16px;">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Full Name :</th>
|
||||
<td class="text-muted"><?php echo $users['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Mobile :</th>
|
||||
<td class="text-muted"><?php echo $users['mobile_no']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Email :</th>
|
||||
<td class="text-muted"><?php echo $users['email']; ?></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="user_id" name="user_id" value="<?= isset($users['user_id']) ? $users['user_id'] : '' ?>">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
|
||||
</div>
|
||||
<div class="col-lg-8 col-xl-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="tab-pane show active" id="settings">
|
||||
<form>
|
||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Personal Info</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" value="<?php echo $users['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="mobile_no">Mobile Number</label>
|
||||
<input type="text" class="form-control" id="mobile_no" value="<?php echo $users['mobile_no']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="user_id" value="<?php echo $users['user_id']; ?>" hidden>
|
||||
<label for="useremail">Email Address</label>
|
||||
<input type="email" class="form-control" id="useremail" value="<?php echo $users['email']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" style="margin-top: 28px;">
|
||||
<button type="button" class="btn btn-primary" style="float: inline-end;" onclick="submitPersonalInfo()">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- end settings content-->
|
||||
|
||||
</div>
|
||||
<input type="hidden" id="user_id" name="user_id" value="<?= isset($users['user_id']) ? $users['user_id'] : '' ?>">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="card text-center">
|
||||
<div class="card-body">
|
||||
<div class="text-left mt-3">
|
||||
|
||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Change Password</h5>
|
||||
|
||||
</div> <!-- end card -->
|
||||
</div>
|
||||
<div class="col-lg-8 col-xl-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="tab-pane show active" id="settings">
|
||||
<form>
|
||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Personal Info</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="old_password">Old Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="old_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleOldPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" value="<?php echo $users['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="new_password">New Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="new_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleNewPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<label for="mobile_no">Mobile Number</label>
|
||||
<input type="text" class="form-control" id="mobile_no" value="<?php echo $users['mobile_no']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirm Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="confirm_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleConfirmPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="user_id" value="<?php echo $users['user_id']; ?>" hidden>
|
||||
<label for="useremail">Email Address</label>
|
||||
<input type="email" class="form-control" id="useremail" value="<?php echo $users['email']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="margin-top: 27px;">
|
||||
<button type="submit" class="btn btn-primary" id="submit_password" style="float: inline-end;" onclick="changePassword(this)">Submit</button>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" style="margin-top: 28px;">
|
||||
<button type="button" class="btn btn-primary" style="float: inline-end;" onclick="submitPersonalInfo()">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- end settings content-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="card text-center">
|
||||
<div class="card-body">
|
||||
<div class="text-left mt-3">
|
||||
|
||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Change Password</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="old_password">Old Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="old_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleOldPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="new_password">New Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="new_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleNewPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirm Password</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="confirm_password" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-eye" id="toggleConfirmPassword"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="margin-top: 27px;">
|
||||
<button type="submit" class="btn btn-primary" id="submit_password" style="float: inline-end;" onclick="changePassword(this)">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function submitPersonalInfo(params) {
|
||||
|
||||
var user_id = $('#user_id').val();
|
||||
@ -194,8 +174,6 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function changePassword(params) {
|
||||
|
||||
var user_id = $('#user_id').val();
|
||||
@ -229,11 +207,7 @@
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
var oldPasswordField = document.getElementById("old_password");
|
||||
var toggleOldPassword = document.getElementById("toggleOldPassword");
|
||||
@ -265,11 +239,7 @@
|
||||
toggle.className = "fa fa-eye";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var newPasswordField = document.getElementById('new_password');
|
||||
|
||||
@ -65,26 +65,31 @@
|
||||
<p><?= $value->company_mobile_no ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<tr>
|
||||
<td><span>GSTIN: <?php echo $business['gstno']?> </span><br>
|
||||
<tr>
|
||||
<td>
|
||||
<div ><span>GSTIN: <?php echo $business['gstno']?> </span><br>
|
||||
<span>State Name: <?php echo $business['state']?> , Code: <?php echo $business['code']?> </span><br>
|
||||
<span>Contact : <?php echo $business['mobile']?></span><br>
|
||||
<span>Email : <?php echo $business['email']?></span><br><br>
|
||||
<span>Buyer (Bill To) </span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table class="invoice-info-table" >
|
||||
<tbody >
|
||||
<tr>
|
||||
<td>Invoice No.</td><td>1</td>
|
||||
<td>Invoice No.</td><td><?= $sales[0]->order_number ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dated</td><td>2</td>
|
||||
<td>Dated</td><td><?= date('Y-m-d', strtotime($sales[0]->created_at)) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bike Name</td><td><?php echo $bike_make['make'], $bike_model['model_name']; ?></td>
|
||||
@ -99,16 +104,13 @@
|
||||
<td>Contact Number</td><td><?php echo $vehicle['mobile_no']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Job Card No. </td><td>5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dated</td><td>5</td>
|
||||
<td>Sale Order No. </td><td><?= $sales[0]->sales_order_id ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delivery Date</td><td>5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mode Of Payment</td><td>5</td>
|
||||
<td>Mode Of Payment</td><td><?= $sales[0]->mode_of_payment ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -137,9 +139,10 @@
|
||||
<tr >
|
||||
<th >S no</th>
|
||||
<th >Description Of Goods</th>
|
||||
<th >Taxable Value</th>
|
||||
<th>Rate</th>
|
||||
<th >Quantity</th>
|
||||
<th >Per</th>
|
||||
<th >Taxable Amount</th>
|
||||
<th >GST</th>
|
||||
<th >CGST Amount</th>
|
||||
<th >SGST Amount</th>
|
||||
@ -149,12 +152,18 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $serialNumber = 1; ?>
|
||||
<?php foreach ($items as $item) : ?>
|
||||
<?php $total_taxable_amount = 0; $total_CGST = 0; $total_SGST = 0; foreach ($items as $item) :
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<?php $taxPercentage = $item->tax / 100;
|
||||
$taxAmount = $item->amount * $taxPercentage;
|
||||
$amountWithoutTax = $item->amount - $taxAmount;
|
||||
$value_tax = number_format($taxAmount, 2, '.', ',');?>
|
||||
<?php $taxable_amount = $item->net_price * $item->qty;
|
||||
$total_taxable_amount += $taxable_amount;
|
||||
$cgst = ($taxable_amount * $item->tax / 100 ) /2;
|
||||
$sgst = ($taxable_amount * $item->tax / 100 ) /2;
|
||||
|
||||
$total_CGST += $cgst;
|
||||
$total_SGST += $sgst;
|
||||
?>
|
||||
<td style="border: 1px solid black;">
|
||||
<?= $serialNumber++; ?>
|
||||
</td>
|
||||
@ -167,8 +176,8 @@
|
||||
</td>
|
||||
<td style="border-right: 0.5px solid black;"><?php echo $value_tax /2;?>
|
||||
</td>
|
||||
<td style="border: 0.5px solid black;"><?php echo $value_tax;?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item->amount ?></td>
|
||||
<td style="border: 0.5px solid black;"><?php echo $taxable_amount * $item->tax / 100 ?></td>
|
||||
<td style="border: 0.5px solid black;"><?= $item->amount ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
@ -177,22 +186,22 @@
|
||||
<td style="border: 0.5px solid black;"><?= $sales[0]->tax ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="7" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">CGST</td>
|
||||
<td style="border: 0.5px solid black;"><?= $sales[0]->tax / 2 ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="7" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">SGST</td>
|
||||
<td style="border: 0.5px solid black;"><?= $sales[0]->tax / 2 ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="7" style="border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">Total</td>
|
||||
<td style="border: 0.5px solid black;"><?= $sales[0]->total ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" style="border: 0.5px solid black;">Amount Chargeable (in words)</td>
|
||||
<td colspan="11" style="border: 0.5px solid black;">Amount Chargeable (in words)</td>
|
||||
</tr>
|
||||
|
||||
<tr><td></td></tr>
|
||||
|
||||
@ -221,7 +221,7 @@ p {
|
||||
<tr style="border: 1px solid black;">
|
||||
<th style="border: 0.5px solid black;">S no</th>
|
||||
<th style="border: 0.5px solid black;">Description Of Goods</th>
|
||||
<th style="border: 0.5px solid black;">Taxable Value</th>
|
||||
<th style="border: 0.5px solid black;">Amount with Tax</th>
|
||||
<th style="border: 0.5px solid black;">Quantity</th>
|
||||
<th style="border: 0.5px solid black;">Per</th>
|
||||
<th style="border: 0.5px solid black;">GST</th>
|
||||
@ -240,22 +240,22 @@ p {
|
||||
<?= $serialNumber++; ?>
|
||||
</td>
|
||||
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['product_name'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?php echo isset($item['custom_amount']) ? $item['custom_amount'] : $item['amount'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['qty'] ?></td>
|
||||
<td style="border-right: 0.5px solid black;">nos</td>
|
||||
<td style="border-right: 0.5px solid black;"><?= $item['tax'] ?>%</td>
|
||||
<td style="border-right: 0.5px solid black;"><?php echo isset($item['custom_tax']) ? $item['custom_tax'] : ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?php echo isset($item['custom_tax']) ? $item['custom_tax'] : ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border: 0.5px solid black;"><?= $item['product_name'] ?></td>
|
||||
<td style="border: 0.5px solid black;"><?php echo isset($item['custom_amount']) ? $item['custom_amount'] : $item['amount'] ?></td>
|
||||
<td style="border: 0.5px solid black;"><?= $item['qty'] ?></td>
|
||||
<td style="border: 0.5px solid black;">nos</td>
|
||||
<td style="border: 0.5px solid black;"><?= $item['tax'] ?>%</td>
|
||||
<td style="border: 0.5px solid black;"><?php echo isset($item['custom_tax']) ? $item['custom_tax'] : ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border: 0.5px solid black;"><?php echo isset($item['custom_tax']) ? $item['custom_tax'] : ($item['amount'] * ($item['tax'] / 2) / 100) ?></td>
|
||||
<td style="border: 0.5px solid black;"><?php echo isset($item['custom_tax']) ? $item['custom_tax'] : ($item['amount'] * $item['tax'] / 100) ?></td>
|
||||
<td style="border-right: 0.5px solid black;"><?php echo isset($item['custom_total']) ? $item['custom_total'] : ($item['amount'] + ($item['amount'] * $item['tax'] / 100) ) ?></td>
|
||||
<td style="border: 0.5px solid black;"><?php echo isset($item['custom_total']) ? $item['custom_total'] : ($item['amount'] + ($item['amount'] * $item['tax'] / 100) ) ?></td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td colspan="6" style="border-top: 0.5px solid black;border-left: 0.5px solid black;"></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">Total Taxable Value</td>
|
||||
<td style="border: 0.5px solid black;"><?= $job_card[0]['subtotal'] ?></td>
|
||||
<td colspan="3" style="text-align:center;border: 0.5px solid black;">Total Amount with Tax</td>
|
||||
<td style="border: 0.5px solid black;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" style="border-left: 0.5px solid black;"></td>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<label for="inputEmail4" class="col-form-label">Vehicle<span class="text-danger">*</span></label>
|
||||
<?= isset($sales['vehicle_id']) ? '' : '<i type="button" class="fe-plus-circle" id="addVehicleModalButton" style="font-size: 18px;" data-toggle="modal" data-target="#addVehicleModal" title="Add Client"></i>' ?>
|
||||
|
||||
<select class="form-control vehicle-select SelExample" name="vehicle_id" id="vehicle_name" <?= isset($sales['vehicle_id']) ? 'readonly' : 'required' ?>>
|
||||
<select class="form-control vehicle-select SelExample" name="vehicle_id" id="vehicle_name" <?= isset($sales['vehicle_id']) ? 'readonly' : 'required="true"' ?>>
|
||||
|
||||
<?= isset($sales['vehicle_id']) ? '' : '<option value="">Select a vehicle</option>' ?>
|
||||
<?php foreach ($vehicle as $value) : ?>
|
||||
@ -206,7 +206,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form >
|
||||
<form id="job_card_add_vehicle">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<!-- <div class="form-group"> -->
|
||||
@ -652,11 +652,15 @@ $(document).ready(async function() {
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#submit-btn').click(function(event) {
|
||||
// Prevent the default form submission
|
||||
event.preventDefault();
|
||||
data_contruction_for_save();
|
||||
$("#delete_items").val(JSON.stringify(delete_items_id));
|
||||
$('#form-submit').submit();
|
||||
var isValid = $('#form-submit')[0].checkValidity();
|
||||
|
||||
|
||||
// event.preventDefault();
|
||||
if (isValid) {
|
||||
data_contruction_for_save();
|
||||
$("#delete_items").val(JSON.stringify(delete_items_id));
|
||||
$('#form-submit').submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -1313,45 +1317,69 @@ $(document).ready(async function() {
|
||||
var ifStatementCondition = "createclientName !== '' && createclientMobile !== '' && createclientType !== '' && reg_no !== '' && model !== '' && make !== ''";
|
||||
}
|
||||
|
||||
console.log(ifStatementCondition);
|
||||
|
||||
if (reg_no) {
|
||||
$.ajax({
|
||||
url: '<?= base_url("checkRegisterNo") ?>', // URL to your controller method for fetching models
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: { register_number: reg_no },
|
||||
success: function(response) {
|
||||
if (response) {
|
||||
$('#reg_no').val("");
|
||||
toastr.warning("Register Number Already Added!");
|
||||
}else{
|
||||
if( eval(ifStatementCondition) ){
|
||||
|
||||
// Send AJAX request to save the client
|
||||
$.ajax({
|
||||
url: '<?php echo base_url().'save_vehicle'?>', // URL to your save_client method
|
||||
method: 'POST',
|
||||
data: {
|
||||
client_id: clientName,
|
||||
mobile_no: clientMobile,
|
||||
reg_no:reg_no,
|
||||
model:model,
|
||||
make:make,
|
||||
createclientName:createclientName,
|
||||
createclientMobile:createclientMobile,
|
||||
createclientType:createclientType,
|
||||
formType:formType,
|
||||
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#addVehicleModal').modal('hide');
|
||||
toastr.success("Vehicle saved successfully!");
|
||||
window.location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error occurred while saving vehicle:', error);
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
toastr.warning("Please Fill All Data");
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error); // Log any errors to the console
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if( eval(ifStatementCondition) ){
|
||||
|
||||
// Send AJAX request to save the client
|
||||
$.ajax({
|
||||
url: '<?php echo base_url().'save_vehicle'?>', // URL to your save_client method
|
||||
method: 'POST',
|
||||
data: {
|
||||
client_id: clientName,
|
||||
mobile_no: clientMobile,
|
||||
reg_no:reg_no,
|
||||
model:model,
|
||||
make:make,
|
||||
createclientName:createclientName,
|
||||
createclientMobile:createclientMobile,
|
||||
createclientType:createclientType,
|
||||
formType:formType,
|
||||
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#addVehicleModal').modal('hide');
|
||||
toastr.success("Vehicle saved successfully!");
|
||||
window.location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error occurred while saving vehicle:', error);
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
toastr.warning("Please Fill All Data");
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<h4 class="page-title">Job Card List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_jobcard/0"; ?>" class="btn btn-primary waves-effect"> Add New<i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "new_jobcard/0"; ?>" class="btn btn-primary waves-effect"> Add Job Card</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
@ -49,6 +49,28 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.dataTables_wrapper button{
|
||||
background: #f1f5f7;
|
||||
color: #343a40;
|
||||
border-width: 0;
|
||||
}
|
||||
.dataTables_wrapper .dt-buttons{
|
||||
float:left;
|
||||
}
|
||||
.cancelled-status {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.created-status {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.paid-status {
|
||||
color: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
toastr.options = {
|
||||
@ -125,7 +147,8 @@
|
||||
|
||||
<li>
|
||||
<a href="#sidebarLayouts1" data-toggle="collapse">
|
||||
<i class="mdi mdi-sale"></i>
|
||||
<!-- <i class="mdi mdi-sale"></i> -->
|
||||
<i class="ri-file-chart-fill"></i>
|
||||
<span> Sales </span>
|
||||
<span class="menu-arrow"></span>
|
||||
</a>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<a href="#" data-toggle="modal" data-target="#bike_make_login-modal" class="btn btn-primary waves-effect" onclick="clearDetials(this)">
|
||||
<i class="ri-add-line"></i>
|
||||
Add Make
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;text-align: center;width: 100%;">
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;text-align: center;width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bike Make</th>
|
||||
@ -42,18 +42,18 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="<?php echo $item['make_id']; ?>" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line"></i></a>
|
||||
<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="<?php echo $item['make_id']; ?>" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line" style="font-size:20px"></i></a>
|
||||
|
||||
<a href="#" data-toggle="modal" data-target="#bike_model_login-modal" style="margin-left: 12px;" class="add-button" title="Add" data-id="<?php echo $item['make_id']; ?>" data-value="<?php echo $item['make']; ?>" onclick="setMakeName(this)">
|
||||
<i class="ri-add-line icon-large"></i>
|
||||
<i class="ri-add-line icon-large" style="font-size:20px"></i>
|
||||
</a>
|
||||
<a href="<?= "bike_model_index/" . $item['make_id']; ?>" class="view-list-button" title="Model List" style="margin-left: 12px;">
|
||||
<i class="ri-list-check-2 icon-large"></i>
|
||||
<i class="ri-list-check-2 icon-large" style="font-size:20px"></i>
|
||||
</a>
|
||||
<?php if($item['isactive'] == 1): ?>
|
||||
<a style="color:red; margin-left:12px;" data-id="<?php echo $item['make_id']; ?>" data-isactive="<?php echo $item['isactive']; ?>" title="Deactivate" onclick="statusChange(this)" ><i class="fa fa-bicycle"></i><i class="fa fa-times" style="font-size: x-small;"></i></a>
|
||||
<a style="color:red; margin-left:12px;" data-id="<?php echo $item['make_id']; ?>" data-isactive="<?php echo $item['isactive']; ?>" title="Deactivate" onclick="statusChange(this)" ><i class="fa fa-bicycle" style="font-size:20px"></i><i class="fa fa-times" style="font-size: x-small;" style="font-size:20px"></i></a>
|
||||
<?php else: ?>
|
||||
<a style="color:green; margin-left:12px;" data-id="<?php echo $item['make_id']; ?>" data-isactive="<?php echo $item['isactive']; ?>" title="Activate" onclick="statusChange(this)" ><i class="fa fa-bicycle"></i></a>
|
||||
<a style="color:green; margin-left:12px;" data-id="<?php echo $item['make_id']; ?>" data-isactive="<?php echo $item['isactive']; ?>" title="Activate" onclick="statusChange(this)" ><i class="fa fa-bicycle" style="font-size:20px"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -217,14 +217,14 @@
|
||||
row += '</td><td>';
|
||||
|
||||
// Check the isactive status and set the icon color accordingly
|
||||
row += '<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="'+ item.make_id +'" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line"></i></a>';
|
||||
row += '<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="'+ item.make_id +'" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line" style="font-size:20px;"></i></a>';
|
||||
|
||||
row +='<a href="#" data-toggle="modal" data-target="#bike_model_login-modal" style="margin-left: 12px;" class="add-button" title="Add" data-id="'+ item.make_id+'" data-value="' +item.make+'" onclick="setMakeName(this)"><i class="ri-add-line icon-large"></i></a>';
|
||||
row +='<a href="bike_model_index/' +item.make_id+'" class="view-list-button" title="Model List" style="margin-left: 12px;"><i class="ri-list-check-2 icon-large"></i></a>';
|
||||
row +='<a href="#" data-toggle="modal" data-target="#bike_model_login-modal" style="margin-left: 12px;" class="add-button" title="Add" data-id="'+ item.make_id+'" data-value="' +item.make+'" onclick="setMakeName(this)"><i class="ri-add-line icon-large" style="font-size:20px;"></i></a>';
|
||||
row +='<a href="bike_model_index/' +item.make_id+'" class="view-list-button" title="Model List" style="margin-left: 12px;"><i class="ri-list-check-2 icon-large" style="font-size:20px;"></i></a>';
|
||||
if (item.isactive == 1) {
|
||||
row += '<a style="color:red; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Deactivate" onclick="statusChange(this)"><i class="fa fa-bicycle"></i><i class="fa fa-times" style="font-size: x-small;"></i></a>';
|
||||
row += '<a style="color:red; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Deactivate" onclick="statusChange(this)"><i class="fa fa-bicycle" style="font-size:20px;"></i><i class="fa fa-times" style="font-size: x-small;" style="font-size:20px;"></i></a>';
|
||||
} else if (item.isactive == 0) {
|
||||
row += '<a style="color:green; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Activate" onclick="statusChange(this)"><i class="fa fa-bicycle"></i></a>';
|
||||
row += '<a style="color:green; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Activate" onclick="statusChange(this)"><i class="fa fa-bicycle" style="font-size:20px;"></i></a>';
|
||||
}
|
||||
|
||||
row += '</td><td></td></tr>';
|
||||
@ -298,14 +298,14 @@
|
||||
row += '</td><td>';
|
||||
|
||||
// Check the isactive status and set the icon color accordingly
|
||||
row += '<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="'+ item.make_id +'" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line"></i></a>';
|
||||
row += '<a data-toggle="modal" data-target="#bike_make_login-modal" data-value="'+ item.make_id +'" class="edit-button" onclick="editMake(this)"><i class="ri-pencil-line" style="font-size:20px;"></i></a>';
|
||||
|
||||
row +='<a href="#" data-toggle="modal" data-target="#bike_model_login-modal" style="margin-left: 12px;" class="add-button" title="Add" data-id="'+ item.make_id+'" data-value="' +item.make+'" onclick="setMakeName(this)"><i class="ri-add-line icon-large"></i></a>';
|
||||
row +='<a href="bike_model_index/' +item.make_id+'" class="view-list-button" title="Model List" style="margin-left: 12px;"><i class="ri-list-check-2 icon-large"></i></a>';
|
||||
row +='<a href="#" data-toggle="modal" data-target="#bike_model_login-modal" style="margin-left: 12px;" class="add-button" title="Add" data-id="'+ item.make_id+'" data-value="' +item.make+'" onclick="setMakeName(this)"><i class="ri-add-line icon-large" style="font-size:20px;"></i></a>';
|
||||
row +='<a href="bike_model_index/' +item.make_id+'" class="view-list-button" title="Model List" style="margin-left: 12px;"><i class="ri-list-check-2 icon-large" style="font-size:20px;"></i></a>';
|
||||
if (item.isactive == 1) {
|
||||
row += '<a style="color:red; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Deactivate" onclick="statusChange(this)"><i class="fa fa-bicycle"></i><i class="fa fa-times" style="font-size: x-small;"></i></a>';
|
||||
row += '<a style="color:red; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Deactivate" onclick="statusChange(this)"><i class="fa fa-bicycle"></i><i class="fa fa-times" style="font-size: x-small;" style="font-size:20px;"></i></a>';
|
||||
} else if (item.isactive == 0) {
|
||||
row += '<a style="color:green; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Activate" onclick="statusChange(this)"><i class="fa fa-bicycle"></i></a>';
|
||||
row += '<a style="color:green; margin-left:12px;" data-id="' + item.make_id + '" data-isactive="' + item.isactive + '" title="Activate" onclick="statusChange(this)"><i class="fa fa-bicycle" style="font-size:20px;"></i></a>';
|
||||
}
|
||||
|
||||
row += '</td><td></td></tr>';
|
||||
@ -325,3 +325,52 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Make', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Make', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Make', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -8,9 +8,7 @@
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<a href="#" data-toggle="modal" data-target="#manufacturer_login-modal" class="btn btn-primary waves-effect" onclick="clearDetials(this)">
|
||||
<i class="ri-add-line"></i>
|
||||
</a>
|
||||
<a href="#" data-toggle="modal" data-target="#manufacturer_login-modal" class="btn btn-primary waves-effect" onclick="clearDetials(this)"> Add Manufacturer</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -36,10 +34,10 @@
|
||||
<td class="manufacturer_name"><?php echo $item['manufacturer_name']; ?></td>
|
||||
<td class="quality"><?php echo $item['quality']; ?></td>
|
||||
<td>
|
||||
<a data-toggle="modal" data-target="#manufacturer_login-modal" data-value="<?php echo $item['manufacturer_id']; ?>" class="edit-button" onclick="editManufacturer(this)"><i class="ri-pencil-line"></i></a>
|
||||
<a data-toggle="modal" data-target="#manufacturer_login-modal" data-value="<?php echo $item['manufacturer_id']; ?>" class="edit-button" onclick="editManufacturer(this)"><i class="ri-pencil-line" style="font-size:20px;"></i></a>
|
||||
|
||||
<a href="<?= "product_index/" . $item['manufacturer_id']; ?>" class="view-list-button" title="Model List" style="margin-left: 16px;">
|
||||
<i class="ri-list-check-2 icon-large"></i>
|
||||
<i class="ri-list-check-2 icon-large" style="font-size:20px;"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -70,8 +68,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="manufacturername">Quality</label>
|
||||
<select name="quality" id="quality" class="form-control" style="border-color: lightgray;color: #6c757d;">
|
||||
<option value="0">Select Quality</option>
|
||||
<select name="quality" id="quality" class="form-control" style="border-color: lightgray;color: #6c757d;" required="true">
|
||||
<option value="Q1">Q1</option>
|
||||
<option value="Q2">Q2</option>
|
||||
<option value="Q3">Q3</option>
|
||||
@ -80,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitMake(this)">Submit</button>
|
||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitManufacturer(this)">Submit</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@ -98,7 +95,7 @@
|
||||
|
||||
|
||||
|
||||
function submitMake(params) {
|
||||
function submitManufacturer(params) {
|
||||
var formData = {
|
||||
manufacturername: $('#manufacturer_name').val(),
|
||||
quality: $('#quality').val()
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="manufacturer" class="col-form-label">Manufacturer<span class="text-danger">*</span></label>
|
||||
<?= isset($products['product_id']) ? '' : '<i type="button" class="fe-plus-circle" id="addManufacturerButton" style="font-size: 18px;" data-toggle="modal" data-target="#manufacturer_login-modal" title="Add Client"></i>' ?>
|
||||
<select class="form-control SelExample" id="manufacturer" name="manufacturer" required>
|
||||
<option value="">Select a Manufacturer</option>
|
||||
<?php foreach ($manufacturers as $value): ?>
|
||||
@ -308,6 +309,44 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Start Biake Mnufacturer Create Pop-UP -->
|
||||
<div id="manufacturer_login-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="text-center mt-2 mb-4">
|
||||
<h4 id="form_add_edit">Add Manufacturer</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manufacturername">Manufacturer Name </label>
|
||||
<input type="text" id="manufacturer_id" hidden>
|
||||
<input class="form-control" type="text" id="manufacturer_name" required="" placeholder="Manufacturer Name....">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="manufacturername">Quality</label>
|
||||
<select name="quality" id="manufacturer_quality" class="form-control" style="border-color: lightgray;color: #6c757d;" required="true">
|
||||
<option value="Q1">Q1</option>
|
||||
<option value="Q2">Q2</option>
|
||||
<option value="Q3">Q3</option>
|
||||
<option value="Q4">Q4</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-rounded btn-primary" type="submit" onclick="submitManufacturers(this)">Submit</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- End Bike Make Create Pop-UP -->
|
||||
|
||||
<script>
|
||||
/** CALCULATE TOTAL AMOUNT ( UNIT PRICE + TAX ) */
|
||||
$(document).ready(function() {
|
||||
@ -618,6 +657,8 @@ $('#saveMakeBtn').click(function() {
|
||||
} else {
|
||||
toastr.error("Failed to save model");
|
||||
}
|
||||
$('#model').val(response.model_id);
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error occurred while saving model:', error);
|
||||
@ -639,6 +680,59 @@ $('#saveMakeBtn').click(function() {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function submitManufacturers(params) {
|
||||
var formData = {
|
||||
manufacturer_name: $('#manufacturer_name').val(),
|
||||
quality: $('#manufacturer_quality').val()
|
||||
};
|
||||
|
||||
var edit_manufacturer_id = $('#manufacturer_id').val();
|
||||
|
||||
if (!edit_manufacturer_id) {
|
||||
edit_manufacturer_id =0;
|
||||
}
|
||||
|
||||
|
||||
if (!$('#manufacturer_name').val() || !$('#manufacturer_quality').val()) {
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url: '<?php echo base_url().'save_manufacturer'?>',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
$('#manufacturer_login-modal').modal('hide');
|
||||
$('#manufacturer_name').val('');
|
||||
|
||||
if(response.modelData){
|
||||
$('#manufacturer').empty();
|
||||
|
||||
response.modelData.forEach(function(manufacturer) {
|
||||
$('#manufacturer').append($('<option>', {
|
||||
value: manufacturer.manufacturer_id,
|
||||
text: manufacturer.manufacturer_name
|
||||
}));
|
||||
});
|
||||
|
||||
if(response.manufacturer_id) {
|
||||
$('#manufacturer').val(response.manufacturer_id);
|
||||
if (response.quality) {
|
||||
$('#quality').val(response.quality);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response here
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected]{
|
||||
|
||||
@ -1,4 +1,26 @@
|
||||
<?php include('layout/header.php'); ?>
|
||||
<style>
|
||||
.dataTables_wrapper button{
|
||||
background: #f1f5f7;
|
||||
color: #343a40;
|
||||
border-width: 0;
|
||||
}
|
||||
.dataTables_wrapper .dt-buttons{
|
||||
float:left;
|
||||
}
|
||||
.cancelled-status {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.created-status {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.paid-status {
|
||||
color: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@ -7,7 +29,7 @@
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<?php if(!$manufacturer_id) { ?>
|
||||
<li class=""> <a href="<?= base_url() . "new_product/0"; ?>" class="btn btn-primary waves-effect"> Add New<i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "new_product/0"; ?>" class="btn btn-primary waves-effect"> Add Product</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ol>
|
||||
@ -21,14 +43,34 @@
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons2" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchSKUId" placeholder="Search SKU Id">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchProductName" placeholder="Search Product Name">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchManufacturerName" placeholder="Search Manufacturer Name">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchCategory" placeholder="Search Category">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchUnitPrice" placeholder="Search Unit Price">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchQtyStock" placeholder="Search Qty in Stock">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control form-control-sm" type="text" id="searchRackNo" placeholder="Search Rack No">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>SKU Id</th>
|
||||
<th>Product Name</th>
|
||||
@ -39,9 +81,8 @@
|
||||
<th>Rack No</th>
|
||||
<?php if(!$manufacturer_id) { ?><th>Actions</th><?php } ?>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($products as $value) :
|
||||
if ($value['isactive'] == 1) : ?>
|
||||
@ -53,28 +94,24 @@
|
||||
<td><?= number_format($value['unit_price']); ?></td>
|
||||
<td><?= $value['qty_stock']; ?></td>
|
||||
<td><?= $value['rack_number']; ?></td>
|
||||
|
||||
<!-- Call the model method -->
|
||||
<?php if(!$manufacturer_id) { ?>
|
||||
<td>
|
||||
<a href="<?= "new_product/" . $value['product_id']; ?>" class="edit-button"><i
|
||||
class="ri-pencil-line"></i></a>
|
||||
class="ri-pencil-line" style="font-size:20px;"></i></a>
|
||||
<a href="<?= "delete_product/" . $value['product_id']; ?>"
|
||||
class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
class="delete-button"><i class="ri-delete-bin-line" style="font-size:20px;"></i></a>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php endif?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
@ -122,7 +159,27 @@
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
|
||||
// "ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Event listener for input changes in search fields
|
||||
$('input[type="text"]').on('input', function() {
|
||||
var columnIndex = $(this).closest('td').index() + 1; // Get the index of the input field's parent td
|
||||
var searchText = $(this).val().toLowerCase();
|
||||
$('#datatable-buttons2 tbody tr').each(function() {
|
||||
var cellText = $(this).find('td:nth-child(' + columnIndex + ')').text().toLowerCase();
|
||||
if (cellText.includes(searchText)) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -27,7 +27,7 @@
|
||||
<h4 class="page-title">Purchase Order List </h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_purchase/0"; ?>" class="btn btn-primary waves-effect"> Add New <i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "new_purchase/0"; ?>" class="btn btn-primary waves-effect"> Add Purchase Order</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
@ -62,4 +62,53 @@
|
||||
</div> <!-- end col -->
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Mechanic', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Mechanic', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Mechanic', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -27,7 +27,7 @@
|
||||
<h4 class="page-title">Purchase Return List </h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "return_order_index"; ?>" class="btn btn-primary waves-effect"> Add New <i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "return_order_index"; ?>" class="btn btn-primary waves-effect"> Add Purchase Return</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<h4 class="page-title">Sales Order List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_sale/0"; ?>" class="btn btn-primary waves-effect"> Add New <i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "new_sale/0"; ?>" class="btn btn-primary waves-effect"> Add Sale Order </a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<?= isset($sales['vehicle_id']) ? '' : '<i type="button" class="fe-plus-circle" id="addVehicleModalButton" style="font-size: 18px;" data-toggle="modal" data-target="#addVehicleModal" title="Add Client"></i>' ?>
|
||||
|
||||
<select class="form-control vehicle-select SelExample" name="vehicle_id" id="vehicle_id"
|
||||
<?= isset($sales['vehicle_id']) ? 'disabled' : 'required' ?>>
|
||||
<?= isset($sales['vehicle_id']) ? 'disabled' : 'required="true"' ?>>
|
||||
|
||||
<?= isset($sales['vehicle_id']) ? '' : '<option value="">Select a vehicle</option>' ?>
|
||||
<?php foreach ($vehicle as $value) : ?>
|
||||
@ -67,7 +67,7 @@
|
||||
<?php if (isset($sales['status']) && $sales['status'] !== ''): ?>
|
||||
(<?= $sales['status'] ?>)
|
||||
<?php endif; ?></label>
|
||||
<select class="form-control status-select" name="status" required data-toggle="select2">
|
||||
<select class="form-control status-select status_class_for_change" name="status" required data-toggle="select2">
|
||||
<?php if (isset($sales['status'])): ?>
|
||||
<?php if ($sales['status'] === 'Cancelled'): ?>
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<option>Select Status</option>
|
||||
<option value>Select Status</option>
|
||||
<option value="Paid" <?= $sales['status'] === 'Paid' ? 'selected' : '' ?>>Paid</option>
|
||||
<option value="Cancelled" <?= $sales['status'] === 'Cancelled' ? 'selected' : '' ?>>Cancelled</option>
|
||||
|
||||
@ -88,6 +88,18 @@
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if (isset($sales['status']) && $sales['status'] !== ''): ?>
|
||||
|
||||
<div class="form-group col-md-4" id="mode_of_payment_parent_div_id" <?= $sales['status'] === 'Paid' ? '' : 'style="display:none;"' ?>>
|
||||
<label for="mode_of_payment" class="col-form-label">Mode Of Payment<span class="text-danger">*</span>
|
||||
<select class="form-control" name="mode_of_payment" id="mode_of_payment" >
|
||||
<option value>Select Mode Of Payment</option>
|
||||
<option value="online" <?= $sales['mode_of_payment'] === 'online' ? 'selected' : '' ?> >Online</option>
|
||||
<option value="cash" <?= $sales['mode_of_payment'] === 'cash' ? 'selected' : '' ?>>Cash</option>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><br>
|
||||
|
||||
@ -802,44 +814,65 @@ $(document).ready(function() {
|
||||
|
||||
console.log(ifStatementCondition);
|
||||
|
||||
if (eval(ifStatementCondition)) {
|
||||
|
||||
// Send AJAX request to save the client
|
||||
if (reg_no) {
|
||||
$.ajax({
|
||||
url: '<?php echo base_url().'save_vehicle'?>', // URL to your save_client method
|
||||
method: 'POST',
|
||||
data: {
|
||||
client_id: clientName,
|
||||
mobile_no: clientMobile,
|
||||
reg_no: reg_no,
|
||||
model: model,
|
||||
make: make,
|
||||
createclientName: createclientName,
|
||||
createclientMobile: createclientMobile,
|
||||
createclientType: createclientType,
|
||||
formType: formType,
|
||||
|
||||
},
|
||||
url: '<?= base_url("checkRegisterNo") ?>', // URL to your controller method for fetching models
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: { register_number: reg_no },
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#addVehicleModal').modal('hide');
|
||||
toastr.success("Vehicle saved successfully!");
|
||||
window.location.reload();
|
||||
if (response) {
|
||||
$('#reg_no').val("");
|
||||
toastr.warning("Register Number Already Added!");
|
||||
}else{
|
||||
if (eval(ifStatementCondition)) {
|
||||
|
||||
// Send AJAX request to save the client
|
||||
$.ajax({
|
||||
url: '<?php echo base_url().'save_vehicle'?>', // URL to your save_client method
|
||||
method: 'POST',
|
||||
data: {
|
||||
client_id: clientName,
|
||||
mobile_no: clientMobile,
|
||||
reg_no: reg_no,
|
||||
model: model,
|
||||
make: make,
|
||||
createclientName: createclientName,
|
||||
createclientMobile: createclientMobile,
|
||||
createclientType: createclientType,
|
||||
formType: formType,
|
||||
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#addVehicleModal').modal('hide');
|
||||
toastr.success("Vehicle saved successfully!");
|
||||
window.location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error occurred while saving vehicle:', error);
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
toastr.warning("Please Fill All Data");
|
||||
}
|
||||
|
||||
} else {
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error occurred while saving vehicle:', error);
|
||||
toastr.warning("Failed to save vehicle. Please try again");
|
||||
console.error(error); // Log any errors to the console
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
toastr.warning("Please Fill All Data");
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
@ -929,9 +962,20 @@ $(document).on('click', '#selectClient', function() {
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
// Assuming you have an edit button with an ID 'editButton'
|
||||
$('#editaddbutton').click(function() {
|
||||
// Enable the vendor dropdown
|
||||
$('#vehicle_id').prop('disabled', false);
|
||||
});
|
||||
// Assuming you have an edit button with an ID 'editButton'
|
||||
$('#editaddbutton').click(function() {
|
||||
// Enable the vendor dropdown
|
||||
$('#vehicle_id').prop('disabled', false);
|
||||
});
|
||||
|
||||
$('.status_class_for_change').change(function (params) {
|
||||
|
||||
if($(this).val() === 'Paid'){
|
||||
$('#mode_of_payment_parent_div_id').css('display','');
|
||||
$('#mode_of_payment').prop('required','required');
|
||||
}else{
|
||||
$('#mode_of_payment_parent_div_id').css('display','none');
|
||||
$('#mode_of_payment').removeAttr('required');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@ -75,11 +75,11 @@
|
||||
<div class="form-group col-md-3">
|
||||
<label for="model" class="col-form-label">Service</label>
|
||||
<select class="form-control SelExample" id="serviceSelected" name="sub_service_id[]" multiple>
|
||||
<!-- <option value="">Select a Service</option> -->
|
||||
<!-- <option value="0" <?= isset($services['sub_service_id']) && in_array(0, json_decode($services['sub_service_id'])) ? 'selected' : '' ?>>None</option> -->
|
||||
<option value="">Select a Service</option>
|
||||
<option value="0" <?= isset($services['sub_service_id']) && in_array(0, json_decode($services['sub_service_id'])) ? 'selected' : '' ?>>None</option>
|
||||
<?php foreach ($service as $value) : ?>
|
||||
<?php if ((int)$value["isactive"] === 1) : ?>
|
||||
<option value="<?= $value["service_id"] ?>" <?= isset($services['sub_service_id']) && in_array($value['sub_service_id'], json_decode($services['sub_service_id'])) ? 'selected' : '' ?>>
|
||||
<option value="<?= $value["service_id"] ?>" <?= isset($services['sub_service_id']) && !empty($services['sub_service_id']) && in_array($value['sub_service_id'], json_decode($services['sub_service_id'])) ? 'selected' : '' ?>>
|
||||
<?= $value["service_name"]; ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<h4 class="page-title">Service List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_service/0"; ?>" class="btn btn-primary waves-effect"> <i class="ri-add-line"></i></a>
|
||||
<li class=""> <a href="<?= base_url() . "new_service/0"; ?>" class="btn btn-primary waves-effect">Add Service</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -19,7 +19,7 @@
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100" style="width:100% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service Name</th>
|
||||
@ -45,10 +45,10 @@
|
||||
<td><?= $value['description']; ?></td>
|
||||
<td>
|
||||
<a href="<?= "new_service/" . $value['service_id']; ?>" class="edit-button">
|
||||
<i class="ri-pencil-line"></i>
|
||||
</a>
|
||||
<i class="ri-pencil-line" style="font-size:20px;"></i>
|
||||
</a>
|
||||
<a href="<?= "delete_service/" . $value['service_id']; ?>" class="delete-button">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
<i class="ri-delete-bin-line" style="font-size:20px;"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -64,4 +64,53 @@
|
||||
</div> <!-- end col -->
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Service', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Service', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Service', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -7,7 +7,7 @@
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<a href="<?= base_url() . "new_user/0"; ?>" class="btn btn-primary waves-effect" > <i class="ri-add-line"></i></a></li>
|
||||
<a href="<?= base_url() . "new_user/0"; ?>" class="btn btn-primary waves-effect" >Add User</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table dt-responsive nowrap w-100">
|
||||
<table id="datatable-buttons-2" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
@ -69,4 +69,52 @@
|
||||
</div> <!-- end col -->
|
||||
<?php include('layout/footer.php'); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'User', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'User', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'User', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -40,8 +40,8 @@
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td><?= $roleModel->getRoleNameById($value['role']); ?></td> <!-- Call the model method -->
|
||||
<td>
|
||||
<a href="<?= base_url("edit_user_super_admin/" . $value['user_id']) ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= "delete_user/" . $value['user_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="<?= base_url("edit_user_super_admin/" . $value['user_id']) ?>" class="edit-button"><i class="ri-pencil-line" style="font-size:20px;"></i></a>
|
||||
<a href="<?= "delete_user/" . $value['user_id']; ?>" class="delete-button"><i class="ri-delete-bin-line" style="font-size:20px;"></i></a>
|
||||
</td>
|
||||
|
||||
<?php endif?>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="<?= base_url() . "add_vehicle"; ?>" method="post">
|
||||
<form id="vehicle_add_form_id" action="<?= base_url() . "add_vehicle"; ?>" method="post">
|
||||
|
||||
<h4 class="header-title">Vehicle Details :</h4>
|
||||
<div class="form-row">
|
||||
@ -112,7 +112,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button id="form_submit_button" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -440,6 +440,42 @@ $('#saveModelBtn').click(function() {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$('#form_submit_button').click(function () {
|
||||
// var isValid = $('#vehicle_add_form_id')[0].checkValidity();
|
||||
|
||||
var register_number = $('#regno').val();
|
||||
|
||||
if (register_number) {
|
||||
$.ajax({
|
||||
url: '<?= base_url("checkRegisterNo") ?>', // URL to your controller method for fetching models
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: { register_number: register_number },
|
||||
success: function(response) {
|
||||
if (response) {
|
||||
$('#regno').val("");
|
||||
toastr.warning("Register Number Already Added!");
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error); // Log any errors to the console
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected]{
|
||||
color:#ffffff;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<h4 class="page-title">Vehicle List</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class=""> <a href="<?= base_url() . "new_vehicle/0"; ?>" class="btn btn-primary waves-effect"> <i class="ri-add-line"></i></a></li>
|
||||
<li class=""> <a href="<?= base_url() . "new_vehicle/0"; ?>" class="btn btn-primary waves-effect"> Add Vehicle</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- <h4 class="header-title">Business List</h4> -->
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"
|
||||
<table id="datatable-buttons-2" class="table table-striped dt-responsive nowrap w-100"
|
||||
style="width:100% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -58,4 +58,53 @@
|
||||
</div> <!-- end col -->
|
||||
|
||||
</div>
|
||||
<?php include('layout/footer.php'); ?>
|
||||
|
||||
<?php include('layout/footer.php'); ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Vehicle', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Vehicle', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Vehicle', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -7,7 +7,7 @@
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<a href="<?= base_url() . "new_vendor/0"; ?>" class="btn btn-primary waves-effect" > <i class="ri-add-line"></i></a></li>
|
||||
<a href="<?= base_url() . "new_vendor/0"; ?>" class="btn btn-primary waves-effect" > Add Vendor</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
|
||||
<li class="breadcrumb-item active">Datatables</li> -->
|
||||
</ol>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
|
||||
<table id="datatable-buttons" class="table dt-responsive nowrap w-100">
|
||||
<table id="datatable-buttons-2" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
@ -49,8 +49,8 @@
|
||||
<td><?= $value['contact_person_mobile1']; ?></td>
|
||||
<td><?= $value['category']; ?></td> <!-- Call the model method -->
|
||||
<td>
|
||||
<a href="<?= "new_vendor/" . $value['vendor_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= "delete_vendor/" . $value['vendor_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="<?= "new_vendor/" . $value['vendor_id']; ?>" class="edit-button"><i class="ri-pencil-line" style="font-size:20px;"></i></a>
|
||||
<a href="<?= "delete_vendor/" . $value['vendor_id']; ?>" class="delete-button"><i class="ri-delete-bin-line" style="font-size:20px;"></i></a>
|
||||
</td>
|
||||
|
||||
<?php endif?>
|
||||
@ -65,6 +65,53 @@
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
<?php include('layout/footer.php'); ?>
|
||||
</div>
|
||||
|
||||
<?php include('layout/footer.php'); ?> </div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#datatable-buttons-2').DataTable({
|
||||
"order": [[2, 'desc']], // Set initial sorting to descending on the first column
|
||||
"dom": 'Bfrtip', // Show export buttons
|
||||
"buttons": [ {
|
||||
extend: 'pdfHtml5',
|
||||
title: 'Vendor', // Set your custom PDF title here
|
||||
text: 'PDF',
|
||||
customize: function(doc) {
|
||||
// You can further customize the PDF here if needed
|
||||
// doc.content[1].table.body.forEach(function(row) {
|
||||
// row.splice(0, 1); // Remove the first column (ID column)
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: 'Vendor', // Set your custom print title here
|
||||
text: 'Print',
|
||||
customize: function(win) {
|
||||
// You can further customize the print output here if needed
|
||||
// $(win.document.body).find('table').find('th:first-child, td:first-child').remove();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'copy',
|
||||
text: 'Copy', // Set the title for the Copy button
|
||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV', // Set the title for the CSV button
|
||||
title: 'Vendor', // Set your custom print title here
|
||||
exportOptions: {
|
||||
// columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||
}
|
||||
}], // Enable export options
|
||||
"language": {
|
||||
"search": "Search: " // Customize search label
|
||||
},
|
||||
"ordering": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user