ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/4b473e023fd52bd43c89b7959adb857f.php |
<?php $addProductPermission = user()->permission('add_product'); ?> <!-- CREATE INVOICE START --> <div class="bg-white rounded b-shadow-4 create-inv"> <!-- HEADING START --> <div class="px-lg-4 px-md-4 px-3 py-3"> <h4 class="mb-0 f-21 font-weight-normal text-capitalize"><?php echo app('translator')->get('modules.orders.createOrder'); ?></h4> </div> <!-- HEADING END --> <hr class="m-0 border-top-grey"> <!-- FORM START --> <?php if (isset($component)) { $__componentOriginal18ad2e0d264f9740dc73fff715357c28 = $component; } ?> <?php $component = App\View\Components\Form::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Form::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'c-inv-form','id' => 'saveInvoiceForm']); ?> <input type="hidden" name="type" value="send"> <!-- CLIENT, PROJECT, GST, BILLING, SHIPPING ADDRESS START --> <div class="row px-lg-4 px-md-4 px-3 pt-3"> <!-- INVOICE NUMBER START --> <div class="col-md-4 mb-4"> <div class="form-group mb-lg-0 mb-md-0 mb-4"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'order_number','fieldLabel' => __('modules.orders.orderNumber'),'fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mb-12']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php $__env->slot('prepend', null, []); ?> <span class="input-group-text"><?php echo e(invoice_setting()->order_prefix); ?><?php echo e(invoice_setting()->order_number_separator); ?><?php echo e($zero); ?></span> <?php $__env->endSlot(); ?> <input type="text" name="order_number" id="order_number" class="form-control height-35 f-15" value="<?php echo e(is_null($lastOrder) ? 1 : $lastOrder); ?>"> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> </div> <!-- INVOICE NUMBER END --> <!-- CLIENT START --> <div class="col-md-4 mb-4"> <?php if (isset($component)) { $__componentOriginalcfa76c1cf34159bb19d1a4c8f5da7d2c = $component; } ?> <?php $component = App\View\Components\ClientSelectionDropdown::resolve(['clients' => $clients,'selected' => null] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('client-selection-dropdown'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\ClientSelectionDropdown::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcfa76c1cf34159bb19d1a4c8f5da7d2c)): ?> <?php $component = $__componentOriginalcfa76c1cf34159bb19d1a4c8f5da7d2c; ?> <?php unset($__componentOriginalcfa76c1cf34159bb19d1a4c8f5da7d2c); ?> <?php endif; ?> </div> <!-- CLIENT END --> <!-- BILLING ADDRESS START --> <div class="col-md-4 mb-4"> <div class="form-group c-inv-select mb-0"> <label class="f-14 text-dark-grey mb-12 text-capitalize w-100" for="usr"><?php echo app('translator')->get('modules.invoices.billingAddress'); ?></label> <p class="f-15" id="client_billing_address"> <span class="text-lightest"><?php echo app('translator')->get('messages.selectCustomerForBillingAddress'); ?></span> </p> </div> </div> <!-- SHIPPING ADDRESS START --> <div class="col-md-4"> <div class="form-group c-inv-select mb-lg-0 mb-md-0 mb-4"> <label class="f-14 text-dark-grey mb-12 text-capitalize w-100" for="usr"><?php echo app('translator')->get('modules.invoices.shippingAddress'); ?> </label> <p class="f-15" id="client_shipping_address"> <?php if(isset($estimate) && $estimate->client && $estimate->client->clientDetails->shipping_address): ?> <?php echo nl2br($estimate->client->clientDetails->shipping_address); ?> <?php elseif(isset($client) && $client->clientDetails && $client->clientDetails->shipping_address): ?> <?php echo nl2br($client->clientDetails->shipping_address); ?> <?php else: ?> <a href="javascript:;" class="text-capitalize" id="show-shipping-field"><i class="f-12 mr-2 fa fa-plus"></i><?php echo app('translator')->get('app.addShippingAddress'); ?></a> <?php endif; ?> </p> <p class="d-none" id="add-shipping-field"> <textarea class="form-control f-14 pt-2" rows="3" placeholder="<?php echo app('translator')->get('placeholders.address'); ?>" name="shipping_address" id="shipping_address"><?php if(isset($estimate) && $estimate->client): ?> <?php echo nl2br($estimate->client->clientDetails->shipping_address); ?> <?php endif; ?></textarea> </p> </div> </div> <!-- SHIPPING ADDRESS END --> <div class="col-md-4"> <div class="form-group c-inv-select mb-4"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'company_address_id','fieldLabel' => __('modules.invoices.generatedBy')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <div class="select-others height-35 rounded"> <select class="form-control select-picker" data-live-search="true" data-size="8" name="company_address_id" id="company_address_id"> <?php $__currentLoopData = $companyAddresses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e($item->is_default ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"> <?php echo e($item->location); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> </div> <!-- Order Status --> <div class="col-md-4"> <?php if (isset($component)) { $__componentOriginal89b295b0763c93abe0143426334eb5d6 = $component; } ?> <?php $component = App\View\Components\Forms\Label::resolve(['fieldId' => 'status','fieldLabel' => __('app.status'),'fieldRequired' => true] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.label'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Label::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mt-0']); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal89b295b0763c93abe0143426334eb5d6)): ?> <?php $component = $__componentOriginal89b295b0763c93abe0143426334eb5d6; ?> <?php unset($__componentOriginal89b295b0763c93abe0143426334eb5d6); ?> <?php endif; ?> <select class="form-control select-picker" name="status" id="status"> <option value="pending" data-content="<i class='fa fa-circle mr-2 text-yellow'></i> <?php echo app('translator')->get('app.pending'); ?> "><?php echo app('translator')->get('app.pending'); ?></option> <option value="on-hold" data-content="<i class='fa fa-circle mr-2 text-info'></i> <?php echo app('translator')->get('app.on-hold'); ?> "><?php echo app('translator')->get('app.on-hold'); ?></option> <option value="failed" data-content="<i class='fa fa-circle mr-2 text-muted'></i> <?php echo app('translator')->get('app.failed'); ?> "><?php echo app('translator')->get('app.failed'); ?></option> <option value="processing" data-content="<i class='fa fa-circle mr-2 text-blue'></i> <?php echo app('translator')->get('app.processing'); ?> "><?php echo app('translator')->get('app.processing'); ?></option> <option value="completed" data-content="<i class='fa fa-circle mr-2 text-dark-green'></i> <?php echo app('translator')->get('app.completed'); ?> "><?php echo app('translator')->get('app.completed'); ?></option> <option value="canceled" data-content="<i class='fa fa-circle mr-2 text-red'></i> <?php echo app('translator')->get('app.canceled'); ?> "><?php echo app('translator')->get('app.canceled'); ?></option> </select> </div> <input type="hidden" id="calculate_tax" value="after_discount"> </div> <hr class="m-0 mt-2 border-top-grey"> <div class="row px-lg-4 px-md-4 px-3 py-3"> <div class="col-md-3 d-none product-category-filter"> <div class="form-group c-inv-select mb-4"> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" name="category_id" id="product_category_id" data-live-search="true"> <option value=""><?php echo e(__('app.select') . ' ' . __('app.product') . ' ' . __('app.category')); ?></option> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($category->id); ?>"> <?php echo e($category->category_name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> </div> <div class="col-md-3"> <div class="form-group c-inv-select mb-4"> <?php if (isset($component)) { $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7 = $component; } ?> <?php $component = App\View\Components\Forms\InputGroup::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.input-group'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\InputGroup::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <select class="form-control select-picker" data-live-search="true" data-size="8" id="add-products" title="<?php echo e(__('app.menu.selectProduct')); ?>"> <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option data-content="<?php echo e($item->name); ?>" value="<?php echo e($item->id); ?>"> <?php echo e($item->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php $__env->slot('preappend', null, []); ?> <a href="javascript:;" class="btn btn-outline-secondary border-grey toggle-product-category" data-toggle="tooltip" data-original-title="<?php echo e(__('modules.productCategory.filterByCategory')); ?>"><i class="fa fa-filter"></i></a> <?php $__env->endSlot(); ?> <?php if($addProductPermission == 'all' || $addProductPermission == 'added'): ?> <?php $__env->slot('append', null, []); ?> <a href="<?php echo e(route('products.create')); ?>" data-redirect-url="no" class="btn btn-outline-secondary border-grey openRightModal" data-toggle="tooltip" data-original-title="<?php echo e(__('app.add').' '.__('modules.dashboard.newproduct')); ?>"><?php echo app('translator')->get('app.add'); ?></a> <?php $__env->endSlot(); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7)): ?> <?php $component = $__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7; ?> <?php unset($__componentOriginalcbf9105fd4879d5d6ef9e1f6fe271af7); ?> <?php endif; ?> </div> </div> </div> <?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.alert','data' => ['class' => 'my-4 mx-4','id' => 'alertMessage','type' => 'danger']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('alert'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'my-4 mx-4','id' => 'alertMessage','type' => 'danger']); ?><?php echo app('translator')->get('messages.addItem'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?> <?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?> <?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?> <?php endif; ?> <div id="sortable"> </div> <hr class="m-0 border-top-grey"> <!-- TOTAL, DISCOUNT START --> <div class="d-flex px-lg-4 px-md-4 px-3 pb-3 c-inv-total"> <table width="100%" class="text-right f-14 text-capitalize"> <tbody> <tr> <td width="50%" class="border-0 d-lg-table d-md-table d-none"></td> <td width="50%" class="p-0 border-0 c-inv-total-right"> <table width="100%"> <tbody> <tr> <td colspan="2" class="border-top-0 text-dark-grey"> <?php echo app('translator')->get('modules.invoices.subTotal'); ?></td> <td width="30%" class="border-top-0 sub-total">0.00</td> <input type="hidden" class="sub-total-field" name="sub_total" value="0"> </tr> <tr> <td width="20%" class="text-dark-grey"><?php echo app('translator')->get('modules.invoices.discount'); ?> </td> <td width="40%" style="padding: 5px;"> <table width="100%"> <tbody> <tr> <td width="70%" class="c-inv-sub-padding"> <input type="number" min="0" name="discount_value" class="form-control f-14 border-0 w-100 text-right discount_value" placeholder="0" value="<?php echo e(isset($estimate) ? $estimate->discount : '0'); ?>"> </td> <td width="30%" align="left" class="c-inv-sub-padding"> <div class="select-others select-tax height-35 rounded border-0"> <select class="form-control select-picker" id="discount_type" name="discount_type"> <option <?php if(isset($estimate) && $estimate->discount_type == 'percent'): ?> selected <?php endif; ?> value="percent">% </option> <option <?php if(isset($estimate) && $estimate->discount_type == 'fixed'): ?> selected <?php endif; ?> value="fixed"> <?php echo app('translator')->get('modules.invoices.amount'); ?></option> </select> </div> </td> </tr> </tbody> </table> </td> <td><span id="discount_amount"><?php echo e(isset($estimate) ? number_format((float) $estimate->discount, 2, '.', '') : '0.00'); ?></span> </td> </tr> <tr> <td><?php echo app('translator')->get('modules.invoices.tax'); ?></td> <td colspan="2" class="p-0 border-0"> <table width="100%" id="invoice-taxes"> <tr> <td colspan="2"><span class="tax-percent">0.00</span></td> </tr> </table> </td> </tr> <tr class="bg-amt-grey f-16 f-w-500"> <td colspan="2"><?php echo app('translator')->get('modules.invoices.total'); ?></td> <td><span class="total">0.00</span></td> <input type="hidden" class="total-field" name="total" value="0"> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <!-- TOTAL, DISCOUNT END --> <!-- NOTE AND TERMS AND CONDITIONS START --> <div class="d-flex flex-wrap px-lg-4 px-md-4 px-3 py-3"> <div class="col-md-6 col-sm-12 c-inv-note-terms p-0 mb-lg-0 mb-md-0 mb-3"> <label class="f-14 text-dark-grey mb-12 text-capitalize w-100" for="usr"><?php echo app('translator')->get('app.clientNote'); ?></label> <textarea class="form-control" name="note" id="note" rows="4"></textarea> </div> </div> <!-- NOTE AND TERMS AND CONDITIONS END --> <!-- CANCEL SAVE SEND START --> <?php if (isset($component)) { $__componentOriginalb19caa501eea72410c04d1917a586963 = $component; } ?> <?php $component = App\View\Components\FormActions::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form-actions'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormActions::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'c-inv-btns d-block d-lg-flex d-md-flex']); ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?php $component = App\View\Components\Forms\ButtonPrimary::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-primary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonPrimary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'createOrder']); ?><?php echo app('translator')->get('app.submit'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalc35c79ed7e812580313ad04118477974 = $component; } ?> <?php $component = App\View\Components\Forms\ButtonCancel::resolve(['link' => route('orders.index')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-cancel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonCancel::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'ml-2 border-0 ']); ?><?php echo app('translator')->get('app.cancel'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc35c79ed7e812580313ad04118477974)): ?> <?php $component = $__componentOriginalc35c79ed7e812580313ad04118477974; ?> <?php unset($__componentOriginalc35c79ed7e812580313ad04118477974); ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalb19caa501eea72410c04d1917a586963)): ?> <?php $component = $__componentOriginalb19caa501eea72410c04d1917a586963; ?> <?php unset($__componentOriginalb19caa501eea72410c04d1917a586963); ?> <?php endif; ?> <!-- CANCEL SAVE SEND END --> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal18ad2e0d264f9740dc73fff715357c28)): ?> <?php $component = $__componentOriginal18ad2e0d264f9740dc73fff715357c28; ?> <?php unset($__componentOriginal18ad2e0d264f9740dc73fff715357c28); ?> <?php endif; ?> <!-- FORM END --> </div> <!-- CREATE INVOICE END --> <script> $(document).ready(function() { $('.toggle-product-category').click(function() { $('.product-category-filter').toggleClass('d-none'); }); $('#product_category_id').on('change', function(){ var categoryId = $(this).val(); var url = "<?php echo e(route('invoices.product_category', ':id')); ?>", url = (categoryId) ? url.replace(':id', categoryId) : url.replace(':id', null);; $.easyAjax({ url : url, type : "GET", container: '#saveInvoiceForm', blockUI: true, success: function (response) { if (response.status == 'success') { var options = []; var rData = []; rData = response.data; $.each(rData, function(index, value) { var selectData = ''; selectData = '<option value="' + value.id + '">' + value.name + '</option>'; options.push(selectData); }); $('#add-products').html( '<option value="" class="form-control" ><?php echo e(__('app.select') . ' ' . __('app.product')); ?></option>' + options); $('#add-products').selectpicker('refresh'); } } }); }); const hsn_status = <?php echo e($invoiceSetting->hsn_sac_code_show); ?>; $('#client_list_id').change(function() { var id = $(this).val(); changeClient(id); }); function changeClient(id) { if (id == '') { id = 0; } console.log(id); var token = "<?php echo e(csrf_token()); ?>"; var url = "<?php echo e(route('clients.ajax_details', ':id')); ?>"; url = url.replace(':id', id); $.easyAjax({ url: url, container: '#saveInvoiceForm', type: "POST", blockUI: true, data: { _token: token }, success: function(response) { if (response.status == 'success') { if (response.data !== null) { $('#client_billing_address').html(nl2br(response.data.client_details .address)); $('#add-shipping-field').addClass('d-none'); $('#client_shipping_address').removeClass('d-none'); if (response.data.client_details.shipping_address === null) { var addShippingLink = '<a href="javascript:;" class="text-capitalize" id="show-shipping-field"><i class="f-12 mr-2 fa fa-plus"></i><?php echo app('translator')->get("app.addShippingAddress"); ?></a>'; $('#client_shipping_address').html(addShippingLink); } else { $('#client_shipping_address').html(nl2br(response.data .client_details .shipping_address)); } } else { $('#client_billing_address').html( '<span class="text-lightest"><?php echo app('translator')->get("messages.selectCustomerForBillingAddress"); ?></span>' ); } } else { var addShippingLink = '<a href="javascript:;" class="text-capitalize" id="show-shipping-field"><i class="f-12 mr-2 fa fa-plus"></i><?php echo app('translator')->get("app.addShippingAddress"); ?></a>'; $('#client_shipping_address').html(addShippingLink); } } }); } $('body').on('click', '#show-shipping-field', function() { $('#add-shipping-field, #client_shipping_address').toggleClass('d-none'); }); const resetAddProductButton = () => { $("#add-products").val('').selectpicker("refresh"); }; $('#add-products').on('changed.bs.select', function(e, clickedIndex, isSelected, previousValue) { e.stopImmediatePropagation() var id = $(this).val(); if (previousValue != id && id != '') { addProduct(id); resetAddProductButton(); } }); function ucWord(str){ str = str.toLowerCase().replace(/\b[a-z]/g, function(letter) { return letter.toUpperCase(); }); return str; } function addProduct(id) { $.easyAjax({ url: "<?php echo e(route('orders.add_item')); ?>", type: "GET", data: { id: id }, blockUI: true, success: function(response) { if($('input[name="item_name[]"]').val() == ''){ $("#sortable .item-row").remove(); } $(response.view).hide().appendTo("#sortable").fadeIn(500); $('.selectpicker').selectpicker('refresh'); calculateTotal(); $('.dropify').dropify(); $('#alertMessage').hide().fadeOut(500); var noOfRows = $(document).find('#sortable .item-row').length; var i = $(document).find('.item_name').length - 1; var itemRow = $(document).find('#sortable .item-row:nth-child(' + noOfRows + ') select.type'); itemRow.attr('id', 'multiselect' + i); itemRow.attr('name', 'taxes[' + i + '][]'); $(document).find('#multiselect' + i).selectpicker(); $(document).find('#dropify' + i).dropify({ messages: dropifyMessages }); } }); } $('#saveInvoiceForm').on('click', '.remove-item', function() { $(this).closest('.item-row').fadeOut(300, function() { $(this).remove(); $('select.customSequence').each(function(index) { $(this).attr('name', 'taxes[' + index + '][]'); $(this).attr('id', 'multiselect' + index + ''); }); if($(document).find('#sortable .item-row').length == 0){ $('#alertMessage').show().fadeIn(500); } calculateTotal(); }); }); $('#createOrder').click(function() { if (KTUtil.isMobileDevice()) { $('.desktop-description').remove(); } else { $('.mobile-description').remove(); } calculateTotal(); var discount = $('#discount_amount').html(); var total = $('.sub-total-field').val(); if (parseFloat(discount) > parseFloat(total)) { Swal.fire({ icon: 'error', text: "<?php echo e(__('messages.discountExceed')); ?>", customClass: { confirmButton: 'btn btn-primary', }, showClass: { popup: 'swal2-noanimation', backdrop: 'swal2-noanimation' }, buttonsStyling: false }); return false; } $.easyAjax({ url: "<?php echo e(route('orders.store')); ?>", container: '#saveInvoiceForm', type: "POST", blockUI: true, redirect: true, file: true, data: $('#saveInvoiceForm').serialize() }) }); $('#saveInvoiceForm').on('click', '.remove-item', function() { $(this).closest('.item-row').fadeOut(300, function() { $(this).remove(); $('select.customSequence').each(function(index) { $(this).attr('name', 'taxes[' + index + '][]'); $(this).attr('id', 'multiselect' + index + ''); }); calculateTotal(); }); }); $('#saveInvoiceForm').on('keyup', '.quantity,.cost_per_item,.item_name, .discount_value', function() { var quantity = $(this).closest('.item-row').find('.quantity').val(); var perItemCost = $(this).closest('.item-row').find('.cost_per_item').val(); var amount = (quantity * perItemCost); $(this).closest('.item-row').find('.amount').val(decimalupto2(amount)); $(this).closest('.item-row').find('.amount-html').html(decimalupto2(amount)); calculateTotal(); }); $('#saveInvoiceForm').on('change', '.type, #discount_type, #calculate_tax', function() { var quantity = $(this).closest('.item-row').find('.quantity').val(); var perItemCost = $(this).closest('.item-row').find('.cost_per_item').val(); var amount = (quantity * perItemCost); $(this).closest('.item-row').find('.amount').val(decimalupto2(amount)); $(this).closest('.item-row').find('.amount-html').html(decimalupto2(amount)); calculateTotal(); }); $('#saveInvoiceForm').on('input', '.quantity', function() { var quantity = $(this).closest('.item-row').find('.quantity').val(); var perItemCost = $(this).closest('.item-row').find('.cost_per_item').val(); var amount = (quantity * perItemCost); $(this).closest('.item-row').find('.amount').val(decimalupto2(amount)); $(this).closest('.item-row').find('.amount-html').html(decimalupto2(amount)); calculateTotal(); }); calculateTotal(); init(RIGHT_MODAL); }); </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/orders/ajax/admin_create.blade.php ENDPATH**/ ?>