@extends('admin.layouts') @section('content') {{-- ========================================================= --}} {{-- HEADER --}} {{-- ========================================================= --}}

{{ \Carbon\Carbon::parse( $date )->format('d-m-Y') }} - Sales Details

@if(!empty($branchName)) Branch: {{ $branchName }} @else All Branches @endif
{{-- ========================================================= --}} {{-- SUMMARY --}} {{-- ========================================================= --}}
Total Bills
{{ number_format($totalBills) }}
Quantity
{{ number_format($totalQuantity, 3) }}
Total Sales
₹{{ number_format( $totalAmount, 2 ) }}
Total Profit
₹{{ number_format( $totalProfit, 2 ) }}
{{-- ========================================================= --}} {{-- FILTER --}} {{-- ========================================================= --}}
{{-- ========================================================= --}} {{-- DETAILS TABLE --}} {{-- ========================================================= --}}
Sales Details
{{ $details->count() }} product entries found
@forelse( $details as $index => $detail ) @empty @endforelse
SNO ORDER ID DATE PRODUCT CODE QTY PRICE TOTAL COST PROFIT
{{ $index + 1 }} {{ $detail['order_id'] }} {{ \Carbon\Carbon::parse( $detail['date'] )->format( 'd-m-Y h:i A' ) }} {{ $detail['product_name'] }} {{ $detail['code'] }} {{ number_format( $detail['quantity'], 3 ) }} ₹{{ number_format( $detail['price'], 2 ) }} ₹{{ number_format( $detail['total'], 2 ) }} ₹{{ number_format( $detail['cost'], 2 ) }} @if($detail['profit'] >= 0) ₹{{ number_format( $detail['profit'], 2 ) }} @else ₹{{ number_format( $detail['profit'], 2 ) }} @endif
No Sales Found
@endsection