/
home
/
sjslayjy
/
public_html
/
olddevlok
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Token'); ?> <?php $__env->startSection('style'); ?> <?php echo e(Html::style("assets/css/bootstrap-datepicker3.min.css")); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#"><?php echo e(__('messages.Home')); ?></a> </li> <li class="active"><?php echo e(__('messages.Token')); ?></li> </ul> </div> <div class="page-content"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title"><?php echo e(__('messages.Update')); ?> <?php echo e(__('messages.Token')); ?> #<?php echo e($token->id); ?></h3> </div> <div class="panel-body"> <form action="" role="form" id="updateTokenForm"> <input type="hidden" name="id" value="<?php echo e($token->id); ?>"> <div class="container"> <div class="row"> <div class="col-md-4" style="display: none;"> <div class="form-group"> <label for="token_type"><?php echo e(__('messages.tokentype')); ?></label> <select class="form-control select2" name="token_type" id="token_type"> <option value="1" selected><?php echo e(__('messages.Rake')); ?> <?php echo e(__('messages.Unloading')); ?></option> <option value="2"><?php echo e(__('messsages.Stockin')); ?></option> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="master_rake_id"><?php echo e(__('messages.masterrake')); ?></label> <select class="form-control select2" name="master_rake_id" id="master_rake_id" onchange="getMasterRakeDetails(this.value)" disabled="disabled"> <option value=""><?php echo e(__('messsages.masterrake')); ?> <?php echo e(__('messsages.Select')); ?></option> <?php $__currentLoopData = $master_rakes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rake): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($rake->id); ?>" <?php echo e($rake->id == $token->master_rake_id ? "selected":""); ?>><?php echo e($rake->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_rake_id_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="company_id"><?php echo e(__('messages.company')); ?></label> <select class="form-control select2" name="company_id" id="company_id" disabled="disabled"> <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($company->id); ?>" <?php echo e($acting_company == $company->id ? "selected":""); ?>><?php echo e($company->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="to_type"><?php echo e(__('messages.To')); ?></label> <select class="form-control select2" name="to_type" id="to_type" onchange="handleToType(this.value)" disabled="disabled"> <option value="1" <?php echo e(1 == $token->to_type ? "selected":""); ?>>Warehouse</option> <option value="2" <?php echo e(2 == $token->to_type ? "selected":""); ?>>Retailer</option> <option value="3" <?php echo e(3 == $token->to_type ? "selected":""); ?>>Dealer</option> </select> </div> </div> <div class="col-md-4" id="warehouses_section" style="display: <?php echo e(1 == $token->to_type ? 'block':'none'); ?>;"> <div class="form-group"> <label for="warehouse_id"><?php echo e(__('messages.Warehouses')); ?></label> <select class="form-control select2" name="warehouse_id" id="warehouse_id" disabled="disabled"> <option value=""><?php echo e(__('messsages.Warehouses')); ?> <?php echo e(__('messsages.Select')); ?></option> <?php $__currentLoopData = $warehouses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($warehouse->id); ?>" <?php echo e($token->warehouse_id == $warehouse->id ? "selected":""); ?>><?php echo e($warehouse->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_warehouse_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4" id="retailer_section" style="display: <?php echo e(2 == $token->to_type ? 'block':'none'); ?>;"> <div class="form-group"> <label for="retailer_id"><?php echo e(__('messages.Retailers')); ?></label> <select class="form-control select2" name="retailer_id" id="retailer_id" disabled="disabled"> <option value=""><?php echo e(__('messsages.Retailers')); ?> <?php echo e(__('messsages.Select')); ?></option> <?php $__currentLoopData = $retailers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $retailer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($retailer->id); ?>" <?php echo e($token->retailer_id == $retailer->id ? "selected":""); ?>><?php echo e($retailer->name); ?>(<?php echo e($retailer->address); ?>)</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_warehouse_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4" id="dealer_section" style="display: <?php echo e(3 == $token->to_type ? 'block':'none'); ?>;"> <div class="form-group"> <label for="dealer_id"><?php echo e(__('messages.Dealer')); ?></label> <select class="form-control select2" name="dealer_id" id="dealer_id" onchange="handleDealer(this.value)" disabled="disabled"> <option value=""><?php echo e(__('messsages.Dealer')); ?> <?php echo e(__('messages.Select')); ?></option> <?php $__currentLoopData = $dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dealer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($dealer->id); ?>" <?php echo e($token->dealer_id == $dealer->id ? "selected":""); ?>><?php echo e($dealer->name); ?> (<?php echo e($dealer->address1); ?>)</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_dealer_id_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="date_of_generation"><?php echo e(__('messages.Date')); ?></label> <input type="text" class="form-control date-picker" name="date_of_generation" id="date_of_generation" placeholder="Date" value="<?php echo e(date('m/d/Y',strtotime($token->date_of_generation))); ?>" disabled="disabled"> <span class="label label-danger" id="add_date_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="product_company_id"><?php echo e(__('messages.ProductCompany')); ?></label> <select class="form-control select2" name="product_company_id" id="product_company_id" disabled="disabled"> <option value=""> <?php echo e(__('messsages.ProductCompany')); ?> <?php echo e(__('messsages.Select')); ?></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 == $token->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="add_product_company_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="account_from_id"><?php echo e(__('messages.AccountFrom')); ?></label> <select class="form-control select2" name="account_from_id" id="account_from_id" onchange="getRakeAllotmentDetails(this.value)" disabled="disabled"> <option value=""><?php echo e(__('messsages.AccountFrom')); ?> <?php echo e(__('messages.Select')); ?>}</option> <?php $__currentLoopData = $master_rake->rake_allotments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dealer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($dealer->dealer_id); ?>" <?php echo e($dealer->dealer_id == $token->account_from_id ? "selected":""); ?>><?php echo e($dealer->dealer->name); ?> (<?php echo e($dealer->dealer->address1); ?>)</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_account_from_id_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="product_id"><?php echo e(__('messages.Product')); ?></label> <select class="form-control select2" name="product_id" id="product_id" onchange="getAllotedProductDetails(this.value)"disabled="disabled" > <option value=""><?php echo e(__('messages.Product')); ?> <?php echo e(__('messages.Select')); ?></option> <?php $__currentLoopData = $master_rake->master_rake_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($product->product_id); ?>" <?php echo e($product->product_id == $token->product_id ? "selected":""); ?>><?php echo e($product->product->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_product_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="quantity"><?php echo e(__('messages.Token')); ?> <?php echo e(__('messages.Quantity')); ?></label> <input type="text" class="form-control" name="quantity" id="quantity" value="<?php echo e($token->quantity); ?>" placeholder="Quantity"> <span class="label label-danger" id="add_quantity_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="total_loadings">Total Loadings</label> <input type="text" class="form-control" name="total_loadings" id="total_loadings" placeholder="Remaining Quantity" value="<?php echo e($total_loadings); ?>" readonly="readonly"> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="remaining_quantity"><?php echo e(__('messages.Token')); ?> <?php echo e(__('messages.RemainingQuantity')); ?></label> <input type="text" class="form-control" name="remaining_quantity" id="remaining_quantity" placeholder="Remaining Quantity" value="<?php echo e($token->quantity - $total_loadings); ?>" readonly="readonly"> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="unit_id"><?php echo e(__('messages.Unit')); ?></label> <select class="form-control select2" name="unit_id" id="unit_id" disabled="disabled"> <option value=""><?php echo e(__('messages.Unit')); ?> <?php echo e(__('messages.Select')); ?></option> <?php $__currentLoopData = $units; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $unit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($unit->id); ?>" <?php echo e($unit->id == $token->unit_id ? "selected":""); ?>><?php echo e($unit->unit); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_unit_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="rate"><?php echo e(__('messages.Rate')); ?></label> <input type="text" class="form-control" name="rate" id="rate" placeholder="Rate" value="<?php echo e($token->rate); ?>" disabled="disabled"> <span class="label label-danger" id="add_rate_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="transporter_id"><?php echo e(__('messages.Transporter')); ?></label> <select class="form-control select2" name="transporter_id" id="transporter_id" disabled="disabled"> <option value=""><?php echo e(__('messages.Transporter')); ?> <?php echo e(__('messages.Select')); ?></option> <?php $__currentLoopData = $transporters; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transporter): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($transporter->id); ?>" <?php echo e($transporter->id == $token->transporter_id ? "selected":""); ?>><?php echo e($transporter->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_transporter_id_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="warehouse_keeper_id"><?php echo e(__('messages.WarehouseKeeper')); ?></label> <select class="form-control select2" name="warehouse_keeper_id" id="warehouse_keeper_id" disabled="disabled"> <option value=""><?php echo e(__('messages.WarehousesKeeper')); ?> <?php echo e(__('messages.Select')); ?></option> <?php $__currentLoopData = $warehouse_keepers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse_keeper): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($warehouse_keeper->id); ?>" <?php echo e($warehouse_keeper->id == $token->warehouse_keeper_id ? "selected":""); ?>><?php echo e($warehouse_keeper->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="label label-danger" id="add_Warehouse_keeper_id_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="truck_number"><?php echo e(__('messages.TruckNumber')); ?></label> <input type="text" class="form-control" name="truck_number" id="truck_number" placeholder="Truck Number" value="<?php echo e($token->truck_number); ?>" disabled="disabled"> <span class="label label-danger" id="add_truck_number_error" style="display: none;"></span> </div> </div> <div class="col-md-4"> <div class="form-group"> <label for="delivery_payment_mode"><?php echo e(__('messages.FreightPaymentMode')); ?></label> <select class="form-control select2" name="delivery_payment_mode" id="delivery_payment_mode" disabled="disabled"> <option value="EX">EX</option> <option value="FOR">FOR</option> </select> <span class="label label-danger" id="add_delivery_payment_mode_error" style="display: none;"></span> </div> </div> <div class="clearfix"></div> <div class="col-md-4"> <div class="form-group"> <label for="description"><?php echo e(__('messages.Description')); ?></label> <textarea name="description" id="description" class="form-control" rows="3" required="required" disabled="disabled"><?php echo e($token->description); ?></textarea> <span class="label label-danger" id="add_description_error" style="display: none;"></span> </div> </div> </div> </div> <a href="<?php echo e(URL('/user/generated-token')); ?>" class="btn btn-default" >Back</a> <button type="button" id="updateTokenBtn" class="btn btn-primary">Submit</button> </form> </div> </div> </div> </div><!-- /.page-content --> </div><!-- /.main-content --> <?php $__env->startSection('script'); ?> <?php echo e(Html::script("assets/js/ace-elements.min.js")); ?> <?php echo e(Html::script("assets/js/ace.min.js")); ?> <?php echo e(Html::script("assets/js/bootstrap-datepicker.min.js")); ?> <script type="text/javascript"> $(document).ready(function() { $('.date-picker').datepicker({ autoclose: true, todayHighlight: true }) .next().on(ace.click_event, function(){ $(this).prev().focus(); }); $('#updateTokenBtn').click(function(e){ e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: $('#updateTokenForm').attr('action'), method: 'POST', data: $('#updateTokenForm').serialize(), success: function(data){ $('.loading-bg').hide(); if(!data.flag){ swal('Error',data.error,'error') }else{ swal({ title: "Success!", text: data.message, type: "success" }, function() { window.location.reload(); }); } } }); }); }); function showError(id,error){ if(typeof(error) === "undefined"){ $('#'+id).hide(); }else{ $('#'+id).show(); $('#'+id).text(error); } } </script> <?php $__env->stopSection(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/pmmsanvp/public_html/srt/resources/views/dashboard/token/edit-token-quantity.blade.php ENDPATH**/ ?>