@extends('AdminLte.template') @section('title', 'Purchase using CSV') @section('Content')

Purchase using CSV

@if($issues) @endif @if($savedPurchases)
{{ count($savedPurchases) }} purchase bills saved as pending.
@foreach($savedPurchases as $saved) @endforeach
SupplierInvoice No.Invoice DateTHIMS Purchase No.Items
{{ $saved['supplier'] }}{{ $saved['invoice'] }}{{ $saved['date'] }}{{ $saved['purchase'] }}{{ $saved['items'] }}
@endif
@csrf
@if($preview)

{{ $upload['filename'] }} — {{ $preview['store']->gm_description }}

{{ $preview['rowCount'] }} item rows; {{ count($preview['bills']) }} bills.

@if($preview['errors']) @endif
@foreach($preview['bills'] as $bill) @endforeach
Supplier CodeSupplierInvoice No.Invoice DateItemsBill Total
{{ $bill['supplier_code'] }}{{ $bill['supplier_name'] }}{{ $bill['invoice'] }}{{ $bill['date'] }}{{ count($bill['lines']) }}{{ number_format($bill['total'] + $bill['round_off'], 2) }}
@csrf {{ $preview['errors'] ? 'Correct the CSV and upload it again before submitting.' : 'All bills will be saved together.' }}
@endif
@endsection @section('ExternalJs') @endsection