diff --git a/app/Controllers/ApiIntegration.php b/app/Controllers/ApiIntegration.php index c2faab9f..5c018757 100644 --- a/app/Controllers/ApiIntegration.php +++ b/app/Controllers/ApiIntegration.php @@ -571,14 +571,14 @@ class ApiIntegration extends ResourceController $B = $filteringRequestedBillingAddress; $missingBillingValues = array_diff($A, $B); //Find difference element in Existing Images only $commonBillingElements = array_intersect($A, $B); - if (!empty($missingBillingValues)) { - $this->logger->info("Api SaveCustomerDetails : Missing billing " .implode(",",$missingBillingValues)." Are inactived"); - $inactive_where = ['isactive' => 1, 'customer_id' => (int)$last_insert_customer_id,'address_type'=>1]; - $inactive_whereIn[0] = 'address_1'; - $inactive_whereIn[1] = $missingBillingValues; - $data_to_batch_update = ['isactive' => 0,'updated_by'=>$this->global_variable_user_id]; - $api_model->inactiveMissingDetails('customer_addresses',$data_to_batch_update, $inactive_where, $inactive_whereIn); - } + // if (!empty($missingBillingValues)) { + // $this->logger->info("Api SaveCustomerDetails : Missing billing " .implode(",",$missingBillingValues)." Are inactived"); + // $inactive_where = ['isactive' => 1, 'customer_id' => (int)$last_insert_customer_id,'address_type'=>1]; + // $inactive_whereIn[0] = 'address_1'; + // $inactive_whereIn[1] = $missingBillingValues; + // $data_to_batch_update = ['isactive' => 0,'updated_by'=>$this->global_variable_user_id]; + // $api_model->inactiveMissingDetails('customer_addresses',$data_to_batch_update, $inactive_where, $inactive_whereIn); + // } } } @@ -654,14 +654,14 @@ class ApiIntegration extends ResourceController $B = $filteringRequestedShippingAddress; $missingShippingValues = array_diff($A, $B); //Find difference element in Existing Images only $commonShippingElements = array_intersect($A, $B); - if (!empty($missingShippingValues)) { - $inactive_where = ['isactive' => 1, 'customer_id' => (int)$last_insert_customer_id, 'address_type'=>2]; - $inactive_whereIn[0] = 'address_1'; - $inactive_whereIn[1] = $missingShippingValues; - $data_to_batch_update = ['isactive' => 0,'updated_by'=>$this->global_variable_user_id]; - $api_model->inactiveMissingDetails('customer_addresses',$data_to_batch_update, $inactive_where, $inactive_whereIn); - $this->logger->info("Api SaveCustomerDetails : Missing Shipping " .implode(",",$missingShippingValues)." Are inactived"); - } + // if (!empty($missingShippingValues)) { + // $inactive_where = ['isactive' => 1, 'customer_id' => (int)$last_insert_customer_id, 'address_type'=>2]; + // $inactive_whereIn[0] = 'address_1'; + // $inactive_whereIn[1] = $missingShippingValues; + // $data_to_batch_update = ['isactive' => 1,'updated_by'=>$this->global_variable_user_id]; + // $api_model->inactiveMissingDetails('customer_addresses',$data_to_batch_update, $inactive_where, $inactive_whereIn); + // $this->logger->info("Api SaveCustomerDetails : Missing Shipping " .implode(",",$missingShippingValues)." Are inactived"); + // } } } diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php index d717537f..a2a8ea3a 100644 --- a/app/Models/InvoiceModel.php +++ b/app/Models/InvoiceModel.php @@ -99,6 +99,7 @@ public function existsSubscriptionDetails($where){ public function getSubscriptionInvoiceDetail($where) { $result = $this->getJoinedData($where); + // print_r($result);die; if (!empty($result)) { foreach ($result as $i => $item) { $invoiceId = $item['invoice_id']; @@ -244,8 +245,8 @@ public function getJoinedData($where, $orderby = []) ->select('B.title as company_name,B.business_logo,B.terms as company_terms,B.address as company_address,B.city as company_city,B.state as company_state,B.postal_code as company_postal_code,B.email as company_email,B.mobile_no as company_mobile_no') ->select('COALESCE(NULLIF(states.state_name, ""), A.state) AS customer_bill_state') ->select('COALESCE(NULLIF(states.state_name, ""), S.state) AS customer_ship_state') - ->select('concat(A.address_1," ", A.address_2) as customer_bill_address,A.postal_code as customer_bill_postal_code ,A.city as customer_bill_city, countries.country_name as customer_bill_country,A.country as bcountry,A.state as bstate,A.customer_address_id as baddr_id,A.email as bemail') - ->select('concat(S.address_1," ", S.address_2) as customer_ship_address,S.postal_code as customer_ship_postal_code ,S.city as customer_ship_city, countries.country_name as customer_ship_country,S.country as scountry,S.state as sstate,S.customer_address_id as saddr_id,S.email as semail') + ->select('CONCAT_WS(" ", A.first_name, A.last_name) as customer_biller_name,concat(A.address_1," ", A.address_2) as customer_bill_address,A.postal_code as customer_bill_postal_code ,A.city as customer_bill_city, countries.country_name as customer_bill_country,A.country as bcountry,A.state as bstate,A.customer_address_id as baddr_id,A.email as bemail,A.mobile_no as bmobile') + ->select('CONCAT_WS(" ", S.first_name, S.last_name) as customer_shipper_name,concat(S.address_1," ", S.address_2) as customer_ship_address,S.postal_code as customer_ship_postal_code ,S.city as customer_ship_city, countries.country_name as customer_ship_country,S.country as scountry,S.state as sstate,S.customer_address_id as saddr_id,S.email as semail,S.mobile_no as smobile') ->get() ->getResult(); diff --git a/app/Views/auth_login.php b/app/Views/auth_login.php index 173470f8..bedd2c44 100755 --- a/app/Views/auth_login.php +++ b/app/Views/auth_login.php @@ -21,17 +21,23 @@ " rel="stylesheet" type="text/css" /> - +