@extends('layouts.business.pdf.pdf_layout') @section('pdf_title')
@include('business::print.header')

{{ __('Bill Wise Profit & Loss') }}

{{--

{{ __('Duration: 14-12-2025 to 24-12-2025') }}

--}}
@endsection @section('pdf_content') @foreach ($profits as $profit) @endforeach @if ($profits->count() > 0) @endif
{{ __('Date') }} {{ __('Invoice') }} {{ __('Party Name') }} {{ __('Sale Amount') }} {{ __('Profit') }} {{ __('Loss') }}
{{ formatted_date($profit->saleDate) }} {{ $profit->invoiceNumber }} {{ $profit->party->name ?? '' }} {{ currency_format($profit->totalAmount, currency: business_currency()) }} {{ $profit->lossProfit > 0 ? currency_format($profit->lossProfit, currency: business_currency()) : '' }} {{ $profit->lossProfit < 0 ? currency_format(abs($profit->lossProfit), currency: business_currency()) : '' }}
{{ __('Total') }} {{ currency_format($profits->sum('totalAmount'), currency: business_currency()) }} {{ currency_format($profits->where('lossProfit', '>', 0)->sum('lossProfit'), currency: business_currency()) }} {{ currency_format(abs($profits->where('lossProfit', '<', 0)->sum('lossProfit')), currency: business_currency()) }}
@endsection