@foreach($profits as $sale) @endforeach
PROFITS ANALYSIS REPORT
PRODUCT QUANTITY SELLING PRICE TOTAL SELLING PRICE BUYING PRICE TOTAL BUYING PRICE PROFIT DATE
{{ $sale->product->product_name }} {{ $sale->quantity ?? 0 }} {{ number_format($sale->selling_price ?? 0) }} {{ number_format($sale->selling_price*$sale->quantity ?? 0) }} {{ number_format($sale->buying_price ?? 0) }} {{ number_format($sale->buying_price*$sale->quantity ?? 0) }} {{ number_format(($sale->selling_price*$sale->quantity)-($sale->buying_price*$sale->quantity)) }} {{ $sale->sale->sale_date ?? '----' }}
Total Sales: {{ number_format($totalselling) }} Total Cost: {{ number_format($totalbuying) }} Total Profits: {{ number_format($totalselling-($totalbuying+$totaldiscount)) }}