FIX_Approve Status changes
This commit is contained in:
parent
bc41e5173a
commit
1df1b63211
@ -20,7 +20,7 @@ class Subscription extends BaseController
|
||||
|
||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||
$this->logger->info("Invoice: Listing In Admin BID = " . $session_bid);
|
||||
$where = ['I.business_id' => (int)$session_bid, 'I.isactive' => 1,'I.invoice_type'=>2,'S.isactive'=>1];
|
||||
$where = ['I.business_id' => (int)$session_bid, 'I.isactive' => 1,'I.invoice_type'=>2];
|
||||
} else {
|
||||
$this->logger->info("Invoice: Listing In the Super-Admin ");
|
||||
$where = ['I.business_id != ' => NULL, 'I.isactive != ' => NULL,'I.invoice_type'=>2];
|
||||
|
||||
@ -356,10 +356,8 @@ public function insertSubscriptionData($data,$invoice_status)
|
||||
$invoice_id = $data['invoice_id'];
|
||||
$customer_id = $data['customer_id'];
|
||||
$scheme_id = $data['scheme_id'];
|
||||
// $data['isactive'] = $invoice_status !== 'Draft' ? 0 : 1 ;
|
||||
|
||||
$data['isactive'] = $invoice_status === 'Approved' ? 1 : 0 ;
|
||||
$where = ['invoice_id' => $invoice_id,'customer_id' => $customer_id,'scheme_id' => $scheme_id];
|
||||
|
||||
$query = $this->db->table('subscription')->select('sub_id')->where($where)->get()->getRow();
|
||||
|
||||
if (!empty($query)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user