+ Adding has_nano_credit field while fetching wallet
This commit is contained in:
parent
ac02bb8718
commit
b636efa825
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue