From b636efa825c958eca593c7f1909592fa97977d72 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Tue, 8 Dec 2020 13:40:15 +0100 Subject: [PATCH] + Adding has_nano_credit field while fetching wallet --- app/Http/Controllers/WalletController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/WalletController.php b/app/Http/Controllers/WalletController.php index 907f674..66131e5 100755 --- a/app/Http/Controllers/WalletController.php +++ b/app/Http/Controllers/WalletController.php @@ -34,7 +34,7 @@ class WalletController extends Controller public function activated($id_agent) { $networks = DB::select('SELECT ne.name as network , cc.name AS country, cc.code_country, cc.currency_code, w.id, w.balance_princ , w.balance_com, w.created_date, cw.type, - na.id AS id_networkAgent , cw.taux_com_client_depot , na.id AS id_networkAgent , cg.category FROM agents ag + na.id AS id_networkAgent , cw.taux_com_client_depot , na.id AS id_networkAgent , cg.category , cw.has_nano_credit FROM agents ag INNER JOIN networks_agents na ON ag.id=na.agent_id INNER JOIN codeGenerer cg ON cg.id=na.codeGenerer_id INNER JOIN networks ne ON ne.id=na.network_id INNER JOIN configWallet cw ON ne.id = cw.id_network INNER JOIN countries_currencies cc ON ne.country_id=cc.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN ( SELECT networks.id FROM networks LEFT JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND id_network IS NOT NULL)', ['id' => $id_agent]); @@ -110,7 +110,7 @@ class WalletController extends Controller // Wallets users iLink public function showWalletUser($id_user) { - $wallet = collect(DB::select('SELECT wu.*, u.user_code , u.numero_carte , u.expiration_date ,n2.id as id_wallet_network, n2.name as network , cc.name as country, cc.currency_code from wallets_users wu + $wallet = collect(DB::select('SELECT wu.*, u.user_code , u.numero_carte , u.expiration_date ,n2.id as id_wallet_network, n2.name as network , cc.name as country, cc.currency_code , cw.has_nano_credit from wallets_users wu INNER JOIN users u ON u.id = wu.idUser INNER JOIN networks n1 ON n1.id = u.network_id INNER JOIN networks n2 ON n2.country_id = n1.country_id