Sales Partner Report
{{ ucfirst($business_name)}}
@if($payment_method == "All") All Partner @else Sales Partner: {{strtoupper($payment_method)}} @endif
{{date("d M Y",strtotime($from))}} till {{date("d M Y",strtotime($to))}}
@if($payment_method == "All") @php($i = 0) @php($total_opening_balance = 0) @php($total_debit = 0) @php($total_credit = 0) @php($total_closing_balance = 0) @if(!empty($result)) @foreach($result as $value) @if($value["opening_balance"] != 0 || $value["debit"] != 0 || $value["credit"] != 0 || $value["closing_balance"] != 0) @php($i++) @php($total_opening_balance += $value["opening_balance"]) @php($total_debit += $value["debit"]) @php($total_credit += $value["credit"]) @php($total_closing_balance += $value["closing_balance"]) @endif @endforeach @endif @else @php($i = 0) @php($first_opening_balance = 0) @php($last_closing_balance = 0) @php($total_debit = 0) @php($total_credit = 0) @if(!empty($data)) @php($first_opening_balance = $data[0]["oppening_balnce"]) @foreach($data as $value) @php($i++) @php($last_closing_balance = $value["clossing_balnce"]) @php($total_debit += $value["debit"]) @php($total_credit += $value["credit"]) @endforeach @endif @endif
Index @if($payment_method == "All") Description @else Date @endif Opening Balance Debit Credit Closing Balance
{{$i}} {{strtoupper($value["card"])}} {{number_format($value["opening_balance"],$decimal_point)}} {{number_format($value["debit"],$decimal_point)}} {{number_format($value["credit"],$decimal_point)}} {{number_format($value["closing_balance"],$decimal_point)}}
           
    {{($total_opening_balance != 0) ? number_format($total_opening_balance,$decimal_point) : number_format(0,$decimal_point)}} {{($total_debit != 0) ? number_format($total_debit,$decimal_point) : number_format(0,$decimal_point)}} {{($total_credit != 0) ? number_format($total_credit,$decimal_point) : number_format(0,$decimal_point)}} {{($total_closing_balance != 0) ? number_format($total_closing_balance,$decimal_point) : number_format(0,$decimal_point)}}
{{$i}} {{date("d M Y",strtotime($value["date"]))}} {{number_format($value["oppening_balnce"],$decimal_point)}} {{number_format($value["debit"],$decimal_point)}} {{number_format($value["credit"],$decimal_point)}} {{number_format($value["clossing_balnce"],$decimal_point)}}
           
    {{($first_opening_balance != 0) ? number_format($first_opening_balance,$decimal_point) : number_format(0,$decimal_point)}} {{($total_debit != 0) ? number_format($total_debit,$decimal_point) : number_format(0,$decimal_point)}} {{($total_credit != 0) ? number_format($total_credit,$decimal_point) : number_format(0,$decimal_point)}} {{($last_closing_balance != 0) ? number_format($last_closing_balance,$decimal_point) : number_format(0,$decimal_point)}}