
<?php $__env->startSection('content'); ?>
<style>
    .invoice-table {
        width: 100%;
        border-collapse: collapse;
    }
    .invoice-table th, .invoice-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }
    .invoice-table th {
        background-color: #f2f2f2;
    }
    .form-control {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    .checkbox-label {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }
    .summary-box {
        border: 1px solid #ddd;
        padding: 15px;
        margin-top: 20px;
        background-color: #f9f9f9;
    }
    .char-count {
        font-size: 12px;
        color: #6c757d;
    }
    .btn {
        padding: 8px 16px;
        margin-right: 10px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    .btn-primary {
        background-color: #007bff;
        color: white;
    }
    .btn-secondary {
        background-color: #6c757d;
        color: white;
    }
    .btn-danger {
        background-color: #dc3545;
        color: white;
    }
    .btn-success {
        background-color: #28a745;
        color: white;
    }
    .action-buttons {
        margin-bottom: 15px;
    }
</style>
<main class="main-content">
    <div class="container px-2">
        <h2>Advance Payment Received</h2>
        <div class="page-header">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb ">
                    <li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a></li>
                    <li class="breadcrumb-item"><a href="<?php echo e(asset('account/advance-payment')); ?>">Advance Payment</a></li>
                    <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('message.add')); ?></li>
                </ol>
            </nav>
        </div>

        <div class="card">
            <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
            <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>
            
            <form action="<?php echo e(asset('account/add-advance-payment-receive')); ?>" method="post">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="type" value="received">
                <div class="row align-items-center mb-3 px-3 pt-3">
                    <div class="col-md-6">
                        <div class="form-group row align-items-center">
                            <label class="col-md-4 col-form-label font-weight-bold">Client Name</label>
                            <div class="col-md-8">
                                
                                    <select class="form-control client_change_option select2" name="client_vendor_id" required>
                                        <option selected disabled>Select</option>
                                        <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cus): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($cus->id); ?>" ><?php echo e($cus->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                    
                                
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card-header py-4">
                    
                    
                    <div class="row mb-3">
                        <div class="col-md-4">
                            <div class="form-group row ">
                                <label class="col-md-5 col-form-label font-weight-bold">Number</label>
                                <div class="col-md-2 px-0">
                                    <input type="text" class="form-control" name="number_prefix" >
                                </div>
                                <div class="col-md-5">
                                    <input type="number" class="form-control" name="payment_number" value="<?php echo e($payment_number); ?>" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group row align-items-center">
                                <label class="col-md-3 col-form-label font-weight-bold">Date</label>
                                <div class="col-md-9">
                                    <input type="date" class="form-control" name="date" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group row align-items-center">
                                <label class="col-md-4 col-form-label font-weight-bold">Method</label>
                                <div class="col-md-8">
                                    <select class="form-control select2" name="payment_method" required>
                                        <option value="cash">Cash</option>
                                        <option value="cash_memo">Cash Memo</option>
                                        <option value="credit_card">Credit Card</option>
                                        <option value="cheque">Cheque</option>
                                        <option value="bank_transfer">Bank Transfer</option>
                                        <option value="pay_slip">Pay Slip</option>
                                        <option value="credit_note">Credit Note</option>
                                        <option value="payment_gateway">Payment Gateway</option>
                                        <option value="upi">UPI</option>
                                        <option value="qr_code">QR Code</option>
                                        <option value="other">Other</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group row align-items-center">
                                <label class="col-md-5 col-form-label font-weight-bold">Amount</label>
                                <div class="col-md-7 pl-0">
                                    <input type="number" class="form-control" id="enter_amount" name="amount" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group row align-items-center">
                                <label class="col-md-4 col-form-label font-weight-bold">Reference</label>
                                <div class="col-md-8">
                                    <input type="text" name="reference" class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group row align-items-center">
                                <label class="col-md-5 col-form-label font-weight-bold">Bank Charge</label>
                                <div class="col-md-7">
                                    <input type="number" class="form-control" name="bank_charge" >
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row py-3">
                        <div class="col-md-6"></div>
                        <div class="col-md-6 d-flex justify-content-between">
                            <h5>Amount Received</h5>
                            <h5 id="received_amount">₹ 0.00</h5>
                        </div>
                    </div>
                </div>
                <div class="card-body">
                    
                    <div class="mt-4">
                        <h6>Memo/notes</h6>
                        <textarea class="form-control" name="note" rows="3" placeholder="Enter any additional notes here..."></textarea>
                    </div>

                    <div class="d-flex justify-content-end mt-4">
                        
                        <div>
                            
                            <button type="submit" class="btn btn-primary">Save & View Receipt</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>


    <!-- The Modal -->
    <div class="modal" id="invoiceModal">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">

            <!-- Modal Header -->
            <div class="modal-header bg-success rounded-0">
                <h4 class="modal-title">Add Expense</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>

            <!-- Modal body -->
            <div class="modal-body">
                
                <form action="<?php echo e(asset('account/add-account-expense')); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label>Expense Name</label>
                                <input type="text" name="name" class="form-control">
                            </div>
                        </div>
                    </div>
                    
                    <div class="d-flex justify-content-end">
                        <button type="submit" class="btn btn-success">Submit</button>
                    </div>
                </form>
            </div>

            

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

<?php $__env->startPush('footer-script'); ?>

<script>
    $(document).ready(function() {



        //amount code
        $("#enter_amount").on("input",function(){
            var amount = $(this).val();
            $("#received_amount").text("₹ "+amount);
        });
        
        
    });
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/peoplebee.in/accounts-admin/resources/views/accounting/advance_payment/add.blade.php ENDPATH**/ ?>