@if($isBuyingPriceAllowed)
Expected Transactions
Income {{ optional($commentspack?->package?->currency)->selling_currency.'.' ?? '' }}{{$commentspack?->packagesummary?->grand_total}}
Expense {{ optional($commentspack?->package?->currency)->selling_currency.'.' ?? '' }}{{$commentspack?->packagesummary?->buying_price}}
@php $profit = $commentspack?->packagesummary?->grand_total - $commentspack?->packagesummary?->buying_price; $profit_percentage = $commentspack?->packagesummary?->grand_total>0 ? number_format(($profit / $commentspack?->packagesummary?->grand_total) * 100, 2, '.', '') : 0; @endphp
Profit {{$profit}}
{{$profit_percentage}}%
Actual Transactions
@php $debitTotal = $transactions->where('void', '0')->where('trans_type', 'd')->sum('amount'); $creditTotal = $transactions->where('void', '0')->where('trans_type', 'c')->sum('amount'); $ac_profit = $creditTotal - $debitTotal; $ac_profit_percentage = $creditTotal>0 ? number_format(($ac_profit / $creditTotal) * 100, 2, '.', '') : 0; @endphp
Income {{$creditTotal}}
Expense {{$debitTotal}}
Profit {{$ac_profit}}
{{$ac_profit_percentage}}%
@endif
Actual Breakdowns
@foreach($breakdownTotals as $key =>$breakdown) @endforeach
BreakDown Credit Debit
{{ \App\Models\Transactions::BREAKDOWN_LABELS[$key] ?? 'Unknown' }} {{ $breakdown['total_credit'] }} {{ $breakdown['total_debit'] }}