@extends('layouts/contentLayoutMaster') @section('title', 'Management Invoices') @section('vendor-style') {{-- Page Css files --}} @endsection @section('page-style') {{-- Page Css files --}} @endsection @section('content')
@include('content.partial.form-message')

Invoices List

input("date")) }}"/>
input("search")) }}"/>
@php $customers = \App\Models\Customer::orderBy('name', 'asc')->get(); if($customers->count()){ @endphp @php } @endphp
@php $inventories = \App\Models\Inventory::orderBy('part_number', 'asc')->get(); if($inventories->count()){ @endphp @php } @endphp
@php $customer_pos = \App\Models\CustomerPO::orderBy('customer_po_number', 'asc')->get(); if($customer_pos->count()){ @endphp @php } @endphp
Reset
@can('Order - Invoices - Add') Add New Invoice @endcan

@if($invoices->total()) Records {{ ( $invoices->currentPage() - 1 ) * $invoices->perPage() + 1 }} to {{ ( $invoices->currentPage() - 1 ) * $invoices->perPage() + $invoices->count() }} from {{ $invoices->total() }} Records @else No Record @endif

@foreach( $invoices as $invoice ) @php $invoice_parts = \App\Models\InvoicePart::where('invoice_id', '=', $invoice->id)->selectRaw('sum(quantity*unit_price) as total')->first(); @endphp @endforeach
Invoice# Date Customer Customer PO AWB Sub Total Total Price File Action
{{ $invoice->invoice_number }} {{ $invoice->date }} {{ $invoice->customerPO->customer->name }} {{ $invoice->customerPO->customer_po_number }} {{ $invoice->awb }} {{ number_format( $invoice_parts->total, 2) }} {{ number_format( $invoice_parts->total + $invoice->shipping_cost + $invoice->clearance + $invoice->sales_tax, 2) }} @php if( is_file(public_path('storage/' . $invoice->file_path)) ){ echo ""; @endphp file @php echo ""; } @endphp
{{ $invoices->appends($_REQUEST)->fragment('top-list')->links('vendor.pagination.bootstrap-5') }}
@endsection @section('vendor-script') {{-- Vendor js files --}} @endsection @section('page-script') @endsection