One Hat Cyber Team
Your IP :
18.221.11.104
Server IP :
104.21.32.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
/
Edit File:
9db0f793cf41f88aa98e7113db5753ae.php
<?php $__env->startSection('styles'); ?> <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"> <style> .item_block{ box-shadow: 0px 0px 5px #ccc; } .hide{ display:none; } .item_block{ margin-bottom: 1em; padding:1em; margin-top: 10px; } </style> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="page-content"> <div class="container-fluid"> <?php if(session()->has('messageerror')): ?> <div class = "alert alert-danger alert-fill alert-close alert-dismissible fade in"> <strong><?php echo e(session()->get('messageerror')); ?></strong> </div> <?php endif; ?> <?php if(session()->has('message')): ?> <div class="alert alert-info alert-fill alert-close alert-dismissible fade in"> <strong><?php echo e(session()->get('message')); ?></strong> </div> <?php endif; ?> <?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">Adjustment Entries</h3> </div> </div> </section> <div class="box-typical box-typical-padding"> <form action="<?php echo e(route('store-adjustment')); ?>" method="post"> <?php echo csrf_field(); ?> <div class="row"> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleInput">Adjustment Date</label> <div class='input-group date'> <input type="text" readonly id="adjustment_date" class="form-control" name="adjustment_date"> <span class="input-group-addon"> <i class="font-icon font-icon-calend"></i> </span> </div> </fieldset> </div> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleCluster">Adjustment Type</label> <select class="select2" name="adjustment_type" id="adjustment_type"> <option value="opening_stock">Opening Stock</option> <option value="increase">Increase</option> <option value="decrease">Decrease</option> </select> </fieldset> </div> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleHub">Comment</label> <input class="form-control comment" type="text" name="comment" id="comment"> </fieldset> </div> </div><!--.row--> <div class="row"> <div class="col-lg-12"> <div class="input-group-btn"> <button class="btn btn-success add float-right" type="button"><i class="fldemo glyphicon glyphicon-plus"></i>Add</button> </div> </div> </div> <div class="increment"> <div class="item_block item-block-1"> <div class="row"> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleCluster">Item</label> <select class="form-control item item-1 select2" name="item[]" id="item" data-id=1> <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($item->id); ?>"><?php echo e($item->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </fieldset> </div> <div class="col-lg-6"> <fieldset class="form-group"> <label class="form-label semibold" for="exampleHub">Stock to be adjusted</label> <input class="form-control stockadjusted" type="text" name="stockadjusted[]" id="stockadjusted"> </fieldset> </div> </div><!--.row--> <div class="row"> <div class="col-lg-12"> <div class="input-group-btn"> <button class="btn btn-warning remove float-right" type="button"><i class="fldemo glyphicon glyphicon-plus"></i>Remove</button> </div> </div> </div> </div> </div> <div class="row m-t"> <div class="col-lg-12"> <button type="submit" name="add_transfer_stock" class="btn btn-inline btn-success p-x-3 p-y">Submit </button> </div> </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="<?php echo e(asset('js/lib/select2/select2.full.min.js')); ?>"></script> <script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> <script> $( function() { $( "#adjustment_date" ).datepicker({ dateFormat: "yy-mm-dd" }); }); </script> <script> $(document).ready(function() { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $('#from').on('change', function () { var from = $(this).val(); $('#stock').val(''); let source = $('#source'); let item = $('#item'); let stocktransfer = $('#stocktransfer'); stocktransfer.val(''); item.empty(); source.empty(); item.prop('disabled',true); if(from=='H'){ jQuery.ajax({ url: "<?php echo e(url('/stock/physical/hubs')); ?>", method: 'get', success: function(result){ var data = JSON.parse(result); if(data.length>0){ source.append('<option value="">Select Hub</option>'); for(var i=0;i<data.length;i++){ var obj = data[i]; source.append('<option value='+obj.id+'>'+obj.name+'</option>'); } source.prop('disabled',false); } } }); }else if(from=='D'){ jQuery.ajax({ url: "<?php echo e(url('/stock/physical/boys')); ?>", method: 'get', success: function(result){ var data = JSON.parse(result); if(data.length>0){ source.append('<option value="">Select Delivery Boy</option>'); for(var i=0;i<data.length;i++){ var obj = data[i]; source.append('<option value='+obj.id+'>'+obj.name+'</option>'); } source.prop('disabled',false); } } }); }else{ source.prop('disabled',true); } }); $('#source').on('change', function () { var sourcetype = $('#from').val(); var source = $(this).val(); let stock = $('#stock'); let item = $('.item'); let stocktransfer = $('#stocktransfer'); stocktransfer.val(''); item.empty(); stock.val(''); if(source!=''){ jQuery.ajax({ url: "<?php echo e(url('/stock/hubs/items')); ?>", method: 'get', data: { sourcetype: sourcetype, source: source }, success: function(result){ var data = JSON.parse(result); if(data.length>0){ item.append('<option value="">Select Items</option>'); for(var i=0;i<data.length;i++){ var obj = data[i]; item.append('<option value='+obj.itemid+' data-id='+obj.remstk+'>'+obj.iname+'</option>'); } item.prop('disabled',false); $('#to').prop('disabled',false); }else{ toastr.error("Source doesn't have any item in the stock",'Error', {timeOut: 4000}); } } }); }else{ item.prop('disabled',true); } }); $("body").on("change",".item",function(){ var item=$(this).val(); // let stocktransfer = $(this).parents('.stocktransfer'); // stocktransfer.val(''); if(item != ''){ var stk = $(this).find(':selected').data('id'); $(this).parents('.row').find('.stock').val(stk); $(this).parents('.row').find('.stock').prop('disabled',false); $(this).parents('.row').find('.stock').removeAttr('readonly'); }else{ $(this).parents('.row').find('.stock').val(''); $(this).parents('.row').find('.stock').prop('disabled',true); } }); $('#to').on('change', function () { var to = $(this).val(); let destination = $('#destination'); destination.empty(); if(to=='H'){ jQuery.ajax({ url: "<?php echo e(url('/stock/physical/hubs')); ?>", method: 'get', success: function(result){ var data = JSON.parse(result); if(data.length>0){ destination.append('<option value="">Select Hub</option>'); for(var i=0;i<data.length;i++){ var obj = data[i]; destination.append('<option value='+obj.id+'>'+obj.name+'</option>'); } destination.prop('disabled',false); } } }); }else if(to=='D'){ jQuery.ajax({ url: "<?php echo e(url('/stock/physical/boys')); ?>", method: 'get', success: function(result){ var data = JSON.parse(result); if(data.length>0){ destination.append('<option value="">Select Delivery Boy</option>'); for(var i=0;i<data.length;i++){ var obj = data[i]; destination.append('<option value='+obj.id+'>'+obj.name+'</option>'); } destination.prop('disabled',false); } } }); }else{ destination.prop('disabled',true); } }); $('#destination').on('change', function () { let stocktransfer = $('.stocktransfer'); if(stocktransfer.val()===''){ stocktransfer.val("0"); } if($(this).val()!=''){ stocktransfer.prop('disabled',false); } }); $("body").on("keyup",".stocktransfer",function(){ var transfer_stock = $(this).val(); if(transfer_stock != '' || transfer_stock == 0) { var total_stock = $(this).parents('.item_block').find('.stock').val(); if(transfer_stock < 0){ toastr.error("Negative stock cannot be transferred",'Error', {timeOut: 4000}); $(this).val("0"); } if(total_stock) { if(transfer_stock <= Number(total_stock) ) { $(this).parents('.row').find('.comment').prop('disabled',false); } else { toastr.error("Transfer stock cannot be more than actual stock",'Error', {timeOut: 4000}); $(this).val("0"); } } } }); }); </script> <script> $(document).ready(function() { $(".add").click(function(){ var id = $(".increment .item_block").eq(-1).find('.item').data('id'); var lsthmtl = '<div class="item_block">'; lsthmtl+= $(".increment .item_block").eq(-1).html(); lsthmtl+='</div>'; $(".increment").append(lsthmtl); $(".increment .item_block").eq(-1).removeClass('item-block-'+id); $(".increment .item_block").eq(-1).find('.item').removeClass('item-'+id); var new_id = parseInt(id) + 1; $(".increment .item_block").eq(-1).addClass('item-block-'+new_id); $(".increment .item_block").eq(-1).find('.item').data('id', new_id); $(".increment .item_block").eq(-1).find('.item').addClass('item-'+new_id); $('.item-'+new_id).select2(); $(".item-block-"+new_id).find('.select2-container').not(':first').hide(); }); $("body").on("click",".remove",function(){ $(this).parents(".item_block").remove(); }); }); </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/adjustments/adjustment.blade.php ENDPATH**/ ?>
Simpan