<?php $__env->startSection('content'); ?>
    <?php
        use App\Models\ExpireDateQty;
    ?>
    <title><?php echo e($title); ?></title>

    <main id="js-page-content" role="main" class="page-content">
        <ol class="breadcrumb page-breadcrumb">
            <li class="breadcrumb-item"><a href="javascript:void(0);"><?php echo e(trans('admin.Sales')); ?> </a></li>
            <li class="breadcrumb-item active"><?php echo e($title); ?> </li>
            <li class="position-absolute pos-top pos-right d-none d-sm-block"><span
                    class="js-get-date"></span></li>
        </ol>



        <form id="form" action="<?php echo e($urll); ?>" method="post" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>

            <?php echo view('honeypot::honeypotFormFields'); ?>
            <input type="hidden" name="Sale_Type" value="Sales">
            <input type="hidden" name="ID" value="<?php echo e($item->id); ?>">
            <input type="hidden" name="User" value="<?php echo e($item->User); ?>">
            <div class="row">
                <div class="col-lg-12">
                    <div id="panel-2" class="panel">
                        <div class="panel-hdr">
                            <h2>
                                <span class="fw-300"><i>   <?php echo e($title); ?>  </i></span>
                            </h2>
                        </div>
                        <div class="panel-container show">
                            <span id="ex"> <?php echo $__env->make('admin.layouts.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?></span>
                            <div class="panel-content">
                                <div class="form-row">
                                    <div class="form-group col-lg-2">
                                        <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Code')); ?> </label>
                                        <input type="text" name="Old_Code" value="<?php echo e($item->Code); ?>" class="form-control " readonly>
                                        <input type="hidden" name="Code" value="<?php echo e($Code); ?>" class="form-control">
                                        <input type="hidden" id="SSAFE" name="Safe" value="<?php echo e($Def->Safe); ?>" class="form-control">
                                        <input type="hidden"  name="Coin" value="<?php echo e($Def->Coin); ?>" class="form-control">
                                        <input type="hidden"  name="Draw" value="1" class="form-control">
                                        <input type="hidden"  name="Status" value="1" class="form-control">
                                    </div>
                                    <?php if(auth()->guard('admin')->user()->emp == 0): ?>
                                        <div class="form-group col-lg-2">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Date')); ?></label>
                                            <input type="date" name="Date" value="<?php echo e($item->Date); ?>" class="form-control" required>
                                        </div>
                                    <?php else: ?>

                                        <?php if(auth()->guard('admin')->user()->Date == 1): ?>
                                            <div class="form-group col-lg-2">
                                                <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Date')); ?></label>
                                                <input type="date" name="Date" value="<?php echo e($item->Date); ?>" class="form-control" required>
                                            </div>
                                        <?php else: ?>
                                            <div class="form-group col-lg-2">
                                                <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Date')); ?></label>
                                                <input type="date" name="Date" value="<?php echo e($item->Date); ?>" class="form-control" required readonly>
                                            </div>
                                        <?php endif; ?>

                                    <?php endif; ?>

                                    <?php if($Place != 'Edit_Sales'): ?>

                                        <div class="form-group col-lg-2">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Sale_Date')); ?></label>
                                            <input type="date" name="Sale_Date" value="<?php echo e($item->Sale_Date); ?>"  class="form-control">
                                        </div>

                                    <?php endif; ?>





                                    <div class="form-group col-lg-2">
                                        <label class="form-label" for=""><?php echo e(trans('admin.Store')); ?></label>
                                        <select class="select2 form-control w-100" id="store" name="Store" required>
                                            <?php $__currentLoopData = $Stores; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($stor->id); ?>" <?php if($item->Store == $stor->id): ?> selected <?php endif; ?>>
                                                    <?php echo e(app()->getLocale() == 'ar' ?$stor->Name :$stor->NameEn); ?>

                                                </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>




                                    <?php if(auth()->guard('admin')->user()->emp != 0): ?>
                                        <div class="form-group col-lg-2">
                                            <label class="form-label" for=""> <?php echo e(trans('admin.Payment_Method')); ?></label>
                                            <select class="select2 form-control w-100" name="Payment_Method" id="Payment_Method" onchange="Statuss()" required>

                                                <?php if(auth()->guard('admin')->user()->Cash == 1): ?>
                                                    <option value="Cash" <?php if($item->Payment_Method == 'Cash'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Cash')); ?> </option>
                                                <?php endif; ?>
                                                <?php if(auth()->guard('admin')->user()->Later == 1): ?>
                                                    <option value="Later" <?php if($item->Payment_Method == 'Later'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Later')); ?></option>
                                                <?php endif; ?>
                                                <?php if(auth()->guard('admin')->user()->Installment == 1): ?>
                                                    <option value="Installment"  <?php if($item->Payment_Method == 'Installment'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Installment')); ?></option>
                                                <?php endif; ?>
                                                <?php if(auth()->guard('admin')->user()->Check == 1): ?>
                                                    <option value="Check" <?php if($item->Payment_Method == 'Check'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Check')); ?></option>
                                                <?php endif; ?>
                                                <?php if(auth()->guard('admin')->user()->InstallmentCompanies == 1): ?>
                                                    <option value="InstallmentCompanies"><?php echo e(trans('admin.InstallmentCompanies')); ?></option>
                                                <?php endif; ?>
                                            </select>
                                        </div>

                                    <?php else: ?>
                                        <div class="form-group col-lg-2">
                                            <label class="form-label" for=""> <?php echo e(trans('admin.Payment_Method')); ?></label>
                                            <select class="select2 form-control w-100" name="Payment_Method" id="Payment_Method" onchange="Statuss()" required>
                                                <option value="Cash" <?php if($item->Payment_Method == 'Cash'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Cash')); ?> </option>
                                                <option value="Later" <?php if($item->Payment_Method == 'Later'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Later')); ?></option>
                                                <option value="Installment"  <?php if($item->Payment_Method == 'Installment'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Installment')); ?></option>
                                                <option value="Check" <?php if($item->Payment_Method == 'Check'): ?> selected <?php endif; ?>><?php echo e(trans('admin.Check')); ?></option>
                                                <option value="InstallmentCompanies" <?php if($item->Payment_Method == 'InstallmentCompanies'): ?> selected <?php endif; ?>><?php echo e(trans('admin.InstallmentCompanies')); ?></option>
                                            </select>
                                        </div>
                                    <?php endif; ?>
                                    <div class="form-group col-lg-2" style="display: none" id="Later_Due">
                                        <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Later_Due')); ?></label>
                                        <input type="date" name="Later_Due" value="<?php echo e($item->Later_Due); ?>"  class="form-control" >
                                    </div>





                                    <div class="form-group col-lg-4">
                                        <label class="form-label" for=""><?php echo e(trans('admin.Account')); ?> (<?php echo e(trans('admin.Client')); ?>)</label>
                                        <select  class="select2 form-control w-100" id="client" name="Client" required>

                                            <option value="<?php echo e($item->Client); ?>">

                                                <?php echo e(app()->getLocale() == 'ar' ?$item->Client()->first()->Name :$item->Client()->first()->NameEn); ?>

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


                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('ايقونه اضافه عميل')): ?>


                                        <div class="form-group col-lg-1">
                                            <button style="margin: 22px" type="button" class="btn btn-default" data-toggle="modal" data-target="#NewClient">
                                                <i class="fal fa-user"></i>
                                            </button>

                                            <!-- Modal New Client -->
                                            <div class="modal fade" id="NewClient" tabindex="-1" role="dialog" aria-hidden="true">
                                                <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
                                                    <div class="modal-content">
                                                        <div class="modal-header">
                                                            <h4 class="modal-body row">
                                                                <div class="form-group col-md-2">
                                                                    <label class="form-label" for="simpleinput">   <?php echo e(trans('admin.Code')); ?></label>
                                                                    <input type="text" id="CODE"  value="<?php echo e($CodeUser); ?>" disabled class="form-control">
                                                                </div>
                                                                <div class="form-group col-md-2">
                                                                    <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Arabic_Name')); ?>  </label><span class="strick">*</span>
                                                                    <input type="text" id="Name" value="<?php echo e(old('Name')); ?>" class="form-control">
                                                                </div>
                                                                <div class="form-group col-md-2">
                                                                    <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.English_Name')); ?>  </label><span class="strick">*</span>
                                                                    <input type="text" id="NameEn" value="<?php echo e(old('NameEn')); ?>" class="form-control">
                                                                </div>
                                                                <div class="form-group col-md-3">
                                                                    <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Phone')); ?>  </label><span class="strick">*</span>
                                                                    <input type="number" id="Phone" value="<?php echo e(old('Phone')); ?>" class="form-control">
                                                                </div>
                                                                <div class="form-group col-md-3">
                                                                    <label class="form-label" for="">   <?php echo e(trans('admin.Price_Level')); ?> </label><span class="strick">*</span>
                                                                    <select class="select2 form-control w-100" id="PriceLevel">
                                                                        <option value="1"> <?php echo e(trans('admin.Level1')); ?> </option>
                                                                        <option value="2"> <?php echo e(trans('admin.Level2')); ?> </option>
                                                                        <option value="3"> <?php echo e(trans('admin.Level3')); ?> </option>
                                                                    </select>
                                                                </div>
                                                            </h4>
                                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                                <span aria-hidden="true"><i class="fal fa-times"></i></span>
                                                            </button>
                                                        </div>
                                                        <div class="modal-footer">
                                                            <button type="button" class="btn btn-secondary" data-dismiss="modal"> <?php echo e(trans('admin.No')); ?></button>
                                                            <button type="button" onclick="NewClients()"  class="btn btn-primary"> <?php echo e(trans('admin.AddNew')); ?></button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                        </div>
                                    <?php endif; ?>

                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('خانه رصيد حساب العميل')): ?> <?php $credStyle="block"; ?> <?php endif; ?>
                                    <div class="form-group col-lg-2" style="display: <?php echo e($credStyle); ?>">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Account_Credit')); ?> </label>
                                        <input type="text" id="AccountCredit" name="Current_Credit" value="0" class="form-control " readonly>
                                    </div>

                                    <div class="form-group col-lg-2" style="display: <?php echo e($credStyle); ?>">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Credit_Limit')); ?> </label>
                                        <input type="text" id="Credit_Limit"  value="0" class="form-control " readonly>
                                    </div>


                                <?php if($show->Note == 1): ?>
                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Notes')); ?>  </label>
                                            <input type="text" name="Note" value="<?php echo e($item->Note); ?>" class="form-control">
                                        </div>
                                    <?php else: ?>
                                        <div class="form-group col-lg-4" style="display: none">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Notes')); ?>  </label>
                                            <input type="text" name="Note" value="<?php echo e($item->Note); ?>" class="form-control">
                                        </div>
                                    <?php endif; ?>


                                    <input type="hidden" name="Files" value="<?php echo e($item->File); ?>">

                                </div>

                                <div id="Install" style="display: none">

                                    <div class="row">
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Presenter')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->presenter); ?>" class="form-control" name="presenter" >

                                        </div>
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.annual_interest')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->annual_interest); ?>" class="form-control" name="annual_interest">

                                        </div>

                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.monthly_installment')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->monthly_installment); ?>" class="form-control" name="monthly_installment">

                                        </div>

                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Years_Number')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->Years_Number); ?>" class="form-control" name="Years_Number">

                                        </div>

                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.total')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->total); ?>" class="form-control" name="total" readonly>

                                        </div>

                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.installment_Num')); ?></label>
                                            <input type="number" step="any"  value="<?php echo e($item->installment_Num); ?>" class="form-control" name="installment_Num">

                                        </div>

                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Date_First_installment')); ?></label>
                                            <input type="date"   value="<?php echo e($item->Date_First_installment); ?>" class="form-control" name="Date_First_installment">

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

                                <div  id="CHECK" style="display: none">

                                    <div class="row">
                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for=""><?php echo e(trans('admin.Check_Type')); ?></label>
                                            <select class="select2 form-control w-100"  name="Check_Type" >
                                                <option value=""> <?php echo e(trans('admin.Check_Type')); ?></option>
                                                <?php $__currentLoopData = $ChecksTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($type->id); ?>" <?php if($item->Check_Type == $type->id): ?> selected <?php endif; ?>>

                                                        <?php echo e(app()->getLocale() == 'ar' ?$type->Arabic_Name :$type->English_Name); ?>

                                                    </option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>

                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Due_Date')); ?>  </label>
                                            <input type="date"  value="<?php echo e($item->Due_Date); ?>" class="form-control" name="Due_Date">
                                        </div>


                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.Check_Number')); ?>  </label>
                                            <input type="number" step="any"  value="<?php echo e($item->Check_Number); ?>" class="form-control" name="Check_Number">
                                        </div>
                                    </div>

                                </div>

                                <div id="CompInstall" style="display: none">
                                    <div class="row">

                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for=""><?php echo e(trans('admin.InstallCompany')); ?></label>
                                            <select class="select2 form-control w-100"  name="InstallCompany" id="InstallCompany" onchange="InstaallComp()" >
                                                <option value=""> <?php echo e(trans('admin.InstallCompany')); ?></option>
                                                <?php $__currentLoopData = $InstallmentCompanies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inst): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($inst->id); ?>">
                                                        <?php echo e(app()->getLocale() == 'ar' ?$inst->Arabic_Name :$inst->English_Name); ?>

                                                    </option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>


                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.ContractNumber')); ?>  </label>
                                            <input type="text" name="ContractNumber" value="<?php echo e(old('ContractNumber')); ?>" class="form-control">
                                        </div>



                                        <div class="form-group col-lg-4">
                                            <label class="form-label" for=""><?php echo e(trans('admin.PayFees')); ?></label>
                                            <select class="select2 form-control w-100"  name="PayFees"  >
                                                <option value="No"> <?php echo e(trans('admin.No')); ?></option>
                                                <option value="Yes"> <?php echo e(trans('admin.Yes')); ?></option>
                                            </select>
                                        </div>
                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('رسوم خدمات شركات التقسيط')): ?>  <?php $Style='block';  ?>   <?php endif; ?>

                                        <div class="form-group col-lg-4" style="display: <?php echo e($Style); ?>">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.ServiceFee')); ?>  </label>
                                            <input type="text" name="ServiceFee" id="ServiceFee" value="<?php echo e(old('ServiceFee')); ?>" class="form-control" readonly>
                                        </div>


                                        <div class="form-group col-lg-4" style="display: <?php echo e($Style); ?>">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.CompanyPrecent')); ?>  </label>
                                            <input type="text" name="CompanyPrecent" id="CompanyPrecent" value="<?php echo e(old('CompanyPrecent')); ?>" class="form-control" readonly>
                                        </div>

                                        <div class="form-group col-lg-4" style="display: <?php echo e($Style); ?>">
                                            <label class="form-label" for="simpleinput"><?php echo e(trans('admin.TotalServiceFee')); ?>  </label>
                                            <input type="text"  id="TotalServiceFee"  class="form-control" readonly>
                                        </div>



                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xl-12">
                    <div id="panel-1" class="panel">

                        <div class="panel-container show">
                            <div class="panel-content">
                                <div class="row">
                                    <?php if($show->SearchCode == 1): ?>
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput">  </label>
                                            <div class="input-items" style="position:relative;">
                                                <input type="text" id="search" class="form-control" placeholder="<?php echo e(trans('admin.Search_For_Products')); ?>">
                                                <?php if(app()->getLocale() == 'ar' ): ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;left:3px;"></i>
                                                <?php else: ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;right: 0;left:auto;"></i>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput">  </label>
                                            <div class="input-items" style="position:relative;">
                                                <input type="text" id="SearchCode" class="form-control" placeholder="<?php echo e(trans('admin.SearchCode')); ?>">
                                                <?php if(app()->getLocale() == 'ar' ): ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;left:3px;"></i>
                                                <?php else: ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;right: 0;left:auto;"></i>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    <?php else: ?>
                                        <div class="form-group col-lg-6">
                                            <label class="form-label" for="simpleinput">  </label>
                                            <div class="input-items" style="position:relative;">
                                                <input type="text" id="search" class="form-control" placeholder="<?php echo e(trans('admin.Search_For_Products')); ?>">
                                                <?php if(app()->getLocale() == 'ar' ): ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;left:3px;"></i>
                                                <?php else: ?>
                                                    <i class="fal fa-barcode-alt" style="position:absolute ;top:5px;right: 0;left:auto;"></i>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    <?php endif; ?>

                                    <?php if($show->Group_Brand == 1): ?>
                                        <div class="form-group col-lg-2 mt-3">
                                            <select class="select2 form-control w-100" id="Brandd">
                                                <option value=""><?php echo e(trans('admin.Brand')); ?></option>
                                                <?php $__currentLoopData = $Brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($brand->id); ?>">
                                                        <?php echo e(app()->getLocale() == 'ar' ?$brand->Name :$brand->NameEn); ?>

                                                    </option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-2 mt-3">
                                            <select class="select2 form-control w-100" id="Groupp">
                                                <option value=""><?php echo e(trans('admin.Group')); ?></option>
                                                <?php $__currentLoopData = $ItemsGroups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($group->id); ?>">

                                                        <?php echo e(app()->getLocale() == 'ar' ?$group->Name :$group->NameEn); ?>

                                                    </option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    <?php endif; ?>
                                    <?php if($show->Icon_Payment_Recipt == 1): ?>
                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('اضافه سند قبض')): ?>
                                            <div class="form-group col-lg-1 col-2">
                                                <button type="button" class="btn btn-default pos-icon" data-toggle="modal" data-target="#Recipt">
                                                    <a data-toggle="tooltip" data-placement="top" title=" <?php echo e(trans('admin.Recipt_Voucher')); ?>">
                                                        <img src="<?php echo e(asset('Admin/img/37-approve-checked-simple-outline.gif')); ?>" alt="">
                                                    </a>
                                                </button>
                                            </div>
                                        <?php endif; ?>
                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('اضافه سند صرف')): ?>
                                            <div class="form-group col-lg-1 col-2">
                                                <button type="button" class="btn btn-default pos-icon" data-toggle="modal" data-target="#PayVouch">
                                                    <a data-toggle="tooltip" data-placement="top" title=" <?php echo e(trans('admin.Payment_Voucher')); ?>">
                                                        <img src="<?php echo e(asset('Admin/img/290-coin-outline (1).gif')); ?>" alt="">
                                                    </a>
                                                </button>
                                            </div>
                                        <?php endif; ?>
                                    <?php endif; ?>
                                </div>
                                <div id="mobile-overflow">
                                    <table
                                        class="table table-bordered table-hover table-striped w-100 mobile-width-more table-color1">
                                        <thead>
                                        <tr>
                                            <th><?php echo e(trans('admin.Name')); ?></th>
                                            <?php if($show->Show_Unit == 1): ?>
                                                <th><?php echo e(trans('admin.Unit')); ?></th>
                                            <?php endif; ?>

                                            <?php if($show->Show_Barcode == 1): ?>
                                                <th><?php echo e(trans('admin.Code')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Patch_Number == 1): ?>
                                                <th><?php echo e(trans('admin.Patch_Number')); ?></th>
                                            <?php endif; ?>

                                            <th><?php echo e(trans('admin.Qty')); ?></th>
                                            <th><?php echo e(trans('admin.Price')); ?></th>
                                            <?php if($show->Disc == 1): ?>
                                                <th><?php echo e(trans('admin.Discount')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Tax == 1): ?>
                                                <th><?php echo e(trans('admin.Tax')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Store == 1): ?>
                                                <th style="padding:12px 20px;"><?php echo e(trans('admin.Store')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Expire_Date == 1): ?>
                                                <th><?php echo e(trans('admin.Exp_Date')); ?></th>
                                            <?php endif; ?>

                                            <th><?php echo e(trans('admin.Actions')); ?></th>
                                        </tr>
                                        </thead>
                                        <tbody class="Data" id="Data">

                                        </tbody>
                                    </table>
                                </div>
                                <!-- datatable start -->
                                <div id="mobile-overflow">
                                    <table id="dt"
                                           class="table table-bordered table-hover table-striped w-100 mobile-width-more table-color2">
                                        <thead>
                                        <tr>
                                            <th><?php echo e(trans('admin.Name')); ?></th>
                                            <?php if($show->Show_Unit == 1): ?>
                                                <th><?php echo e(trans('admin.Unit')); ?></th>
                                            <?php endif; ?>

                                            <?php if($show->Show_Barcode == 1): ?>
                                                <th><?php echo e(trans('admin.Code')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Patch_Number == 1): ?>
                                                <th><?php echo e(trans('admin.Patch_Number')); ?></th>
                                            <?php endif; ?>

                                            <th><?php echo e(trans('admin.Qty')); ?></th>
                                            <th><?php echo e(trans('admin.Price')); ?></th>
                                            <?php if($show->Disc == 1): ?>
                                                <th><?php echo e(trans('admin.Discount')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->TotalBfTax == 1): ?>
                                                <th><?php echo e(trans('admin.Total_Bf_Taxes')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Tax == 1): ?>
                                                <th><?php echo e(trans('admin.Tax')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Show_Total == 1): ?>
                                                <th><?php echo e(trans('admin.Total')); ?></th>
                                            <?php endif; ?>

                                            <?php if($show->Show_Net == 1): ?>
                                                <th><?php echo e(trans('admin.The_Net')); ?></th>
                                            <?php endif; ?>


                                            <?php if($show->Store == 1): ?>
                                                <th><?php echo e(trans('admin.Store')); ?></th>
                                            <?php endif; ?>
                                            <?php if($show->Expire_Date == 1): ?>
                                                <th><?php echo e(trans('admin.Exp_Date')); ?></th>
                                            <?php endif; ?>

                                            <th><?php echo e(trans('admin.Actions')); ?></th>
                                        </tr>
                                        </thead>
                                        <tbody id="data-dt">
                                        <?php if($show->Disc == 1): ?>
                                            <?php  $disshow='';   ?>
                                        <?php else: ?>
                                            <?php  $disshow='none';   ?>
                                        <?php endif; ?>


                                        <?php if($show->TotalBfTax == 1): ?>
                                            <?php  $totbfhow='';   ?>
                                        <?php else: ?>
                                            <?php  $totbfhow='none';   ?>
                                        <?php endif; ?>


                                        <?php if($show->Tax == 1): ?>
                                            <?php  $taxshow='';   ?>
                                        <?php else: ?>
                                            <?php  $taxshow='none';   ?>
                                        <?php endif; ?>


                                        <?php if($show->Store == 1): ?>
                                            <?php  $storeshow='';   ?>
                                        <?php else: ?>
                                            <?php  $storeshow='none';   ?>
                                        <?php endif; ?>


                                        <?php if($show->AvQty == 1): ?>
                                            <?php  $avqtyshow='';   ?>
                                        <?php else: ?>
                                            <?php  $avqtyshow='none';   ?>
                                        <?php endif; ?>

                                        <?php $__currentLoopData = $details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pro): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                            <tr>
                                                <td>

                                                    <?php echo e(app()->getLocale() == 'ar' ?$pro->Product()->first()->P_Ar_Name :$pro->Product()->first()->P_En_Name); ?>

                                                    <input type='hidden' name='P_Ar_Name[]' value='<?php echo e($pro->Product()->first()->P_Ar_Name); ?>'>
                                                    <input type='hidden' name='P_En_Name[]' value='<?php echo e($pro->Product()->first()->P_En_Name); ?>'>

                                                    <?php if(!empty($pro->V1)): ?>
                                                        ( <?php echo e(app()->getLocale() == 'ar' ?$pro->V1()->first()->Name :$pro->V1()->first()->NameEn); ?> )

                                                        <input type='hidden' name='VOne[]' value='<?php echo e($pro->V1); ?>'>
                                                        <input type='hidden' name='V_Name[]' value='<?php echo e($pro->V_Name); ?>'>

                                                    <?php else: ?>
                                                        <input type='hidden' name='VOne[]' value=''>
                                                        <input type='hidden' name='V_Name[]' value=''>
                                                    <?php endif; ?>

                                                    <?php if(!empty($pro->V2)): ?>
                                                        ( <?php echo e(app()->getLocale() == 'ar' ?$pro->V2()->first()->Name :$pro->V2()->first()->NameEn); ?> )
                                                        <input type='hidden' name='VTwo[]' value='<?php echo e($pro->V2); ?>'>
                                                        <input type='hidden' name='VV_Name[]' value='<?php echo e($pro->VV_Name); ?>'>
                                                    <?php else: ?>
                                                        <input type='hidden' name='VTwo[]' value=''>
                                                        <input type='hidden' name='VV_Name[]' value=''>
                                                    <?php endif; ?>

                                                </td>

                                                <?php if($show->Show_Unit == 1): ?>

                                                    <td><input type='hidden' name='Unit[]' value='<?php echo e($pro->Unit); ?>'><?php echo e(app()->getLocale() == 'ar' ?$pro->Unit()->first()->Name :$pro->Unit()->first()->NameEn); ?></td>

                                                <?php else: ?>
                                                    <input type='hidden' name='Unit[]' value='<?php echo e($pro->Unit); ?>'>
                                                <?php endif; ?>

                                                <?php if($show->Show_Barcode == 1): ?>
                                                    <td><input type='hidden' name='P_Code[]' value='<?php echo e($pro->Product_Code); ?>'>
                                                        <input type='hidden' name='Patch_Number[]' value='<?php echo e($pro->Patch_Number); ?>'>
                                                        <?php echo e($pro->Product_Code); ?>

                                                    </td>
                                                <?php else: ?>
                                                    <input type='hidden' name='P_Code[]' value='<?php echo e($pro->Product_Code); ?>'>
                                                    <input type='hidden' name='Patch_Number[]' value='<?php echo e($pro->Patch_Number); ?>'>
                                                <?php endif; ?>



                                                <?php if($show->Patch_Number == 1): ?>
                                                    <td><?php echo e($pro->Patch_Number); ?>


                                                    </td>
                                                <?php endif; ?>

                                                <td style="display: none" ><input type='hidden' name='AvQty[]' value='<?php echo e($pro->AvQty); ?>'><?php echo e($pro->AvQty); ?></td>
                                                <td><input class='Qun' type='hidden'  name='Qty[]' value='<?php echo e($pro->Qty); ?>'><?php echo e($pro->Qty); ?></td>

                                                <td><input type='hidden' name='Price[]' value='<?php echo e($pro->Price); ?>'><?php echo e($pro->Price); ?></td>
                                                <td style="display: <?php echo e($disshow); ?>"><input class='Disc' type='hidden' name='Discount[]' value='<?php echo e($pro->Discount); ?>'>  <input type='hidden' class='TDISCOOO' id='TDiscProEdit<?php echo e($pro->id); ?>' name='TDiscPro[]' value='<?php echo e($pro->TDiscount); ?>'><?php echo e($pro->Discount); ?></td>

                                                <td style="display: <?php echo e($totbfhow); ?>"><input class='TotalBFTax' type='hidden' name='TotalBFTax[]' value='<?php echo e($pro->Total_Bf_Tax); ?>'><?php echo e($pro->Total_Bf_Tax); ?></td>
                                                <td style="display: <?php echo e($taxshow); ?>"><input class='TotalTax' type='hidden' name='TotalTax[]' value='<?php echo e($pro->Total_Tax); ?>'><?php echo e($pro->Total_Tax); ?></td>

                                                <?php if($show->Show_Total == 1): ?>
                                                    <td><input class='Tot' type='hidden' name='Total[]' value='<?php echo e($pro->Total); ?>'><?php echo e($pro->Total); ?></td>
                                                <?php else: ?>
                                                    <input class='Tot' type='hidden' name='Total[]' value='<?php echo e($pro->Total); ?>'>
                                                <?php endif; ?>

                                                <?php if($show->Show_Net == 1): ?>
                                                    <td><input class="net" type='hidden' name='Total_Net[]' value='<?php echo e($pro->Total_Net); ?>'><?php echo e($pro->Total_Net); ?></td>
                                                <?php else: ?>
                                                    <input class="net" type='hidden' name='Total_Net[]' value='<?php echo e($pro->Total_Net); ?>'>
                                                <?php endif; ?>

                                                <td style="display: <?php echo e($storeshow); ?>"><input  type='hidden' name='StorePurch[]' value='<?php echo e($pro->Store); ?>'>  <?php echo e(app()->getLocale() == 'ar' ?$pro->Store()->first()->Name :$pro->Store()->first()->NameEn); ?></td>
                                                <input type='hidden' name='Exp_Date[]' value='<?php echo e($pro->Exp_Date); ?>'>
                                                <input type='hidden'   name='CostPrice[]' value='<?php echo e($pro->CostPrice); ?>'>
                                                <input type='hidden' class='COSTPRICES' id='TotCostNew<?php echo e($pro->id); ?>' name='TotCostNew[]' value='<?php echo e($pro->TotCostNew); ?>'>


                                                <input type='hidden'    name='weight[]' value='<?php echo e($pro->weight); ?>'>
                                                <input type='hidden'    name='UnitRate[]' value='<?php echo e($pro->UnitRate); ?>'>
                                                <input type='hidden'  class='W'  name='Total_Wight[]' value='<?php echo e($pro->Total_Wight); ?>'>

                                                <?php if($show->Expire_Date == 1): ?>

                                                    <td>
                                                        <?php  $qqq=ExpireDateQty::find($pro->Exp_Date); ?>
                                                        <?php if(!empty($qqq)): ?>
                                                            <?php echo e($qqq->Exp_Date); ?>

                                                        <?php endif; ?>
                                                    </td>

                                                <?php endif; ?>



                                                    <td style="display: none" ><?php echo e($pro->SalesProDesc); ?></td>



                                                <td>
                                                    <button id='DelAssem' type='button' class='btn btn-default'><i class='fal fa-trash'></i></button>   <input type='hidden' name='Product[]' value='<?php echo e($pro->Product); ?>'>
                                                    <input type='hidden' name='PurchTax[]' value='<?php echo e($pro->Tax); ?>'>
                                                    <input type='hidden' id='Enough<?php echo e($pro->id); ?>' name='AllEnough[]' class='ENO'  value='0'>
                                                </td>
                                            </tr>

                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>

                                    </table>
                                </div>
                                <!-- datatable end -->
                                <div class="form-row">
                                    <div class="form-group col-lg-4">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Product_Numbers')); ?> </label>
                                        <input type="text" id="Product_Numbers" disabled class="form-control">
                                        <input type="hidden" id="Product_NumbersHide" name="Product_Numbers">
                                    </div>
                                    <div class="form-group col-lg-4">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Qty')); ?> </label>
                                        <input type="text" id="Total_Qty" disabled class="form-control">
                                        <input type="hidden" id="Total_QtyHide" name="Total_Qty">
                                    </div>
                                    <div class="form-group col-lg-4">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Price')); ?></label>
                                        <input type="text" id="Total_Price" disabled class="form-control">
                                        <input type="hidden" id="Total_PriceHide" name="Total_Price">
                                        <input type="hidden" id="Total_Bf_Taxes" disabled class="form-control">
                                        <input type="hidden" id="Total_Bf_TaxesHide" name="Total_BF_Taxes">
                                        <input type="hidden" id="Total_Discount" disabled class="form-control">
                                        <input type="hidden" id="Total_DiscountHide" name="Total_Discount">
                                        <input type="hidden" id="TotalCost" name="Total_Cost">
                                    </div>
                                    <div class="form-group col-lg-3">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Taxes')); ?></label>
                                        <input type="text" id="Total_Taxes" disabled class="form-control">
                                        <input type="hidden" id="Total_TaxesHide" name="Total_Taxes">
                                    </div>
                                    <div class="form-group col-lg-3">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_After_Taxes')); ?></label>
                                        <input type="text" id="Total_After_Taxes" disabled class="form-control">
                                    </div>
                                    <div class="form-group col-lg-3">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Discount')); ?> </label>
                                        <input type="text" id="Total_DiscountTT" disabled class="form-control">
                                        <input type="hidden" id="Total_DiscountHideTT" name="Total_Discount">
                                    </div>
                                    <div class="form-group col-lg-3">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_af_Discount')); ?> </label>
                                        <input type="text" class="form-control" id="TAFterD" disabled>
                                    </div>

                                    <div class="form-group col-lg-2">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Bill')); ?> </label>
                                        <input type="text" id="Total_Bill" disabled class="form-control">
                                    </div>


                                    <?php if(auth()->guard('admin')->user()->emp == 0): ?>
                                        <div class="form-group col-lg-2">
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Discount_Bill')); ?> </label>
                                            <input type="text" class="form-control" id="resdiual" name="DiscountBill" value="<?php echo e($item->DiscountBill); ?>" onkeyup="Statuss()">
                                        </div>
                                    <?php else: ?>

                                        <div class="form-group col-lg-2" <?php if(auth()->guard('admin')->user()->bill_discount == 0): ?> style="display: none" <?php endif; ?> >
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Discount_Bill')); ?> </label>
                                            <input type="text" class="form-control" id="resdiual" name="DiscountBill" value="<?php echo e($item->DiscountBill); ?>" onkeyup="Statuss()">
                                        </div>

                                    <?php endif; ?>

                                    <div class="form-group col-lg-2">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Net')); ?> </label>
                                        <input type="text" class="form-control" id="Total_PriceW" disabled>
                                    </div>
                                    <div class="form-group col-lg-2">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Paid')); ?> </label>
                                        <input type="number" step="any" name="Pay" id="paid" onkeyup="PayInstall()" onclick="PayInstall()" class="form-control">

                                    </div>
                                    <?php $d='none'; ?>
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('نسبه الربح')): ?> <?php $d='block'; ?>    <?php endif; ?>
                                    <div class="form-group col-lg-2" style="display: <?php echo e($d); ?>">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Profit')); ?> </label>
                                        <input type="number" step="any" name="ProfitPrecent" id="ProfitPrecent" class="form-control" value="0" readonly>

                                    </div>
                                    <div class="form-group col-lg-2" style="display: <?php echo e($d); ?>">
                                        <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.ProfitPrecent')); ?> %</label>
                                        <input type="number" step="any"  id="proPrecent" class="form-control" value="0" readonly>
                                    </div>



                                    <?php if($show->TaxOnTotal == 1): ?>
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.TaxOnTotal')); ?> </label>
                                            <select class="select2 form-control" name="TaxOnTotal">
                                                <option value="No"><?php echo e(trans('admin.No')); ?></option>
                                                <option value="Yes"><?php echo e(trans('admin.Yes')); ?></option>
                                            </select>
                                        </div>

                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.TaxOnTotalType')); ?> </label>
                                            <select class="select2 form-control" name="TaxOnTotalType" id="TaxOnTotalType" onchange="TaxOn()">
                                                <option value=""><?php echo e(trans('admin.TaxOnTotalType')); ?></option>
                                                <?php $__currentLoopData = $Taxes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tax): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($tax->id); ?>"> <?php echo e(app()->getLocale() == 'ar' ?$tax->Name :$tax->NameEn); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>


                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.ProfitTax')); ?> </label>
                                            <input type="text" class="form-control" id="ProfitTax" name="ProfitTax" value="0" readonly>
                                        </div>
                                    <?php endif; ?>


                                    <?php if($Def->Total_Wight_Bill == 1): ?>
                                        <div class="form-group col-lg-3">
                                            <label class="form-label" for="simpleinput"> <?php echo e(trans('admin.Total_Wight_Bill')); ?> </label>
                                            <input type="number" step="any" name="Total_Wight_Bill" id="Total_Wight_Bill" class="form-control" value="0" readonly>

                                        </div>
                                    <?php endif; ?>
                                </div>
                                <div class="buttons mt-3" id="Submit" style="display: none">
                                    <input type="hidden" id="sp" name="SP">
                                    <button type="button"  class="btn btn-primary" onclick="SPS()"> <i class="fal fa-folder"></i> <?php echo e(trans('admin.SaveChanges')); ?> </button>



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



            </div>

        </form>
        <input type="hidden" id="ED" value="<?php echo e($show->Expire_Date); ?>">
        <input type="hidden" id="DISCSHOW" value="<?php echo e($show->Disc); ?>">
        <input type="hidden" id="TOTBFSHOW" value="<?php echo e($show->TotalBfTax); ?>">
        <input type="hidden" id="TAXSHOW" value="<?php echo e($show->Tax); ?>">
        <input type="hidden" id="STORESHOW" value="<?php echo e($show->Store); ?>">
        <input type="hidden" id="AVQTYSHOW" value="<?php echo e($show->AvQty); ?>">
        <input type="hidden" id="ALLOFDISC" value="<?php echo e($item->Total_Discount); ?>">
        <input type="hidden" id="Sales_Pro_Desc" value="<?php echo e($show->Sales_Pro_Desc); ?>">
        <input type="hidden" id="Show_Unit" value="<?php echo e($show->Show_Unit); ?>">
        <input type="hidden" id="Show_Barcode" value="<?php echo e($show->Show_Barcode); ?>">
        <input type="hidden" id="Show_Total" value="<?php echo e($show->Show_Total); ?>">
        <input type="hidden" id="Show_Net" value="<?php echo e($show->Show_Net); ?>">
        <input type="hidden" id="SHW"  value="0">

        <?php if($Def->Price_Sale == 0): ?>

            <?php if(auth()->guard('admin')->user()->emp != 0): ?>

                <?php if(auth()->guard('admin')->user()->price_sale == 1): ?>

                    <input type="hidden" id="PRICEOPEN" value="1">
                <?php else: ?>

                    <input type="hidden" id="PRICEOPEN" value="0">
                <?php endif; ?>

            <?php else: ?>

                <input type="hidden" id="PRICEOPEN" value="0">
            <?php endif; ?>


        <?php else: ?>

            <?php if(auth()->guard('admin')->user()->emp != 0): ?>

                <?php if(auth()->guard('admin')->user()->price_sale == 1): ?>

                    <input type="hidden" id="PRICEOPEN" value="1">
                <?php else: ?>

                    <input type="hidden" id="PRICEOPEN" value="0">
                <?php endif; ?>

            <?php else: ?>

                <input type="hidden" id="PRICEOPEN" value="1">
            <?php endif; ?>




        <?php endif; ?>




        <?php if(auth()->guard('admin')->user()->emp != 0): ?>

            <?php if(auth()->guard('admin')->user()->discount == 1): ?>

                <input type="hidden" id="DISCOPEN" value="1">
            <?php else: ?>

                <input type="hidden" id="DISCOPEN" value="0">
            <?php endif; ?>

        <?php else: ?>

            <input type="hidden" id="DISCOPEN" value="1">
        <?php endif; ?>

        <?php if($show->Patch_Number == 1): ?>
            <input type="hidden" id="Patch" value="1">
        <?php else: ?>
            <input type="hidden" id="Patch" value="0">
        <?php endif; ?>

        <?php if($Def->Discount == 0): ?>
            <input type="hidden" id="DIS" value="0">  <!-- Number -->
        <?php else: ?>
            <input type="hidden" id="DIS" value="1">  <!-- Precent -->
        <?php endif; ?>
    </main>


    <!--         Recipt Voucher modal -->
    <div class="modal fade" id="Recipt" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <?php echo e(trans('admin.Receipt_Voucher')); ?>

                    </h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true"><i class="fal fa-times"></i></span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-3">
                            <label><?php echo e(trans('admin.Creditor')); ?></label>
                            <input type="number" step="any" class="form-control" id="Creditor">
                        </div>
                        <div class="col-md-3">
                            <label><?php echo e(trans('admin.Account')); ?></label>
                            <select class="select2 form-control w-100" id="AccountCodeF">
                            </select>
                        </div>
                        <div class="form-group col-lg-3">
                            <label class="form-label" for=""><?php echo e(trans('admin.Store')); ?></label>
                            <select class="select2 form-control w-100" id="STOREF">
                                <?php $__currentLoopData = $Stores; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($stor->id); ?>" <?php if($Def->Store == $stor->id): ?> selected <?php endif; ?>>

                                        <?php echo e(app()->getLocale() == 'ar' ?$stor->Name :$stor->NameEn); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group col-lg-3">
                            <label class="form-label" for=""><?php echo e(trans('admin.Safe')); ?></label>
                            <select class="select2 form-control w-100" id="SafeF">
                                <?php $__currentLoopData = $Safes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $safe): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($safe->id); ?>" <?php if($Def->Safe == $safe->id): ?> selected <?php endif; ?>>
                                        <?php echo e(app()->getLocale() == 'ar' ?$safe->Name :$safe->NameEn); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>

                        <?php if(auth()->guard('admin')->user()->emp == 0): ?>
                            <div class="form-group col-lg-4">
                                <label class="form-label" for=""><?php echo e(trans('admin.Collector')); ?></label>
                                <select class="select2 form-control w-100" id="Collector">
                                    <option value=""><?php echo e(trans('admin.Collector')); ?></option>
                                    <?php $__currentLoopData = $Employess; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $emp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($emp->id); ?>">

                                            <?php echo e(app()->getLocale() == 'ar' ?$emp->Name :$emp->NameEn); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        <?php else: ?>
                            <input type="hidden"  id="Collector" value="<?php echo e(auth()->guard('admin')->user()->emp); ?>" class="form-control" />
                        <?php endif; ?>



                        <input type="hidden" id="CoinF" value="<?php echo e($Def->Coin); ?>">
                        <input type="hidden" id="DrawF" value="<?php echo e($Def->Draw); ?>">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal"> <?php echo e(trans('admin.Close')); ?></button>
                    <button type="button" class="btn btn-secondary" id="ReciptVoucher"> <?php echo e(trans('admin.Save')); ?></button>
                </div>
            </div>
        </div>
    </div>
    <!--         Payment Voucher modal -->
    <div class="modal fade" id="PayVouch" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <?php echo e(trans('admin.Payment_Voucher')); ?>

                    </h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true"><i class="fal fa-times"></i></span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-3">
                            <label><?php echo e(trans('admin.Debitor')); ?></label>
                            <input type="number" step="any" class="form-control" id="Debitor">
                        </div>
                        <div class="col-md-3">
                            <label><?php echo e(trans('admin.Account')); ?></label>
                            <select  class="select2 form-control w-100" id="AccountCodee" >
                            </select>
                        </div>
                        <div class="form-group col-lg-3">
                            <label class="form-label" for=""><?php echo e(trans('admin.Store')); ?></label>
                            <select class="select2 form-control w-100" id="STOREP" >
                                <?php $__currentLoopData = $Stores; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($stor->id); ?>" <?php if($Def->Store == $stor->id): ?> selected <?php endif; ?>>
                                        <?php echo e(app()->getLocale() == 'ar' ?$stor->Name :$stor->NameEn); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group col-lg-3">
                            <label class="form-label" for=""><?php echo e(trans('admin.Safe')); ?></label>
                            <select class="select2 form-control w-100" id="SafeP">
                                <?php $__currentLoopData = $Safes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $safe): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($safe->id); ?>" <?php if($Def->Safe == $safe->id): ?> selected <?php endif; ?>>
                                        <?php echo e(app()->getLocale() == 'ar' ?$safe->Name :$safe->NameEn); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <input type="hidden" id="CoinP"  value="<?php echo e($Def->Coin); ?>">
                        <input type="hidden" id="DrawP"  value="<?php echo e($Def->Draw); ?>">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">   <?php echo e(trans('admin.Close')); ?></button>
                    <button type="button" class="btn btn-secondary" id="PaymentVoucher">   <?php echo e(trans('admin.Save')); ?></button>
                </div>
            </div>
        </div>
    </div>



    <?php if(app()->getLocale() == 'ar' ): ?>
        <input type="hidden" id="LANG" value="ar">
    <?php else: ?>
        <input type="hidden" id="LANG" value="en">
    <?php endif; ?>


    <input type="hidden" id="LOWCOSTPRICE" value="<?php echo e($Def->SalesLowCostPrice); ?>">
    <input type="hidden" id="LimitSalesQty" value="<?php echo e($Def->LimitSalesQty); ?>">
    <input type="hidden" id="Duplicate_Items" value="<?php echo e($Def->Duplicate_Items); ?>">
    <input type="hidden" id="RATOO" value="0">
    <input type="hidden" id="DEFAULTCOSTPRICE" value="<?php echo e($FCOST->Cost_Price); ?>">
    <input type="hidden" id="SHOWHIDEPRO" value="<?php echo e($Def->Hide_Product); ?>">

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

<?php $__env->startPush('js'); ?>
    <link rel="stylesheet" media="screen, print" href="<?php echo e(asset('Admin/css/datagrid/datatables/datatables.bundle.css')); ?>">
    <link rel="stylesheet" media="screen, print" href="<?php echo e(asset('Admin/css/formplugins/summernote/summernote.css')); ?>">
    <link rel="stylesheet" media="screen, print" href="<?php echo e(asset('Admin/css/formplugins/select2/select2.bundle.css')); ?>">

    <script src="<?php echo e(asset('Admin/js/datagrid/datatables/datatables.bundle.js')); ?>"></script>
    <script src="<?php echo e(asset('Admin/js/datagrid/datatables/datatables.export.js')); ?>"></script>
    <script src="<?php echo e(asset('Admin/js/formplugins/summernote/summernote.js')); ?>"></script>
    <script src="<?php echo e(asset('Admin/js/formplugins/select2/select2.bundle.js')); ?>"></script>
    <script src="<?php echo e(asset('Admin/js/ERP/EditQuoteImages.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('admin.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/limraerp/public_html/orient.limraerp.com/resources/views/admin/Sales/EditQuoteImages.blade.php ENDPATH**/ ?>