@extends('layouts.app') @push('css') @endpush @section('content')
{{ $title }}
{{ csrf_field() }}

@if(session('success')) {!! alert_success(session('success')) !!} @elseif(session('error')) {!! alert_error(session('error')) !!} @endif @php $total_cost =0; $total_selling =0; $total_profit =0; @endphp @foreach($invoices as $invoice) @php $total_cost+=($invoice->quantity * $invoice->cost_price); $total_selling+=($invoice->quantity * $invoice->selling_price); $total_profit += (($invoice->quantity * $invoice->selling_price)-($invoice->quantity * $invoice->cost_price)); @endphp @endforeach
# Invoice/Receipt No Customer Stock Qty Sold Total Cost Price Total Selling Price Profit Status Date Time By Created Action
{{ $loop->iteration }} {{ $invoice->invoice->invoice_paper_number }} {{ $invoice->customer->firstname }} {{ $invoice->customer->lastname }} {{ $invoice->stock->name }} {{ $invoice->quantity }} {{ number_format(($invoice->quantity * $invoice->cost_price),2) }} {{ number_format(($invoice->quantity * $invoice->selling_price),2) }} {{ number_format((($invoice->quantity * $invoice->selling_price)-($invoice->quantity * $invoice->cost_price)),2) }} {!! invoice_status($invoice->status) !!} {{ convert_date2($invoice->invoice->invoice_date) }} {{ date("h:i a",strtotime($invoice->invoice->sales_time)) }} {{ $invoice->invoice->created_user->name }} {{ $invoice->invoice->created_at }}
{{ number_format($total_cost,2) }} {{ number_format($total_selling,2) }} {{ number_format($total_profit,2) }}
@endsection @push('js') @endpush