CHANGE_SERVICE_GROUP_BUSINESS_LIST_SERVICE_LIST_SERIAL_NO : AADHAVAN
This commit is contained in:
parent
0b1ca98138
commit
f1f974e8b4
@ -395,23 +395,9 @@ class MasterController extends BaseController
|
|||||||
|
|
||||||
public function shared_doc_non_financial_year_to(){
|
public function shared_doc_non_financial_year_to(){
|
||||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||||
$currentDate = new \DateTime();
|
|
||||||
// Determine the start and end dates of the current financial year
|
|
||||||
if ($currentDate->format('n') >= 4) {
|
|
||||||
// If the current month is April (4) or later, the financial year started this year
|
|
||||||
$financialYearStart = new \DateTime($currentDate->format('Y') . '-04-01');
|
|
||||||
$financialYearEnd = new \DateTime(($currentDate->format('Y') + 1) . '-03-31');
|
|
||||||
} else {
|
|
||||||
// If the current month is before April, the financial year started last year
|
|
||||||
$financialYearStart = new \DateTime(($currentDate->format('Y') - 1) . '-04-01');
|
|
||||||
$financialYearEnd = new \DateTime($currentDate->format('Y') . '-03-31');
|
|
||||||
}
|
|
||||||
// Convert to the format suitable for your database (assuming MySQL)
|
|
||||||
$financialYearStart = $financialYearStart->format('Y-m-d');
|
|
||||||
$financialYearEnd = $financialYearEnd->format('Y-m-d');
|
|
||||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||||
$business_id = $this->session->get('logged_in_staff_business_id');
|
$business_id = $this->session->get('logged_in_staff_business_id');
|
||||||
|
|
||||||
if($this->session->get('logged_in_staff_role') == 'Admin'){
|
if($this->session->get('logged_in_staff_role') == 'Admin'){
|
||||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name ,
|
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name ,
|
||||||
service_group.group_name , client_branch.name as client_branch_name ,
|
service_group.group_name , client_branch.name as client_branch_name ,
|
||||||
@ -428,6 +414,8 @@ class MasterController extends BaseController
|
|||||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||||
->findAll();
|
->findAll();
|
||||||
|
// dd($data['clientdata']);
|
||||||
|
|
||||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||||
}
|
}
|
||||||
$business_id = $this->session->get('logged_in_staff_business_id');
|
$business_id = $this->session->get('logged_in_staff_business_id');
|
||||||
@ -753,13 +741,10 @@ class MasterController extends BaseController
|
|||||||
|
|
||||||
public function rememeber_notification()
|
public function rememeber_notification()
|
||||||
{
|
{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$doc_id = $this->request->getPost('doc_id');
|
$doc_id = $this->request->getPost('doc_id');
|
||||||
$MailHelper = new MailHelper();
|
$MailHelper = new MailHelper();
|
||||||
|
|
||||||
// print_r($this->session->get());die;
|
|
||||||
|
|
||||||
$clientData = $this->ClientDocsModel->select('client.name as client_name, client_branch.email, client_branch.mobile_no, client_branch.whatsapp, client.individual, client_docs.business_id')
|
$clientData = $this->ClientDocsModel->select('client.name as client_name, client_branch.email, client_branch.mobile_no, client_branch.whatsapp, client.individual, client_docs.business_id')
|
||||||
->join('client_branch', 'client_docs.client_branch_id = client_branch.id', 'left')
|
->join('client_branch', 'client_docs.client_branch_id = client_branch.id', 'left')
|
||||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||||
@ -770,7 +755,6 @@ class MasterController extends BaseController
|
|||||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||||
->where('client_docs.id', $doc_id)->get()->getRow();
|
->where('client_docs.id', $doc_id)->get()->getRow();
|
||||||
}
|
}
|
||||||
// print_r($clientData);die;
|
|
||||||
// helper('url');
|
// helper('url');
|
||||||
$url ='<a href="' . generate_signed_url('preview', ['doc_id'=>md5((string)$doc_id)], 36000) . '">Preview and Approve Document</a>';
|
$url ='<a href="' . generate_signed_url('preview', ['doc_id'=>md5((string)$doc_id)], 36000) . '">Preview and Approve Document</a>';
|
||||||
// $businessData = $this->BranchModel->select('branches.* , business.business_name ')
|
// $businessData = $this->BranchModel->select('branches.* , business.business_name ')
|
||||||
|
|||||||
@ -189,6 +189,7 @@
|
|||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Serial No</th>
|
||||||
<th>Business Name</th>
|
<th>Business Name</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -218,6 +219,7 @@
|
|||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Serial No</th>
|
||||||
<th>Service Name</th>
|
<th>Service Name</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -252,9 +254,14 @@
|
|||||||
businessListContainer.empty();
|
businessListContainer.empty();
|
||||||
|
|
||||||
// Append each business to the table
|
// Append each business to the table
|
||||||
businessList.forEach(function(business) {
|
businessList.forEach(function(business, index) {
|
||||||
businessListContainer.append('<tr><td>' + business.business_name + '</td></tr>');
|
var row = '<tr>' +
|
||||||
|
'<td>' + (index + 1) + '</td>' +
|
||||||
|
'<td>' + business.business_name + '</td>' +
|
||||||
|
'</tr>';
|
||||||
|
businessListContainer.append(row);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Event listener for service count click
|
// Event listener for service count click
|
||||||
@ -267,10 +274,15 @@
|
|||||||
serviceListContainer.empty();
|
serviceListContainer.empty();
|
||||||
|
|
||||||
// Append each service to the table
|
// Append each service to the table
|
||||||
serviceList.forEach(function(service) {
|
serviceList.forEach(function(service, index) {
|
||||||
console.log(service);
|
var row = '<tr>' +
|
||||||
serviceListContainer.append('<tr><td>' + service + '</td></tr>');
|
'<td>' + (index + 1) + '</td>' +
|
||||||
|
'<td>' + service + '</td>' +
|
||||||
|
'</tr>';
|
||||||
|
serviceListContainer.append(row);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user