@php use Carbon\Carbon; @endphp @extends('admin.layout.master') @section('title') Manage Sale @endsection @section('content')
@csrf
Reset
@include('admin.layout.laravel_errors')
Sale
@forelse($sales as $i=>$sale) @empty @endforelse
Id Status Category Product Price Quantity Total Price Date Detail Edit Delete
{{ $i+1 }} @if($sale->payment_status==0) Unpaid @else Paid @endif {{ ($sale->category_data) ? $sale->category_data->name : '--' }} {{ ($sale->subcategory_data) ? $sale->subcategory_data->name : '--' }} {{ ($sale->price) ? number_format($sale->price) : '--' }} {{ ($sale->quantity) ? $sale->quantity : '--' }} {{ ($sale->total_price) ? number_format($sale->total_price) : '--' }} {{ ($sale->date) ? Carbon::parse($sale->date)->format("d-m-Y") : '--' }} {{ ($sale->sale_detail) ? $sale->sale_detail : '--' }}
Total Sale
RS {{ number_format($total) }}

@include('admin.layout.laravel_errors')
Pending Payments
@forelse($pending_sales as $i=>$sale1) @empty @endforelse
Id Status Category Product Price Quantity Total Price Date Detail Edit Delete
{{ $i+1 }} @if($sale1->payment_status==0) Unpaid @else Paid @endif {{ ($sale1->category_data) ? $sale1->category_data->name : '--' }} {{ ($sale1->subcategory_data) ? $sale1->subcategory_data->name : '--' }} {{ ($sale1->price) ? number_format($sale1->price) : '--' }} {{ ($sale1->quantity) ? $sale1->quantity : '--' }} {{ ($sale1->total_price) ? number_format($sale1->total_price) : '--' }} {{ ($sale1->date) ? Carbon::parse($sale1->date)->format("d-m-Y") : '--' }} {{ ($sale1->sale_detail) ? $sale1->sale_detail : '--' }}
Total Sale
RS {{ number_format($pendingtotal) }}

Expense
@forelse($expense as $i=>$expens) @empty @endforelse
ID Name Price Detail Date Edit Delete
{{ $i+1 }} {{ ($expens->name) ? $expens->name : '--' }} {{ ($expens->price) ? number_format($expens->price) : '--' }} {{ ($expens->detail) ? $expens->detail : '--' }} {{ ($expens->date) ? Carbon::parse($expens->date)->format("d-m-Y") : '--' }}
@endsection @section('script') @endsection