
<?php $__env->startSection('title'); ?> Cancel Invoice | Beauty Parlour <?php $__env->stopSection(); ?>
<?php $__env->startSection('view-cancel-invoice-details'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('view-cancel-invoice-details'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content_section'); ?>

<div class="row min-vh-100">
    <!-- all content will be here. start -->
    <!-- all content will be here. start -->
    <form action="#" method="POST" enctype="multipart/form-data" id="billingRootForm">
        <?php echo csrf_field(); ?>

        <input type="hidden" name="user_id" value="<?php echo e($singleBillingData->user_id); ?>">
        <input type="hidden" name="billing_id" value="<?php echo e($singleBillingData->id); ?>">
        <input type="hidden" name="cancel_by" value="<?php echo e(Auth::user()->name); ?>">
        <div class="row invoice p-0 m-0">
            <div class="col-md-9 p-0 m-0">
                <div class="shadow rounded m-3">

                    <?php
                    ///To get logo...
                    $softLogo = App\Models\Logo::getSoftwareLogo();
                    ?>
                    <div class="d-md-flex justify-content-between custom-billing-invoice-header">
                        <div class="custom-invoice-logo-section">
                            <div class="d-flex align-items-center  custom-billing-invoice-logo">
                                <?php if(isset($softLogo) && $softLogo->logo_image != null): ?>
                                <img src="<?php echo e(asset('backend/uploads/logoImg/'.$softLogo->logo_image)); ?>" alt="logo">
                                <?php else: ?>
                                <img src="<?php echo e(asset('backend')); ?>/billing_invoice_logo.png" alt="logo">
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="custom-issue-due-date-section">

                            <div class="d-flex align-items-center gap-2">
                                <div
                                    class="d-flex flex-column justify-content-end custom-issue-due-date-text-area gap-2">
                                    <p class="">Invoice Number: </p>
                                    <p class="">Invoice Date: </p>
                                    <p class="">Invoice Generate: </p>
                                </div>

                                <div class="d-flex flex-column gap-2 custom-billing-invoice-header-right">
                                    <input type="text" name="invoice_id"
                                        class="form-control custom-cursor-pointer custom-readonly-bg-color"
                                        value="#<?php echo e($singleBillingData->billing_id); ?>" readonly>
                                    <input type="text"
                                        class=" form-control custom-readonly-bg-color flatpickr-basic custom-date-picker"
                                        name="date_issue" id="date_issue" placeholder="DD-MM-YYYY"
                                        value="<?php echo e(Carbon\Carbon::parse($singleBillingData->billing_date)->format('d-m-Y')); ?>"
                                        readonly>
                                    <input type="text"
                                        class="form-control custom-readonly-bg-color flatpickr-basic custom-date-picker"
                                        value="<?php echo e(Str::title($singleBillingData->billing_by)); ?>" readonly>
                                </div>
                            </div>

                        </div>
                    </div>

                    <hr>
                    <div class="custom-invoice-to">
                        <div class="line-height-15px">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group custom-select2-form">
                                        <label for="branch_id"> <b>Billing Branch</b>
                                        </label>
                                        <select name="branch_id" id="branch_id"
                                            class="form-select custom-cursor-pointer select2" disabled required>
                                            <option value="" selected disabled>
                                                <?php echo e($singleBillingData->branchData->branch_title); ?>:
                                                <?php echo e($singleBillingData->branchData->branch_address); ?>

                                            </option>
                                        </select>
                                    </div>

                                    <?php $__errorArgs = ['branch_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class=text-danger><?php echo e($message); ?></span>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                    <span class="mt-4" id="updateBillingBranchInfo">
                                        <p class="mb-1 mt-2"><b class="custom-invoice-min-bold-color">Name:</b>
                                            <?php echo e($singleBillingData->branch_id != null ? $singleBillingData->branchData->branch_title : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Mobile:</b>
                                            <?php echo e($singleBillingData->branch_id != null ? $singleBillingData->branchData->phone1 : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Email:</b>
                                            <?php echo e($singleBillingData->branch_id != null ? $singleBillingData->branchData->email : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Address:</b>
                                            <?php echo e($singleBillingData->branch_id != null ? $singleBillingData->branchData->branch_address : ''); ?>

                                        </p>
                                    </span>

                                </div>
                                <div class="col-md-6">
                                    <div class="form-group custom-select2-form">
                                        <label for="client_id"> <b>Invoice To</b>
                                        </label>
                                        <select name="client_id" id="client_id"
                                            class="form-select custom-cursor-pointer select2" disabled required>
                                            <option value="" selected disabled>
                                                <?php echo e($singleBillingData->clientData->client_name); ?>

                                            </option>
                                        </select>
                                    </div>

                                    <?php $__errorArgs = ['client_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class=text-danger><?php echo e($message); ?></span>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                    <span class="mt-4" id="updateClientInformation">
                                        <p class="mb-1 mt-2"><b class="custom-invoice-min-bold-color">Name:</b>
                                            <?php echo e($singleBillingData->client_id != null ? $singleBillingData->clientData->client_name : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Mobile:</b>
                                            <?php echo e($singleBillingData->client_id != null ? $singleBillingData->clientData->client_mobile : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Email:</b>
                                            <?php echo e($singleBillingData->client_id != null ? $singleBillingData->clientData->client_email : ''); ?>

                                        </p>
                                        <p class="mb-1"><b class="custom-invoice-min-bold-color">Address:</b>
                                            <?php echo e($singleBillingData->client_id != null ? $singleBillingData->clientData->client_address : ''); ?>

                                        </p>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <hr>

                    <div class="row px-4">
                        <div class="col-12">
                            <div class="table-responsive">
                                <table class="table table-bordered py-3">
                                    <!-- <hr class="mb-1"> -->
                                    <thead>
                                        <tr>
                                            <th scope="col"> Service </th>
                                            <th scope="col" class="text-center"> QTY </th>
                                            <th scope="col" class="text-center"> Unit Price </th>
                                            <th scope="col" class="text-center"> Discount </th>
                                            <th scope="col" class="text-center"> Total Price </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $serviceBPP; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $singleBPP): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php if(isset($singleBPP) && $singleBPP != null): ?>
                                        <tr>
                                            <td class="text-no-wrap"><?php echo e($singleBPP->serviceData->service_name); ?></td>
                                            <td class="text-center"><?php echo e($singleBPP->product_qty); ?></td>
                                            <td class="text-center"><?php echo e($singleBPP->product_price); ?></td>
                                            <td class="text-center"><?php echo e($singleBPP->product_discount); ?></td>
                                            <td class="text-center"><?php echo e($singleBPP->grand_total_price); ?></td>
                                        </tr>
                                        <?php endif; ?>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>

                                </table>
                            </div>
                        </div>
                    </div>

                    <hr>

                    <div class="custom-invoice-common-padding pb-5">
                        <div class="row">
                            <div class="col-md-6">
                                <span class="">
                                    
                                    <p class="mb-1" id="updateBranchInvoiceTerms">
                                        <?php if($singleBillingData->invoice_terms_id != null): ?>
                                        <?php echo $singleBillingData->invoiceTermsData->invoice_terms; ?>

                                        <?php else: ?>
                                        <?php endif; ?>
                                    </p>
                                </span>
                            </div>
                            <div class="col-md-6">
                                <div class="w-100 d-flex gap-2">
                                    <div class="text-end w-50 custom-footer-right-text-block">
                                        <p>Service Qty:</p>
                                        <p>Sub Total:</p>
                                        <p>Discount:</p>
                                        <p>Total Amount:</p>
                                    </div>
                                    <div class="d-flex flex-column gap-2 w-50">
                                        <input type="text" name="sub_total_quantity" id="sub_total_quantity"
                                            class="form-control custom-cursor-pointer custom-readonly-bg-color"
                                            value="<?php echo e($subTotalProductQty > 0 ? $subTotalProductQty : 0); ?>" readonly>
                                        <input type="text" name="sub_total_price" id="sub_total_price"
                                            class="form-control custom-cursor-pointer custom-readonly-bg-color"
                                            value="<?php echo e($subTotalPrice > 0 ? $subTotalPrice : 0); ?>" readonly>
                                        <input type="text" name="sub_total_discount" id="sub_total_discount"
                                            class="form-control custom-cursor-pointer custom-readonly-bg-color"
                                            value="<?php echo e($subTotalProductDiscount > 0 ? $subTotalProductDiscount : 0); ?>"
                                            readonly>
                                        <input type="text" name="grand_total_price" id="grand_total_price"
                                            class="form-control custom-cursor-pointer custom-readonly-bg-color"
                                            value="<?php echo e($grandTotalProductPrice > 0 ? $grandTotalProductPrice : 0); ?>"
                                            readonly>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-md-3 p-0 m-0">
                <div class="row p-3">
                    <div class="col-12 mb-4">
                        <div class="">
                            <div class="card card-stats">
                                <div class="card-header custom-payment-section-header">
                                    <div class="icon icon-warning d-flex">
                                        <span class="material-symbols-outlined">equalizer</span>
                                        <p
                                            class="category custom-card-header-title custom-payment-section-heading-title">
                                            <strong>Cancellation Status</strong>
                                        </p>
                                    </div>
                                </div>
                                <div class="card-footer p-0 dashboard-card-footer text-center custom-invoice-card-status">
                                    <div class="stats">
                                        <div class="row">
                                            <div class="col-12">
                                                <i class="material-symbols-outlined text-danger">check_circle</i><br>
                                                <span class="text-danger">Canceled</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-12 mb-4">
                        <div class="">
                            <div class="card card-stats">
                                <div class="card-header custom-payment-section-header">
                                    <div class="icon icon-warning d-flex">
                                        <span class="material-symbols-outlined">equalizer</span>
                                        <p
                                            class="category custom-card-header-title custom-payment-section-heading-title">
                                            <strong>Cancellation Condition</strong>
                                        </p>
                                    </div>
                                </div>
                                <div class="card-content px-3 custom-payment-section-body">
                                    <div class="form-group custom-select2-form mb-3">
                                        <label for="cancel_condition"> <b>Cncellation Type</b> <span
                                                class=" text-danger">(required)</span>
                                        </label>
                                        <select name="cancel_condition" id="cancel_condition"
                                            class="form-select select2" required disabled>
                                            <option value="" selected disabled>Select Condition</option>
                                            <option value="Adjusted" <?php echo e($singleCancelBillData->cancel_condition == 'Adjusted' ? 'selected' : ''); ?>>Adjusted</option>
                                            <option value="Refunded" <?php echo e($singleCancelBillData->cancel_condition == 'Refunded' ? 'selected' : ''); ?>>Refunded</option>
                                            <option value="Nothing"  <?php echo e($singleCancelBillData->cancel_condition == 'Nothing' ? 'selected' : ''); ?>>Nothing</option>
                                        </select>
                                    </div>

                                    <?php $__errorArgs = ['cancel_condition'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class=text-danger><?php echo e($message); ?></span>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                    <div class="form-group custom-select2-form mb-3">
                                        <label for="cancel_condition"> <b>Cancellation By:</b> <span class=" text-danger">(required)</span>
                                        </label>
                                        <input type="text" class="form-control custom-readonly-bg-color" value="<?php echo e(Str::title(Auth::user()->name)); ?>" readonly>
                                    </div>
                                    
                                    <div class="form-group custom-select2-form">
                                        <label for="cancel_condition"> <b>Date & Time:</b> <span class=" text-danger">(required)</span>
                                        </label>
                                        <input type="text" class="form-control custom-readonly-bg-color" value="<?php echo e(Carbon\Carbon::parse($singleBillingData->created_at->toDateString())->format('d-m-Y')); ?> & <?php echo e($singleCancelBillData->created_at->format('h:i')); ?>" readonly>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-12 mb-4">
                        <div class="">
                            <div class="card card-stats">
                                <div class="card-header custom-payment-section-header">
                                    <div class="icon icon-warning d-flex">
                                        <span class="material-symbols-outlined">equalizer</span>
                                        <p
                                            class="category custom-card-header-title custom-payment-section-heading-title">
                                            <strong>Cancellation Notes</strong>
                                        </p>
                                    </div>
                                </div>
                                <div class="card-content px-3 custom-payment-section-body">
                                    <span>
                                        <div class="form-group custom-select2-form">
                                            <label for="cancel_note"> <b> Notes </b><span class=" text-danger">(required)</span></label>
                                    
                                            <textarea placeholder="Enter Notes" class="form-control custom-readonly-bg-color" name="cancel_note" id="description" cols="2" rows="2"
                                                required readonly><?php echo e($singleCancelBillData->cancel_note); ?></textarea>
                                        </div>
                                    
                                        <?php $__errorArgs = ['cancel_note'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class=text-danger><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </form>
    <!-- all content will be here. end -->
</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
    $(document).ready(function(){
        $("#cancel_condition").select2();
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\skin-care\resources\views/admin/cancelInvoice/viewCancelnvoiceDetails.blade.php ENDPATH**/ ?>