+ Fix historic bugs
This commit is contained in:
parent
8fa08fd251
commit
0022e5451f
|
@ -161,10 +161,12 @@ class iLinkTransactionController extends Controller
|
||||||
if ($hyperviseurPayeur->id == $hyperviseur->id) { //Si c'est le reseau payeur est aussi emetteur
|
if ($hyperviseurPayeur->id == $hyperviseur->id) { //Si c'est le reseau payeur est aussi emetteur
|
||||||
$walletHyperviseur->balance_com += $transaction->part_reseau_payeur;
|
$walletHyperviseur->balance_com += $transaction->part_reseau_payeur;
|
||||||
$reseauPayeur->balance_com += $transaction->part_reseau_emetteur;
|
$reseauPayeur->balance_com += $transaction->part_reseau_emetteur;
|
||||||
|
$transaction->id_wallet_hyp_payeur = $walletHyperviseur->id;
|
||||||
} else {
|
} else {
|
||||||
$wallet_agent_hypPayeur = WalletAgent::where('agent_id', $hyperviseurPayeur->id)->firstOrFail();
|
$wallet_agent_hypPayeur = WalletAgent::where('agent_id', $hyperviseurPayeur->id)->firstOrFail();
|
||||||
$walletHyperviseurPayeur = Wallet::findOrFail($wallet_agent_hypPayeur->wallet_id);
|
$walletHyperviseurPayeur = Wallet::findOrFail($wallet_agent_hypPayeur->wallet_id);
|
||||||
$walletHyperviseurPayeur->balance_com += $transaction->part_reseau_payeur;
|
$walletHyperviseurPayeur->balance_com += $transaction->part_reseau_payeur;
|
||||||
|
$transaction->id_wallet_hyp_payeur = $walletHyperviseurPayeur->id;
|
||||||
$walletHyperviseurPayeur->save();
|
$walletHyperviseurPayeur->save();
|
||||||
}
|
}
|
||||||
$walletHyperviseur->save();
|
$walletHyperviseur->save();
|
||||||
|
@ -561,7 +563,7 @@ class iLinkTransactionController extends Controller
|
||||||
END
|
END
|
||||||
END AS destinataire , wit.date , wit.id FROM wallet_ilink_transaction wit
|
END AS destinataire , wit.date , wit.id FROM wallet_ilink_transaction wit
|
||||||
INNER JOIN type_ilink_transaction tit ON wit.type = tit.id LEFT JOIN users u ON u.user_code = wit.id_destinataire WHERE wit.id_wallet_user = :id_wallet
|
INNER JOIN type_ilink_transaction tit ON wit.type = tit.id LEFT JOIN users u ON u.user_code = wit.id_destinataire WHERE wit.id_wallet_user = :id_wallet
|
||||||
ORDER BY wit.date DESC LIMIT 10;',['id_wallet', $id_wallet_user]);
|
ORDER BY wit.date DESC LIMIT 10;',['id_wallet'=>$id_wallet_user]);
|
||||||
return $this->successResponse($transactions);
|
return $this->successResponse($transactions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,7 +579,7 @@ class iLinkTransactionController extends Controller
|
||||||
END
|
END
|
||||||
END AS destinataire , wit.date , wit.id FROM wallet_ilink_transaction wit
|
END AS destinataire , wit.date , wit.id FROM wallet_ilink_transaction wit
|
||||||
INNER JOIN type_ilink_transaction tit ON wit.type = tit.id LEFT JOIN users u ON u.user_code = wit.id_destinataire WHERE wit.id_wallet_ag = :id_wallet
|
INNER JOIN type_ilink_transaction tit ON wit.type = tit.id LEFT JOIN users u ON u.user_code = wit.id_destinataire WHERE wit.id_wallet_ag = :id_wallet
|
||||||
ORDER BY wit.date DESC LIMIT 10;',['id_wallet', $id_wallet_agent]);
|
ORDER BY wit.date DESC LIMIT 10;',['id_wallet'=>$id_wallet_agent]);
|
||||||
return $this->successResponse($transactions);
|
return $this->successResponse($transactions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
* @property int $id_wallet_ag
|
* @property int $id_wallet_ag
|
||||||
* @property int $id_wallet_sup
|
* @property int $id_wallet_sup
|
||||||
* @property int $id_wallet_hyp
|
* @property int $id_wallet_hyp
|
||||||
|
* @property int $id_wallet_hyp_payeur
|
||||||
* @property int $canceled
|
* @property int $canceled
|
||||||
* @property int $type
|
* @property int $type
|
||||||
* @property Carbon $date
|
* @property Carbon $date
|
||||||
|
@ -87,6 +88,7 @@ class WalletIlinkTransaction extends Model
|
||||||
'id_wallet_ag' => 'int',
|
'id_wallet_ag' => 'int',
|
||||||
'id_wallet_sup' => 'int',
|
'id_wallet_sup' => 'int',
|
||||||
'id_wallet_hyp' => 'int',
|
'id_wallet_hyp' => 'int',
|
||||||
|
'id_wallet_hyp_payeur' => 'int',
|
||||||
'canceled' => 'int',
|
'canceled' => 'int',
|
||||||
'type' => 'int'
|
'type' => 'int'
|
||||||
];
|
];
|
||||||
|
@ -134,6 +136,7 @@ class WalletIlinkTransaction extends Model
|
||||||
'id_wallet_ag',
|
'id_wallet_ag',
|
||||||
'id_wallet_sup',
|
'id_wallet_sup',
|
||||||
'id_wallet_hyp',
|
'id_wallet_hyp',
|
||||||
|
'id_wallet_hyp_payeur',
|
||||||
'canceled',
|
'canceled',
|
||||||
'type',
|
'type',
|
||||||
'date'
|
'date'
|
||||||
|
|
Loading…
Reference in New Issue