FIX_reimplement Renew flag copied from old code

This commit is contained in:
VE10-Sanjeev 2024-11-20 03:24:05 +00:00
parent 1df1b63211
commit 5fd516972a

View File

@ -538,6 +538,16 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_
if (count($result)>0){
$membership_id = $this->generate_membership_id(6);
}
$get_exists_subscription_where = ['S.customer_id' => (int)$customer_id, 'S.scheme_id' => $product_id, 'I.status' => 'Approved', 'I.isactive' => 1];
$get_exists_subscription_dtls = $model->existsSubscriptionDetails($get_exists_subscription_where);
// the scheme is already exists to the customer
if ($get_exists_subscription_dtls) {
$this->logger->info($msg_flag_name . ": This Scheme Already Existing in this Customer. ");
$renewal = 1;
}
// Prepare subscription data
$subscription_data = [
'customer_id' => $customer_id,