+ Update wallet transaction history fields
This commit is contained in:
parent
e545eb7e3a
commit
6b2e0af795
|
@ -188,8 +188,8 @@ class TransactionController extends Controller
|
||||||
{
|
{
|
||||||
// $transactions = WalletTransaction::where('id_wallet',$id_wallet)->orderBy('date','desc')->limit(10)
|
// $transactions = WalletTransaction::where('id_wallet',$id_wallet)->orderBy('date','desc')->limit(10)
|
||||||
// ->get(['type' ,DB::raw('\'wallet\' as source'), 'montant' ,'numCarte AS destinataire' , 'date', 'id']);
|
// ->get(['type' ,DB::raw('\'wallet\' as source'), 'montant' ,'numCarte AS destinataire' , 'date', 'id']);
|
||||||
$transactions = WalletTransaction::where('id_wallet', $id_wallet)->where('canceled' ,'0')->orderBy('date', 'desc')->limit(10)
|
$transactions = WalletTransaction::where('id_wallet', $id_wallet)->where('canceled', '0')->where('deleted', '0')->orderBy('date', 'desc')->limit(10)
|
||||||
->get(['type as operation', 'montant', 'numCarte AS destinataire', 'date', 'id' , 'commission_banque', 'commission_ag',
|
->get(['type as operation', 'montant', 'numCarte AS destinataire', 'date', 'id', 'commission_banque', 'commission_ag',
|
||||||
'commission_sup', 'commission_hyp']);
|
'commission_sup', 'commission_hyp']);
|
||||||
foreach ($transactions as $trans){
|
foreach ($transactions as $trans){
|
||||||
$trans->frais = $trans->commission_banque + $trans->commission_sup + $trans->commission_ag + $trans->commission_hyp;
|
$trans->frais = $trans->commission_banque + $trans->commission_sup + $trans->commission_ag + $trans->commission_hyp;
|
||||||
|
|
Loading…
Reference in New Issue