+ Update the route to obtain the list of member codes of an agent
This commit is contained in:
parent
c2a9675da9
commit
dc84b92d9d
|
@ -129,6 +129,9 @@ class WalletController extends Controller
|
||||||
|
|
||||||
$transactions_mapped = array_map(function ($data) {
|
$transactions_mapped = array_map(function ($data) {
|
||||||
|
|
||||||
|
$date = $data->date_creation;
|
||||||
|
unset($data->date_creation);
|
||||||
|
|
||||||
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
||||||
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
||||||
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
||||||
|
@ -146,6 +149,8 @@ class WalletController extends Controller
|
||||||
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
||||||
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
||||||
|
|
||||||
|
$data->date_creation = $date;
|
||||||
|
|
||||||
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
||||||
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -179,6 +184,9 @@ class WalletController extends Controller
|
||||||
|
|
||||||
$transactions_mapped = array_map(function ($data) {
|
$transactions_mapped = array_map(function ($data) {
|
||||||
|
|
||||||
|
$date = $data->date_creation;
|
||||||
|
unset($data->date_creation);
|
||||||
|
|
||||||
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
||||||
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
||||||
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
||||||
|
@ -196,6 +204,7 @@ class WalletController extends Controller
|
||||||
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
||||||
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
||||||
|
|
||||||
|
$data->date_creation = $date;
|
||||||
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
||||||
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -228,6 +237,9 @@ class WalletController extends Controller
|
||||||
|
|
||||||
$transactions_mapped = array_map(function ($data) {
|
$transactions_mapped = array_map(function ($data) {
|
||||||
|
|
||||||
|
$date = $data->date_creation;
|
||||||
|
unset($data->date_creation);
|
||||||
|
|
||||||
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
||||||
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
||||||
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
||||||
|
@ -245,6 +257,7 @@ class WalletController extends Controller
|
||||||
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
||||||
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
||||||
|
|
||||||
|
$data->date_creation = $date;
|
||||||
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
||||||
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -278,6 +291,9 @@ class WalletController extends Controller
|
||||||
|
|
||||||
$transactions_mapped = array_map(function ($data) {
|
$transactions_mapped = array_map(function ($data) {
|
||||||
|
|
||||||
|
$date = $data->date_creation;
|
||||||
|
unset($data->date_creation);
|
||||||
|
|
||||||
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
$wallet_user = isset($data->id_wallet_user) ? WalletsUser::findOrFail($data->id_wallet_user) : null;
|
||||||
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
$user_destinataire = isset($data->id_destinataire) ? User::where('user_code', $data->id_destinataire)->first() : null;
|
||||||
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
$emetteur = $wallet_user ? $wallet_user->user->lastname . ' ' . $wallet_user->user->firstname : $data->prenom_emetteur . ' ' . $data->nom_emetteur;
|
||||||
|
@ -295,6 +311,8 @@ class WalletController extends Controller
|
||||||
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
$data->final_country = $data->montant_net_final_country ? $this->getCountryName($data->final_country) : '';
|
||||||
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
$data->reseau_payeur = isset($data->network_destinataire) ? $this->getNetworkName($data->network_destinataire) . ' ' . $data->final_country : null;
|
||||||
|
|
||||||
|
$data->date_creation = $date;
|
||||||
|
|
||||||
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
unset($data->type, $data->id_wallet_user, $data->network_destinataire, $data->nom_destinataire, $data->prenom_destinataire, $data->taxe, $data->numero_carte,
|
||||||
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
$data->montant_net_final_country, $data->montant_net, $data->nom_emetteur, $data->prenom_emetteur, $data->id_destinataire);
|
||||||
return $data;
|
return $data;
|
||||||
|
|
Loading…
Reference in New Issue