diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 6b21c89..54552cd 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -395,24 +395,10 @@ class MasterController extends BaseController public function shared_doc_non_financial_year_to(){ 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(); $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 , service_group.group_name , client_branch.name as client_branch_name , client.name as client_name, service_group.business_id') @@ -428,6 +414,8 @@ class MasterController extends BaseController ->join('client', 'client_branch.client_id = client.client_id', 'left') // ->where('client.business_id',$this->session->get('logged_in_staff_business_id')) ->findAll(); + // dd($data['clientdata']); + $data['serviceGroupData'] = $this->ServiceGroupModel->findAll(); } $business_id = $this->session->get('logged_in_staff_business_id'); @@ -753,13 +741,10 @@ class MasterController extends BaseController public function rememeber_notification() { - try { $doc_id = $this->request->getPost('doc_id'); $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') ->join('client_branch', 'client_docs.client_branch_id = client_branch.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') ->where('client_docs.id', $doc_id)->get()->getRow(); } - // print_r($clientData);die; // helper('url'); $url ='Preview and Approve Document'; // $businessData = $this->BranchModel->select('branches.* , business.business_name ') diff --git a/app/Views/service_group_list.php b/app/Views/service_group_list.php index ed5d846..69f0005 100644 --- a/app/Views/service_group_list.php +++ b/app/Views/service_group_list.php @@ -189,6 +189,7 @@ + @@ -218,6 +219,7 @@
Serial No Business Name
+ @@ -252,9 +254,14 @@ businessListContainer.empty(); // Append each business to the table - businessList.forEach(function(business) { - businessListContainer.append(''); + businessList.forEach(function(business, index) { + var row = '' + + '' + + '' + + ''; + businessListContainer.append(row); }); + }); // Event listener for service count click @@ -267,10 +274,15 @@ serviceListContainer.empty(); // Append each service to the table - serviceList.forEach(function(service) { - console.log(service); - serviceListContainer.append(''); + serviceList.forEach(function(service, index) { + var row = '' + + '' + + '' + + ''; + serviceListContainer.append(row); }); + + }); });
Serial No Service Name
' + business.business_name + '
' + (index + 1) + '' + business.business_name + '
' + service + '
' + (index + 1) + '' + service + '