@extends('layouts.dashboard') @section('title', 'PDF Uploads') @section('page-title', 'PDF Uploads') @section('content')

Upload PDF

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@csrf
@error('pdf_file')
{{ $message }}
@enderror
@if(isset($message) && $message)
{{ $message }}
@endif @if(isset($filename) && $filename)
File: {{ $filename }}
@endif @if(isset($invoiceData) && is_array($invoiceData) && count($invoiceData))

Extracted Invoice Data

@php $soNo = isset($filename) ? pathinfo($filename, PATHINFO_FILENAME) : ''; @endphp @foreach($invoiceData as $row) @endforeach
# SO No Item Name Category HSN Qty Rate
{{ $row['sr_no'] ?? '' }} {{ $soNo }} {{ $row['item_name'] ?? '' }} {{ $row['category'] ?? '' }} {{ $row['hsn'] ?? '' }} {{ $row['qty'] ?? '' }} {{ $row['rate'] ?? '' }}
@endif @if(isset($invoiceData) && is_array($invoiceData) && count($invoiceData) && !empty($apiTimestamp)) @if(!empty($confirmOverwrite))
Sales Order exists: SO {{ $soNo }} already has {{ $existingCount ?? 0 }} records in the database. Overwriting will delete all existing entries for this SO and insert the latest data.
@endif
@csrf @if(!empty($confirmOverwrite)) @else @endif
@endif @if(isset($invoiceData) && is_array($invoiceData) && count($invoiceData)) @endif @endsection