Update ilink trnastion while done withdrawal on the agent
This commit is contained in:
parent
b7e8bb2878
commit
7de562487e
|
@ -815,15 +815,10 @@ class iLinkTransactionController extends Controller
|
|||
$plr_agent_wallet_cash_international = $this->getPaliers($paliers_commission_wallets, 'agent_wallet_cash_international');
|
||||
$plr_sup_wallet_cash_national = $this->getPaliers($paliers_commission_wallets, 'sup_wallet_cash_national');
|
||||
$plr_sup_wallet_cash_international = $this->getPaliers($paliers_commission_wallets, 'sup_wallet_cash_international');
|
||||
$plr_customer_wallet_cash_national = $this->getPaliers($paliers_commission_wallets, 'customer_wallet_cash_national');
|
||||
$plr_customer_wallet_cash_international = $this->getPaliers($paliers_commission_wallets, 'customer_wallet_cash_international');
|
||||
|
||||
//TODO commission client
|
||||
$commission_customer = ($init_country != $final_country) ? $this->calculateFees($plr_customer_wallet_cash_international, $request->montant) : $this->calculateFees($plr_customer_wallet_cash_national, $request->montant);
|
||||
$transactionRetrait->commission_ag = ($init_country != $final_country) ? $this->calculateFees($plr_agent_wallet_cash_international, $request->montant) : $this->calculateFees($plr_agent_wallet_cash_national, $request->montant);
|
||||
$transactionRetrait->commission_sup = ($init_country != $final_country) ? $this->calculateFees($plr_sup_wallet_cash_international, $request->montant, $transactionRetrait->commission_ag) : $this->calculateFees($plr_sup_wallet_cash_national, $request->montant, $transactionRetrait->commission_ag);
|
||||
$transactionRetrait->commission_hyp = $commission_customer - $transactionRetrait->commission_ag - $transactionRetrait->commission_sup;
|
||||
$montantNet -= $commission_customer;
|
||||
$transactionRetrait->commission_ag = ($init_country != $final_country) ? $this->calculateFees($plr_agent_wallet_cash_international, $transaction->montant) : $this->calculateFees($plr_agent_wallet_cash_national, $transaction->montant);
|
||||
$transactionRetrait->commission_sup = ($init_country != $final_country) ? $this->calculateFees($plr_sup_wallet_cash_international, $transaction->montant, $transactionRetrait->commission_ag) : $this->calculateFees($plr_sup_wallet_cash_national, $transaction->montant, $transactionRetrait->commission_ag);
|
||||
$transactionRetrait->commission_hyp = $commissionHyp - ($transactionRetrait->commission_ag + $transactionRetrait->commission_sup);
|
||||
|
||||
$walletAgent->balance_princ += $montantNet;
|
||||
$walletAgent->balance_com += $transactionRetrait->commission_ag;
|
||||
|
|
Loading…
Reference in New Issue