FIX_EMAIL URL
This commit is contained in:
parent
d1279ed129
commit
bf7e27f33e
@ -159,8 +159,8 @@ $routes->match(['get','post'],'/itemwise_report_with_payment_method','Invoice::i
|
||||
|
||||
# Notifications Routes
|
||||
// $routes->get('controller/SubExpdetail/(:num)', 'YourController::SubExpdetail/$1');
|
||||
$routes->get("getExpCustomerDetail",'Notifications::getExpCustomerDetail/');
|
||||
$routes->get("getExpCustomerDetail/(:any)",'Notifications::getExpCustomerDetail/$1');
|
||||
$routes->match(['get','post'],"getExpCustomerDetail",'Notifications::getExpCustomerDetail/');
|
||||
$routes->match(['get','post'],"getExpCustomerDetail/(:any)",'Notifications::getExpCustomerDetail/$1');
|
||||
$routes->get("getExpCustomerDetail/(:any)/(:any)",'Notifications::getExpCustomerDetail/$1/$2');
|
||||
$routes->get('send_whatsapp_message/', 'Notifications::send_whatsapp_message');
|
||||
// $routes->post('whatsapp_custom_notifications/', 'Notifications::whatsapp_custom_notifications');
|
||||
|
||||
@ -572,12 +572,20 @@ class Notifications extends BaseController
|
||||
################################################################
|
||||
public function getExpCustomerDetail($window_time = null,$to_time = null)
|
||||
{
|
||||
// dd($window_time);
|
||||
$valid_dates = [0,1,7,15,30];
|
||||
if(!in_array($window_time,$valid_dates) ){
|
||||
return "Invalid Window Time";
|
||||
}
|
||||
$NotificationModel = new NotificationModel();
|
||||
$this->update_expired_members();
|
||||
$response ="<pre>";// $response = "<pre> Hi, Started. <br>";
|
||||
# Step 1: add the days to retrive the data//
|
||||
$providedDate = date('Y-m-d');
|
||||
$window_time = $this->request->getGet('params');
|
||||
// if ($this->request->getmethod() == 'post') {
|
||||
// $window_time = $this->request->getGet('params');
|
||||
// }
|
||||
// dd($window_time);
|
||||
if ($window_time!= ''){
|
||||
if($window_time >= 0){
|
||||
$newDate = date('Y-m-d', strtotime("$providedDate + $window_time days"));
|
||||
@ -585,6 +593,8 @@ class Notifications extends BaseController
|
||||
$newDate = date('Y-m-d', strtotime("$providedDate $window_time days"));
|
||||
}
|
||||
$ExpCustomerDetail = $NotificationModel->getExpDate(); // Retrieve the stored query
|
||||
// echo("Inside If");
|
||||
// print_r(''.$ExpCustomerDetail);die();
|
||||
|
||||
}else{
|
||||
$dateData = $this->request->getGet('to_date');
|
||||
@ -830,7 +840,12 @@ class Notifications extends BaseController
|
||||
# Loop Closed
|
||||
}
|
||||
$response .= "Process Completed <br></pre>";
|
||||
return $this->response->setBody($response);
|
||||
if ($this->request->getmethod() == 'get') {
|
||||
return $response;
|
||||
}else{
|
||||
return $this->response->setBody($response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -19,6 +19,9 @@ public function getAllSubscribersWithNames($where)
|
||||
$builder->join('books', 'books.book_id = subscription.scheme_id');
|
||||
$builder->join('customers', 'customers.customer_id = subscription.customer_id');
|
||||
$builder->where($where);
|
||||
|
||||
// $query = $this->db->getLastQuery();
|
||||
// dd($query);
|
||||
return $builder->get()->getResultArray();
|
||||
}
|
||||
public function getCustomerNameBySchemeName($schemeName)
|
||||
|
||||
@ -861,7 +861,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="quick_billing_state"></label>
|
||||
<label for="quick_billing_state">State</label>
|
||||
<input class="form-control" type="text" id="quick_billing_state" value="Tamil Nadu">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
console.log("params 2 is "+ params2);
|
||||
console.log('<?= base_url() . 'getExpCustomerDetail/' ?>');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
type: "POST",
|
||||
url: `<?= base_url() . 'getExpCustomerDetail/' ?>${params}/${params2}`,
|
||||
data: {
|
||||
from_date : from_date,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user