@extends('layouts.business.pdf.pdf_layout') @section('pdf_title')
{{ __('Duration: 14-12-2025 to 24-12-2025') }}
--}}| {{ __('Party Name') }} | {{ __('Sale Amount') }} | {{ __('Profit') }} | {{ __('Loss') }} |
|---|---|---|---|
| {{ $party->name }} | {{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }} | {{ currency_format($party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }} | {{ currency_format($party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }} |
| {{ __('Total') }} | {{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }} | {{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }} | {{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }} |