Total Wallet Transactions Count: {{$purchase_trxs->count()}}
@php
$totalCost = 0;
$totalPrice = 0;
$totalServiceCharge = 0;
$totalCommission = 0;
foreach ($purchase_trxs as $key=>$trx) {
$totalCost += json_decode($trx->parameters)->agent_price;
$totalPrice += json_decode($trx->parameters)->selling_price;
$totalServiceCharge += json_decode($trx->parameters)->service_charge;
}
@endphp
Total Cost
{{Auth::user()->country_currency->code}} {{number_format(Auth::user()->toMyCurrency($totalCost),2,'.',',')}}
Commission
{{Auth::user()->country_currency->code}} {{number_format(Auth::user()->toMyCurrency($totalPrice-$totalCost),2,'.',',')}}
Price
{{Auth::user()->country_currency->code}} {{number_format(Auth::user()->toMyCurrency($totalPrice),2,'.',',')}}
Service Charge
{{Auth::user()->country_currency->code}} {{number_format(Auth::user()->toMyCurrency($totalServiceCharge),2,'.',',')}}
Transactions
Total {{$purchase_trxs->count()}}