@php
$line_total_amount = 0;
$total_amount = 0;
$total_profit = 0;
$line_total_profit = 0;
@endphp
| # |
Customer Name |
Brand/Tpye |
Model/Name |
IMEI/SN |
Selling Price |
Quantity |
Total Amount |
Profit |
Sale Date |
Actions |
@foreach ($sales as $sale)
@php
$line_total_amount = $sale->sell_price * $sale->sold_quantity;
$line_total_profit = $sale->profit;
$total_amount += $line_total_amount;
$total_profit += $line_total_profit;
@endphp
| {{ $sale->id }} |
{{ htmlspecialchars($sale->customer_name) }} |
{{ e($sale->product->brand) }} {{ e($sale->product->type) }} |
{{ e($sale->product->model) }} {{ e($sale->product->name) }} |
{{ htmlspecialchars($sale->product->imei_or_sn) }} |
{{ $all_settings->currency . ' ' . number_format($sale->sell_price, 2) }} |
{{ $sale->sold_quantity }} |
{{ $all_settings->currency . ' ' . number_format($line_total_amount, 2) }}
|
{{ $all_settings->currency . ' ' . number_format($line_total_profit, 2) }} |
{{ $sale->created_at }} |
|
@endforeach
| # |
Customer Name |
Brand |
Model |
IMEI/SN |
Selling Price |
Quantity |
Total Amount |
Profit |
Sale Date |
Actions |
| Total Sale |
Total Amount |
Total Profit |
| {{ count($sales) }} |
{{ $all_settings->currency }}
{{ number_format($total_amount, 3) }}
|
{{ $all_settings->currency }} {{ number_format($total_profit, 3) }} |