

<?php $__env->startSection('title', 'Purchase Invoice'); ?>

<?php $__env->startSection('content'); ?>
<style>
    .form-container {
        background-color: #fff;
        padding: 30px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        max-width: 800px;
        margin: 30px auto;
        font-family: Arial, sans-serif;
        border-style: groove;
    }

    .form-container h2 {
        text-align: center;
        margin-bottom: 25px;
    }

    .form-group {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 15px;
    }

    .form-group label {
        flex: 0 0 40%;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        flex: 0 0 60%;
        padding: 10px;
        font-size: 14px;
        border-radius: 5px;
        border: 2px solid gray;
    }

    button[type="submit"] {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        background-color: #28a745;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
</style>

<div class="form-container">
    <h2>Purchase Invoice Form</h2>
    <form action="<?php echo e($action); ?>" method="POST" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
        <?php if($method !== 'POST'): ?>
            <?php echo method_field($method); ?>
        <?php endif; ?>

        <div class="form-group">
            <label for="make">Make:</label>
            <input type="text" id="make" name="make" value="<?php echo e(old('make', $invoice->make ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="model">Model:</label>
            <input type="text" id="model" name="model" value="<?php echo e(old('model', $invoice->model ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="registration_no">Registration No:</label>
            <input type="text" id="registration_no" name="registration_no" value="<?php echo e(old('registration_no', $invoice->registration_no ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="purchase_date">Purchase Date:</label>
            <input type="date" id="purchase_date" name="purchase_date" value="<?php echo e(old('purchase_date', $invoice->purchase_date ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="purchase_price">Purchase Price:</label>
            <input type="number" step="0.01" id="purchase_price" name="purchase_price" value="<?php echo e(old('purchase_price', $invoice->purchase_price ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="vendor_name">Vendor Name:</label>
            <input type="text" id="vendor_name" name="vendor_name" value="<?php echo e(old('vendor_name', $invoice->vendor_name ?? '')); ?>">
        </div>

        <div class="form-group">
            <label for="invoice_file">Upload Invoice File:</label>
            <input type="file" id="invoice_file_path" name="invoice_file_path" accept="application/pdf,image/*">
        </div>

        <button type="submit">
            <?php echo e($method === 'POST' ? 'Submit Invoice' : 'Update Invoice'); ?>

        </button>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\laravel-app12\resources\views/purchase_invoice/form.blade.php ENDPATH**/ ?>