Fix bugs on agents wallets
This commit is contained in:
parent
ef30a4f50d
commit
aa1b551d97
|
@ -26,10 +26,10 @@ class WalletController extends Controller
|
|||
|
||||
public function activated($id_agent)
|
||||
{
|
||||
$networks = DB::select('SELECT ne.name as network , countries.name AS country, w.id, w.balance_princ , w.balance_com, w.created_date, cw.type,
|
||||
$networks = DB::select('SELECT ne.name as network , cc.name AS 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
|
||||
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 ON ne.country_id=countries.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN (
|
||||
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]);
|
||||
|
||||
// Create wallet if is not exist
|
||||
|
|
Loading…
Reference in New Issue