

<?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 ?? '')); ?>" required>
        </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 ?? '')); ?>" required>
        </div>

        <div class="form-group">
            <label for="varient">Varient:</label>
            <input type="text" id="varient" name="varient" value="<?php echo e(old('varient', $invoice->varient ?? '')); ?>" required>
        </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 ?? '')); ?>" required>
        </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 ?? '')); ?>" required>
        </div>

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

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

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

        <div class="form-group">
            <label for="seller_address">Seller Address</label>

            <textarea row="2" class="form-control" type="text" id="seller_address" name="seller_address" value="<?php echo e(old('seller_address', $invoice->seller_address ?? '')); ?>" required></textarea>
        </div>



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

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

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

        <div class="form-group">
            <label for="buyer_address">Buyer Address</label>
            <textarea row="2" class="form-control" type="text" id="buyer_address" name="buyer_address" value="<?php echo e(old('buyer_address', $invoice->buyer_address ?? '')); ?>"></textarea>
        </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 ?? '')); ?>" required>
        </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 D:\AppServ\www\laravel-app12\resources\views/purchase_invoice/form.blade.php ENDPATH**/ ?>