One Hat Cyber Team
Your IP :
18.116.100.166
Server IP :
104.21.48.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
app.gftag.com
/
storage
/
framework
/
views
/
View File Name :
2e6d50300a2ee9d59711fda1545e99b4.php
<?php $__env->startSection('styles'); ?> <style> .loader-class { display: none; } .loader { width: 40px; height: 40px; border: 5px solid #cabfbf; border-bottom-color: transparent; border-radius: 50%; box-sizing: border-box; animation: rotation 1s linear infinite; display: inline-block; } @keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <link rel="stylesheet" href="<?php echo e(asset('css/separate/vendor/bootstrap-select/bootstrap-select.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('css/separate/vendor/select2.min.css')); ?>"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1/jquery.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css"> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="page-content"> <div class="container-fluid"> <?php if(count($errors) > 0): ?> <div class="alert alert-danger alert-fill alert-close alert-dismissible fade in"> <ul> <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li><?php echo e($error); ?></li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> </div> <?php endif; ?> <section class="card"> <div class="row"> <div class="col-lg-6 p-t"> <h3 class="p-l">Return Items</h3> </div> </div> </section> <div class="box-typical box-typical-padding"> <form id="sale_return_form" method="post"> <?php echo csrf_field(); ?> <input type="text" value="<?php echo e(request()->route()->parameter('sale_id')); ?>" name="sale_id" hidden> <div class="row"> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleInput">Narration</label> <input type="text" class="form-control unit" name="narration" value="<?php echo e(old('narration')); ?>"> </fieldset> </div> <div class="col-lg-6"> <label class="form-label semibold" for="exampleInput">Credit Note Date</label> <div class='input-group date'> <input type="text" readonly id="return_date" class="form-control" name="return_date" value="<?php echo e(old('return_date')); ?>" required> <span class="input-group-addon"> <i class="font-icon font-icon-calend"></i> </span> </div> </div> </div> <div class="item_block item-block-1"> <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="row"> <div class="col-lg-3"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleInput">Return Item</label> <input type="text" name="item[]" class="form-control item_name" id="item_name" value="<?php echo e($item['item_name']); ?>" readonly> <input type="text" value="<?php echo e($item['item_id']); ?>" name="item_id[]" hidden> <input type="text" value="<?php echo e($item['sale_item_id']); ?>" name="sale_item_id[]" hidden> <input type="text" name="price[]" class="form-control price" id="price" hidden value="<?php echo e($item['price']); ?>"> </fieldset> </div> <div class="col-lg-3"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleInput">Unit of Sale</label> <input type="text" class="form-control unit" name="unit[]" value="<?php echo e($item['unit'] ?? 'pcs'); ?>" readonly> </fieldset> </div> <div class="col-lg-3"> <fieldset class="form-group"> <label class="form-label semibold" for="sales_quantity">Sales Quantity</label> <input type="text" name="sales_quantity[]" class="form-control sales_quantity" id="sales_quantity" value="<?php echo e($item['quantity']); ?>" readonly> </fieldset> </div> <div class="col-lg-3"> <fieldset class="form-group"> <label class="form-label semibold" for="return_quantity">Return Quantity</label> <input type="text" name="return_quantity[]" class="form-control return_quantity" id="return_quantity" value=0> <span id="errorMessage" style="color: red;"></span> </fieldset> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="row m-t"> <div class="col-lg-12"> <button type="submit" id="add_sale" class="btn btn-inline btn-success p-x-3 p-y">Submit </button> </div> </div> <div class="loader-class"> <span class="loader"></span> <p>Please wait</p> </div> </form> </div><!--.box-typical--> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <script src="<?php echo e(asset('js/lib/bootstrap-select/bootstrap-select.min.js')); ?>"></script> <script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> <script src="<?php echo e(asset('js/lib/bootstrap-select/bootstrap-select.min.js')); ?>"></script> <script src="<?php echo e(asset('js/lib/select2/select2.full.min.js')); ?>"></script> <script> $(function() { $("#return_date").datepicker({ dateFormat: "yy-mm-dd" }); }); $(document).ready(function() { $("#sale_return_form").on('submit', function(event) { event.preventDefault(); if ($('#return_date').val() === '') { toastr.error('Please select a return date', 'Error'); return; } var formData = $(this).serialize(); $.ajax({ url: "<?php echo e(route('add-sales-return')); ?>", method: 'POST', data: formData, beforeSend: function() { $("#add_sale").prop("disabled", true); $('.loader-class').css('display', 'block') }, success: function(response) { $('.loader-class').css('display', 'none') toastr.success('Return Created Successfully', 'Success'); }, error: function(xhr, status, error) { console.error("Error:", error); toastr.error('Something went wrong', 'Error'); }, complete: function() { $("#add_sale").prop("disabled", false); $('.loader-class').css('display', 'none') location.reload(); } }); }); $('#return_quantity').on('input', function() { var salesValue = parseInt($('#sales_quantity').val()); var inputValue = parseInt($(this).val()); var errorMessage = $('#errorMessage'); if (inputValue > salesValue) { errorMessage.text('Input value cannot exceed Sales value.'); $(this).val(salesValue); } else { errorMessage.text(''); } }); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/forge/app.gftag.com/resources/views/saleReturn/create.blade.php ENDPATH**/ ?>