auto_gen_receipt_no : RV
This commit is contained in:
parent
45d0e0a7dd
commit
76f2045126
4
.env
4
.env
@ -65,13 +65,13 @@ app.baseURL = 'http://localhost/donation/'
|
||||
|
||||
|
||||
database.default.hostname = localhost
|
||||
database.default.database = doner_management
|
||||
database.default.database = donor_management
|
||||
database.default.username = root
|
||||
database.default.password = ''
|
||||
database.default.DBDriver = MySQLi
|
||||
|
||||
database.tests.hostname = localhost
|
||||
database.tests.database = doner_management
|
||||
database.tests.database = donor_management
|
||||
database.tests.username = root
|
||||
database.tests.password = ''
|
||||
database.tests.DBDriver = MySQLi
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -52,8 +52,8 @@ writable/debugbar/
|
||||
!writable/debugbar/.gitkeep
|
||||
writable/session/
|
||||
!writable/session/.gitkeep
|
||||
writable/log/
|
||||
!writable/log/.gitkeep
|
||||
writable/logs/
|
||||
!writable/logs/.gitkeep
|
||||
writable/uploads/
|
||||
!writable/uploads/.gitkeep
|
||||
writable/cache/
|
||||
|
||||
@ -52,6 +52,7 @@ $routes->get("user_list/", "Users::index");
|
||||
$routes->get("user_page/(:any)", "Users::user_page/$1");
|
||||
$routes->post("insert_users", "Users::insert_users");
|
||||
$routes->get("delete_user/(:any)", "Users::delete_user/$1");
|
||||
$routes->get("activateUser/(:any)", "Users::activateUser/$1");
|
||||
|
||||
# Causes Routes
|
||||
$routes->get("causes_list/", "Books::index");
|
||||
@ -71,35 +72,24 @@ $routes->get("appsetting_page/(:any)", "AppSettings::appsetting_page/$1");
|
||||
$routes->post("appsetting_synchronization", "AppSettings::appsetting_synchronization");
|
||||
// $routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
|
||||
|
||||
# Business Routes
|
||||
$routes->get("business_list/", "Business::index");
|
||||
$routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1");
|
||||
$routes->post("insert_business/", "Business::insert_business");
|
||||
$routes->get("delete_business/(:any)", "Business::delete_business/$1");
|
||||
#Routes for Organization Routes
|
||||
$routes->get("org_list/", "Business::index");
|
||||
$routes->get("new_org/(:any)", "Business::new_org/$1");
|
||||
$routes->post("insert_org/", "Business::insert_org");
|
||||
$routes->get("delete_org/(:any)", "Business::delete_org/$1");
|
||||
|
||||
# Donor Routes
|
||||
#Routes for Donor Routes
|
||||
$routes->get("Donor_list/", "Customer::index");
|
||||
$routes->get("new_Donor/(:any)", "Customer::new_Donor/$1");
|
||||
$routes->post("insert_customer", "Customer::insert_customer");
|
||||
$routes->get("delete_customer/(:any)", "Customer::delete_customer/$1");
|
||||
$routes->post("insert_donor", "Customer::insert_donor");
|
||||
$routes->get("delete_donor/(:any)", "Customer::delete_donor/$1");
|
||||
|
||||
# Routes for Customer group
|
||||
$routes->get('customer_group/', 'Customer::customer_group');
|
||||
$routes->get('view_customer_group/(:any)', 'Customer::view_customer_group/$1');
|
||||
$routes->get('preview_customer_group/(:any)', 'Customer::preview_customer_group/$1');
|
||||
$routes->get('delete_customer_group/(:any)', 'Customer::delete_customer_group/$1');
|
||||
$routes->post("insert_customer_group", "Customer::insert_customer_group");
|
||||
|
||||
# Scheme Routes
|
||||
$routes->get("scheme_list/", "Scheme::index");
|
||||
$routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1");
|
||||
$routes->post("insert_scheme/", "Scheme::insert_scheme");
|
||||
$routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1");
|
||||
#subscription Routes
|
||||
$routes->get("subscribers_list/", "Subscription::index");
|
||||
$routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1");
|
||||
$routes->post("add_subscription/", "Subscription::add_subscription/");
|
||||
$routes->post('subscription/download_details', 'Subscription::download_details');
|
||||
#Routes for donor group
|
||||
$routes->get('donor_group/', 'Customer::donor_group');
|
||||
$routes->get('view_donor_group/(:any)', 'Customer::view_donor_group/$1');
|
||||
$routes->get('preview_donor_group/(:any)', 'Customer::preview_donor_group/$1');
|
||||
$routes->get('delete_donor_group/(:any)', 'Customer::delete_donor_group/$1');
|
||||
$routes->post("insert_donor_group", "Customer::insert_donor_group");
|
||||
|
||||
|
||||
|
||||
@ -107,7 +97,7 @@ $routes->post('subscription/download_details', 'Subscription::download_details')
|
||||
$routes->get('addressprint/', 'Address::index');
|
||||
$routes->post('address/generatePdf', 'Address::generatePdf');
|
||||
|
||||
#evnts
|
||||
#Routes for campaign
|
||||
$routes->get("campaign_list/", "Event::index");
|
||||
$routes->get("new_campaign/(:any)", "Event::new_campaign/$1");
|
||||
$routes->post("insert_event/", "Event::insert_event");
|
||||
@ -115,10 +105,9 @@ $routes->post("insert_event/", "Event::insert_event");
|
||||
$routes->get('invoice_number_format/(:any)', 'Event::invoice_number_format/$1');
|
||||
$routes->post("insert_invoice_number_format", "Event::insert_invoice_number_format");
|
||||
|
||||
#Receipt Routes
|
||||
#Routes for Receipt Routes
|
||||
$routes->get("receipt_list/", "Invoice::index");
|
||||
$routes->get("new_receipt/(:any)", "Invoice::new_receipt/$1");
|
||||
// $routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1");
|
||||
|
||||
$routes->post("load_details1/", "Invoice::load_details1/");
|
||||
$routes->post("load_details2/", "Invoice::load_details2/");
|
||||
|
||||
@ -13,7 +13,7 @@ class Address extends BaseController
|
||||
helper('session');
|
||||
$customerModel = new CustomerModel();
|
||||
$data['page_name'] = 'Customer Listing';
|
||||
$data['doner'] = $customerModel->findAll();
|
||||
$data['donor'] = $customerModel->findAll();
|
||||
return view('address_list', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,13 +486,13 @@ class ApiIntegration extends ResourceController
|
||||
$customer_id = "";
|
||||
if (count($records) > 0 && !empty($wordpress_customer_id)) {
|
||||
$where = ['wp_api_customer_id' => $wordpress_customer_id, 'isactive' => 1];
|
||||
$customer_details = $api_model->setTable('doner')->where($where)->first();
|
||||
$customer_details = $api_model->setTable('donor')->where($where)->first();
|
||||
if (isset($customer_details['customer_id']) && $customer_details['customer_id'] != "") {
|
||||
$customer_id = $customer_details['customer_id'];
|
||||
$where['customer_id'] = $customer_details['customer_id'];
|
||||
}
|
||||
|
||||
$countAll = $api_model->countAll('doner', $where);
|
||||
$countAll = $api_model->countAll('donor', $where);
|
||||
$this->logger->info(($countAll) ? "Api SaveCustomerDetails : in wordpress customer ref ID = ".$wordpress_customer_id." is available on customer table and its PrimaryKey = ".$customer_id : "Api SaveBookDetails : in wordpress Customer ref ID = ".$wordpress_customer_id." Not available on Customer table");
|
||||
|
||||
$customer_data['first_name'] = $records['first_name'];
|
||||
@ -509,7 +509,7 @@ class ApiIntegration extends ResourceController
|
||||
|
||||
if ((int)$countAll == 0) {
|
||||
$customer_data['created_by'] = $this->global_variable_user_id;
|
||||
$insert_result = $api_model->insertData('doner', $customer_data);
|
||||
$insert_result = $api_model->insertData('donor', $customer_data);
|
||||
$last_insert_customer_id = $insert_result['info'];
|
||||
$extensive_correspondence .= $insert_result['info'] ? "Customer id : " . $insert_result['info']
|
||||
: "Err :" . $insert_result['err'];
|
||||
@ -520,7 +520,7 @@ class ApiIntegration extends ResourceController
|
||||
$customer_data['updated_by'] = $this->global_variable_user_id;
|
||||
$last_insert_customer_id = $customer_id;
|
||||
$customer_where = ['customer_id' => $customer_id, 'isactive' => 1, 'wp_api_customer_id' => $wordpress_customer_id];
|
||||
$update_result = $api_model->updateData('doner', $customer_data, $customer_where);
|
||||
$update_result = $api_model->updateData('donor', $customer_data, $customer_where);
|
||||
$extensive_correspondence .= $update_result['info'] ? "Customer id : " . $last_insert_customer_id . " ( " . $update_result['info'] . ")"
|
||||
: " ( Err :" . $update_result['err'] . ")";
|
||||
$basic_message .= "Customer id : " . $last_insert_customer_id;
|
||||
@ -743,7 +743,7 @@ class ApiIntegration extends ResourceController
|
||||
if(isset($records['billing']) && gettype($records['billing']) === 'object') {$billing_array = [$records['billing']];}
|
||||
if(isset($records['shipping']) && gettype($records['shipping']) === 'object') {$shipping_array = [$records['shipping']];}
|
||||
$where = ['wp_api_customer_id' => (int)$records['customer_id'], 'isactive' => 1];
|
||||
$local_customer = $api_model->getData('doner', $where);
|
||||
$local_customer = $api_model->getData('donor', $where);
|
||||
$local_customer_id = !empty($local_customer) ? $local_customer[0]->customer_id : NULL;
|
||||
$this->logger->info((!empty($local_customer)) ? "Api SaveSalesDetails : in wordpress customer ref ID = ".$records['customer_id']." is available on Customer table and its PrimaryKey = ".$local_customer_id."(local customer id)" : "Api SaveSalesDetails : in wordpress customer ref ID = ".$records['customer_id']." Not available on Customer table");
|
||||
|
||||
|
||||
@ -98,6 +98,10 @@ abstract class BaseController extends Controller
|
||||
|
||||
$session_uid = get_logged_user_id();
|
||||
$session_uname = get_logged_name();
|
||||
$session_role = get_user_role();
|
||||
|
||||
// echo $session_role; die;
|
||||
|
||||
if(!is_session_active()) {
|
||||
|
||||
header("Location: " . base_url("login"));
|
||||
@ -106,27 +110,55 @@ abstract class BaseController extends Controller
|
||||
|
||||
$auth_model = new AuthenticationModel();
|
||||
|
||||
$details = $auth_model->getheringDetailsForHeader($session_uid);
|
||||
$data['company_name'] = $details[0]['site_name'];
|
||||
$data['company_short_name'] = $details[0]['site_title'];
|
||||
$data['company_address'] = $details[0]['company_address'];
|
||||
$data['company_mobile_no'] = $details[0]['company_mobile_no'];
|
||||
$data['company_email'] = $details[0]['company_email'];
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$data['loggedin_person_id'] = $session_uid;
|
||||
|
||||
$data['loggedin_person_role'] = $details[0]['role'];
|
||||
$data['favicon'] = !empty($details[0]['favicon']) && file_exists(FCPATH."public/uploads/".$details[0]['favicon']) ? base_url("public/uploads/".$details[0]['favicon']) : base_url("public/uploads/default.ico");
|
||||
$data['profile_picture'] = !empty($details[0]['profile_picture']) && file_exists(FCPATH."public/uploads/".$details[0]['profile_picture']) ? base_url("public/uploads/" . $details[0]['profile_picture']) : base_url("public/uploads/avatar.png");
|
||||
$data['company_logo_small'] = !empty($details[0]['company_logo_small']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png");
|
||||
$data['company_logo_large'] = !empty($details[0]['company_logo_large']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png");
|
||||
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$session_bid = get_business_id();
|
||||
$data['bid'] = $session_bid;
|
||||
$data['footer_about'] = $details[0]['footer_about'];
|
||||
|
||||
return $data;
|
||||
if($session_role === 'sadmin'){
|
||||
|
||||
$details = $auth_model->getheringSuperAdminDetailsForHeader($session_uid);
|
||||
$data['company_name'] = $details[0]['site_name'];
|
||||
$data['company_short_name'] = $details[0]['site_title'];
|
||||
$data['company_address'] = $details[0]['company_address'];
|
||||
$data['company_mobile_no'] = $details[0]['company_mobile_no'];
|
||||
$data['company_email'] = $details[0]['company_email'];
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$data['loggedin_person_id'] = $session_uid;
|
||||
|
||||
$data['loggedin_person_role'] = $details[0]['role'];
|
||||
$data['favicon'] = !empty($details[0]['favicon']) && file_exists(FCPATH."public/uploads/".$details[0]['favicon']) ? base_url("public/uploads/".$details[0]['favicon']) : base_url("public/uploads/default.ico");
|
||||
$data['profile_picture'] = !empty($details[0]['profile_picture']) && file_exists(FCPATH."public/uploads/".$details[0]['profile_picture']) ? base_url("public/uploads/" . $details[0]['profile_picture']) : base_url("public/uploads/avatar.png");
|
||||
$data['company_logo_small'] = !empty($details[0]['company_logo_small']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png");
|
||||
$data['company_logo_large'] = !empty($details[0]['company_logo_large']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png");
|
||||
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$session_bid = get_business_id();
|
||||
$data['bid'] = $session_bid;
|
||||
$data['footer_about'] = $details[0]['footer_about'];
|
||||
|
||||
return $data;
|
||||
}else{
|
||||
|
||||
$details = $auth_model->getheringDetailsForHeader($session_uid);
|
||||
$data['company_name'] = $details[0]['site_name'];
|
||||
$data['company_short_name'] = $details[0]['site_title'];
|
||||
$data['company_address'] = $details[0]['company_address'];
|
||||
$data['company_mobile_no'] = $details[0]['company_mobile_no'];
|
||||
$data['company_email'] = $details[0]['company_email'];
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$data['loggedin_person_id'] = $session_uid;
|
||||
|
||||
$data['loggedin_person_role'] = $details[0]['role'];
|
||||
$data['favicon'] = !empty($details[0]['favicon']) && file_exists(FCPATH."public/uploads/".$details[0]['favicon']) ? base_url("public/uploads/".$details[0]['favicon']) : base_url("public/uploads/default.ico");
|
||||
$data['profile_picture'] = !empty($details[0]['profile_picture']) && file_exists(FCPATH."public/uploads/".$details[0]['profile_picture']) ? base_url("public/uploads/" . $details[0]['profile_picture']) : base_url("public/uploads/avatar.png");
|
||||
$data['company_logo_small'] = !empty($details[0]['company_logo_small']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png");
|
||||
$data['company_logo_large'] = !empty($details[0]['company_logo_large']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png");
|
||||
|
||||
$data['loggedin_person'] = $session_uname;
|
||||
$session_bid = get_business_id();
|
||||
$data['bid'] = $session_bid;
|
||||
$data['footer_about'] = $details[0]['footer_about'];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,7 +22,7 @@ class Business extends BaseController
|
||||
}
|
||||
$BusinessModel = new BusinessModel();
|
||||
$data['page_name'] = 'Organization Details';
|
||||
$data['businesses'] = $BusinessModel->where($where)->where('business_id !=', 0)->findAll();
|
||||
$data['businesses'] = $BusinessModel->where($where)->where('business_id !=', 0)->where('isactive', 1)->findAll();
|
||||
// $data['lastQuery'] = $BusinessModel->getLastQuery();
|
||||
// print_r($data);die;
|
||||
$this->render_page('business_list', $data);
|
||||
@ -32,7 +32,7 @@ class Business extends BaseController
|
||||
}
|
||||
|
||||
## To Load Business Form (Add/Update)
|
||||
public function new_bussiness($id)
|
||||
public function new_org($id)
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
@ -56,7 +56,7 @@ class Business extends BaseController
|
||||
}
|
||||
|
||||
## For inserting/updating details of business
|
||||
public function insert_business()
|
||||
public function insert_org()
|
||||
{
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
@ -115,8 +115,8 @@ class Business extends BaseController
|
||||
$BusinessModel->update($business_id, $data);
|
||||
}
|
||||
|
||||
if (empty($business_id)) {
|
||||
return redirect()->route('business_list');
|
||||
if ($session_role === 'sadmin') {
|
||||
return redirect()->route('org_list');
|
||||
}else{
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
@ -124,24 +124,23 @@ class Business extends BaseController
|
||||
}
|
||||
|
||||
## For delete the business details (Which means inactive the details)
|
||||
public function delete_business($id)
|
||||
public function delete_org($id)
|
||||
{
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
$BusinessModel = new BusinessModel();
|
||||
|
||||
// Check if the business ID exists
|
||||
$existingBusiness = $BusinessModel->find($id);
|
||||
if (!$existingBusiness) {
|
||||
return redirect()->route('business_list');
|
||||
}
|
||||
// $existingBusiness = $BusinessModel->find($id);
|
||||
// if (!$existingBusiness) {
|
||||
// return redirect()->route('org_list');
|
||||
// }
|
||||
|
||||
// Delete the business record
|
||||
$data['isactive'] = 0;
|
||||
$data['updated_by'] = $session_uid;
|
||||
$BusinessModel->update($id, $data);
|
||||
//$BusinessModel->delete($id);
|
||||
|
||||
return redirect()->route('business_list');
|
||||
return redirect()->route('org_list');
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,8 +25,9 @@ class Customer extends BaseController
|
||||
$CustomerModel = new CustomerModel();
|
||||
|
||||
$data['page_name'] = 'Donor Details';
|
||||
$data['customer'] = $CustomerModel->where($where)->orderBy('doner_id', 'DESC')->findAll();
|
||||
|
||||
$data['customer'] = $CustomerModel->where($where)->orderBy('donor_id', 'DESC')->findAll();
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($data); die();
|
||||
|
||||
$this->render_page('customer_list', $data);
|
||||
@ -53,7 +54,7 @@ class Customer extends BaseController
|
||||
$customerModel = new CustomerModel();
|
||||
|
||||
// Retrieve customer details by customer ID
|
||||
$edit_user_details = $customerModel->where(['doner_id' => $id])->first();
|
||||
$edit_user_details = $customerModel->where(['donor_id' => $id])->first();
|
||||
$data['customer'] = $edit_user_details;
|
||||
}
|
||||
|
||||
@ -69,7 +70,7 @@ class Customer extends BaseController
|
||||
|
||||
|
||||
## For inserting/updating details of customer
|
||||
public function insert_customer()
|
||||
public function insert_donor()
|
||||
{
|
||||
$requestData = $this->request->getPost();
|
||||
// print_r($requestData);die;
|
||||
@ -89,7 +90,7 @@ class Customer extends BaseController
|
||||
'email' => $this->request->getPost('cmail'),
|
||||
'date_of_birth' => $dob,
|
||||
'pan_no' => $this->request->getPost('pan_no'),
|
||||
'doner_type' => $this->request->getPost('DonorType'),
|
||||
'donor_type' => $this->request->getPost('DonorType'),
|
||||
'org_name' => $this->request->getPost('org_name') !== '' || $this->request->getPost('org_name') !== null ? $this->request->getPost('org_name') : NULL,
|
||||
'address' => $this->request->getPost('address'),
|
||||
'city' => $this->request->getPost('city'),
|
||||
@ -102,8 +103,8 @@ class Customer extends BaseController
|
||||
|
||||
// print_r($data); die();
|
||||
|
||||
$doner_id = $this->request->getPost('doner_id'); // Get the business ID for update
|
||||
if (empty($doner_id)) {
|
||||
$donor_id = $this->request->getPost('donor_id'); // Get the business ID for update
|
||||
if (empty($donor_id)) {
|
||||
|
||||
// It's an insert operation
|
||||
$data['isactive'] = 1;
|
||||
@ -111,11 +112,11 @@ class Customer extends BaseController
|
||||
if ($model->insert($data)) {
|
||||
session()->setFlashdata('success', 'Donor successfully created.');
|
||||
$this->logger->info("Donor : has been added successfully. Inserted ID = " . $model->insertID());
|
||||
$doner_id_for_addresses = $model->insertID();// for Donor ADDRESS Table
|
||||
$donor_id_for_addresses = $model->insertID();// for Donor ADDRESS Table
|
||||
} else {
|
||||
session()->setFlashdata('error', 'Donor could not be added. Please try again..');
|
||||
$this->logger->error("Donor: Err could not be added. Please try again.");
|
||||
$doner_id_for_addresses = "";
|
||||
$donor_id_for_addresses = "";
|
||||
}
|
||||
} else {
|
||||
// It's an update operation
|
||||
@ -124,24 +125,16 @@ class Customer extends BaseController
|
||||
$data['isactive'] = ($isactive == 'on') ? 1 : 0;
|
||||
}
|
||||
$data['updated_by'] = $session_uid;
|
||||
$doner_id_for_addresses = $doner_id; // for Customer ADDRESS Table
|
||||
if ($model->update($doner_id, $data)) {
|
||||
$donor_id_for_addresses = $donor_id; // for Customer ADDRESS Table
|
||||
if ($model->update($donor_id, $data)) {
|
||||
session()->setFlashdata('success', 'Donor successfully updated');
|
||||
$this->logger->info("Donor: has been updated successfully. Updated Donor ID = " . $doner_id_for_addresses);
|
||||
$this->logger->info("Donor: has been updated successfully. Updated Donor ID = " . $donor_id_for_addresses);
|
||||
} else {
|
||||
session()->setFlashdata('error', 'Donor updation failed. Please try again.');
|
||||
$this->logger->error("Donor: Err Failed to update ID =" . $doner_id_for_addresses);
|
||||
$this->logger->error("Donor: Err Failed to update ID =" . $donor_id_for_addresses);
|
||||
}
|
||||
}
|
||||
|
||||
// if($doner_id_for_addresses != ""){
|
||||
// $this->logger->info("Donor: i got Donor id for addresses = " . $doner_id_for_addresses);
|
||||
// $requestData = $this->request->getPost();
|
||||
// $bill_addr = $this->save_customer_addresses($doner_id_for_addresses, $requestData, 'b');
|
||||
// $this->logger->info("Customer: bill addr final message = " .implode(" ",$bill_addr));
|
||||
// $ship_addr = $this->save_customer_addresses($doner_id_for_addresses, $requestData, 's');
|
||||
// $this->logger->info("Donor: Ship addr final message = " . implode(" ",$ship_addr));
|
||||
// }
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error("Donor : Err Occur =" . $e->getMessage());
|
||||
@ -153,13 +146,13 @@ class Customer extends BaseController
|
||||
|
||||
|
||||
## For delete the customer details (Which means inactive the details)
|
||||
public function delete_customer($id)
|
||||
public function delete_donor($id)
|
||||
{
|
||||
try {
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
$CustomerModel = new CustomerModel();
|
||||
$where = ['doner_id' => (int)$id, 'isactive =' => 1];
|
||||
$where = ['donor_id' => (int)$id, 'isactive =' => 1];
|
||||
|
||||
// Check if the business ID exists
|
||||
$existingCustomer = $CustomerModel->where($where)->find($id);
|
||||
@ -185,7 +178,7 @@ class Customer extends BaseController
|
||||
public function get_customer_address($id,$type){
|
||||
$model = new CustomerModel();
|
||||
$model->setTable('customer_addresses');
|
||||
$where = ['isactive' => 1, 'doner_id' => (int)$id,'address_type'=>(int)$type];
|
||||
$where = ['isactive' => 1, 'donor_id' => (int)$id,'address_type'=>(int)$type];
|
||||
$address_details = $model->where($where)->findAll();
|
||||
return $address_details;
|
||||
}
|
||||
@ -206,24 +199,24 @@ class Customer extends BaseController
|
||||
return $state_details;
|
||||
}
|
||||
|
||||
public function customer_group(){
|
||||
public function donor_group(){
|
||||
|
||||
$session_bid = get_business_id();
|
||||
$data['page_name'] = 'Donor Group Details';
|
||||
$model = new CustomerModel();
|
||||
$data['customer_group'] = $model->getGroupDetails($session_bid);
|
||||
$data['donor_group'] = $model->getGroupDetails($session_bid);
|
||||
$this->render_page('customer_group', $data);
|
||||
}
|
||||
|
||||
|
||||
public function view_customer_group($id){
|
||||
public function view_donor_group($id){
|
||||
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
|
||||
$data['field'] = [
|
||||
['value'=>'', 'fieldflag'=>1, 'text'=> 'Choose the Field', 'disable' => false],
|
||||
['value'=>'C.doner_type', 'fieldflag'=>1, 'text'=> 'Donor Type', 'disable' => false],
|
||||
['value'=>'C.donor_type', 'fieldflag'=>1, 'text'=> 'Donor Type', 'disable' => false],
|
||||
['value'=>'C.city', 'fieldflag'=>1, 'text'=> 'City', 'disable' => false],
|
||||
['value'=>'C.postal_code', 'fieldflag'=>1, 'text'=> 'Postal Code', 'disable' => false],
|
||||
['value'=>'I.receipt_date', 'fieldflag'=>2, 'text'=> 'Receipt Date', 'disable' => false],
|
||||
@ -244,7 +237,7 @@ class Customer extends BaseController
|
||||
'is null' => 'Is NULL',
|
||||
'is not null' => 'Is Not NULL',
|
||||
];
|
||||
$data['customer_group'] = [];
|
||||
$data['donor_group'] = [];
|
||||
|
||||
if ($id === '0') {
|
||||
// Add Customer
|
||||
@ -255,28 +248,28 @@ class Customer extends BaseController
|
||||
|
||||
// Load your Customer Model
|
||||
$model = new CustomerModel();
|
||||
$model->setTable('customer_groups');
|
||||
$model->setTable('donor_groups');
|
||||
$where = ['group_id'=>$id];
|
||||
$result = $model->where($where)->findAll();
|
||||
|
||||
if (!empty($result)) {
|
||||
$data['customer_group']['groupname'] = $result[0]['group_name'];
|
||||
$data['customer_group']['column'] = $result[0]['column'] ? unserialize($result[0]['column']) : [];
|
||||
$data['customer_group']['operator'] = $result[0]['operator'] ? unserialize($result[0]['operator']) : [];
|
||||
$data['customer_group']['values'] = $result[0]['value'] ? unserialize($result[0]['value']) : [];
|
||||
$data['customer_group']['group_id'] = $result[0]['group_id'];
|
||||
$data['customer_group']['isactive'] = $result[0]['isactive'];
|
||||
$data['donor_group']['groupname'] = $result[0]['group_name'];
|
||||
$data['donor_group']['column'] = $result[0]['column'] ? unserialize($result[0]['column']) : [];
|
||||
$data['donor_group']['operator'] = $result[0]['operator'] ? unserialize($result[0]['operator']) : [];
|
||||
$data['donor_group']['values'] = $result[0]['value'] ? unserialize($result[0]['value']) : [];
|
||||
$data['donor_group']['group_id'] = $result[0]['group_id'];
|
||||
$data['donor_group']['isactive'] = $result[0]['isactive'];
|
||||
}
|
||||
}
|
||||
$this->render_page('customer_group_form', $data);
|
||||
}
|
||||
|
||||
|
||||
public function preview_customer_group($id){
|
||||
public function preview_donor_group($id){
|
||||
try {
|
||||
helper('session');
|
||||
$model = new CustomerModel();
|
||||
$model->setTable('customer_groups');
|
||||
$model->setTable('donor_groups');
|
||||
$where = ['isactive' => 1,'group_id'=>$id];
|
||||
$result = $model->where($where)->findAll();
|
||||
$db = \Config\Database::connect();
|
||||
@ -299,12 +292,12 @@ class Customer extends BaseController
|
||||
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
public function delete_customer_group($id){
|
||||
public function delete_donor_group($id){
|
||||
try {
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
$model = new CustomerModel();
|
||||
$model->setTable('customer_groups');
|
||||
$model->setTable('donor_groups');
|
||||
$where = ['isactive' => 1,'group_id'=>(int)$id];
|
||||
$result = $model->where($where)->findAll();
|
||||
if ($result) {
|
||||
@ -325,10 +318,10 @@ class Customer extends BaseController
|
||||
$this->logger->error("Donor Group: Err Occur = ".$e->getMessage()." File = ". $e->getFile() . " Line = " . $e->getLine());
|
||||
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
|
||||
}
|
||||
return redirect()->route('customer_group');
|
||||
return redirect()->route('donor_group');
|
||||
|
||||
}
|
||||
public function insert_customer_group(){
|
||||
public function insert_donor_group(){
|
||||
try {
|
||||
$this->logger->info("Donor Group: Inserting/Updating Details");
|
||||
helper('session');
|
||||
@ -414,11 +407,11 @@ class Customer extends BaseController
|
||||
|
||||
// Now you can use $whereCondition in your SQL query
|
||||
$db = \Config\Database::connect();
|
||||
// $sql = "SELECT doner_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM doner WHERE ".$whereCondition;
|
||||
$sql = "SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, ' ', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM doner as C
|
||||
LEFT JOIN receipt I ON I.doner_id = C.doner_id and I.isactive = 1
|
||||
// $sql = "SELECT donor_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM donor WHERE ".$whereCondition;
|
||||
$sql = "SELECT C.city, C.state, I.receipt_date, C.donor_id, CONCAT(C.first_name, ' ', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM donor as C
|
||||
LEFT JOIN receipt I ON I.donor_id = C.donor_id and I.isactive = 1
|
||||
WHERE C.isactive = 1 AND " . $whereCondition . "
|
||||
GROUP BY C.doner_id";
|
||||
GROUP BY C.donor_id";
|
||||
|
||||
$this->logger->info("Customer Group: SQL = ".$sql);
|
||||
|
||||
@ -459,7 +452,7 @@ class Customer extends BaseController
|
||||
$this->logger->error("Donor Group: Err Occur = ".$e->getMessage()." File = ". $e->getFile() . " Line = " . $e->getLine());
|
||||
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
|
||||
}
|
||||
return redirect()->route('customer_group');
|
||||
return redirect()->route('donor_group');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ class Home extends BaseController
|
||||
}
|
||||
$model = new HomeModel();
|
||||
$data['customer'] = $model->customers($where);
|
||||
$data['customer']['label'] = "Doners";
|
||||
$data['customer']['label'] = "donors";
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($data['customer'] ); die;
|
||||
|
||||
@ -24,7 +24,7 @@ class Invoice extends BaseController
|
||||
|
||||
$model = new InvoiceModel();
|
||||
$where = ['business_id' => (int)get_business_id()];
|
||||
$data['Donors'] = $model->getData('doner', $where);
|
||||
$data['Donors'] = $model->getData('donor', $where);
|
||||
$data['page_name'] = 'Receipt Details';
|
||||
$data['receipt'] = $model->where(["business_id"=>$session_bid])->findAll();
|
||||
|
||||
@ -46,9 +46,9 @@ class Invoice extends BaseController
|
||||
$where = ['business_id' => (int)get_business_id()];
|
||||
|
||||
// Get customer names for the dropdown, events details, and books details
|
||||
$data['customers'] = $model->getData('doner', $where);
|
||||
$data['customers'] = $model->getData('donor', $where);
|
||||
$data['causes'] = $model->getData('causes', $where);
|
||||
$data['invoice_number_formatting'] = $model->getData('invoice_number_formatting', $where);
|
||||
$data['invoice_number_formatting'] = $model->getData('settings', $where);
|
||||
|
||||
if ($id === '0') {
|
||||
$this->logger->info("Receipt: In Add Details");
|
||||
@ -122,11 +122,11 @@ class Invoice extends BaseController
|
||||
$receipt_date = $this->request->getVar('receipt_date');
|
||||
|
||||
$receipt_id = (!empty($this->request->getPost('receipt_id'))) ? $this->request->getPost('receipt_id') : "";
|
||||
$customer_id = (int)$this->request->getPost('doner_id');
|
||||
$customer_id = (int)$this->request->getPost('donor_id');
|
||||
|
||||
$data = [
|
||||
'receipt_number' => $this->request->getPost('receipt_number'),
|
||||
'doner_id' => $customer_id,
|
||||
'donor_id' => $customer_id,
|
||||
'notes'=>$this->request->getPost('notes'),
|
||||
'receipt_date' => (!empty($receipt_date)) ? date("Y-m-d", strtotime($receipt_date)) : NULL,
|
||||
'amount' => (int)$this->request->getPost('amount'),
|
||||
@ -163,11 +163,12 @@ class Invoice extends BaseController
|
||||
if($this->request->getPost('next_id')){
|
||||
## Array Formation For Events Details And Updating Events also Here..
|
||||
$update_events = [
|
||||
'id' => 1,
|
||||
'next_id' => (int)$this->request->getPost('next_id'),
|
||||
// 'id' => 1,
|
||||
'start_no' => (int)$this->request->getPost('next_id'),
|
||||
'business_id' => (int)get_business_id(),
|
||||
'updated_by' => get_logged_user_id()
|
||||
];
|
||||
print_r($update_events);
|
||||
$this->update_number_formatting($update_events);}
|
||||
|
||||
|
||||
@ -187,13 +188,13 @@ class Invoice extends BaseController
|
||||
{
|
||||
// `id``event_name``business_id``updated_by``updated_on``next_id`
|
||||
$model = new InvoiceModel();
|
||||
$model->setTable('invoice_number_formatting');
|
||||
$where = ['isactive' => 1, 'id' => (int)$update_events['id'], 'business_id' => (int)$update_events['business_id'], 'next_id' => $update_events['next_id']];
|
||||
$model->setTable('settings');
|
||||
$where = ['isactive' => 1, 'business_id' => (int)$update_events['business_id'], 'start_no' => $update_events['start_no']];
|
||||
$details = $model->where($where)->findAll();
|
||||
if (empty($details)) {
|
||||
$update_where = ['id' => (int)$update_events['id'], 'business_id' => (int)$update_events['business_id']];
|
||||
$update_data = ['next_id' => $update_events['next_id'], 'updated_by' => $update_events['updated_by']];
|
||||
$model->updateData('invoice_number_formatting', $update_data, $update_where);
|
||||
$update_where = ['business_id' => (int)$update_events['business_id']];
|
||||
$update_data = ['start_no' => $update_events['start_no'], 'updated_by' => $update_events['updated_by']];
|
||||
$model->updateData('settings', $update_data, $update_where);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -202,7 +202,7 @@ class Notifications extends BaseController
|
||||
public function get_group_details()
|
||||
{
|
||||
$model = new NotificationModel();
|
||||
$model->setTable('customer_groups');
|
||||
$model->setTable('donor_groups');
|
||||
// $details = $model->where('isactive',1)->orderBy('group_id', 'ASC')->findAll();
|
||||
$where = ['isactive' => 1, 'group_name != ' => 'EXPIRYDATE'];
|
||||
$details = $model->where($where)->orderBy('group_id', 'ASC')->findAll();
|
||||
|
||||
@ -143,6 +143,9 @@ class Settings extends BaseController
|
||||
'currency'=> $this->request->getPost('currency'),
|
||||
'country'=> $this->request->getPost('country'),
|
||||
'business_id'=> $this->request->getPost('business_id'),
|
||||
'start_no'=> $this->request->getPost('start_no'),
|
||||
'left_pad'=> $this->request->getPost('left_pad'),
|
||||
'prefix_format'=> $this->request->getPost('prefix_format'),
|
||||
];
|
||||
|
||||
if($fileName !== "" && $fileName !== null)
|
||||
|
||||
@ -282,4 +282,41 @@ class Users extends BaseController
|
||||
}
|
||||
return redirect()->route('user_list');
|
||||
}
|
||||
|
||||
public function activateUser($user_id){
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
try {
|
||||
if($user_id == $session_uid){
|
||||
throw new \Exception("Your Logged-In, Can't able delete");
|
||||
}
|
||||
$model = new UsersModel();
|
||||
$where = ['users.user_id' => $user_id, 'users.isactive =' => 0];
|
||||
$existingUser = $model->where($where)->find($user_id);
|
||||
$this->logger->Info("Users: Going to ActiveUser ID = ".$user_id);
|
||||
|
||||
if ($existingUser) {
|
||||
$data['isactive'] = 1;
|
||||
$data['updated_by'] = $session_uid;
|
||||
|
||||
if ($model->update($user_id, $data)) {
|
||||
session()->setFlashdata('success', 'User Activated successfully.');
|
||||
$this->logger->info("Users: has been Actived successfully. Actived ID = ".$user_id);
|
||||
} else {
|
||||
$this->logger->error("Users: Not able to Active ID =".$user_id);
|
||||
throw new \Exception("Data Not able to Active");
|
||||
}
|
||||
}
|
||||
else{
|
||||
$this->logger->error("Users: Does Not Exist To Active, ID = ".$user_id);
|
||||
throw new \Exception("User Already Activated");
|
||||
}
|
||||
}catch(\Exception $e) {
|
||||
$this->logger->error("Users: Err Occur = ".$e->getMessage());
|
||||
session()->setFlashdata('error', 'Message: ' .$e->getMessage());
|
||||
}
|
||||
return redirect()->route('user_list');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,5 +19,18 @@ class AuthenticationModel extends Model
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
|
||||
public function getheringSuperAdminDetailsForHeader($user_id)
|
||||
{
|
||||
$builder = $this->db->table('users');
|
||||
$builder->select('users.user_id,users.business_id,users.profile_picture,users.role,app_settings.site_name,app_settings.site_title,app_settings.favicon,app_settings.logo as company_logo_large,business.business_logo as company_logo_small,business.email as company_email,business.address as company_address,business.mobile_no as company_mobile_no,business.title,app_settings.footer_about');
|
||||
$builder->join('app_settings', 'app_settings.business_id = users.business_id', 'left');
|
||||
$builder->join('business', 'business.business_id = users.business_id', 'left');
|
||||
$builder->where('user_id', $user_id);
|
||||
//$template_mapping_details['fk_entity_id'];
|
||||
$query = $builder->get();
|
||||
|
||||
return $query->getResultArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@ use CodeIgniter\Model;
|
||||
|
||||
class CustomerModel extends Model
|
||||
{
|
||||
protected $table = 'doner';
|
||||
protected $primaryKey = 'doner_id ';
|
||||
// protected $allowedFields = ['doner_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','profile_picture','date_of_birth','gender','mode','isactive','business_id'];
|
||||
protected $allowedFields = ['doner_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','org_name','date_of_birth','pan_no','doner_type','isactive','business_id','created_by','updated_by'];
|
||||
protected $table = 'donor';
|
||||
protected $primaryKey = 'donor_id ';
|
||||
// protected $allowedFields = ['donor_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','profile_picture','date_of_birth','gender','mode','isactive','business_id'];
|
||||
protected $allowedFields = ['donor_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','org_name','date_of_birth','pan_no','donor_type','isactive','business_id','created_by','updated_by'];
|
||||
|
||||
public function insertCustomer($data)
|
||||
{
|
||||
@ -18,7 +18,7 @@ class CustomerModel extends Model
|
||||
}
|
||||
public function getCustomerNamesByBusiness($business_id)
|
||||
{
|
||||
$this->builder()->select('doner_id,CONCAT(first_name, " ", last_name) as full_name', false);
|
||||
$this->builder()->select('donor_id,CONCAT(first_name, " ", last_name) as full_name', false);
|
||||
$this->builder()->where('business_id ', $business_id); // Filter by business_id
|
||||
$query = $this->builder()->get(); // Use findAll() instead of get()
|
||||
return ($query->getResult());
|
||||
@ -37,14 +37,14 @@ class CustomerModel extends Model
|
||||
// public function getCustomerIdByName($customerName, $businessId)
|
||||
// {
|
||||
// $customer = $this->builder()
|
||||
// ->select('doner_id')
|
||||
// ->select('donor_id')
|
||||
// ->where('CONCAT(first_name, " ", last_name)', $customerName)
|
||||
// ->where('business_id', $businessId)
|
||||
// ->get()
|
||||
// ->getRow();
|
||||
|
||||
// if ($customer) {
|
||||
// return $customer->doner_id;
|
||||
// return $customer->donor_id;
|
||||
// }
|
||||
|
||||
// return null; // Customer not found
|
||||
@ -90,11 +90,11 @@ class CustomerModel extends Model
|
||||
$dataToUpdate = ['isactive' => 0];
|
||||
$this->db->table('customer_addresses')->where($where)->whereIn('customer_address_id',$missingValues)->update($dataToUpdate);
|
||||
}
|
||||
public function getInvoicesByCustomerId($doner_id)
|
||||
public function getInvoicesByCustomerId($donor_id)
|
||||
{
|
||||
return $this->db->table('invoice')
|
||||
->select('invoice_number, subtotal, invoice_date')
|
||||
->where('doner_id', $doner_id)
|
||||
->where('donor_id', $donor_id)
|
||||
->get()
|
||||
->getResult();
|
||||
}
|
||||
@ -109,7 +109,7 @@ public function getSubscriberDataByCustomerId($customerId)
|
||||
$builder->select('subscription.*,books.title');
|
||||
|
||||
// Add a where condition to filter results based on customer ID.
|
||||
$builder->where('doner_id', $customerId);
|
||||
$builder->where('donor_id', $customerId);
|
||||
|
||||
// Execute the query and return the result as an array of objects.
|
||||
return $builder->get()->getResult();
|
||||
@ -120,7 +120,7 @@ public function saveGroupDetails($data){
|
||||
if($id != ''){
|
||||
unset($data['group_id']); // Remove the id from the data to avoid updating it
|
||||
unset($data['created_by']); // bcoz here data Updating here.
|
||||
if ($this->db->table('customer_groups')->where('group_id', $id)->update($data)) {
|
||||
if ($this->db->table('donor_groups')->where('group_id', $id)->update($data)) {
|
||||
$affectedRows = $this->db->affectedRows();
|
||||
$statement['success'] = 'Customer Group has been updated successfully.';
|
||||
$statement['error'] = "";
|
||||
@ -132,7 +132,7 @@ public function saveGroupDetails($data){
|
||||
}
|
||||
}else{
|
||||
unset($data['updated_by']);
|
||||
if ($this->db->table('customer_groups')->insert($data)) {
|
||||
if ($this->db->table('donor_groups')->insert($data)) {
|
||||
$insertID = $this->db->insertID();
|
||||
$statement['success'] = 'Customer Group has been Inserted successfully.';
|
||||
$statement['error'] = "";
|
||||
@ -148,7 +148,7 @@ return $statement;
|
||||
|
||||
public function getGroupDetails($business_id)
|
||||
{
|
||||
return $this->db->table('customer_groups as CG' )
|
||||
return $this->db->table('donor_groups as CG' )
|
||||
->join('users as U1', 'U1.user_id = CG.created_by', 'left')
|
||||
->join('users as U2', 'U2.user_id = CG.updated_by', 'left')
|
||||
->select('CG.group_id,CG.group_name,CG.created_on,CG.created_by,CG.updated_on,CG.updated_by,DATE_FORMAT(CG.created_on, "%d/%m/%Y %h:%i %p") AS formatted_created_on,concat(U1.first_name," ",U1.last_name) as created_by_name,concat(U2.first_name," ",U2.last_name) as updated_by_name,CG.isactive')
|
||||
|
||||
@ -6,7 +6,7 @@ class HomeModel extends Model
|
||||
|
||||
public function customers($where) {
|
||||
|
||||
$query = $this->db->table('doner');
|
||||
$query = $this->db->table('donor');
|
||||
|
||||
$totalCustomers = $query->where($where)->countAll();
|
||||
$activeCustomers = $query->where($where)->countAllResults();
|
||||
@ -62,7 +62,7 @@ class HomeModel extends Model
|
||||
// $now = date('Y-m-d');
|
||||
// $last30days = date('Y-m-d', strtotime('+30 days'));
|
||||
// return $this->db->table('subscription as S')
|
||||
// ->join('doner as C', 'C.customer_id = S.customer_id', 'left')
|
||||
// ->join('donor as C', 'C.customer_id = S.customer_id', 'left')
|
||||
// ->join('books as BK', 'BK.book_id = S.scheme_id', 'left')
|
||||
// ->join('book_categories as BC', 'BC.book_id = S.scheme_id', 'left')
|
||||
// ->join('category as CM', 'CM.id = BC.category_id', 'left')
|
||||
|
||||
@ -7,8 +7,8 @@ class InvoiceModel extends Model
|
||||
{
|
||||
protected $table = 'receipt';
|
||||
protected $primaryKey = 'receipt_id';
|
||||
// protected $allowedFields = ['invoice_id','invoice_number','doner_id','invoice_date','event_id','business_id','created_on','business_id'];
|
||||
protected $allowedFields = ['receipt_id', 'receipt_number', 'doner_id','notes','amount', 'payment_mode', 'business_id', 'created_on', 'created_by', 'updated_on', 'updated_by','isactive', 'payment_ref_no', 'receipt_date','causes_id'];
|
||||
// protected $allowedFields = ['invoice_id','invoice_number','donor_id','invoice_date','event_id','business_id','created_on','business_id'];
|
||||
protected $allowedFields = ['receipt_id', 'receipt_number', 'donor_id','notes','amount', 'payment_mode', 'business_id', 'created_on', 'created_by', 'updated_on', 'updated_by','isactive', 'payment_ref_no', 'receipt_date','causes_id'];
|
||||
|
||||
public function saveInvoiceItemDetails($data){
|
||||
$i = 0;
|
||||
@ -76,7 +76,7 @@ public function updateData($table, $data, $where)
|
||||
|
||||
return $this->db->table($this->table.' as I' )
|
||||
|
||||
->join('doner as C', 'C.doner_id = I.doner_id', 'left')
|
||||
->join('donor as C', 'C.donor_id = I.donor_id', 'left')
|
||||
->join('Campaign as E', 'E.Campaign_id = I.event_id', 'left')
|
||||
->join('business as B', 'B.business_id = I.business_id', 'left')
|
||||
->join('users as U1', 'U1.user_id = I.created_by', 'left')
|
||||
@ -122,7 +122,7 @@ public function updateData($table, $data, $where)
|
||||
// Fetch invoice data
|
||||
return $this->db->table('receipt')
|
||||
->where('receipt_id', $id)
|
||||
->join('doner as C','C.doner_id= receipt.doner_id','left')
|
||||
->join('donor as C','C.donor_id= receipt.donor_id','left')
|
||||
->join('business as B','B.business_id = receipt.business_id','left')
|
||||
->select('receipt.*,concat(C.first_name," ",C.last_name) as customer_name,C.address, C.postal_code,C.city, C.state,C.mobile_no as customer_mobile, C.pan_no as cust_pan_no')
|
||||
->select('B.title ,B.business_logo,B.terms,B.address,B.city,B.state,B.postal_code,B.email,B.mobile_no, B.pan_no, B.org_reg_no')
|
||||
@ -163,13 +163,13 @@ public function updateData($table, $data, $where)
|
||||
// public function getMembershipListForCustomer($category, $id)
|
||||
// {
|
||||
// $data = $this->db->table('subscription as S')
|
||||
// ->join('doner as C', 'C.doner_id = S.doner_id', 'left')
|
||||
// ->join('donor as C', 'C.donor_id = S.donor_id', 'left')
|
||||
// ->join('category as CM', 'CM.id = S.scheme_id', 'left')
|
||||
// ->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
|
||||
// ->join('causes as BK', 'BC.causes_id = BK.causes_id', 'left')
|
||||
// ->select('S.doner_id, CONCAT(C.first_name, " ", C.last_name) as customer_name, S.sub_id, S.scheme_id, DATE_FORMAT(S.from_subscription, "%d/%m/%Y") AS formatted_from_subscription, DATE_FORMAT(S.to_subscription, "%d/%m/%Y") AS formatted_to_subscription, S.from_subscription, S.to_subscription, S.created_on, CM.name, BK.title, BK.causes_id')
|
||||
// ->select('S.donor_id, CONCAT(C.first_name, " ", C.last_name) as customer_name, S.sub_id, S.scheme_id, DATE_FORMAT(S.from_subscription, "%d/%m/%Y") AS formatted_from_subscription, DATE_FORMAT(S.to_subscription, "%d/%m/%Y") AS formatted_to_subscription, S.from_subscription, S.to_subscription, S.created_on, CM.name, BK.title, BK.causes_id')
|
||||
// ->where('CM.name', strtolower($category))
|
||||
// ->where('S.doner_id', $id)
|
||||
// ->where('S.donor_id', $id)
|
||||
// ->groupBy('S.sub_id')
|
||||
// ->orderBy('S.created_on', 'ASC')
|
||||
// ->get()
|
||||
@ -227,7 +227,7 @@ public function get_general_invoice_data($f_date = null, $t_date = null)
|
||||
{
|
||||
// Fetch invoice data
|
||||
$query = $this->db->table('invoice')
|
||||
->select('invoice.*, doner.*, COUNT(invoiceitems.product) as item_count')
|
||||
->select('invoice.*, donor.*, COUNT(invoiceitems.product) as item_count')
|
||||
->where('invoice.isactive', 1)
|
||||
->where('invoice.invoice_type', 1)
|
||||
->where('invoiceitems.isactive', 1);
|
||||
@ -238,7 +238,7 @@ public function get_general_invoice_data($f_date = null, $t_date = null)
|
||||
->where('invoice.invoice_date <=', $t_date);
|
||||
}
|
||||
|
||||
$result = $query->join('doner', 'doner.doner_id = invoice.doner_id', 'left')
|
||||
$result = $query->join('donor', 'donor.donor_id = invoice.donor_id', 'left')
|
||||
->join('invoiceitems', 'invoiceitems.invoice_id = invoice.invoice_id', 'left')
|
||||
->join('causes', 'causes.causes_id = invoiceitems.product', 'left')
|
||||
->groupBy('invoice.invoice_id') // Assuming invoice_id is the primary key of the invoice table
|
||||
@ -253,7 +253,7 @@ public function get_mem_invoice_data($f_date = null, $t_date = null)
|
||||
{
|
||||
// Fetch invoice data
|
||||
$query = $this->db->table('invoice')
|
||||
->select('invoice.*, doner.*, COUNT(invoiceitems.product) as item_count')
|
||||
->select('invoice.*, donor.*, COUNT(invoiceitems.product) as item_count')
|
||||
->where('invoice.isactive', 1)
|
||||
->where('invoice.invoice_type', 2)
|
||||
->where('invoiceitems.isactive', 1);
|
||||
@ -264,7 +264,7 @@ public function get_mem_invoice_data($f_date = null, $t_date = null)
|
||||
->where('invoice.invoice_date <=', $t_date);
|
||||
}
|
||||
|
||||
$result = $query->join('doner', 'doner.doner_id = invoice.doner_id', 'left')
|
||||
$result = $query->join('donor', 'donor.donor_id = invoice.donor_id', 'left')
|
||||
->join('invoiceitems', 'invoiceitems.invoice_id = invoice.invoice_id', 'left')
|
||||
->join('causes', 'causes.causes_id = invoiceitems.product', 'left')
|
||||
->groupBy('invoice.invoice_id') // Assuming invoice_id is the primary key of the invoice table
|
||||
|
||||
@ -25,7 +25,7 @@ class NotificationModel extends Model
|
||||
// $lastWeek = date('Y-m-d', strtotime('+7 days'));
|
||||
// $date_format = date('Y-m-d', $date);
|
||||
return $this->db->table('subscription as S' )
|
||||
->join('doner as C', 'C.customer_id = S.customer_id', 'left')
|
||||
->join('donor as C', 'C.donor_id = S.customer_id', 'left')
|
||||
->join('category as CM', 'CM.id = S.scheme_id', 'left')
|
||||
->join('business as B', 'B.business_id = S.business_id', 'left')
|
||||
->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
|
||||
@ -90,7 +90,7 @@ public function getCampaignDetails(){
|
||||
$group_names = [];
|
||||
$group_query = [];
|
||||
foreach ($group_id as $j) {
|
||||
$cg_data = $this->db->table('customer_groups as CG')
|
||||
$cg_data = $this->db->table('donor_groups as CG')
|
||||
->select('CG.group_id, CG.group_name,CG.group_query, CG.isactive')
|
||||
->where(['CG.isactive' => 1, 'CG.group_id' => $j])
|
||||
->get()
|
||||
@ -103,8 +103,8 @@ public function getCampaignDetails(){
|
||||
}
|
||||
}
|
||||
$result[$i]['group_name'] = !empty($group_names) ? implode(", ", $group_names) : '';
|
||||
$result[$i]['customer_group'] = !empty($group_query) ? $this->customerGroupQueryExecution($group_query) : '';
|
||||
$result[$i]['customer_group_count'] = !empty($result[$i]['customer_group']) ? count($this->customerGroupQueryExecution($group_query)) : 0;
|
||||
$result[$i]['donor_group'] = !empty($group_query) ? $this->customerGroupQueryExecution($group_query) : '';
|
||||
$result[$i]['donor_group_count'] = !empty($result[$i]['donor_group']) ? count($this->customerGroupQueryExecution($group_query)) : 0;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
@ -149,7 +149,7 @@ public function customerGroupQueryExecution($queries){
|
||||
{
|
||||
$db = \Config\Database::connect();
|
||||
|
||||
$query = "SELECT * FROM customer_groups WHERE group_name = 'EXPIRYDAT'";
|
||||
$query = "SELECT * FROM donor_groups WHERE group_name = 'EXPIRYDAT'";
|
||||
|
||||
$result = $db->query($query)->getResultArray();
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ class SettingsModel extends Model
|
||||
{
|
||||
protected $table = 'settings';
|
||||
protected $primaryKey = 'setting_id';
|
||||
protected $allowedFields = ['setting_id','site_name','site_title','favicon','logo','terms_service','footer_about','admin_email','mobile','copyright','pagination_limit','site_info','about_info','mail_protocol','mail_title','mail_host','mail_port','mail_encryption','mail_username','mail_password','currency','country','isactive','business_id'];
|
||||
protected $allowedFields = ['setting_id','site_name','site_title','favicon','logo','terms_service','footer_about','admin_email','mobile','copyright','pagination_limit','site_info','about_info','mail_protocol','mail_title','mail_host','mail_port','mail_encryption','mail_username','mail_password','currency','country','isactive','business_id','start_no','left_pad','prefix_format'];
|
||||
|
||||
public function saveData($data, $id = null)
|
||||
{
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label for="postal_code" class="col-form-label">Organization</label>
|
||||
<select id="business_id" name="business_id" class="form-control">
|
||||
<option value=null>Choose Organization</option>
|
||||
<?php foreach ($business_details as $value) { ?>
|
||||
<option value="<?php echo $value['business_id']; ?>"
|
||||
<?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||
<p class="sub-header"> </p>
|
||||
|
||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_business"; ?>" id="myForm">
|
||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_org"; ?>" id="myForm">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
@ -109,6 +109,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for Organization id" value="<?= isset($businesses['business_id']) ? $businesses['business_id'] : '' ?>" />
|
||||
|
||||
<?php if (!empty($businesses) && ($loggedin_person_role === 'sadmin')) { ?>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="card-body">
|
||||
<div class="float-right">
|
||||
<?php if($loggedin_person_role === 'sadmin'): ?>
|
||||
<a href="<?= base_url()."new_bussiness/0"; ?>" class="btn btn-primary"><i class="ri-briefcase-4-fill"></i> Add Organization </a>
|
||||
<a href="<?= base_url()."new_org/0"; ?>" class="btn btn-primary"><i class="ri-briefcase-4-fill"></i> Add Organization </a>
|
||||
<?php endif; ?>
|
||||
</div><!-- end col-->
|
||||
<br>
|
||||
@ -39,9 +39,9 @@
|
||||
<td><?= $business['postal_code']; ?></td>
|
||||
<td><?= $business['business_logo']; ?></td>
|
||||
<td>
|
||||
<a href="<?= base_url() . "new_bussiness/" . $business['business_id']; ?>" class="edit-button" title="Click to Edit Business"><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= base_url() . "new_org/" . $business['business_id']; ?>" class="edit-button" title="Click to Edit Business"><i class="ri-pencil-line"></i></a>
|
||||
<?php if($loggedin_person_role === 'sadmin'): ?>
|
||||
<a href="<?= base_url() . "delete_business/" . $business['business_id']; ?>" class="delete-button" title="Click to Delete Business"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="<?= base_url() . "delete_org/" . $business['business_id']; ?>" class="delete-button" title="Click to Delete Business"><i class="ri-delete-bin-line"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -22,14 +22,14 @@
|
||||
<!-- Customer Details Tab -->
|
||||
<div class="tab-pane fade show active" id="customerDetails" role="tabpanel" aria-labelledby="customerDetails-tab">
|
||||
<!-- Customer details form fields -->
|
||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_customer"; ?>" id="myForm" name="myForm">
|
||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_donor"; ?>" id="myForm" name="myForm">
|
||||
<!-- <img src="<?= base_url() . "public/assets/images/plugins/loading.gif" ?>" alt="loader1" style="display:none; height:30px; width:auto;" id="loaderImg"> -->
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="DonorType" class="col-form-label">Donor Type<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="DonorType" name="DonorType" required>
|
||||
<option value="<?= isset($customer['doner_type']) ? $customer['doner_type'] : '' ?>"><?= isset($customer['doner_type']) ? ($customer['doner_type'] === 'option1' ? 'Individual' : ($customer['doner_type'] === 'option2' ? 'Organization' : 'Select Donor Type')) : 'Select Donor Type'; ?></option>
|
||||
<option value="<?= isset($customer['donor_type']) ? $customer['donor_type'] : '' ?>"><?= isset($customer['donor_type']) ? ($customer['donor_type'] === 'option1' ? 'Individual' : ($customer['donor_type'] === 'option2' ? 'Organization' : 'Select Donor Type')) : 'Select Donor Type'; ?></option>
|
||||
<option value="option1">Individual</option>
|
||||
<option value="option2">Organization</option>
|
||||
</select>
|
||||
@ -85,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="doner_id" name="doner_id" placeholder="hidden for Donor id" value="<?= isset($customer['doner_id']) ? $customer['doner_id'] : '' ?>" />
|
||||
<input type="hidden" id="donor_id" name="donor_id" placeholder="hidden for Donor id" value="<?= isset($customer['donor_id']) ? $customer['donor_id'] : '' ?>" />
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
<br />
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
|
||||
<button class="btn btn-success waves-effect waves-light mr-1" id="submitBtn" type="submit"><?= isset($customer['doner_id']) ? 'Update' : 'Submit' ?></button>
|
||||
<button class="btn btn-success waves-effect waves-light mr-1" id="submitBtn" type="submit"><?= isset($customer['donor_id']) ? 'Update' : 'Submit' ?></button>
|
||||
<button type="reset" class="btn btn-primary waves-effect mr-1">Reset</button>
|
||||
<a href="<?= base_url() . "customer_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="float-right">
|
||||
<a href="<?= base_url()."view_customer_group/0"; ?>" class="btn btn-primary"><i class="ri-team-line"></i> Add Donor Group </a>
|
||||
<a href="<?= base_url()."view_donor_group/0"; ?>" class="btn btn-primary"><i class="ri-team-line"></i> Add Donor Group </a>
|
||||
</div><!-- end col-->
|
||||
<br>
|
||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||
@ -37,7 +37,7 @@
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($customer_group as $group) :
|
||||
<?php foreach ($donor_group as $group) :
|
||||
if ($group['isactive']) {
|
||||
$class = 'badge badge-soft-success';
|
||||
$message = 'Active';
|
||||
@ -52,9 +52,9 @@
|
||||
<td><?= $group['created_by_name']; ?></td>
|
||||
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
|
||||
<td>
|
||||
<a href="<?= base_url() . "view_customer_group/" . $group['group_id']; ?>" class="edit-button" title="Edit" ><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= base_url() . "view_donor_group/" . $group['group_id']; ?>" class="edit-button" title="Edit" ><i class="ri-pencil-line"></i></a>
|
||||
<a class="preview-button" title="Customer list" data-toggle="modal" data-target="#scrollable-modal" data-primary-key="<?php echo $group['group_id']; ?>" data-group-name="<?php echo $group['group_name']; ?>"><i class="ri-pages-line"></i></a>
|
||||
<?php if ($group['isactive']) { ?> <a href="<?= base_url() . "delete_customer_group/" . $group['group_id']; ?>" class="delete-button" title="Delete" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
||||
<?php if ($group['isactive']) { ?> <a href="<?= base_url() . "delete_donor_group/" . $group['group_id']; ?>" class="delete-button" title="Delete" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@ -116,7 +116,7 @@ $(document).ready(function() {
|
||||
|
||||
// Get the table reference
|
||||
var table = $("#data-table tbody");
|
||||
var route = "<?= base_url().'preview_customer_group/'?>"+primaryKey;
|
||||
var route = "<?= base_url().'preview_donor_group/'?>"+primaryKey;
|
||||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
|
||||
@ -4,11 +4,11 @@
|
||||
<div class="card-body">
|
||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||
<p class="sub-header"></p>
|
||||
<form id="myForm" class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_customer_group"; ?>" >
|
||||
<form id="myForm" class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_donor_group"; ?>" >
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="groupname" class="col-form-label">Group Name<span class="text-danger"> *</span></label>
|
||||
<input type="text" class="form-control" id="groupname" name="groupname" value="<?= isset($customer_group['groupname']) ? $customer_group['groupname'] : '' ?>" placeholder="Group Name" required />
|
||||
<input type="text" class="form-control" id="groupname" name="groupname" value="<?= isset($donor_group['groupname']) ? $donor_group['groupname'] : '' ?>" placeholder="Group Name" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($customer_group) && !empty($customer_group['column'])){ for ($i = 0; $i < count($customer_group['column']); $i++) { ?>
|
||||
<?php if(!empty($donor_group) && !empty($donor_group['column'])){ for ($i = 0; $i < count($donor_group['column']); $i++) { ?>
|
||||
<tr>
|
||||
<td style="width:30%;">
|
||||
<select class="form-control" data-toggle="select2" id=<?= "column".$i; ?> name="column[]" >
|
||||
@ -35,7 +35,7 @@
|
||||
<option value="<?= $f['value']; ?>"
|
||||
fieldflag="<?= $f['fieldflag']; ?>"
|
||||
<?php if ($f['disable']) echo 'disabled'; ?>
|
||||
<?php if(isset($customer_group['column'][$i]) && $customer_group['column'][$i] == $f['value'] ){echo "selected";}?>>
|
||||
<?php if(isset($donor_group['column'][$i]) && $donor_group['column'][$i] == $f['value'] ){echo "selected";}?>>
|
||||
<?= $f['text']; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@ -43,36 +43,36 @@
|
||||
<td style="width:30%;">
|
||||
<select class="form-control" data-toggle="select2" id=<?= "operator".$i; ?> name="operator[]" onchange="FieldChange(this,<?= $i; ?>)">
|
||||
<?php foreach ($operator as $value => $label) { ?>
|
||||
<option value="<?php echo $value; ?>" <?php if(isset($customer_group['operator'][$i]) && $customer_group['operator'][$i] == $value ){echo "selected";}?> >
|
||||
<option value="<?php echo $value; ?>" <?php if(isset($donor_group['operator'][$i]) && $donor_group['operator'][$i] == $value ){echo "selected";}?> >
|
||||
<?php echo $label; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:30%;">
|
||||
<?php if ($customer_group['operator'][$i] == 'greater than' || $customer_group['operator'][$i] == 'greater than or equal to' || $customer_group['operator'][$i] == 'less than' || $customer_group['operator'][$i] == 'less than or equal to') { ?>
|
||||
<input type="date" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Date" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($customer_group['operator'][$i] === 'between') {
|
||||
$dates = (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? explode(',', $customer_group['values'][$i]) : [] ;
|
||||
<?php if ($donor_group['operator'][$i] == 'greater than' || $donor_group['operator'][$i] == 'greater than or equal to' || $donor_group['operator'][$i] == 'less than' || $donor_group['operator'][$i] == 'less than or equal to') { ?>
|
||||
<input type="date" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Date" value="<?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? $donor_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($donor_group['operator'][$i] === 'between') {
|
||||
$dates = (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? explode(',', $donor_group['values'][$i]) : [] ;
|
||||
?>
|
||||
<div style="display: inline-flex;">
|
||||
<input type="date" class="form-control" id=<?= "values".$i.'1'; ?> placeholder="Enter the Start Date" onchange="concatBetween(<?= $i ?>)" value="<?= (isset($dates[0]) && $dates[0] != "" ) ? str_replace(' ', '', $dates[0]) : '' ?>" />
|
||||
<input type="date" class="form-control ml-1" id=<?= "values".$i.'2'; ?> placeholder="Enter the End Date" onchange="concatBetween(<?= $i ?>)" value="<?= (isset($dates[1]) && $dates[1] != "" ) ? str_replace(' ', '', $dates[1]) : '' ?>" />
|
||||
</div>
|
||||
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="values" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||
<?php } else if(($customer_group['operator'][$i] === 'contain' || $customer_group['operator'][$i] == 'not contain')) { ?>
|
||||
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($customer_group['operator'][$i] === 'is null' || $customer_group['operator'][$i] == 'is not null') { ?>
|
||||
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($customer_group['column'][$i] == 'C.mode' && ($customer_group['operator'][$i] === 'equal' || $customer_group['operator'][$i] == 'not equal' || $customer_group['operator'][$i] == 'like' )) { ?>
|
||||
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="values" value="<?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? $donor_group['values'][$i] : '' ?>" />
|
||||
<?php } else if(($donor_group['operator'][$i] === 'contain' || $donor_group['operator'][$i] == 'not contain')) { ?>
|
||||
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="<?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? $donor_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($donor_group['operator'][$i] === 'is null' || $donor_group['operator'][$i] == 'is not null') { ?>
|
||||
<input type="hidden" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" value="<?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? $donor_group['values'][$i] : '' ?>" />
|
||||
<?php }else if($donor_group['column'][$i] == 'C.mode' && ($donor_group['operator'][$i] === 'equal' || $donor_group['operator'][$i] == 'not equal' || $donor_group['operator'][$i] == 'like' )) { ?>
|
||||
<select class="form-control" id=<?= "values".$i; ?> name="values[]">
|
||||
<option value="">Choose the mode</option>
|
||||
<option value="Online" <?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] == "Online") ? 'selected' : '' ?>>Online</option>
|
||||
<option value="Offline" <?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] == "Offline") ? 'selected' : '' ?>>Offline</option>
|
||||
<option value="Online" <?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] == "Online") ? 'selected' : '' ?>>Online</option>
|
||||
<option value="Offline" <?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] == "Offline") ? 'selected' : '' ?>>Offline</option>
|
||||
</select>
|
||||
<?php } else { ?>
|
||||
<input type="text" class="form-control" id=<?= "values".$i; ?> name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,2)"
|
||||
value="<?= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" />
|
||||
value="<?= (isset($donor_group['values'][$i]) && $donor_group['values'][$i] != "" ) ? $donor_group['values'][$i] : '' ?>" />
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td style="width:10%;">
|
||||
@ -114,20 +114,20 @@
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="button" id="addItem" class="btn btn-soft-dark btn-rounded waves-effect waves-light mr-3 add-item"> + Add New Criteria</button>
|
||||
</div>
|
||||
<?php if (!empty($customer_group)) { ?>
|
||||
<?php if (!empty($donor_group)) { ?>
|
||||
<div class="form-group text-right checkbox checkbox-purple mr-3">
|
||||
<input type="checkbox" id="isactive" name="isactive" class="form-control" <?= isset($customer_group) && $customer_group['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<input type="checkbox" id="isactive" name="isactive" class="form-control" <?= isset($donor_group) && $donor_group['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<label for="isactive"> Is Active</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="string_flag" name="string_flag" placeholder="hidden" value="preview" />
|
||||
<input type="hidden" id="group_id" name="group_id" placeholder="hidden for primary id" value="<?= isset($customer_group['group_id']) ? $customer_group['group_id'] : '' ?>" />
|
||||
<input type="hidden" id="group_id" name="group_id" placeholder="hidden for primary id" value="<?= isset($donor_group['group_id']) ? $donor_group['group_id'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="button" class="btn btn-purple waves-effect mr-1" data-toggle="modal" data-target="#scrollable-modal">Save</button>
|
||||
<button type="button" class="btn btn-primary waves-effect mr-1" onclick="refreshPage()">Reset</button>
|
||||
<a href="<?= base_url() . "customer_group"; ?>" class="btn btn-secondary waves-effect mr-3">Cancel</a>
|
||||
<a href="<?= base_url() . "donor_group"; ?>" class="btn btn-secondary waves-effect mr-3">Cancel</a>
|
||||
</div>
|
||||
<div class="modal" id="scrollable-modal" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
@ -435,7 +435,7 @@ document.getElementById("addItem").addEventListener("click", function() {
|
||||
var table = $("#data-table tbody");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'insert_customer_group' ?>",
|
||||
url: "<?= base_url() . 'insert_donor_group' ?>",
|
||||
data: formData,
|
||||
dataType: "json", // Expect JSON response
|
||||
success: function(response) {
|
||||
|
||||
@ -38,8 +38,8 @@
|
||||
</thead>
|
||||
<?php foreach ($customer as $value) :?>
|
||||
<tr>
|
||||
<td hidden><?$value['doner_id'];?></td>
|
||||
<?php if($value['doner_type'] == 'option2') { ?>
|
||||
<td hidden><?$value['donor_id'];?></td>
|
||||
<?php if($value['donor_type'] == 'option2') { ?>
|
||||
<td><?= $value['org_name']; ?></td>
|
||||
<?php } else { ?>
|
||||
<td><?= $value['first_name'].' '.$value['last_name'] ; ?></td>
|
||||
@ -47,8 +47,8 @@
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td><?= $value['email']; ?></td>
|
||||
<td>
|
||||
<a href="<?= "new_Donor/" . $value['doner_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= "delete_customer/" . $value['doner_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="<?= "new_Donor/" . $value['donor_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?= "delete_donor/" . $value['donor_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -14,10 +14,10 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="customerName" class="col-form-label">Donor Name<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="customerName" name="doner_id" required data-toggle="select2">
|
||||
<select class="form-control" id="customerName" name="donor_id" required data-toggle="select2">
|
||||
<option value="">Select a Donor</option>
|
||||
<?php foreach ($customers as $customer) : ?>
|
||||
<option value="<?= $customer->doner_id ?>" <?php if (isset($receipt_details['doner_id']) && ($receipt_details['doner_id'] === $customer->doner_id)) echo "selected"; ?>><?= $customer->first_name . ' ' . $customer->last_name; ?></option>
|
||||
<option value="<?= $customer->donor_id ?>" <?php if (isset($receipt_details['donor_id']) && ($receipt_details['donor_id'] === $customer->donor_id)) echo "selected"; ?>><?= $customer->first_name . ' ' . $customer->last_name; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
@ -85,22 +85,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var custid = "<?= isset($receipt_details['doner_id']) ? $receipt_details['doner_id'] : ""; ?>";
|
||||
var custid = "<?= isset($receipt_details['donor_id']) ? $receipt_details['donor_id'] : ""; ?>";
|
||||
var inv_number = "<?= isset($receipt_details['invoice_number']) ? $receipt_details['invoice_number'] : ""; ?>";
|
||||
|
||||
if (inv_number != '') {
|
||||
$("#invoiceNumber").val(inv_number).prop("readonly", true);
|
||||
var invoiceNo = $("#invoiceNumber").val()
|
||||
// console.log(invoiceNo) ;
|
||||
|
||||
if (invoiceNo != '') {
|
||||
$("#invoiceNumber").val(invoiceNo).prop("readonly", true);
|
||||
}else{
|
||||
var numbering_arr = <?php echo json_encode($invoice_number_formatting); ?>;
|
||||
console.log('numbering_arr', numbering_arr);
|
||||
// console.log('numbering_arr', numbering_arr);
|
||||
var filtered_data = $.grep(numbering_arr, function(item) {
|
||||
return item.id === '1';
|
||||
// console.log(item)
|
||||
return item;
|
||||
});
|
||||
// console.log(filtered_data);
|
||||
var final_sno = generateSerialNumber(filtered_data);
|
||||
// console.log(final_sno);
|
||||
$("#invoiceNumber").val(final_sno).prop("readonly", true);
|
||||
}
|
||||
|
||||
@ -109,9 +114,9 @@ $(document).ready(function(){
|
||||
|
||||
function generateSerialNumber(filtered_data) {
|
||||
|
||||
var next_id_string = filtered_data[0].next_id;
|
||||
var next_id_string = filtered_data[0].start_no;
|
||||
var left_pad_string = filtered_data[0].left_pad;
|
||||
var prefix_string = String(filtered_data[0].id_formating);
|
||||
var prefix_string = String(filtered_data[0].prefix_format);
|
||||
|
||||
var left_pad_numberic = parseInt(left_pad_string);
|
||||
var next_id_numberic = parseInt(next_id_string);
|
||||
@ -128,6 +133,6 @@ $(document).ready(function(){
|
||||
|
||||
});
|
||||
|
||||
</script> -->
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<td><?= date("d-m-Y", strtotime($row['receipt_date'])); ?> </td>
|
||||
<td >
|
||||
<?php foreach ($Donors as $DonorData) : ?>
|
||||
<?= $row['doner_id'] === $DonorData->doner_id ? $DonorData->first_name . $DonorData->last_name : ''; ?>
|
||||
<?= $row['donor_id'] === $DonorData->donor_id ? $DonorData->first_name . $DonorData->last_name : ''; ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td><?= $row['amount']; ?></td>
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label for="postal_code" class="col-form-label">Organization</label>
|
||||
<select id="business_id" name="business_id" class="form-control">
|
||||
<option value=null><?php isset($details['business_id']) ? '': 'Choose Organization'; ?></option>
|
||||
<option value="null"><?php if(!isset($details['business_id'])){ echo 'Choose Organization'; } ?></option>
|
||||
<?php foreach ($business_details as $value) { ?>
|
||||
<option value="<?php echo $value['business_id']; ?>"
|
||||
<?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
||||
@ -210,6 +210,33 @@
|
||||
value="<?= isset($details['mail_password']) ? $details['mail_password'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="after-add-more">
|
||||
<hr />
|
||||
<h4 class="header-title">Receipt Format</h4>
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<div>
|
||||
<label for="bistate" class="col-form-label">Prefix</label>
|
||||
<input type="text" class="form-control" id="bistate" name="prefix_format" placeholder="Receipt Number Format" value="<?= isset($details['prefix_format']) ? $details['prefix_format'] : ''?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="baddress1" class="col-form-label">Left Padding</label>
|
||||
<input type="text" class="form-control" id="baddress1" name="left_pad" placeholder="Left Padding Number" value="<?= isset($details['left_pad']) ? $details['left_pad'] : '' ?>"/>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="bcity" class="col-form-label">Start Number</label>
|
||||
<input type="text" class="form-control" id="bcity" name="start_no" value="<?= isset($details['start_no']) ? $details['start_no'] : '1' ?>" placeholder="Start Number" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<input type="hidden" id="setting_id" name="setting_id" placeholder="hidden for setting id" value="<?= isset($details['setting_id']) ? $details['setting_id'] : '' ?>" />
|
||||
|
||||
<?php if(!empty($details)){ ?>
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
<?php endif; ?>
|
||||
<?php if ($loggedin_person_role === 'sadmin') : ?>
|
||||
<li>
|
||||
<a href="<?= base_url()."business_list"; ?>">
|
||||
<a href="<?= base_url()."org_list"; ?>">
|
||||
<i class="ri-map-pin-user-fill"></i>
|
||||
<span> Organizations </span>
|
||||
</a>
|
||||
@ -199,7 +199,7 @@
|
||||
<?php endif; ?>
|
||||
<?php if ($loggedin_person_role !== 'manager' && $loggedin_person_role !== 'sadmin') : ?>
|
||||
<li>
|
||||
<a href="<?= base_url()."customer_group"; ?>">
|
||||
<a href="<?= base_url()."donor_group"; ?>">
|
||||
<i class="ri-team-line"></i>
|
||||
<span> Donor Groups </span>
|
||||
</a>
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
</a>
|
||||
|
||||
<?php if ($loggedin_person_role !== 'manager' && $loggedin_person_role !== 'sadmin') : ?>
|
||||
<a href="<?= base_url()."new_bussiness/".$bid; ?>"class="dropdown-item notify-item">
|
||||
<a href="<?= base_url()."new_org/".$bid; ?>"class="dropdown-item notify-item">
|
||||
<i class="ri-briefcase-4-fill"></i><span> Profile Setting </span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -77,7 +77,11 @@
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= $edit_page_route; ?>" class="edit-button" title="Click to Edit User" ><i class="ri-pencil-line"></i></a>
|
||||
<a href="<?php echo "delete_user/".$row['user_id']; ?>" class="delete-button" title="Click to Delete User" ><i class="ri-delete-bin-line"></i></a>
|
||||
<?php if($row['isactive'] === 1) { ?>
|
||||
<a href="<?php echo "delete_user/".$row['user_id']; ?>" class="delete-button" title="Click to In-Active User" ><i class="ri-delete-bin-line"></i></a>
|
||||
<?php } else {?>
|
||||
<a href="<?php echo "activateUser/".$row['user_id']; ?>" class="delete-button" title="Click to Active User" ><i class="ri-delete-bin-line"></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
ALTER TABLE `customers` CHANGE `type` `doner_type` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;
|
||||
ALTER TABLE `customers` CHANGE `type` `donor_type` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;
|
||||
|
||||
ALTER TABLE `customers` ADD `org_name` VARCHAR(256) NOT NULL COMMENT 'Name of The Organization' AFTER `doner_type`, ADD `pan_no` VARCHAR(256) NOT NULL COMMENT 'PAN Card Number' AFTER `org_name`;
|
||||
ALTER TABLE `customers` ADD `org_name` VARCHAR(256) NOT NULL COMMENT 'Name of The Organization' AFTER `donor_type`, ADD `pan_no` VARCHAR(256) NOT NULL COMMENT 'PAN Card Number' AFTER `org_name`;
|
||||
|
||||
ALTER TABLE `customers` CHANGE `doner_type` `doner_type` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, CHANGE `org_name` `org_name` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'Name of The Organization', CHANGE `pan_no` `pan_no` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'PAN Card Number';
|
||||
ALTER TABLE `customers` CHANGE `donor_type` `donor_type` VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, CHANGE `org_name` `org_name` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'Name of The Organization', CHANGE `pan_no` `pan_no` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'PAN Card Number';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Generation Time: Dec 15, 2023 at 10:41 AM
|
||||
-- Generation Time: Dec 18, 2023 at 02:06 PM
|
||||
-- Server version: 10.4.28-MariaDB
|
||||
-- PHP Version: 8.1.17
|
||||
|
||||
@ -18,7 +18,7 @@ SET time_zone = "+00:00";
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `doner_management`
|
||||
-- Database: `donor_management`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
@ -50,7 +50,7 @@ CREATE TABLE `app_settings` (
|
||||
`mail_username` varchar(255) DEFAULT NULL,
|
||||
`mail_password` varchar(255) DEFAULT NULL,
|
||||
`currency` varchar(255) NOT NULL DEFAULT 'USD',
|
||||
`country` int(11) DEFAULT 178,
|
||||
`country` varchar(60) DEFAULT NULL,
|
||||
`created_on` datetime DEFAULT current_timestamp(),
|
||||
`created_by` int(11) DEFAULT NULL,
|
||||
`updated_on` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
@ -63,7 +63,7 @@ CREATE TABLE `app_settings` (
|
||||
--
|
||||
|
||||
INSERT INTO `app_settings` (`business_id`, `app_setting_id`, `site_name`, `site_title`, `favicon`, `logo`, `terms_service`, `footer_about`, `admin_email`, `mobile`, `copyright`, `pagination_limit`, `site_info`, `about_info`, `mail_protocol`, `mail_title`, `mail_host`, `mail_port`, `mail_encryption`, `mail_username`, `mail_password`, `currency`, `country`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(0, 1, 'Bigbamboo Donor Management', 'Donation', NULL, NULL, NULL, NULL, 'sadmin@bbbp.com', '1010101010', '2023', 1, NULL, NULL, '', '', '', '', NULL, '', '', 'USD', 1, '2023-09-06 15:22:18', 1, '2023-12-15 12:37:34', NULL, 1);
|
||||
(0, 1, 'Donor Management', 'Donation', NULL, NULL, NULL, NULL, 'sadmin@bbbp.com', '1010101010', '2023', 1, NULL, NULL, '', '', '', '', NULL, '', '', 'IND', 'india', '2023-09-06 15:22:18', 1, '2023-12-18 12:50:35', NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -73,11 +73,11 @@ INSERT INTO `app_settings` (`business_id`, `app_setting_id`, `site_name`, `site_
|
||||
|
||||
CREATE TABLE `business` (
|
||||
`business_id` int(11) NOT NULL,
|
||||
`title` varchar(50) NOT NULL COMMENT 'title of the business/publication',
|
||||
`title` varchar(50) DEFAULT NULL COMMENT 'title of the business/publication',
|
||||
`business_logo` varchar(45) DEFAULT NULL COMMENT 'url or path of business/publication display picture',
|
||||
`pan_no` varchar(100) NOT NULL,
|
||||
`org_reg_no` varchar(100) NOT NULL,
|
||||
`80G` varchar(60) NOT NULL,
|
||||
`pan_no` varchar(100) DEFAULT NULL,
|
||||
`org_reg_no` varchar(100) DEFAULT NULL,
|
||||
`80G` varchar(60) DEFAULT NULL,
|
||||
`email` varchar(45) DEFAULT NULL COMMENT 'email of the business/publication',
|
||||
`mobile_no` varchar(15) DEFAULT NULL COMMENT 'mobile number of the business/publication',
|
||||
`address` varchar(100) DEFAULT NULL COMMENT 'street name or area of the business/publication',
|
||||
@ -99,10 +99,10 @@ CREATE TABLE `business` (
|
||||
|
||||
INSERT INTO `business` (`business_id`, `title`, `business_logo`, `pan_no`, `org_reg_no`, `80G`, `email`, `mobile_no`, `address`, `city`, `state`, `postal_code`, `country`, `terms`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(0, 'Bigbamboo Donation Management', NULL, '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '2023-09-27 13:16:17', NULL, '2023-12-14 11:46:12', NULL, 1),
|
||||
(1, 'Vijayabharatham Prasuram Book Publishing', '600px-Instagram_icon.png', 'LQDTD5444T', 'LQDTD5444T', 'gfgfdsgsdfgsfd', 'contact@vijayabharathambooks.com', '8939149466', 'Sri Kasi, 12, M.V. Naidu Street,Chetpet', 'Chennai', 'Tamil Nadu', '6000315', 'India', '1. **Payment Terms:**\r\n - Payment is due upon receipt of the invoice.\r\n - Payment must be made within [number of days, e.g., 30 days] from the invoice date.\r\n - Late payment may incur additional charges and interest at a rate of [percentage] per month.\r\n\r\n2. **Discounts:**\r\n - Early payment discounts may be available. Please refer to the invoice for details.\r\n - Bulk purchase discounts may apply for orders exceeding a certain quantity.\r\n\r\n3. **Billing Information:**\r\n - Ensure that the billing address and contact information provided are accurate. Any changes must be communicated promptly.', '2023-08-18 12:35:56', 1, '2023-12-12 18:31:25', 1, 1),
|
||||
(2, 'Hard Case Crime', '', 'fgdfgsfdgdsfgsdfg', '4352435234524', '', 'hardcasecrime@gmail.com', '1212232345', '1st Street nanganallur', 'chennai', 'TN', '60001', 'IN', 'hsfgsdfgsdfg', '2023-09-11 12:17:44', 1, '2023-12-12 17:21:08', NULL, 1),
|
||||
(6, 'All the Children', '07156b4680962b650af1c6927c7019d5.jpg', 'ABCTY1234D', 'KL 17 U 33300', '80G of the Income Tax ', 'all@children.com', '9095586507', '54 Gitanjali Bldg, Colaba', 'Chennai', 'TamilNadu', '600011', NULL, 'An Intellectual Property clause will inform users that the contents, logo and other visual media you created is your property and is protected by copyright laws.\r\nA Termination clause will inform users that any accounts on your website and mobile app, or users\' access to your website and app, can be terminated in case of abuses or at your sole discretion.\r\nA Governing Law clause will inform users which laws govern the agreement. These laws should come from the country in which your company is headquartered or the country from which you operate your website and mobile app.\r\nA Links to Other Websites clause will inform users that you are not responsible for any third party websites that you link to. This kind of clause will generally inform users that they are responsible for reading and agreeing (or disagreeing) with the Terms and Conditions or Privacy Policies of these third parties.\r\nIf your website or mobile app allows users to create content and make that content public to other users, a Content clause will inform users that they own the rights to the content they have created. This clause usually mentions that users must give you (the website or mobile app developer/owner) a license so that you can share this content on your website/mobile app and to make it available to other users.\r\n\r\nBecause the content created by users is public to other users, a DMCA notice clause (or Copyright Infringement ) section is helpful to inform users and copyright authors that, if any content is found to be a copyright infringement, you will respond to any DMCA takedown notices received and you will take down the content.\r\n\r\nA Limit What Users Can Do clause can inform users that by agreeing to use your service, they\'re also agreeing to not do certain things. This can be part of a very long and thorough list in your Terms and Conditions agreement so as to encompass the most amount of negative uses.', '2023-12-14 11:59:30', NULL, '2023-12-14 12:18:17', NULL, 1),
|
||||
(8, 'ABC Trust', '600px-Instagram_icon.png', 'ABCTY1234D', 'KL 17 U 3330', '80G of the Income Tax ', 'abc@gmail.com', '8906754321', '54 Gitanjali Bldg, Colaba', 'Chennai', 'TamilNadu', '600011', NULL, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum', '2023-12-14 15:00:12', NULL, NULL, NULL, 1);
|
||||
(1, 'Vijayabharatham Prasuram Book Publishing', '600px-Instagram_icon.png', 'LQDTD5444T', 'LQDTD5444T', 'gfgfdsgsdfgsfd', 'contact@vijayabharathambooks.com', '8939149466', 'Sri Kasi, 12, M.V. Naidu Street,Chetpet', 'Chennai', 'Tamil Nadu', '6000315', 'India', '1. **Payment Terms:**\r\n - Payment is due upon receipt of the invoice.\r\n - Payment must be made within [number of days, e.g., 30 days] from the invoice date.\r\n - Late payment may incur additional charges and interest at a rate of [percentage] per month.\r\n\r\n2. **Discounts:**\r\n - Early payment discounts may be available. Please refer to the invoice for details.\r\n - Bulk purchase discounts may apply for orders exceeding a certain quantity.\r\n\r\n3. **Billing Information:**\r\n - Ensure that the billing address and contact information provided are accurate. Any changes must be communicated promptly.', '2023-08-18 12:35:56', 1, '2023-12-18 17:55:49', 1, 1),
|
||||
(2, 'Hard Case Crime', '', 'fgdfgsfdgdsfgsdfg', '4352435234524', '', 'hardcasecrime@gmail.com', '1212232345', '1st Street nanganallur', 'chennai', 'TN', '60001', 'IN', 'hsfgsdfgsdfg', '2023-09-11 12:17:44', 1, '2023-12-18 18:02:18', NULL, 0),
|
||||
(6, 'All the Childrens', '07156b4680962b650af1c6927c7019d5.jpg', 'ABCTY1234D', 'KL 17 U 33300', NULL, 'all@children.com', '9095586507', '54 Gitanjali Bldg, Colaba', 'Chennai', 'TamilNadu', '600011', NULL, NULL, '2023-12-14 11:59:30', NULL, '2023-12-18 14:24:30', NULL, 1),
|
||||
(8, 'ABC Trusts', '600px-Instagram_icon.png', 'ABCTY1234D', 'KL 17 U 3330', NULL, 'abc@gmail.com', '8906754321', '54 Gitanjali Bldg, Colaba', 'Chennai', 'TamilNadu', '600011', NULL, NULL, '2023-12-14 15:00:12', NULL, '2023-12-18 14:22:32', NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -151,8 +151,6 @@ INSERT INTO `causes` (`causes_id`, `business_id`, `name`, `description`, `create
|
||||
(14, 1, 'For Dress', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue dui sit amet felis fermentum faucibus. Etiam cursus pretium libero, sed consequat metus laoreet quis. Sed mauris risus, dapibus non tellus id, mollis imperdiet elit. Mauris gravida, tellus in sodales aliquam, diam sapien ullamcorper mi, et fringilla est mi at.', '2023-11-25 19:39:35', 5, '2023-12-14 11:20:56', 2, 1),
|
||||
(15, 1, 'For Food', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue dui sit amet felis fermentum faucibus. Etiam cursus pretium libero, sed consequat metus laoreet quis. Sed mauris risus, dapibus non tellus id, mollis imperdiet elit. Mauris gravida, tellus in sodales aliquam, diam sapien ullamcorper mi, et fringilla est mi at.', '2023-12-12 14:26:51', 2, '2023-12-14 11:20:16', 2, 1),
|
||||
(17, 1, 'For Trip', ' Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue dui sit amet felis fermentum faucibus. Etiam cursus pretium libero, sed consequat metus laoreet quis. Sed mauris risus, dapibus non tellus id, mollis imperdiet elit. Mauris gravida, tellus in sodales aliquam, diam sapien ullamcorper mi, et fringilla est mi at.', '2023-12-14 11:35:32', 2, NULL, NULL, 1),
|
||||
(19, 1, 'test', 'test', '2023-12-14 11:40:12', 2, NULL, NULL, 1),
|
||||
(21, 1, 'test 2', ' test 2', '2023-12-14 11:42:27', 2, NULL, NULL, 1),
|
||||
(22, 6, 'All For Food', ' Lorem and ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue dui sit amet felis fermentum faucibus. Etiam cursus pretium libero, sed consequat metus laoreet quis. Sed mauris risus, dapibus non tellus id, mollis imperdiet elit. Mauris gravida, tellus in sodales aliquam, diam sapien ullamcorper mi, et fringilla est mi at.', '2023-12-14 12:21:49', 10, '2023-12-14 12:26:12', 10, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
@ -427,58 +425,15 @@ INSERT INTO `countries` (`country_id`, `country_code`, `country_short_name`, `co
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `customer_groups`
|
||||
-- Table structure for table `donor`
|
||||
--
|
||||
|
||||
CREATE TABLE `customer_groups` (
|
||||
`group_id` int(11) NOT NULL,
|
||||
`business_id` int(11) NOT NULL,
|
||||
`group_name` varchar(100) NOT NULL COMMENT 'name of the group',
|
||||
`column` mediumtext NOT NULL COMMENT 'columns ',
|
||||
`operator` mediumtext NOT NULL,
|
||||
`value` mediumtext NOT NULL,
|
||||
`group_query` mediumtext NOT NULL COMMENT 'query formation for group',
|
||||
`created_on` datetime DEFAULT current_timestamp(),
|
||||
`created_by` int(11) DEFAULT NULL,
|
||||
`updated_on` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`updated_by` int(11) DEFAULT NULL,
|
||||
`isactive` tinyint(4) DEFAULT 1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `customer_groups`
|
||||
--
|
||||
|
||||
INSERT INTO `customer_groups` (`group_id`, `business_id`, `group_name`, `column`, `operator`, `value`, `group_query`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(1, 1, 'new', 'a:1:{i:0;s:6:\"C.type\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:8:\"customer\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN category CM on CM.id = S.scheme_id\n WHERE C.isactive = 1 AND LOWER(C.type) = LOWER(\'customer\') GROUP BY C.customer_id', '2023-11-09 10:56:24', 2, '2023-12-14 14:01:09', NULL, 1),
|
||||
(2, 1, 'test', 'a:2:{i:0;s:6:\"C.type\";i:1;s:7:\"CA.city\";}', 'a:2:{i:0;s:5:\"equal\";i:1;s:5:\"equal\";}', 'a:2:{i:0;s:8:\"customer\";i:1;s:7:\"Chennai\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN category CM on CM.id = S.scheme_id\n WHERE C.isactive = 1 AND LOWER(C.type) = LOWER(\'customer\') AND LOWER(CA.city) = LOWER(\'Chennai\') GROUP BY C.customer_id', '2023-11-28 18:07:48', 2, '2023-12-14 14:01:09', 2, 0),
|
||||
(3, 1, 'EXPIRYDATE', '', '', '', 'SELECT * FROM subscription as S\r\nJOIN customers as C ON C.customer_id = S.customer_id\r\nJOIN books as B ON B.book_id=S.scheme_id\r\nWHERE S.to_subscription = DATE_ADD(CURDATE(), INTERVAL WINDOW_TIME DAY);', '2023-11-28 18:42:06', NULL, '2023-12-14 14:01:09', NULL, 1),
|
||||
(5, 1, 'Tamilnadu Customers List', 'a:1:{i:0;s:8:\"CA.state\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:2:\"TN\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(CA.state) = LOWER(\'TN\') GROUP BY C.customer_id', '2023-12-02 10:17:03', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(6, 1, 'All Customer', 'a:1:{i:0;s:6:\"C.type\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:8:\"customer\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.type) = LOWER(\'customer\') GROUP BY C.customer_id', '2023-12-02 10:18:04', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(7, 1, 'Purchased in One Month (customer list)', 'a:2:{i:0;s:14:\"I.invoice_date\";i:1;s:6:\"C.type\";}', 'a:2:{i:0;s:7:\"between\";i:1;s:5:\"equal\";}', 'a:2:{i:0;s:21:\"2023-11-02,2023-12-02\";i:1;s:8:\"customer\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND I.invoice_date BETWEEN \'2023-11-02\' AND \'2023-12-02\' AND LOWER(C.type) = LOWER(\'customer\') GROUP BY C.customer_id', '2023-12-02 10:19:36', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(8, 1, 'All Customer Last One Year ', 'a:2:{i:0;s:6:\"C.type\";i:1;s:14:\"I.invoice_date\";}', 'a:2:{i:0;s:5:\"equal\";i:1;s:7:\"between\";}', 'a:2:{i:0;s:8:\"customer\";i:1;s:21:\"2022-12-02,2023-12-02\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.type) = LOWER(\'customer\') AND I.invoice_date BETWEEN \'2022-12-02\' AND \'2023-12-02\' GROUP BY C.customer_id', '2023-12-02 10:21:36', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(9, 1, 'Last 3 year Membership', 'a:2:{i:0;s:7:\"CM.name\";i:1;s:14:\"I.invoice_date\";}', 'a:2:{i:0;s:5:\"equal\";i:1;s:7:\"between\";}', 'a:2:{i:0;s:10:\"Membership\";i:1;s:21:\"2020-12-02,2023-12-02\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(CM.name) = LOWER(\'Membership\') AND I.invoice_date BETWEEN \'2020-12-02\' AND \'2023-12-02\' GROUP BY C.customer_id', '2023-12-02 10:27:35', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(10, 1, 'mode online', 'a:1:{i:0;s:6:\"C.mode\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:6:\"Online\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.mode) = LOWER(\'Online\') GROUP BY C.customer_id', '2023-12-02 15:55:33', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(11, 1, 'postal code', 'a:1:{i:0;s:14:\"CA.postal_code\";}', 'a:1:{i:0;s:4:\"like\";}', 'a:1:{i:0;s:1:\"6\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(CA.postal_code) LIKE \'%6%\' GROUP BY C.customer_id', '2023-12-02 16:02:41', 2, '2023-12-14 14:01:09', NULL, 1),
|
||||
(12, 1, 'testing', 'a:2:{i:0;s:6:\"C.mode\";i:1;s:7:\"CA.city\";}', 'a:2:{i:0;s:4:\"like\";i:1;s:5:\"equal\";}', 'a:2:{i:0;s:7:\"Offline\";i:1;s:11:\"kanchipuram\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.mode) LIKE \'%Offline%\' AND LOWER(CA.city) = LOWER(\'kanchipuram\') GROUP BY C.customer_id', '2023-12-06 17:54:07', 2, '2023-12-14 14:01:09', NULL, 1),
|
||||
(13, 1, 'testing', 'a:2:{i:0;s:6:\"C.mode\";i:1;s:7:\"CA.city\";}', 'a:2:{i:0;s:4:\"like\";i:1;s:5:\"equal\";}', 'a:2:{i:0;s:7:\"Offline\";i:1;s:11:\"kanchipuram\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.mode) LIKE \'%Offline%\' AND LOWER(CA.city) = LOWER(\'kanchipuram\') GROUP BY C.customer_id', '2023-12-06 17:54:07', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(14, 1, 'test1', 'a:2:{i:0;s:6:\"C.type\";i:1;s:14:\"I.invoice_date\";}', 'a:2:{i:0;s:5:\"equal\";i:1;s:7:\"between\";}', 'a:2:{i:0;s:1:\"2\";i:1;s:21:\"2023-12-01,2023-12-10\";}', 'SELECT CA.city,CA.state,I.invoice_date,C.customer_id,CONCAT(C.first_name,\'\',C.last_name) as customer_name,C.email,C.mobile_no ,S.to_subscription as due_date, C.isactive ,count(I.invoice_id) as invoice_count_raised_by_customer, S.scheme_id , CM.name\n FROM customers as C\n LEFT JOIN invoice I on I.customer_id = C.customer_id and I.isactive = 1\n LEFT JOIN customer_addresses CA on CA.customer_id = C.customer_id and CA.address_type = 1 and CA.isactive = 1\n LEFT JOIN subscription S on S.customer_id = C.customer_id \n LEFT JOIN book_categories BC on BC.book_id = S.scheme_id \n LEFT JOIN category CM on CM.id = BC.category_id\n WHERE C.isactive = 1 AND LOWER(C.type) = LOWER(\'2\') AND I.invoice_date BETWEEN \'2023-12-01\' AND \'2023-12-10\' GROUP BY C.customer_id', '2023-12-06 18:06:21', 2, '2023-12-14 14:01:09', 2, 1),
|
||||
(15, 1, 'test', 'a:1:{i:0;s:12:\"C.doner_type\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:2:\"10\";}', 'SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, \' \', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM customers as C\n LEFT JOIN receipt I ON I.doner_id = C.doner_id and I.isactive = 1\n WHERE C.isactive = 1 AND LOWER(C.doner_type) = LOWER(\'10\') \n GROUP BY C.doner_id', '2023-12-13 22:14:21', 2, '2023-12-14 14:01:09', NULL, 1),
|
||||
(16, 1, 'test', 'a:1:{i:0;s:12:\"C.doner_type\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:2:\"10\";}', 'SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, \' \', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM customers as C\n LEFT JOIN receipt I ON I.doner_id = C.doner_id and I.isactive = 1\n WHERE C.isactive = 1 AND LOWER(C.doner_type) = LOWER(\'10\') \n GROUP BY C.doner_id', '2023-12-14 08:45:57', 2, '2023-12-14 14:01:09', NULL, 1),
|
||||
(17, 6, 'test2', 'a:1:{i:0;s:14:\"I.receipt_date\";}', 'a:1:{i:0;s:5:\"equal\";}', 'a:1:{i:0;s:2:\"10\";}', 'SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, \' \', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM customers as C\n LEFT JOIN receipt I ON I.doner_id = C.doner_id and I.isactive = 1\n WHERE C.isactive = 1 AND LOWER(I.receipt_date) = LOWER(\'10\') \n GROUP BY C.doner_id', '2023-12-14 13:59:08', 10, NULL, NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `doner`
|
||||
--
|
||||
|
||||
CREATE TABLE `doner` (
|
||||
CREATE TABLE `donor` (
|
||||
`business_id` int(11) DEFAULT NULL COMMENT 'foreign key linking to the business',
|
||||
`doner_id` int(11) NOT NULL,
|
||||
`donor_id` int(11) NOT NULL,
|
||||
`first_name` varchar(45) DEFAULT NULL COMMENT 'first name of the customer',
|
||||
`last_name` varchar(45) DEFAULT NULL COMMENT 'last name of the customer',
|
||||
`doner_type` varchar(50) NOT NULL COMMENT 'type of the customer which means Customer Or Subscriber ',
|
||||
`donor_type` varchar(50) NOT NULL COMMENT 'type of the customer which means Customer Or Subscriber ',
|
||||
`pan_no` varchar(100) NOT NULL,
|
||||
`org_name` varchar(512) DEFAULT NULL,
|
||||
`email` varchar(45) DEFAULT NULL COMMENT 'email of the customer',
|
||||
@ -498,43 +453,32 @@ CREATE TABLE `doner` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `doner`
|
||||
-- Dumping data for table `donor`
|
||||
--
|
||||
|
||||
INSERT INTO `doner` (`business_id`, `doner_id`, `first_name`, `last_name`, `doner_type`, `pan_no`, `org_name`, `email`, `mobile_no`, `date_of_birth`, `address`, `city`, `state`, `postal_code`, `country`, `mode`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(6, 1, 'all 1', 'test', 'option1', 'ABCTY1234D', '', 'venkatesh@gmail.com', '9089765677', '2023-12-14', 'safdsdfdsf', 'sirkali', 'tamilnadu', '000000', 'India', '', '2023-12-14 12:21:02', 10, '2023-12-14 12:29:01', 10, 1),
|
||||
(1, 2, 'test', '1', 'option2', 'ABCTY1234D', 'Venba Organization', 'venkatesh@gmail.com', '9089765677', NULL, 'adsfasdfasd', 'sdfasdf', 'sdfasdfasd', '7865483', 'Barbados', '', '2023-12-14 12:44:58', 2, '2023-12-14 15:53:19', 2, 1),
|
||||
(6, 3, 'Harish', 'V', 'option1', 'ABCTY1234D', '', 'harish@gmail.com', '9089765677', '2023-12-14', 'chennai', 'sirkali', 'tamilnadu', '000000', 'India', '', '2023-12-14 15:19:59', 11, NULL, NULL, 1),
|
||||
(8, 4, 'Harish', 'R', 'option1', 'ABCTY1234D', '', 'venkatesh@gmail.com', '9089765677', '2023-12-14', 'chennai', 'mayiladuthurai', 'tamilnadu', '7865483', 'India', '', '2023-12-14 15:24:41', 11, NULL, NULL, 1),
|
||||
(8, 5, 'venba', 'V', 'option2', 'ABCTY1234D', 'Venba Organization', 'venba@gmail.com', '9089765677', '2023-12-13', 'chennai', 'chennai', 'tamilnadu', '7865483', 'India', '', '2023-12-14 15:29:24', 11, NULL, NULL, 1),
|
||||
(1, 6, 'Harish', 'V', 'option2', 'ABCTY1234D', 'napal', 'harish@gmail.com', '9089765677', NULL, '', '', '', '', '', '', '2023-12-14 17:26:48', 2, '2023-12-14 17:27:23', 2, 0);
|
||||
INSERT INTO `donor` (`business_id`, `donor_id`, `first_name`, `last_name`, `donor_type`, `pan_no`, `org_name`, `email`, `mobile_no`, `date_of_birth`, `address`, `city`, `state`, `postal_code`, `country`, `mode`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(1, 1, 'Sharth', 'Vishal', 'option1', 'ABCTY1234D', '', 'sharth@gmail.com', '8090809080', NULL, '', 'Namakkal', 'tamilnadu', '637001', 'India', '', '2023-12-18 17:24:48', 2, NULL, NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `invoice_number_formatting`
|
||||
-- Table structure for table `donor_groups`
|
||||
--
|
||||
|
||||
CREATE TABLE `invoice_number_formatting` (
|
||||
`id` int(150) NOT NULL,
|
||||
`next_id` int(150) NOT NULL,
|
||||
`left_pad` int(150) NOT NULL,
|
||||
`id_formating` varchar(250) NOT NULL,
|
||||
`created_by` int(150) DEFAULT NULL,
|
||||
`created_on` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
CREATE TABLE `donor_groups` (
|
||||
`group_id` int(11) NOT NULL,
|
||||
`business_id` int(11) NOT NULL,
|
||||
`group_name` varchar(100) NOT NULL COMMENT 'name of the group',
|
||||
`column` mediumtext NOT NULL COMMENT 'columns ',
|
||||
`operator` mediumtext NOT NULL,
|
||||
`value` mediumtext NOT NULL,
|
||||
`group_query` mediumtext NOT NULL COMMENT 'query formation for group',
|
||||
`created_on` datetime DEFAULT current_timestamp(),
|
||||
`created_by` int(11) DEFAULT NULL,
|
||||
`updated_on` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`updated_by` int(11) DEFAULT NULL,
|
||||
`isactive` int(11) NOT NULL DEFAULT 1,
|
||||
`business_id` int(150) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `invoice_number_formatting`
|
||||
--
|
||||
|
||||
INSERT INTO `invoice_number_formatting` (`id`, `next_id`, `left_pad`, `id_formating`, `created_by`, `created_on`, `updated_on`, `updated_by`, `isactive`, `business_id`) VALUES
|
||||
(1, 49, 8, '2023-2024', 2, '2023-11-09 13:54:08', '2023-12-14 14:41:49', 2, 1, 1),
|
||||
(2, 1, 4, '2023-2024', 2, '2023-11-09 13:55:26', '2023-12-14 14:49:43', NULL, 1, 6);
|
||||
`isactive` tinyint(4) DEFAULT 1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -558,20 +502,6 @@ CREATE TABLE `notification_campaign` (
|
||||
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0 means not sended 1 means sended'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `notification_campaign`
|
||||
--
|
||||
|
||||
INSERT INTO `notification_campaign` (`campaign_id`, `campaign_name`, `template_id`, `group_id`, `scheduled_date`, `scheduled_time`, `mode`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`, `status`) VALUES
|
||||
(1, 'test', 1, 0x613a313a7b693a303b733a313a2231223b7d, '2023-11-29', '12:26:00', 'Email', '2023-11-29 12:25:04', 2, NULL, NULL, 1, 0),
|
||||
(2, 'WCN For New Subscription Reminder.', 2, 0x613a313a7b693a303b733a313a2231223b7d, '2023-12-07', '16:15:00', 'Whatsapp', '2023-12-01 15:23:45', 2, '2023-12-07 11:08:28', 2, 1, 0),
|
||||
(3, 'WCN For Payment Reminder', 3, 0x613a313a7b693a303b733a313a2232223b7d, '2023-12-03', '16:47:00', 'Whatsapp', '2023-12-01 16:43:17', 2, '2023-12-01 16:55:23', 2, 1, 0),
|
||||
(4, 'ECN For Payment Reminder', 4, 0x613a323a7b693a303b733a313a2231223b693a313b733a313a2232223b7d, '2023-12-07', '23:59:00', 'Email', '2023-12-01 16:53:46', 2, '2023-12-07 11:15:27', 2, 1, 0),
|
||||
(5, 'testing', 1, 0x613a313a7b693a303b733a313a2231223b7d, '2023-12-07', '15:30:00', 'Email', '2023-12-06 11:22:46', 2, '2023-12-07 11:15:21', 2, 1, 0),
|
||||
(6, 'remainder', 4, 0x613a313a7b693a303b733a303a22223b7d, '0000-00-00', '00:00:00', 'Email', '2023-12-06 11:27:54', 2, '2023-12-06 14:56:03', 2, 1, 0),
|
||||
(7, 'testing', 5, 0x613a333a7b693a303b733a313a2231223b693a313b733a313a2232223b693a323b733a313a2235223b7d, '0000-00-00', '00:00:00', 'Whatsapp', '2023-12-06 16:04:02', 2, '2023-12-06 17:42:10', 2, 1, 0),
|
||||
(8, 'Information', 1, 0x613a31323a7b693a303b733a313a2231223b693a313b733a313a2232223b693a323b733a313a2235223b693a333b733a313a2236223b693a343b733a313a2237223b693a353b733a313a2238223b693a363b733a313a2239223b693a373b733a323a223130223b693a383b733a323a223131223b693a393b733a323a223132223b693a31303b733a323a223133223b693a31313b733a323a223134223b7d, '2023-12-14', '16:10:00', 'Email', '2023-12-07 12:54:28', 2, '2023-12-07 14:11:40', 2, 1, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
@ -581,7 +511,7 @@ INSERT INTO `notification_campaign` (`campaign_id`, `campaign_name`, `template_i
|
||||
CREATE TABLE `receipt` (
|
||||
`receipt_id` int(11) NOT NULL,
|
||||
`receipt_number` varchar(50) NOT NULL COMMENT 'unique identifier for the invoice',
|
||||
`doner_id` int(11) DEFAULT NULL COMMENT 'foreign key linking to the customer who placed the order',
|
||||
`donor_id` int(11) DEFAULT NULL COMMENT 'foreign key linking to the customer who placed the order',
|
||||
`amount` decimal(10,0) DEFAULT NULL COMMENT 'total amount to be paid',
|
||||
`receipt_date` date DEFAULT NULL,
|
||||
`payment_mode` varchar(100) DEFAULT NULL COMMENT 'status of the payment',
|
||||
@ -601,12 +531,9 @@ CREATE TABLE `receipt` (
|
||||
-- Dumping data for table `receipt`
|
||||
--
|
||||
|
||||
INSERT INTO `receipt` (`receipt_id`, `receipt_number`, `doner_id`, `amount`, `receipt_date`, `payment_mode`, `payment_ref_no`, `notes`, `causes_id`, `business_id`, `invoice_type`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(1, 'dsafadsfsafd', 1, 1000, '2023-12-14', 'cash', 'sdfsadfasd', 'sdfasdfasd', 22, 6, 2, '2023-12-14 12:22:33', 10, NULL, NULL, 1),
|
||||
(2, '2023-2024-00000048', 2, 1000, '2023-12-14', 'cash', 'sdfsadfasd', 'sdfasdfasdfasdf', 13, 1, 2, '2023-12-14 12:45:31', 2, '2023-12-14 14:41:49', 2, 1),
|
||||
(3, '2023-2024-00000047', 2, 1000, '2023-12-14', 'cash', 'sdfsadfasd', 'gbhfsghs', 13, 1, 2, '2023-12-14 14:41:19', 2, NULL, NULL, 1),
|
||||
(4, '2023-2024-00000047', 4, 1000, '2023-12-14', 'cash', 'cash', 'cash', 0, 8, 2, '2023-12-14 15:26:39', 11, NULL, NULL, 1),
|
||||
(5, '2023-2024-00000047', 6, 1000, '2023-12-15', 'cash', 'cash', '', 13, 1, 2, '2023-12-14 17:28:05', 2, '2023-12-14 17:29:38', 2, 1);
|
||||
INSERT INTO `receipt` (`receipt_id`, `receipt_number`, `donor_id`, `amount`, `receipt_date`, `payment_mode`, `payment_ref_no`, `notes`, `causes_id`, `business_id`, `invoice_type`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(1, '2023-2024-0000000000', 1, 400, '2023-12-18', 'upi', 'upi', '', 0, 1, 2, '2023-12-18 17:48:17', 2, NULL, NULL, 1),
|
||||
(2, '2023-2024-0000000000', 1, 400, '2023-12-18', 'cash', 'upi', '', 0, 1, 2, '2023-12-18 17:49:15', 2, NULL, NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -638,6 +565,9 @@ CREATE TABLE `settings` (
|
||||
`mail_password` varchar(255) DEFAULT NULL,
|
||||
`currency` varchar(255) NOT NULL DEFAULT 'USD',
|
||||
`country` varchar(60) DEFAULT NULL,
|
||||
`start_no` int(150) NOT NULL DEFAULT 1,
|
||||
`left_pad` int(150) NOT NULL,
|
||||
`prefix_format` varchar(250) NOT NULL,
|
||||
`created_on` datetime DEFAULT current_timestamp(),
|
||||
`created_by` int(11) DEFAULT NULL,
|
||||
`updated_on` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
@ -649,11 +579,11 @@ CREATE TABLE `settings` (
|
||||
-- Dumping data for table `settings`
|
||||
--
|
||||
|
||||
INSERT INTO `settings` (`business_id`, `setting_id`, `site_name`, `site_title`, `favicon`, `logo`, `terms_service`, `footer_about`, `admin_email`, `mobile`, `copyright`, `pagination_limit`, `site_info`, `about_info`, `mail_protocol`, `mail_title`, `mail_host`, `mail_port`, `mail_encryption`, `mail_username`, `mail_password`, `currency`, `country`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(0, 1, 'Bigbamboo Donor Management', 'Donation', NULL, NULL, 'Term and Service', 'BBBP.COM', 'sadmin@bbbp.com', '1010101010', '2023', 1, '1', 'nil', 'nil', 'nil', 'nil', 'nil', 'ssl', 'nil', 'nil', 'USD', '1', '2023-09-06 15:22:18', 1, '2023-12-14 16:53:30', NULL, 1),
|
||||
(1, 2, 'Donor Management', 'DM', 'Vijayabharatham.ico', 'Vijayabharatham_withname_1.png', 'Vijayabharatham Publishing Terms', 'https://vijayabharathambooks.com/', 'admin@vbp.com', NULL, '2023', NULL, '1', NULL, NULL, NULL, NULL, NULL, 'ssl', NULL, NULL, 'nil', '1', '2023-09-06 15:16:58', 1, '2023-12-14 11:11:40', NULL, 1),
|
||||
(2, 3, 'Donor Management', 'DM', 'JerryCharlesMiculekPublishing.ico', 'JerryCharlesMiculekPublishing.png', '', '', 'admin@hcc.com', NULL, NULL, NULL, '1', '', NULL, NULL, NULL, NULL, 'ssl', NULL, NULL, 'USD', '178', '2023-09-11 12:43:11', NULL, '2023-12-14 11:11:49', NULL, 1),
|
||||
(6, 4, 'ALL THE CHILDREN', 'TRUST', '1.png', '8831c6628b6a3fb79db75b39d8ef98d6.jpg', NULL, NULL, 'all@children.com', '8754081806', 'AllTheChildren', 11, NULL, NULL, '', '', '', '', NULL, '', '', '', '', '2023-12-15 11:26:57', NULL, '2023-12-15 14:05:10', NULL, 1);
|
||||
INSERT INTO `settings` (`business_id`, `setting_id`, `site_name`, `site_title`, `favicon`, `logo`, `terms_service`, `footer_about`, `admin_email`, `mobile`, `copyright`, `pagination_limit`, `site_info`, `about_info`, `mail_protocol`, `mail_title`, `mail_host`, `mail_port`, `mail_encryption`, `mail_username`, `mail_password`, `currency`, `country`, `start_no`, `left_pad`, `prefix_format`, `created_on`, `created_by`, `updated_on`, `updated_by`, `isactive`) VALUES
|
||||
(0, 1, 'Bigbamboo Donor Management', 'Donation', NULL, NULL, 'Term and Service', 'BBBP.COM', 'sadmin@bbbp.com', '1010101010', '2023', 1, '1', 'nil', 'nil', 'nil', 'nil', 'nil', 'ssl', 'nil', 'nil', 'USD', '1', 0, 0, '', '2023-09-06 15:22:18', 1, '2023-12-18 12:17:21', NULL, 1),
|
||||
(1, 2, 'Vijayabharatham Prasuram Book Publishing', 'VBPB', 'favicon.ico', 'test.png', NULL, NULL, 'admin@vbp.com', '', '2023', 0, NULL, NULL, '', '', '', '', NULL, '', '', 'IND', 'india', 1, 10, '2023-2024', '2023-09-06 15:16:58', 1, '2023-12-18 17:49:15', 2, 1),
|
||||
(2, 3, 'Donor Management', 'DM', 'JerryCharlesMiculekPublishing.ico', 'JerryCharlesMiculekPublishing.png', '', '', 'admin@hcc.com', NULL, NULL, NULL, '1', '', NULL, NULL, NULL, NULL, 'ssl', NULL, NULL, 'USD', '178', 0, 0, '', '2023-09-11 12:43:11', NULL, '2023-12-14 11:11:49', NULL, 1),
|
||||
(6, 4, 'ALL THE CHILDREN', 'TRUST', '1.png', '8831c6628b6a3fb79db75b39d8ef98d6.jpg', NULL, NULL, 'all@children.com', '8754081806', 'AllTheChildren', 11, NULL, NULL, '', '', '', '', NULL, '', '', '', '', 1, 5, 'all@', '2023-12-15 11:26:57', NULL, '2023-12-18 16:52:10', NULL, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -791,7 +721,7 @@ INSERT INTO `users` (`business_id`, `user_id`, `email`, `first_name`, `last_name
|
||||
(1, 5, 'online@vbp.com', 'Vijayabharatham', 'O1', '$2y$10$K8lwOXryrQZsp0QVMKdeXeAepYBLImxPgr5Ze4jDcik53ByLQYw6a', '8122050331', NULL, 'Chennai', NULL, 'nameboard2.jpeg', 'Nanganallur', 'Tamil nadu', '600009', NULL, 'online', NULL, '2023-10-11 15:17:51', 2, '2023-10-12 18:21:46', NULL, 0),
|
||||
(1, 6, 'manager@vbp.com', 'Vijayabharatham', 'M1', '$2y$10$K8lwOXryrQZsp0QVMKdeXeAepYBLImxPgr5Ze4jDcik53ByLQYw6a', '9812205034', NULL, 'Chennai', '', NULL, 'Nanganallur.', 'Tamil nadu', '600011', NULL, 'manager', NULL, '2023-10-11 15:17:51', 2, '2023-10-12 18:35:05', NULL, 1),
|
||||
(1, 7, 'kavitha123@gmail.com', 'Kavitha', 'L', '$2y$10$MQKj999N0XCgMvTT162jQ.pADLijrdbucdBivoYgCAAKzxhWGRQju', '8541236589', NULL, '', '', NULL, '', '', '', NULL, 'admin', NULL, '2023-11-08 09:18:26', 2, NULL, NULL, 1),
|
||||
(1, 8, 'nithiya123@gmail.com', 'Nithiya', 'K', '$2y$10$Cbj4.AJKYvSD1iSum34/E./ugnXYJVvDud/QuGBhGkHkK6hDE30ha', '8541236589', NULL, '', '', NULL, '', '', '', NULL, 'admin', NULL, '2023-11-08 09:19:10', 2, '2023-11-10 17:19:11', 2, 0),
|
||||
(1, 8, 'nithiya123@gmail.com', 'Nithiya', 'K', '$2y$10$Cbj4.AJKYvSD1iSum34/E./ugnXYJVvDud/QuGBhGkHkK6hDE30ha', '8541236589', NULL, '', '', NULL, '', '', '', NULL, 'admin', NULL, '2023-11-08 09:19:10', 2, '2023-12-18 11:22:53', 1, 1),
|
||||
(6, 10, 'all@children.com', 'AllTheChildren', 'Trusts', '$2y$10$.RjgvShqrfYR0liDmu46du6HFtsCVpa/bBKW0aCJ1s0ZpDUO9K/4K', '8976543098', NULL, 'test address', 'male', '07156b4680962b650af1c6927c7019d5_1.jpg', 'fasdfasdf', 'tamilnadu', '908765', NULL, 'admin', NULL, '2023-12-14 12:05:17', 1, '2023-12-14 12:29:46', 10, 1),
|
||||
(8, 11, 'abc@gmail.com', 'venkat', 'R', '$2y$10$lXRCdUJVtM0BZbY0PW8W4uMphDXUqj7hENn2vfGw64BeWs06k8C/e', '8976543098', NULL, 'annappanpettain ', 'male', '07156b4680962b650af1c6927c7019d5_2.jpg', 'chennai', 'tamilnadu', '908765', NULL, 'admin', NULL, '2023-12-14 15:03:45', 1, '2023-12-14 15:23:02', 1, 1),
|
||||
(1, 12, 'venkat@abc.com', 'venkat', 'R', '$2y$10$h28NBQl8g3l9nAQIPQ3NW.qAISWTR3LY7HGrG0WBD75MMomaAkSyq', '8976543098', NULL, 'annappanpettain ', 'male', '07156b4680962b650af1c6927c7019d5_3.jpg', 'mayiladuthurai', 'tamilnadu', '908765', NULL, 'manager', NULL, '2023-12-14 17:24:06', 2, NULL, NULL, 1);
|
||||
@ -825,23 +755,17 @@ ALTER TABLE `countries`
|
||||
ADD PRIMARY KEY (`country_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `customer_groups`
|
||||
-- Indexes for table `donor`
|
||||
--
|
||||
ALTER TABLE `customer_groups`
|
||||
ALTER TABLE `donor`
|
||||
ADD PRIMARY KEY (`donor_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `donor_groups`
|
||||
--
|
||||
ALTER TABLE `donor_groups`
|
||||
ADD PRIMARY KEY (`group_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `doner`
|
||||
--
|
||||
ALTER TABLE `doner`
|
||||
ADD PRIMARY KEY (`doner_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `invoice_number_formatting`
|
||||
--
|
||||
ALTER TABLE `invoice_number_formatting`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `notification_campaign`
|
||||
--
|
||||
@ -886,7 +810,7 @@ ALTER TABLE `users`
|
||||
-- AUTO_INCREMENT for table `business`
|
||||
--
|
||||
ALTER TABLE `business`
|
||||
MODIFY `business_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
|
||||
MODIFY `business_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `campaign`
|
||||
@ -907,34 +831,28 @@ ALTER TABLE `countries`
|
||||
MODIFY `country_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=246;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `customer_groups`
|
||||
-- AUTO_INCREMENT for table `donor`
|
||||
--
|
||||
ALTER TABLE `customer_groups`
|
||||
MODIFY `group_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
|
||||
ALTER TABLE `donor`
|
||||
MODIFY `donor_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `doner`
|
||||
-- AUTO_INCREMENT for table `donor_groups`
|
||||
--
|
||||
ALTER TABLE `doner`
|
||||
MODIFY `doner_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `invoice_number_formatting`
|
||||
--
|
||||
ALTER TABLE `invoice_number_formatting`
|
||||
MODIFY `id` int(150) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||
ALTER TABLE `donor_groups`
|
||||
MODIFY `group_id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `notification_campaign`
|
||||
--
|
||||
ALTER TABLE `notification_campaign`
|
||||
MODIFY `campaign_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
|
||||
MODIFY `campaign_id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `receipt`
|
||||
--
|
||||
ALTER TABLE `receipt`
|
||||
MODIFY `receipt_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
|
||||
MODIFY `receipt_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `settings`
|
||||
Loading…
Reference in New Issue
Block a user