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