⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
erp.dev-unit.com
/
storage
/
framework
/
views
/
View File Name :
e229afd48fa03a2bedbddb194e46f8f6.php
<?php $__env->startSection('page-title'); ?> <?php echo e(__('Create Proposal')); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('page-breadcrumb'); ?> <?php echo e(__('Proposal')); ?> <?php $__env->stopSection(); ?> <?php $type = request()->query('type'); $projectsid = request()->query('project_id'); ?> <?php $__env->startPush('scripts'); ?> <script src="<?php echo e(asset('js/jquery-ui.min.js')); ?>"></script> <script src="<?php echo e(asset('js/jquery.repeater.min.js')); ?>"></script> <script> $(document).ready(function() { $("[name='proposal_type_radio']").trigger('change'); var customerId = '<?php echo e($customerId); ?>'; if (customerId > 0) { $('#customer').val(customerId).change(); } }); $(document).on('change', '#customer', function() { $('#customer_detail').removeClass('d-none'); $('#customer_detail').addClass('d-block'); $('#customer-box').addClass('d-none'); var id = $(this).val(); var url = $(this).data('url'); $.ajax({ url: url, type: 'POST', headers: { 'X-CSRF-TOKEN': jQuery('#token').val() }, data: { 'id': id }, cache: false, success: function(data) { if (data != '') { $('#customer_detail').html(data); } else { $('#customer-box').removeClass('d-none'); $('#customer_detail').removeClass('d-block'); $('#customer_detail').addClass('d-none'); } }, }); }); $(document).on('click', '#remove', function() { $('#customer-box').removeClass('d-none'); $('#customer_detail').removeClass('d-block'); $('#customer_detail').addClass('d-none'); }) </script> <Script> $(document).on('keyup', '.quantity', function() { var quntityTotalTaxPrice = 0; var el = $(this).parent().parent().parent().parent(); var quantity = $(this).val(); var price = $(el.find('.price')).val(); var discount = $(el.find('.discount')).val(); if (discount.length <= 0) { discount = 0; } var totalItemPrice = (quantity * price) - discount; var amount = (totalItemPrice); var totalItemTaxRate = $(el.find('.itemTaxRate')).val(); var itemTaxPrice = parseFloat((totalItemTaxRate / 100) * (totalItemPrice)); $(el.find('.itemTaxPrice')).val(itemTaxPrice.toFixed(2)); $(el.find('.amount')).html(parseFloat(itemTaxPrice) + parseFloat(amount)); var totalItemTaxPrice = 0; var itemTaxPriceInput = $('.itemTaxPrice'); for (var j = 0; j < itemTaxPriceInput.length; j++) { totalItemTaxPrice += parseFloat(itemTaxPriceInput[j].value); } var totalItemPrice = 0; var inputs_quantity = $(".quantity"); var priceInput = $('.price'); for (var j = 0; j < priceInput.length; j++) { totalItemPrice += (parseFloat(priceInput[j].value) * parseFloat(inputs_quantity[j].value)); } var inputs = $(".amount"); var subTotal = 0; for (var i = 0; i < inputs.length; i++) { subTotal = parseFloat(subTotal) + parseFloat($(inputs[i]).html()); } $('.subTotal').html(totalItemPrice.toFixed(2)); $('.totalTax').html(totalItemTaxPrice.toFixed(2)); $('.totalAmount').html((parseFloat(subTotal)).toFixed(2)); }) $(document).on('keyup change', '.price', function() { var el = $(this).parent().parent().parent().parent(); var price = $(this).val(); var quantity = $(el.find('.quantity')).val(); if (quantity.length <= 0) { quantity = 1; } var discount = $(el.find('.discount')).val(); if (discount.length <= 0) { discount = 0; } var totalItemPrice = (quantity * price) - discount; var amount = (totalItemPrice); var totalItemTaxRate = $(el.find('.itemTaxRate')).val(); var itemTaxPrice = parseFloat((totalItemTaxRate / 100) * (totalItemPrice)); $(el.find('.itemTaxPrice')).val(itemTaxPrice.toFixed(2)); $(el.find('.amount')).html(parseFloat(itemTaxPrice) + parseFloat(amount)); var totalItemTaxPrice = 0; var itemTaxPriceInput = $('.itemTaxPrice'); for (var j = 0; j < itemTaxPriceInput.length; j++) { totalItemTaxPrice += parseFloat(itemTaxPriceInput[j].value); } var totalItemPrice = 0; var inputs_quantity = $(".quantity"); var priceInput = $('.price'); for (var j = 0; j < priceInput.length; j++) { if (inputs_quantity[j].value <= 0) { inputs_quantity[j].value = 1; } totalItemPrice += (parseFloat(priceInput[j].value) * parseFloat(inputs_quantity[j].value)); } var inputs = $(".amount"); var subTotal = 0; for (var i = 0; i < inputs.length; i++) { subTotal = parseFloat(subTotal) + parseFloat($(inputs[i]).html()); } $('.subTotal').html(totalItemPrice.toFixed(2)); $('.totalTax').html(totalItemTaxPrice.toFixed(2)); $('.totalAmount').html((parseFloat(subTotal)).toFixed(2)); }) $(document).on('keyup change', '.discount', function() { var el = $(this).parent().parent().parent(); var discount = $(this).val(); if (discount.length <= 0) { discount = 0; } var price = $(el.find('.price')).val(); var quantity = $(el.find('.quantity')).val(); var totalItemPrice = (quantity * price) - discount; var amount = (totalItemPrice); var totalItemTaxRate = $(el.find('.itemTaxRate')).val(); var itemTaxPrice = parseFloat((totalItemTaxRate / 100) * (totalItemPrice)); $(el.find('.itemTaxPrice')).val(itemTaxPrice.toFixed(2)); $(el.find('.amount')).html(parseFloat(itemTaxPrice) + parseFloat(amount)); var totalItemTaxPrice = 0; var itemTaxPriceInput = $('.itemTaxPrice'); for (var j = 0; j < itemTaxPriceInput.length; j++) { totalItemTaxPrice += parseFloat(itemTaxPriceInput[j].value); } var totalItemPrice = 0; var inputs_quantity = $(".quantity"); var priceInput = $('.price'); for (var j = 0; j < priceInput.length; j++) { totalItemPrice += (parseFloat(priceInput[j].value) * parseFloat(inputs_quantity[j].value)); } var inputs = $(".amount"); var subTotal = 0; for (var i = 0; i < inputs.length; i++) { subTotal = parseFloat(subTotal) + parseFloat($(inputs[i]).html()); } var totalItemDiscountPrice = 0; var itemDiscountPriceInput = $('.discount'); for (var k = 0; k < itemDiscountPriceInput.length; k++) { if (itemDiscountPriceInput[k].value == '') { itemDiscountPriceInput[k].value = parseFloat(0); } totalItemDiscountPrice += parseFloat(itemDiscountPriceInput[k].value); } $('.subTotal').html(totalItemPrice.toFixed(2)); $('.totalTax').html(totalItemTaxPrice.toFixed(2)); $('.totalAmount').html((parseFloat(subTotal)).toFixed(2)); $('.totalDiscount').html(totalItemDiscountPrice.toFixed(2)); }) </Script> <?php if(module_is_active('Account') || module_is_active('CMMS')): ?> <script> $(document).on('change', '.item', function() { var in_type = $('#proposal_type').val(); if (in_type == 'product') { items($(this), 'Account'); } else if (in_type == 'parts') { items($(this), 'CMMS'); } }); function items(data, moduleName) { var iteams_id = data.val(); var url = data.data('url'); var el = data; $.ajax({ url: url, type: 'POST', headers: { 'X-CSRF-TOKEN': jQuery('#token').val() }, data: { 'product_id': iteams_id }, cache: false, success: function(data) { var item = JSON.parse(data); $(el.parent().parent().find('.quantity')).val(1); if (item.product != null) { $(el.parent().parent().find('.price')).val(item.product.sale_price); $(el.parent().parent().parent().find('.pro_description')).val(item.product .description); } else { $(el.parent().parent().find('.price')).val(0); $(el.parent().parent().parent().find('.pro_description')).val(''); } var taxes = ''; var tax = []; var totalItemTaxRate = 0; if (item.taxes == 0) { taxes += '-'; } else { for (var i = 0; i < item.taxes.length; i++) { taxes += '<span class="badge bg-primary p-2 px-3 me-1 mr-1 product_tax">' + item.taxes[i].name + ' ' + '(' + item.taxes[i].rate + '%)' + '</span>'; tax.push(item.taxes[i].id); totalItemTaxRate += parseFloat(item.taxes[i].rate); } } var itemTaxPrice = 0; if (item.product != null) { var itemTaxPrice = parseFloat((totalItemTaxRate / 100) * (item.product .sale_price * 1)); } $(el.parent().parent().find('.itemTaxPrice')).val(itemTaxPrice.toFixed(2)); $(el.parent().parent().find('.itemTaxRate')).val(totalItemTaxRate.toFixed(2)); $(el.parent().parent().find('.taxes')).html(taxes); $(el.parent().parent().find('.tax')).val(tax); $(el.parent().parent().find('.unit')).html(item.unit); $(el.parent().parent().find('.discount')).val(0); $(el.parent().parent().find('.amount')).html(item.totalAmount); var inputs = $(".amount"); var subTotal = 0; for (var i = 0; i < inputs.length; i++) { subTotal = parseFloat(subTotal) + parseFloat($(inputs[i]).html()); } var totalItemPrice = 0; var priceInput = $('.price'); for (var j = 0; j < priceInput.length; j++) { totalItemPrice += parseFloat(priceInput[j].value); } var totalItemTaxPrice = 0; var itemTaxPriceInput = $('.itemTaxPrice'); for (var j = 0; j < itemTaxPriceInput.length; j++) { totalItemTaxPrice += parseFloat(itemTaxPriceInput[j].value); if (item.product != null) { $(el.parent().parent().find('.amount')).html(parseFloat(item.totalAmount) + parseFloat(itemTaxPriceInput[j].value)); } } var totalItemDiscountPrice = 0; var itemDiscountPriceInput = $('.discount'); for (var k = 0; k < itemDiscountPriceInput.length; k++) { totalItemDiscountPrice += parseFloat(itemDiscountPriceInput[k].value); } $('.subTotal').html(totalItemPrice.toFixed(2)); $('.totalTax').html(totalItemTaxPrice.toFixed(2)); $('.totalAmount').html((parseFloat(totalItemPrice) - parseFloat( totalItemDiscountPrice) + parseFloat(totalItemTaxPrice)).toFixed(2)); }, }); } </script> <?php endif; ?> <?php if(module_is_active('Taskly')): ?> <script> $(document).on('change', '.item', function() { var iteams_id = $(this).val(); var el = $(this); $(el.parent().parent().find('.price')).val(0); $(el.parent().parent().find('.amount')).html(0); $(el.parent().parent().find('.taxes')).val(0); var proposal_type = $("#proposal_type").val(); if (proposal_type == 'project') { $("#tax_project").change(); } }); $(document).on('change', '#tax_project', function() { var tax_id = $(this).val(); if (tax_id.length != 0) { $.ajax({ type: 'post', url: "<?php echo e(route('get.taxes')); ?>", data: { _token: "<?php echo e(csrf_token()); ?>", tax_id: tax_id, }, beforeSend: function() { $("#loader").removeClass('d-none'); }, success: function(response) { var response = jQuery.parseJSON(response); if (response != null) { $("#loader").addClass('d-none'); var TaxRate = 0; if (response.length > 0) { $.each(response, function(i) { TaxRate = parseInt(response[i]['rate']) + TaxRate; }); } $(".itemTaxRate").val(TaxRate); $(".price").change(); } else { $(".itemTaxRate").val(0); $(".price").change(); $('.section_div').html(''); toastrs('Error', 'Something went wrong please try again !', 'error'); } }, }); } else { $(".itemTaxRate").val(0); $('.taxes').html(""); $(".price").change(); $("#loader").addClass('d-none'); } }); </script> <?php endif; ?> <?php if(module_is_active('Account')): ?> <script> $(document).ready(function() { SectionGet('product'); }); </script> <?php elseif(module_is_active('Taskly')): ?> <script> $(document).ready(function() { SectionGet('project'); }); </script> <?php elseif(module_is_active('CMMS')): ?> <script> $(document).ready(function() { SectionGet('parts'); }); </script> <?php endif; ?> <script> var projectsid = '<?php echo e($projectsid); ?>'; $(document).on('change', "[name='proposal_type_radio']", function() { var val = $(this).val(); $(".proposal_div").empty(); if (val == 'product') { $(".discount_apply_div").removeClass('d-none'); $(".tax_project_div").addClass('d-none'); $(".discount_project_div").addClass('d-none'); var label = `<?php echo e(Form::label('category_id', __('Category'), ['class' => 'form-label'])); ?><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php echo e(Form::select('category_id', $category, null, ['class' => 'form-control ', 'required' => 'required'])); ?>`; $(".proposal_div").append(label); $("#proposal_type").val('product'); SectionGet(val); } else if (val == 'project') { $(".discount_apply_div").addClass('d-none'); $(".tax_project_div").removeClass('d-none'); $(".discount_project_div").removeClass('d-none'); var label = ` <?php echo e(Form::label('project', __('Project'), ['class' => 'form-label'])); ?><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php echo e(Form::select('project', $projects, $projectsid, ['class' => 'form-control ', 'required' => 'required'])); ?>` $(".proposal_div").append(label); $("#proposal_type").val('project'); var project_id = $("#project").val(); if (projectsid != '') { $("#project").val(<?php echo e($projectsid); ?>).trigger('change'); } SectionGet(val, project_id); } else if (val == 'parts') { $(".discount_apply_div").addClass('d-none'); $(".tax_project_div").addClass('d-none'); $(".discount_project_div").addClass('d-none'); var label = ` <?php echo e(Form::label('work_order', __('Work Orders'), ['class' => 'form-label'])); ?><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php echo e(Form::select('work_order', $work_order, null, ['class' => 'form-control', 'required' => 'required'])); ?>` $(".proposal_div").append(label); $("#proposal_type").val('parts'); SectionGet(val); } choices(); }); function SectionGet(type = 'product', project_id = "0", title = 'Project') { $.ajax({ type: 'post', url: "<?php echo e(route('proposal.section.type')); ?>", data: { _token: "<?php echo e(csrf_token()); ?>", type: type, project_id: project_id, acction: 'create', }, beforeSend: function() { $("#loader").removeClass('d-none'); }, success: function(response) { if (response != false) { $('.section_div').html(response.html); $("#loader").addClass('d-none'); $('.pro_name').text(title) // for item SearchBox ( this function is custom Js ) JsSearchBox(); } else { $('.section_div').html(''); toastrs('Error', 'Something went wrong please try again !', 'error'); } }, }); } function SectionGet(type = 'parts', project_id = "0", title = 'Project') { $.ajax({ type: 'post', url: "<?php echo e(route('proposal.section.type')); ?>", data: { _token: "<?php echo e(csrf_token()); ?>", type: type, project_id: project_id, acction: 'create', }, beforeSend: function() { $("#loader").removeClass('d-none'); }, success: function(response) { if (response != false) { $('.section_div').html(response.html); $("#loader").addClass('d-none'); $('.pro_name').text(title) // for item SearchBox ( this function is custom Js ) JsSearchBox(); } else { $('.section_div').html(''); toastrs('Error', 'Something went wrong please try again !', 'error'); } }, }); } $(document).on('change', "#project", function() { var title = $(this).find('option:selected').text(); var project_id = $(this).val(); SectionGet('project', project_id, title); }); </script> <script> $(document).on('click', '[data-repeater-delete]', function() { $(".price").change(); $(".discount").change(); }); </script> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <?php echo e(Form::open(['url' => 'proposal', 'class' => 'w-100', 'enctype' => 'multipart/form-data', 'class' => 'needs-validation', 'novalidate'])); ?> <input type="hidden" name="_token" id="token" value="<?php echo e(csrf_token()); ?>"> <input type="hidden" name="redirect_route" value="<?php echo e(isset($_GET['redirect_route']) ? $_GET['redirect_route'] : null); ?>"> <?php if(module_is_active('Account')): ?> <input type="hidden" name="proposal_type" id="proposal_type" value="product"> <?php elseif(module_is_active('Taskly')): ?> <input type="hidden" name="proposal_type" id="proposal_type" value="project"> <?php elseif(module_is_active('CMMS')): ?> <input type="hidden" name="proposal_type" id="proposal_type" value="parts"> <?php endif; ?> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="row" id="customer-box"> <div class="form-group col-md-6" id="account-box"> <label class="require form-label"><?php echo e(__('Account Type')); ?></label><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <select class="form-control account_type <?php echo e(!empty($errors->first('account_type')) ? 'is-invalid' : ''); ?>" name="account_type" required="" id="account_type"> <option value=""><?php echo e(__('Select Account Type')); ?></option> <?php if(module_is_active('Account')): ?> <option value="Accounting" <?php if(!empty($customerId) && $customerId != 0): ?> selected <?php endif; ?>> <?php echo e(__('Accounting')); ?></option> <?php endif; ?> <?php if(module_is_active('Taskly')): ?> <option value="Projects" <?php if($type == 'project'): ?> selected <?php endif; ?>> <?php echo e(__('Projects')); ?></option> <?php endif; ?> <?php if(module_is_active('CMMS')): ?> <option value="Parts"><?php echo e(__('CMMS')); ?></option> <?php endif; ?> </select> </div> <div class="form-group col-md-6"> <?php echo e(Form::label('customer_id', __('Customer/Client'), ['class' => 'form-label'])); ?></label><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php echo e(Form::select('customer_id', $customers, $customerId, ['class' => 'form-control', 'id' => 'customer', 'data-url' => route('proposal.customer'), 'required' => 'required', 'placeholder' => 'Please Select'])); ?> <?php if(empty($customers->count())): ?> <div class=" text-xs"> <?php echo e(__('Please create Customer/Client first.')); ?><a <?php if(module_is_active('Account')): ?> href="<?php echo e(route('customer.index')); ?>" <?php else: ?> href="<?php echo e(route('users.index')); ?>" <?php endif; ?>><b><?php echo e(__('Create Customer/Client')); ?></b></a> </div> <?php endif; ?> </div> </div> <div id="customer_detail" class="d-none"> </div> </div> <div class="col-md-6"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="require form-label"><?php echo e(__('Billing Type')); ?></label><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <select class="form-control <?php echo e(!empty($errors->first('Billing Type')) ? 'is-invalid' : ''); ?>" name="proposal_type_radio" required="" id="billing_type"> </select> <div class="invalid-feedback"> <?php echo e($errors->first('billing_type')); ?> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="proposal_template" class="form-label"><?php echo e(__('Template')); ?></label> <select class="form-control" name="proposal_template" id="proposal_template"> <option value=""><?php echo e(__('Select Template')); ?></option> <?php $__currentLoopData = templateData()['templates']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $template): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($key); ?>"> <?php echo e($template); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <?php echo e(Form::label('issue_date', __('Issue Date'), ['class' => 'form-label'])); ?></label><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <div class="form-icon-user"> <?php echo e(Form::date('issue_date', date('Y-m-d'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => 'Select Date'])); ?> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <?php echo e(Form::label('proposal_number', __('Proposal Number'), ['class' => 'form-label'])); ?> <div class="form-icon-user"> <input type="text" class="form-control" value="<?php echo e($proposal_number); ?>" readonly> </div> </div> </div> <div class="col-md-6"> <div class="form-group proposal_div"> <?php if(module_is_active('Account')): ?> <?php echo e(Form::label('category_id', __('Category'), ['class' => 'form-label'])); ?></label><?php if (isset($component)) { $__componentOriginaleab1765d328ab3f8835fc5d78676a070 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaleab1765d328ab3f8835fc5d78676a070 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.required','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('required'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $attributes = $__attributesOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__attributesOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php if (isset($__componentOriginaleab1765d328ab3f8835fc5d78676a070)): ?> <?php $component = $__componentOriginaleab1765d328ab3f8835fc5d78676a070; ?> <?php unset($__componentOriginaleab1765d328ab3f8835fc5d78676a070); ?> <?php endif; ?> <?php echo e(Form::select('category_id', $category, null, ['class' => 'form-control ', 'required' => 'required'])); ?> <?php if(empty($category->count())): ?> <div class=" text-xs"> <?php echo e(__('Please add constant category. ')); ?><a href="<?php echo e(route('category.index')); ?>"><b><?php echo e(__('Add Category')); ?></b></a> </div> <?php endif; ?> <?php elseif(module_is_active('Taskly')): ?> <?php echo e(Form::label('project', __('Project'), ['class' => 'form-label'])); ?></label> <?php echo e(Form::select('project', $projects, null, ['class' => 'form-control ', 'required' => 'required'])); ?> <?php elseif(module_is_active('CMMS')): ?> <?php echo e(Form::label('work_order', __('Work Orders'), ['class' => 'form-label'])); ?> <?php echo e(Form::select('work_order', $work_order, null, ['class' => 'form-control ', 'required' => 'required'])); ?> <?php endif; ?> </div> </div> <?php if(module_is_active('Taskly')): ?> <div class="col-md-6 tax_project_div <?php echo e(module_is_active('Account') ? 'd-none' : ''); ?>"> <div class="form-group"> <?php echo e(Form::label('tax_project', __('Tax'), ['class' => 'form-label'])); ?> <?php echo e(Form::select('tax_project[]', $taxs, null, ['class' => 'form-control get_tax multi-select choices', 'data-toggle' => 'select2', 'multiple' => 'multiple', 'id' => 'tax_project', 'data-placeholder' => 'Select Tax'])); ?> </div> </div> <?php endif; ?> <?php if(module_is_active('CustomField') && !$customFields->isEmpty()): ?> <div class="col-md-12"> <div class="tab-pane fade show" id="tab-2" role="tabpanel"> <?php echo $__env->make('custom-field::formBuilder', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> </div> </div> <?php endif; ?> </div> </div> </div> </div> </div> </div> <div id="loader" class="card card-flush"> <div class="card-body"> <div class="row"> <img class="loader" src="<?php echo e(asset('public/images/loader.gif')); ?>" alt=""> </div> </div> </div> <div class="col-12 section_div"> </div> <div class="modal-footer"> <input type="button" value="<?php echo e(__('Cancel')); ?>" onclick="location.href = '<?php echo e(route('proposal.index')); ?>';" class="btn btn-light"> <input type="submit" value="<?php echo e(__('Create')); ?>" class="btn btn-primary mx-2"> </div> <?php echo e(Form::close()); ?> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('scripts'); ?> <script src="<?php echo e(asset('js/jquery-searchbox.js')); ?>"></script> <script> $(document).ready(function() { var optionsMap = { 'Accounting': 'Item Wise', 'Projects': 'Project Wise', 'Parts': 'Parts Wise', }; function mapSelectionToValue(selection) { switch (selection) { case 'Accounting': return 'product'; case 'Projects': return 'project'; case 'Parts': return 'parts'; default: return null; } } $('#account_type').on('change', function() { var selectedOption = $(this).val(); $('#billing_type').empty(); if (optionsMap.hasOwnProperty(selectedOption)) { var value = mapSelectionToValue(selectedOption); if (value !== null) { $('[name="proposal_type_radio"]').append('<option value="' + value + '">' + optionsMap[selectedOption] + '</option>').trigger('change'); } } }); }); </script> <script> $("#submit").click(function() { var skill = $('.account_type').val(); if (skill == '') { $('#account_validation').removeClass('d-none') return false; } else { $('#account_validation').addClass('d-none') } }); </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/id/erp.dev-unit.com/resources/views/proposal/create.blade.php ENDPATH**/ ?>