@extends('layouts.app') @section('main')

Sales Profit Report

@foreach ($transactions as $transaction) @endforeach
# Brand Model Product ID Warranty Customer Name Sale Date Buy Price Sell Price Sold Quantity Profit
{{ $transaction->id }} {{ $transaction->product->ProductBrand->name ?? '-' }} {{ $transaction->product->ProductModel->name ?? '-' }} {{ $transaction->product->id }} {{ $transaction->warranty }} {{ optional($transaction->sale->customer)->name }} {{ \Carbon\Carbon::parse($transaction->created_at)->format('Y-m-d') }} {{ env('APP_CURRENCY') }} {{ $transaction->product->buy_price }} {{ env('APP_CURRENCY') }} {{ $transaction->sell_price }} {{ $transaction->sold_quantity }} {{ env('APP_CURRENCY') }} {{ $transaction->profit }}
@endsection @push('script') @endpush