/
home
/
sjslayjy
/
public_html
/
olddevlok
/
storage
/
framework
/
views
/
Upload File
HOME
<form action="<?php echo e(URL('/stock/stock-transfer-by-road')); ?>" role="form" id="stocktransferByRoad" method="POST"> <input type="hidden" name="by_road_id" value="<?php echo e($by_roads->id); ?>"> <div class="row"> <div class="clearfix"></div> <div class="col-md-6"> <div class="form-group"> <label for="name">Product Company</label> <select class="form-control" name="product_company_id" id="edit_product_company_id"> <option value="">Select Product Company</option> <?php $__currentLoopData = $product_companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product_company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($product_company->id); ?>" <?php echo e($product_company->id == $by_roads->product_company_id? "selected":""); ?>><?php echo e($product_company->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="edit_product_company_error" style="display: none;"></span> </div> </div> <div class="col-md-5"> <div class="form-group"> <label for="name">Warehouse</label> <select class="form-control select2" name="warehouse_id" id="warehouse_id"> <option value="">Select Warehouse</option> <?php $__currentLoopData = $warehouse; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouses): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($warehouses->id); ?>"><?php echo e($warehouses->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_product_company_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group" style="overflow-x:auto;"> <label for="product_id"><?php echo e(__('messages.Product')); ?></label> <table class="table table-striped table-bordered"> <thead> <tr> <th> Product Name</th> <th> Quantity</th> <th> Fresh Quantity</th> <th> Damage Quantity</th> </tr> </thead> <tbody id="tbody"> <?php $__currentLoopData = $by_roads->by_road_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $by_road_product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($by_road_product->remaining_quantity!=0): ?> <tr id="<?php echo e($by_road_product->product_id); ?>"> <td><input type="hidden" name="product_id[]" value="<?php echo e($by_road_product->product_id); ?>"><input type="hidden" id="input_<?php echo e($by_road_product->product_id); ?>" onkeypress="return onlyCurrency(event)" onblur="check_zero(this)" data-id="id_<?php echo e($by_road_product->product_id); ?>_<?php echo e($by_road_product->product_id); ?>" name="product_name[<?php echo e($by_road_product->product_id); ?>]" onkeyup="getvalue(this,<?php echo e($by_road_product->product_id); ?>)" value="<?php echo e(getModelById('Product',$by_road_product->product_id)->name); ?>" style="width:100px;" /><?php echo e(getModelById('Product',$by_road_product->product_id)->name); ?> </td> <td><?php echo e($by_road_product->remaining_quantity); ?></td> <td><input type="text" id="input1_<?php echo e($by_road_product->product_id); ?>" onkeyup="is_valid(<?php echo e($by_road_product->remaining_quantity); ?>,<?php echo e($by_road_product->product_id); ?>)" data-id="id_<?php echo e($by_road_product->product_id); ?>_<?php echo e($by_road_product->product_id); ?>" name="fresh_qty[<?php echo e($by_road_product->product_id); ?>]"/></td> <td><input type="text" id="input2_<?php echo e($by_road_product->product_id); ?>" onkeyup="is_valid(<?php echo e($by_road_product->remaining_quantity); ?>,<?php echo e($by_road_product->product_id); ?>)" data-id="id_<?php echo e($by_road_product->product_id); ?>_<?php echo e($by_road_product->product_id); ?>" name="demage_qty[<?php echo e($by_road_product->product_id); ?>]"/></td> </tr> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> <span class="label label-danger" id="add_product_id_error" style="display: none;"></span> </div> </div> <!-- <div class="col-md-3"> <div class="form-group"> <label for="rate">Fresh Quantity</label> <input type="text" class="form-control checkIfValid" name="fresh_qty" placeholder="Quantity"> <span class="label label-danger" id="add_quantity_error" style="display: none;"></span> </div> </div> <div class="col-md-2"> <div class="form-group"> <label for="wharfage">Damage Qty</label> <input type="text" class="form-control" name="damage_qty" id="Damage" placeholder="Damage"> <span class="label label-danger" id="add_wharfage_error" style="display: none;"></span> </div> </div> --> </div> <!-- <div id="addMoreRowSection"> </div> <div class="pull-left"> <button type="button" id="addMoreRow" class="btn btn-danger"><i class="fa fa-plus"></i> Add More </button> </div> --> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" id="stocktransferByRoadBtn" class="btn btn-primary">Submit</button> </div> </form> <script> $(document).ready(function() { console.log($('#stocktransferByRoad').attr('action')); $('#stocktransferByRoadBtn').click(function(e){ swal({ title: "Are you sure by road stock transfer in warehouse?", // text: "SUMIT", type: "success", confirmButtonText: 'Ok', showCancelButton: true, },(function(isConfirm) { if (isConfirm) { $('.loading-bg').show(); // alert($('#stocktransferByRoad').attr('action')); e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: $('#stocktransferByRoad').attr('action'), method: 'POST', data: $('#stocktransferByRoad').serialize(), success: function(data){ $('.loading-bg').hide(); if(!data.flag){ // showError('add_rake_point_error',data.errors.rake_point); // showError('add_from_warehouse_id_error',data.errors.from_warehouse_id); // showError('add_despatch_location_error',data.errors.despatch_location); // showError('add_dealer_id_error',data.errors.dealer_id); // showError('add_product_company_id_error',data.errors.product_company_id); // showError('add_product_id_error',data.errors.product_id); // showError('add_retailer_id_error',data.errors.retailer_id); // showError('add_quantity_error',data.errors.quantity); // showError('add_unit_id_error',data.errors.unit_id); }else{ swal({ title: "Success!", text: data.message, type: "success" },function() { window.location.reload(); }); $('#modalPopup').modal('toggle') $('#dynamic-table').DataTable().draw(); // window.location.reload(); } } }); } else { location.reload(); } }) ); }); }); </script><?php /**PATH /home/sjslayjy/public_html/devlok/resources/views/dashboard/stock/stock_transfer_by_road.blade.php ENDPATH**/ ?>