Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
60dc7d2d0b
@ -779,6 +779,8 @@ $routes->group('payout', function($routes) {
|
||||
$routes->get('invoices', 'PayoutController::invoices');
|
||||
$routes->post('invoices/save', 'PayoutController::saveInvoice');
|
||||
$routes->get('invoices/history', 'PayoutController::auditHistory');
|
||||
$routes->get('invoice/generate-number/(:num)', 'PayoutController::generateInvoiceNumberAjax/$1');
|
||||
|
||||
});
|
||||
|
||||
//PARTNER COMMISSION
|
||||
|
||||
@ -30,7 +30,7 @@ class PayoutController extends BaseController
|
||||
|
||||
$this->payout_status = [
|
||||
1 => "Pending",
|
||||
2 => "Complete",
|
||||
2 => "Completed",
|
||||
];
|
||||
|
||||
$this->invoiceItemModel = new InvoiceItemModel();
|
||||
@ -84,7 +84,7 @@ class PayoutController extends BaseController
|
||||
// for list
|
||||
$data['payout_status'] = $this->payout_status;
|
||||
$data['agent_list'] = $this->invoiceModel->agentList();
|
||||
$data['page_name'] = "Payout";
|
||||
$data['page_name'] = "Invoices";
|
||||
$payout_data['payout_list_data'] = $this->invoiceModel->invoiceList();
|
||||
$data['payout_list'] = view('payout_list', $payout_data);
|
||||
|
||||
@ -199,10 +199,10 @@ class PayoutController extends BaseController
|
||||
|
||||
$type = $this->request->getGet('type');
|
||||
|
||||
$title = $type === 'add' ? 'Add Invoices'
|
||||
: ($type === 'edit' ? 'Edit Invoices'
|
||||
: ($type === 'adjustment' ? 'Adjustment Invoices'
|
||||
: 'Invoices'));
|
||||
$title = $type === 'add' ? 'Add Payouts'
|
||||
: ($type === 'edit' ? 'Edit Payouts'
|
||||
: ($type === 'adjustment' ? 'Payouts Adjustment'
|
||||
: 'Payouts'));
|
||||
|
||||
$data['tab_name'] = $title;
|
||||
$data['page_name'] = $title;
|
||||
@ -219,9 +219,9 @@ class PayoutController extends BaseController
|
||||
//... Now Seperated edit and adjustment => 'policy_transaction_payouts' old file
|
||||
//... Reason : Due Datatable issues Export button Searching like that so seperated
|
||||
if ($type === 'add') {
|
||||
$invoiceNo = $this->generateInvoiceNumber();
|
||||
// $invoiceNo = $this->generateInvoiceNumber();
|
||||
$data['payouts'] = $this->invoiceModel->payoutList(1);
|
||||
$data['invoice_number'] = $invoiceNo;
|
||||
// $data['invoice_number'] = $invoiceNo;
|
||||
return $this->loadLayout('invoice_policy_mapping_add', $data);
|
||||
}
|
||||
|
||||
@ -229,6 +229,7 @@ class PayoutController extends BaseController
|
||||
|
||||
$invoice = $this->invoiceModel->where('id', $id)->first();
|
||||
$data['freeze_edit'] = $this->auditHistory->where('table_name', 'partner_invoice')->where('pk', $id)->countAllResults();
|
||||
|
||||
|
||||
$agentId = $invoice['agent_id'] ?? null;
|
||||
|
||||
@ -246,6 +247,7 @@ class PayoutController extends BaseController
|
||||
|
||||
$data['invoice_number']= $invoice['invoice_no'];
|
||||
$data['type'] = $type;
|
||||
$data['payout_status'] = $invoice['payout_status'] ;
|
||||
|
||||
return $this->loadLayout('invoice_policy_mapping', $data);
|
||||
|
||||
@ -268,9 +270,18 @@ class PayoutController extends BaseController
|
||||
|
||||
//... ADD Part
|
||||
if (empty($id)) {
|
||||
$exists = $this->invoiceModel
|
||||
->where('invoice_no', $json['invoice_no'])
|
||||
->first();
|
||||
|
||||
if ($exists) {
|
||||
$InvNum = $this->generateInvoiceNumber($json['agent_id']);
|
||||
} else {
|
||||
$InvNum = $json['invoice_no'];
|
||||
}
|
||||
|
||||
$invoiceData = [
|
||||
'invoice_no' => $json['invoice_no'],
|
||||
'invoice_no' => $InvNum,
|
||||
'agent_id' => $json['agent_id'],
|
||||
'invoice_date' => $json['invoice_date'],
|
||||
'invoice_amount' => $json['invoice_amount'],
|
||||
@ -387,34 +398,69 @@ class PayoutController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//... Payout-invoice Mapping - Invoice number is auto-generated only for the Add mode.
|
||||
// Note: It will change each time the page is reloaded.. (REF:MGW)
|
||||
private function generateInvoiceNumber()
|
||||
// Note New Pattern : INV/AG001/20251101/xx (REF:SVM)
|
||||
public function generateInvoiceNumberAjax($agentId)
|
||||
{
|
||||
$year = date('Y');
|
||||
$month = date('m');
|
||||
if (!$agentId) {
|
||||
return $this->response->setJSON([
|
||||
'status' => 'error',
|
||||
'message' => 'Agent ID missing'
|
||||
]);
|
||||
}
|
||||
|
||||
do {
|
||||
// random 3-digit number
|
||||
$random = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT);
|
||||
$invoiceNo = "INV{$year}{$month}{$random}";
|
||||
$invoiceNo = $this->generateInvoiceNumber($agentId);
|
||||
|
||||
// check main invoice table
|
||||
$existsMain = $this->invoiceModel
|
||||
->where('invoice_no', $invoiceNo)
|
||||
->first();
|
||||
|
||||
// check partner invoice table
|
||||
$existsPartner = $this->invoiceModel
|
||||
->where('invoice_no', $invoiceNo)
|
||||
->first();
|
||||
|
||||
} while ($existsMain || $existsPartner); // regenerate if duplicate found
|
||||
|
||||
return $invoiceNo;
|
||||
return $this->response->setJSON([
|
||||
'status' => 'success',
|
||||
'invoice_no' => $invoiceNo
|
||||
]);
|
||||
}
|
||||
|
||||
//... Payout-invoice Mapping - Invoice number is auto-generated only for the Add mode.
|
||||
// Note New Pattern : INV/AG001/20251101/xx (REF:SVM)
|
||||
private function generateInvoiceNumber($agentId)
|
||||
{
|
||||
$agent = $this->invoiceModel->agentListById($agentId);
|
||||
$agentCode = $agent["agent_code"];
|
||||
|
||||
$today = date("Ymd");
|
||||
$likePattern = "INV/$agentCode/$today/%";
|
||||
|
||||
$count = $this->invoiceModel
|
||||
->like("invoice_no", $likePattern)
|
||||
->countAllResults();
|
||||
|
||||
$nextNumber = $count + 1;
|
||||
|
||||
return "INV/$agentCode/$today/$nextNumber";
|
||||
}
|
||||
|
||||
// private function generateInvoiceNumber()
|
||||
// {
|
||||
// $year = date('Y');
|
||||
// $month = date('m');
|
||||
|
||||
// do {
|
||||
// // random 3-digit number
|
||||
// $random = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT);
|
||||
// $invoiceNo = "INV{$year}{$month}{$random}";
|
||||
|
||||
// // check main invoice table
|
||||
// $existsMain = $this->invoiceModel
|
||||
// ->where('invoice_no', $invoiceNo)
|
||||
// ->first();
|
||||
|
||||
// // check partner invoice table
|
||||
// $existsPartner = $this->invoiceModel
|
||||
// ->where('invoice_no', $invoiceNo)
|
||||
// ->first();
|
||||
|
||||
// } while ($existsMain || $existsPartner); // regenerate if duplicate found
|
||||
|
||||
// return $invoiceNo;
|
||||
// }
|
||||
|
||||
//... Payout-invoice Mapping Audit History Based on "Adjustment" value (REF: KV,SVM)
|
||||
public function auditHistory()
|
||||
@ -434,7 +480,7 @@ class PayoutController extends BaseController
|
||||
->getResultArray();
|
||||
|
||||
$details['invoice_child'] = $this->auditHistory
|
||||
->select('auditing_history.*,partner_invoice.invoice_no, user_profiles.first_name as created_name')
|
||||
->select('auditing_history.*,partner_invoice.invoice_no, user_profiles.first_name as created_name,partner_invoice_items.policy_no')
|
||||
->join('user_profiles', 'user_profiles.id = auditing_history.created_by', 'left')
|
||||
->join('partner_invoice_items', 'partner_invoice_items.id = auditing_history.pk', 'left')
|
||||
->join('partner_invoice', 'partner_invoice.id = partner_invoice_items.invoice_id', 'left')
|
||||
|
||||
@ -822,6 +822,7 @@ class RuleImportController extends AdminController
|
||||
|
||||
$count = $this->partnerPolicyModel->where('commission_applied_rule', $rule_id)
|
||||
->countAllResults();
|
||||
// $count = 1;
|
||||
return $this->respond(['status' => true, 'code' => 200, 'count' => $count, 'message' => ""], 200);
|
||||
}
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ class InvoiceModel extends Model
|
||||
-- Payout status
|
||||
CASE
|
||||
WHEN payout_status = 1 THEN 'Pending'
|
||||
WHEN payout_status = 2 THEN 'Complete'
|
||||
WHEN payout_status = 2 THEN 'Completed'
|
||||
END AS status_text,
|
||||
|
||||
partner_agent.name as agent_name
|
||||
@ -175,7 +175,7 @@ class InvoiceModel extends Model
|
||||
-- Payout status
|
||||
CASE
|
||||
WHEN payout_status = 1 THEN 'Pending'
|
||||
WHEN payout_status = 2 THEN 'Complete'
|
||||
WHEN payout_status = 2 THEN 'Completed'
|
||||
END AS status_text,
|
||||
|
||||
partner_agent.name as agent_name
|
||||
@ -198,26 +198,26 @@ class InvoiceModel extends Model
|
||||
pt.agent_id AS agentId,
|
||||
pp.insured_name AS customer,
|
||||
pp.premium_amount AS premium,
|
||||
pp.commission_amount AS commission,
|
||||
COALESCE(pii.commission_amount, pp.commission_amount) AS commission,
|
||||
pp.issued_date AS date_db,
|
||||
DATE_FORMAT(pp.issued_date, "%d/%m/%Y") AS date,
|
||||
pii.id AS invoiceItemId
|
||||
pii.id AS invoiceItemId,
|
||||
pii.commission_amount as paid_amount,
|
||||
pi.payout_status
|
||||
')
|
||||
->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left')
|
||||
->join('partner_invoice pi','pi.id = pii.invoice_id','left')
|
||||
->join('partner_policy pp','pt.policy_no = pp.policy_number AND pt.agent_id = pp.agent_id','left')
|
||||
->where('pt.is_active',1)
|
||||
->where('pt.agent_id IS NOT NULL', null, false);
|
||||
|
||||
if ($flag == 1) { // Add mode
|
||||
// EXCLUDE all policies that exist in partner_invoice_items
|
||||
$builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left');
|
||||
// EXCLUDE all policies that exist in partner_invoice_items
|
||||
$builder->where("pt.policy_no NOT IN (SELECT policy_no FROM partner_invoice_items)", null, false);
|
||||
}
|
||||
|
||||
if ($flag == 2) { // Edit mode
|
||||
// Policies belonging to a specific invoice
|
||||
$builder->select('pii.commission_amount as paid_amount');
|
||||
$builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','inner'); // must exist
|
||||
$builder->join('partner_invoice pi','pi.id = pii.invoice_id','inner'); // must exist
|
||||
$builder->where('pii.is_active',1);
|
||||
if ($invoiceId) {
|
||||
$builder->where('pi.id', $invoiceId); // only policies of this invoice
|
||||
@ -229,8 +229,6 @@ class InvoiceModel extends Model
|
||||
|
||||
if ($flag == 3) { // Extra policies
|
||||
// Policies not assigned to any invoice
|
||||
$builder->select('pii.commission_amount as paid_amount');
|
||||
$builder->join('partner_invoice_items pii','pii.policy_no = pt.policy_no','left');
|
||||
$builder->where('pii.id IS NULL', null, false);
|
||||
if ($agentId) {
|
||||
$builder->where('pt.agent_id', $agentId);
|
||||
@ -240,4 +238,14 @@ class InvoiceModel extends Model
|
||||
return $builder->get()->getResultArray();
|
||||
}
|
||||
|
||||
public function agentListById($agentId)
|
||||
{
|
||||
return $this->db->table('partner_agent')
|
||||
->where('id', $agentId)
|
||||
->where('is_active', 1)
|
||||
->get()
|
||||
->getRowArray();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -858,9 +858,13 @@ table.dataTable tbody td {
|
||||
|
||||
table = $('#user-table').DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
// {
|
||||
// extend: 'collection',
|
||||
|
||||
@ -223,9 +223,12 @@ var table;
|
||||
$(document).ready(function() {
|
||||
table = $('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, button right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus"></i> <span class="btn-custom">Add</span>',
|
||||
|
||||
@ -224,9 +224,9 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#datatable-buttons').DataTable({
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -239,6 +239,10 @@
|
||||
// left: "50px"
|
||||
// });
|
||||
// },
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -89,9 +89,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -117,9 +117,13 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -74,9 +74,13 @@ table.dataTable tbody td {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -76,9 +76,13 @@ table.dataTable tbody td {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -91,9 +91,9 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [
|
||||
// {
|
||||
// extend: 'csv',
|
||||
@ -107,6 +107,10 @@
|
||||
// },
|
||||
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -338,9 +338,13 @@
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -217,9 +217,13 @@ table.dataTable thead th {
|
||||
|
||||
$('#scroll-horizontal-datatable').DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -284,9 +284,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>S.No </th>
|
||||
<th class="text-center">S.No </th>
|
||||
<th>Docs Name </th>
|
||||
<th>File Name </th>
|
||||
<th>Action </th>
|
||||
@ -266,7 +266,7 @@ function create_url_list(data) {
|
||||
|
||||
let base_url = "<?php echo base_url() ?>";
|
||||
|
||||
if (data && data.length > 0) {
|
||||
if (data && data.length > 0) {
|
||||
let html = "";
|
||||
|
||||
data.forEach((item, index) => {
|
||||
|
||||
@ -84,9 +84,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -82,9 +82,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -71,6 +71,9 @@ $(document).ready(function() {
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -298,10 +298,13 @@ var table;
|
||||
$(document).ready(function()
|
||||
{
|
||||
table = $('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add From Lead',
|
||||
|
||||
@ -372,10 +372,13 @@
|
||||
$(document).ready(function() {
|
||||
table = $('#tickets-table').DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
text: 'Upload <i class="mdi mdi-upload"></i>',
|
||||
className: 'btn app-btn-primary mr-2', // custom class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -173,9 +173,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>S.No </th>
|
||||
<th class="text-center">S.No </th>
|
||||
<th>Docs Name </th>
|
||||
<th>File Name </th>
|
||||
<th>Action </th>
|
||||
|
||||
@ -341,9 +341,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -594,9 +594,13 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
|
||||
@ -461,12 +461,16 @@ $(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
|
||||
|
||||
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -336,10 +336,14 @@ $(document).ready(function () {
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
dom:
|
||||
"<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// dom:
|
||||
// "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -98,9 +98,13 @@ $(document).ready(function () {
|
||||
var table = ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
language: {
|
||||
search: `
|
||||
<div class="datatable-search-wrapper" style="position:relative; display:inline-block; width:100%;">
|
||||
|
||||
@ -356,9 +356,13 @@
|
||||
// for datatable
|
||||
$(document).ready(function() {
|
||||
$('#hr_tickets_table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -182,9 +182,13 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -136,12 +136,12 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
|
||||
<input type="date" class="form-control mr-2" id="fromDate" placeholder="From Date" title="From Date" style="width:170px;">
|
||||
<!-- <input type="date" class="form-control mr-2" id="fromDate" placeholder="From Date" title="From Date" style="width:170px;">
|
||||
<input type="date" class="form-control mr-2" id="toDate" placeholder="To Date" title="To Date" style="width:170px;">
|
||||
|
||||
<button type="button" class="btn-icon mr-1" title="Reset Filters" onclick="resetFilters()"><i class="mdi mdi-refresh"></i></button>
|
||||
|
||||
<button type="button" class="btn-icon mr-1" title="Search" onclick="searchPolicies()"><i class="mdi mdi-magnify"></i></button>
|
||||
<button type="button" class="btn-icon mr-1" title="Search" onclick="searchPolicies()"><i class="mdi mdi-magnify"></i></button> -->
|
||||
|
||||
|
||||
<!-- <button class="btn app-btn-primary mr-2" onclick="resetFilters()" title="Reset Filters">
|
||||
@ -319,7 +319,6 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
"<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
@ -630,13 +629,13 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
filteredPolicies = [...filteredPolicies, ...newPolicies];
|
||||
|
||||
// In EDIT mode, pre-check any policies that already have invoiceItemId
|
||||
if (invoiceType != 'add') {
|
||||
filteredPolicies.forEach(p => {
|
||||
if (p.invoiceItemId && !selectedPolicies.has(String(p.id))) {
|
||||
selectedPolicies.add(String(p.id));
|
||||
}
|
||||
});
|
||||
}
|
||||
// if (invoiceType != 'add') {
|
||||
// filteredPolicies.forEach(p => {
|
||||
// if (p.invoiceItemId && !selectedPolicies.has(String(p.id))) {
|
||||
// selectedPolicies.add(String(p.id));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// Re-render table
|
||||
renderPolicies();
|
||||
@ -789,29 +788,31 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const freeze = <?= isset($freeze_edit) ? (int)$freeze_edit : 0 ?>;
|
||||
const type = '<?= isset($type) ? $type : '' ?>';
|
||||
|
||||
if (freeze > 0 && type === 'edit') {
|
||||
console.log("Freeze edit active");
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const freeze = <?= isset($freeze_edit) ? (int)$freeze_edit : 0 ?>;
|
||||
const payout_status = <?= isset($payout_status) ? (int)$payout_status : 0 ?>;
|
||||
const type = '<?= isset($type) ? $type : '' ?>';
|
||||
|
||||
// Wait until DataTable is initialized
|
||||
$('#policy_table').on('draw.dt', function() {
|
||||
document.querySelectorAll('.CB').forEach(cb => cb.disabled = true);
|
||||
});
|
||||
// Determine if we should freeze edits
|
||||
const shouldFreeze =
|
||||
(freeze > 0 && type === 'edit') ||
|
||||
(payout_status === 2 && (type === 'adjustment' || type === 'edit'));
|
||||
|
||||
// Hide summary bar actions
|
||||
document.querySelector('.S').style.display = 'none'; // hides it
|
||||
document.querySelector('.C').style.display = 'none';
|
||||
document.querySelector('.M').style.display = 'none'; // hides it
|
||||
if (shouldFreeze) {
|
||||
console.log("Freeze edit active");
|
||||
|
||||
}
|
||||
});
|
||||
// Disable checkboxes and adjustment inputs after DataTable draw
|
||||
$('#policy_table').on('draw.dt', function() {
|
||||
document.querySelectorAll('.CB').forEach(cb => cb.disabled = true);
|
||||
document.querySelectorAll('.policy-adjustment').forEach(input => input.disabled = true);
|
||||
});
|
||||
|
||||
// Hide summary bar action buttons
|
||||
document.querySelectorAll('.S, .C, .M').forEach(btn => btn.style.display = 'none');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
function auditingHistory() {
|
||||
|
||||
@ -896,7 +897,7 @@ function auditingHistory() {
|
||||
table += `
|
||||
<tr>
|
||||
<td>${index + 1}</td>
|
||||
<td>${row.field_name.replace(/_/g, " ")}</td>
|
||||
<td>${row.policy_no + ' (' + row.field_name.replace(/_/g, " ") + ')'}</td>
|
||||
<td>${row.old_value ?? '-'}</td>
|
||||
<td>${row.new_value ?? '-'}</td>
|
||||
<td>${row.created_name ?? '-'}</td>
|
||||
@ -965,6 +966,7 @@ function getExportFileName() {
|
||||
let day = String(d.getDate()).padStart(2, '0');
|
||||
let month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
let year = d.getFullYear();
|
||||
return `Invoice Policies List ${day}-${month}-${year}`;
|
||||
// let INV = $("#invoiceNo").val() || '';
|
||||
return `Payouts (${day}-${month}-${year})`;
|
||||
}
|
||||
</script>
|
||||
@ -84,7 +84,7 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
<div class="form-group col-md-3">
|
||||
<label for="agents"> Agents <span class="text-danger"></span></label>
|
||||
|
||||
<select class="form-control" id="agentSelect" name="agents_id" onchange="loadPolicies()" required>
|
||||
<select class="form-control" id="agentSelect" name="agents_id" onchange="loadPolicies(); generateInvoiceNumberAjaxCall();" required autocomplete="off">
|
||||
<option value="">Select Agent</option>
|
||||
<?php
|
||||
if(isset($agents) && count($agents)) {
|
||||
@ -127,10 +127,10 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
</div>
|
||||
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<input type="date" class="form-control mr-2" id="fromDate" placeholder="From Date" title="From Date" style="width:170px;">
|
||||
<input type="date" class="form-control mr-2" id="toDate" placeholder="To Date" title="To Date" style="width:170px;">
|
||||
<!-- <input type="date" class="form-control mr-2" id="fromDate" placeholder="From Date" title="From Date" style="width:170px;" autocomplete="off">
|
||||
<input type="date" class="form-control mr-2" id="toDate" placeholder="To Date" title="To Date" style="width:170px;" autocomplete="off">
|
||||
<button type="button" class="btn-icon mr-1" title="Reset Filters" onclick="resetFilters()"><i class="mdi mdi-refresh"></i></button>
|
||||
<button type="button" class="btn-icon mr-1" title="Search" onclick="searchPolicies()"><i class="mdi mdi-magnify"></i></button>
|
||||
<button type="button" class="btn-icon mr-1" title="Search" onclick="searchPolicies()"><i class="mdi mdi-magnify"></i></button> -->
|
||||
</div>
|
||||
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo" aria-expanded="true">
|
||||
@ -198,14 +198,19 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
function getEl(id) { return document.getElementById(id); }
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#agentSelect').select2 && $('#agentSelect').select2();
|
||||
const today = new Date().toISOString().split("T")[0];
|
||||
|
||||
// Initialize Select2
|
||||
if ($('#agentSelect').select2) $('#agentSelect').select2();
|
||||
|
||||
if (getEl('agentSelect')) getEl('agentSelect').value = "";
|
||||
if (getEl('invoiceNo')) getEl('invoiceNo').value = "<?= $invoice_number ?>";
|
||||
// Clear fields without triggering change
|
||||
$("#invoiceNo").val("");
|
||||
$("#agentSelect").val(""); // do NOT trigger change
|
||||
|
||||
// Set max dates for date fields
|
||||
const today = new Date().toISOString().split("T")[0];
|
||||
if (getEl('invoiceDate')) getEl('invoiceDate').max = today;
|
||||
if (getEl('invoiceDate')) getEl('invoiceDate').valueAsDate = new Date();
|
||||
if (getEl('policyTillDate')) getEl('policyTillDate').max = today;
|
||||
if (getEl('invoiceDate')) getEl('invoiceDate').valueAsDate = new Date();
|
||||
if (getEl('policyTillDate')) getEl('policyTillDate').valueAsDate = new Date();
|
||||
|
||||
// Initial empty DataTable so buttons/search are available even before loading policies
|
||||
@ -214,14 +219,12 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom:
|
||||
"<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
@ -339,7 +342,8 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
dom:
|
||||
"<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
@ -471,13 +475,13 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
|
||||
// Reset filters (keeps agent selection; clear others)
|
||||
function resetFilters() {
|
||||
['fromDate','toDate','from_date','to_date','policyTillDate'].forEach(id => {
|
||||
const el = getEl(id);
|
||||
if (el) el.value = '';
|
||||
// Keep agent selected
|
||||
['fromDate','toDate','from_date','to_date'].forEach(id => {
|
||||
if (getEl(id)) getEl(id).value = '';
|
||||
});
|
||||
loadPolicies();
|
||||
}
|
||||
|
||||
|
||||
// Save invoice (AJAX)
|
||||
function saveInvoice() {
|
||||
const agentId = getEl('agentSelect')?.value || '';
|
||||
@ -536,8 +540,58 @@ table.dataTable tbody td { padding: 4px 4px !important; }
|
||||
let day = String(d.getDate()).padStart(2, '0');
|
||||
let month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
let year = d.getFullYear();
|
||||
return `Invoice Policies List ${day}-${month}-${year}`;
|
||||
return `Payouts (${day}-${month}-${year})`;
|
||||
}
|
||||
|
||||
function generateInvoiceNumberAjaxCall() {
|
||||
let agentId = $("#agentSelect").val();
|
||||
|
||||
if (!agentId) {
|
||||
$("#invoiceNo").val("");
|
||||
toastr.error("Please Select The Agent");
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "<?= base_url('payout/invoice/generate-number') ?>/" + agentId,
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.status === "success") {
|
||||
$("#invoiceNo").val(res.invoice_no);
|
||||
} else {
|
||||
toastr.error(res.message);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
toastr.error("Error generating invoice number");
|
||||
}
|
||||
});
|
||||
}
|
||||
// function searchPolicies() {
|
||||
// filterPolicies();
|
||||
// }
|
||||
// function filterPolicies() {
|
||||
// const fromDate = document.getElementById('fromDate').value;
|
||||
// const toDate = document.getElementById('toDate').value;
|
||||
|
||||
// const agentId = document.getElementById('agentSelect').value;
|
||||
// const policyTillDate = document.getElementById('policyTillDate').value;
|
||||
|
||||
// if (!agentId) {
|
||||
// alert('Please select an agent first');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// filteredPolicies = allPolicies.filter(p => {
|
||||
// if (p.agentId != agentId) return false;
|
||||
// if (policyTillDate && p.date_db > policyTillDate) return false;
|
||||
// if (fromDate && p.date_db < fromDate) return false;
|
||||
// if (toDate && p.date_db > toDate) return false;
|
||||
// return true;
|
||||
// });
|
||||
|
||||
// loadPolicies();
|
||||
// }
|
||||
|
||||
</script>
|
||||
@ -206,9 +206,13 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -239,9 +239,9 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -295,6 +295,10 @@ $(document).ready(function() {
|
||||
// }
|
||||
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -75,9 +75,9 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -131,6 +131,10 @@ $(document).ready(function() {
|
||||
// }
|
||||
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -176,11 +176,13 @@
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
|
||||
|
||||
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -458,9 +458,13 @@ table.dataTable tbody td {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
|
||||
@ -94,9 +94,13 @@
|
||||
var ticketsTable = $('#user-table');
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
|
||||
@ -342,7 +342,7 @@
|
||||
<!-- end -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- Modal content for the Large example => Common mail -->
|
||||
<div class="modal fade" id="member_common_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width scrollb">
|
||||
@ -429,6 +429,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="attachment_tbody">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -446,8 +447,7 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- Modal content for the Large example => Welcome mail-->
|
||||
<div class="modal fade" id="member_welcome_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width scrollb">
|
||||
@ -527,7 +527,7 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- Modal content for the Large example => Remainder mail -->
|
||||
<div class="modal fade" id="member_reminder_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="false" aria-modal="true">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
<div class="modal-content">
|
||||
@ -618,7 +618,7 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- Modal content for the Large example => Ecard mail -->
|
||||
<div class="modal fade" id="member_ecard_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
@ -708,7 +708,7 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- Modal content for the Large example => Review And Summary mail -->
|
||||
<div class="modal fade" id="member_review_and_summary_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
@ -799,6 +799,8 @@
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Modal content for the Large example => Acc Manager Summary mail -->
|
||||
<div class="modal fade" id="account_maneger_summary_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
|
||||
@ -178,9 +178,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -182,18 +182,6 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<!-- <h4 style="position: relative;">Payout List <span id="payout_title"></span></h4> -->
|
||||
</div>
|
||||
<div class="col-5" style="align-self: right;"></div>
|
||||
<div class="col-1" style="align-self: right;">
|
||||
<button class="btn app-btn-primary mr-2" type="button"
|
||||
onclick="window.location.href='<?= base_url('payout/invoices?type=add') ?>'">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
@ -215,7 +203,7 @@
|
||||
<tr>
|
||||
<td> <?= $index + 1 ?> </td>
|
||||
<td> <?= $row['invoice_no'] ?> </td>
|
||||
<td> <?= change_date_format($row['invoice_no'], null, 'd-M-Y') ?? "" ?> </td>
|
||||
<td> <?= change_date_format($row['invoice_date'], null, 'd-M-Y') ?? "" ?> </td>
|
||||
<td> <?= format_indian_number($row['invoice_amount']) ?> </td>
|
||||
<td> <?= format_indian_number($row['total_utr_amount']) ?> </td>
|
||||
<td> <?= format_indian_number($row['balance_amount']) ?> </td>
|
||||
@ -224,7 +212,7 @@
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" onclick="fetchUtrDetails(<?= $row['id'] ?>, '<?= $row['invoice_no'] ?>')"><i class="mdi mdi-bank-transfer mr-2 text-muted font-18 vertical-middle"></i>UTR</a>
|
||||
<a href="<?= base_url('payout/invoices?type=edit&id=' . $row['id']) ?>" class="dropdown-item"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a href="<?= base_url('payout/invoices?type=adjustment&id=' . $row['id']) ?>" class="dropdown-item"><i class="mdi mdi-tune mr-2 text-muted font-18 vertical-middle"></i>Adjustment</a>
|
||||
@ -260,15 +248,27 @@
|
||||
|
||||
// Datatable document ready
|
||||
$(document).ready(function() {
|
||||
|
||||
var tableEl = $('#scroll-horizontal-datatable');
|
||||
if (tableEl.length) {
|
||||
|
||||
var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
var ticketsTable = tableEl.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function (e, dt, node, config) {
|
||||
window.location.href = "<?= base_url('payout/invoices?type=add') ?>";
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
@ -276,15 +276,21 @@
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
title: 'List',
|
||||
title: getExportFileName(),
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
title: 'List',
|
||||
sheetName: 'Policy-Tranction-payout-List',
|
||||
title: getExportFileName(),
|
||||
sheetName: getExportFileName(),
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
className: 'app-btn-primary ',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -305,10 +311,21 @@
|
||||
pageLength: 10, // Set default number of rows per page (optional)
|
||||
ordering: false
|
||||
});
|
||||
|
||||
// IMPORTANT — DataTables draw event REF: TTS
|
||||
ticketsTable.on('draw.dt', function () {
|
||||
|
||||
let rowCount = $('#scroll-horizontal-datatable').DataTable().rows({ filter: 'applied' }).count();
|
||||
|
||||
if (rowCount <= 2) {
|
||||
$('.dataTables_scrollBody').css('overflow', 'inherit');
|
||||
} else {
|
||||
$('.dataTables_scrollBody').css('overflow', 'auto');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.error("Table atet found.");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function fetchUtrDetails(invoice_id, invoice_no)
|
||||
@ -361,4 +378,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
function getExportFileName() {
|
||||
let d = new Date();
|
||||
let day = String(d.getDate()).padStart(2, '0');
|
||||
let month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
let year = d.getFullYear();
|
||||
return `Invoices (${day}-${month}-${year})`;
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -154,6 +154,7 @@
|
||||
toastr.success(response.message, 'SUCCESS');
|
||||
$('#modal_body').empty();
|
||||
$('#modal_body').append(response.data);
|
||||
window.location.href = '<?= base_url("payout/list") ?>';
|
||||
}else{
|
||||
toastr.warning(response.message || 'Unable to fetch data', 'WARNING');
|
||||
}
|
||||
@ -163,7 +164,6 @@
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$('.loader').fadeOut();
|
||||
|
||||
@ -490,9 +490,13 @@ table.dataTable thead th {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -562,9 +562,13 @@ $(document).ready(function() {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-12'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -217,9 +217,9 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [
|
||||
// {
|
||||
// extend: 'csv',
|
||||
@ -230,6 +230,10 @@
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -232,9 +232,9 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [
|
||||
// {
|
||||
// extend: 'csv',
|
||||
@ -286,6 +286,10 @@ $(document).ready(function() {
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -301,9 +301,9 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [
|
||||
// {
|
||||
// extend: 'csv',
|
||||
@ -355,6 +355,10 @@
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -149,9 +149,13 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
|
||||
@ -340,9 +340,9 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -361,6 +361,10 @@
|
||||
// }
|
||||
// }
|
||||
// }],
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -117,9 +117,13 @@
|
||||
var ticketsTable = $('#user-table');
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
|
||||
@ -97,9 +97,9 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -111,6 +111,10 @@
|
||||
// title: 'TAT BAND WISE DATA',
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -539,9 +539,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
text:'Map Employees',
|
||||
action: function(e, dt, node, config) {
|
||||
|
||||
@ -320,9 +320,13 @@ table.dataTable tbody td {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -95,9 +95,9 @@ $(document).ready(function() {
|
||||
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -112,6 +112,10 @@ $(document).ready(function() {
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
|
||||
@ -41,9 +41,9 @@ var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
// scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -59,6 +59,10 @@ if (ticketsTable.length) {
|
||||
// }
|
||||
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
language: {
|
||||
search: `
|
||||
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
||||
|
||||
@ -268,9 +268,9 @@ $(document).ready(function() {
|
||||
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
// buttons: [{
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
@ -292,6 +292,10 @@ $(document).ready(function() {
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -254,9 +254,13 @@
|
||||
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
text: 'Add Template',
|
||||
className: 'buttons-html5 addbtnStyle',
|
||||
|
||||
@ -179,9 +179,13 @@
|
||||
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -221,9 +221,13 @@
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>S.No </th>
|
||||
<th class="text-center">S.No </th>
|
||||
<th>Docs Name </th>
|
||||
<th>File Name </th>
|
||||
<th>Action </th>
|
||||
|
||||
@ -470,9 +470,13 @@ $(document).ready(function() {
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
@ -765,9 +765,13 @@
|
||||
|
||||
table = $('#user-table').DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
dom: "<'row'<'col-sm-3'f><'col-sm-9'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
// {
|
||||
// extend: 'collection',
|
||||
|
||||
@ -96,9 +96,12 @@
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
// dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add',
|
||||
|
||||
@ -255,9 +255,9 @@
|
||||
|
||||
});
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [
|
||||
// {
|
||||
// text: '+ add',
|
||||
@ -299,6 +299,10 @@
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
dom: "<'row'<'col-12 d-flex justify-content-between'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-3 text-center'l><'col-sm-4 text-end'p>>",
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user