+ Fix bugs v2

This commit is contained in:
Djery-Tom 2020-07-04 15:32:57 +01:00
parent 35e6fce947
commit 954e304ddd
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use App\Models\AgentPlus;
use App\Models\CodeGenerer;
use App\Models\ConfigWallet;
use App\Models\Country;
use App\Models\Identification;
use App\Models\NetworksAgent;
use App\Models\PayingNetwork;
use App\Models\TypeIlinkTransaction;
@ -1102,6 +1103,11 @@ class iLinkTransactionController extends Controller
if (in_array($transaction->type, [9, 11])) {
$data->nom_destinataire = $transaction->wallet_user->user->lastname;
$data->prenom_destinataire = $transaction->wallet_user->user->firstname;
$identification = $identification = Identification::where('id_user', $transaction->wallet_user->user->id)->first();
if($identification){
$data->type_document_destinataire = $identification->identity_document;
$data->id_document_destinataire = $identification->id_identity_document;
}
$data->user_code = $transaction->wallet_user->user->user_code;
}
unset($data->type, $data->init_country, $data->final_country, $data->id_wallet_user , $data->network_destinataire);