

<?php $__env->startSection('title', 'Edit Inventory'); ?>

<?php $__env->startSection('content'); ?>

<div class="container-fluid">

    <!-- Page Heading -->
    <div class="d-sm-flex align-items-center justify-content-between mb-4">
        <h1 class="h3 mb-0 text-gray-800">Edit Inventory</h1>
        <a href="<?php echo e(route('productlist.index')); ?>" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i
                class="fas fa-arrow-left fa-sm text-white-50"></i> Back</a>
    </div>

    
    <?php echo $__env->make('common.alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
   
    <!-- DataTales Example -->
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">Edit Item</h6>
        </div>
        <form method="POST" action="<?php echo e(route('productlist.updateinventory', ['id' => $products->id])); ?>">
     
        <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <div class="card-body">
                <div class="form-group row">

                   
                <!-- ----------------- -->
                
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Item_Code</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['itemcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Item_Code"
                            placeholder="code" 
                            name="itemcode" 
                            value="<?php echo e(old('itemcode') ?  old('itemcode') : $products->itemcode); ?>">
                        <?php $__errorArgs = ['itemcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>UPC</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['upc'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="UPC"
                            placeholder="upc" 
                            name="upc" 
                            value="<?php echo e(old('upc') ?  old('upc') : $products->upc); ?>">

                        <?php $__errorArgs = ['upc'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Item_Name</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['item'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Item_Name"
                            placeholder="item" 
                            name="item" 
                            value="<?php echo e(old('item') ?  old('item') : $products->item); ?>">

                        <?php $__errorArgs = ['item'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                   
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Description</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Description"
                            placeholder="Description" 
                            name="description" 
                            value="<?php echo e(old('description') ?  old('description') : $products->description); ?>">

                        <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Internal_Description</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['internaldescript'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Internal_Description"
                            placeholder="internaldescript" 
                            name="internaldescript" 
                            value="<?php echo e(old('internaldescript') ?  old('internaldescript') : $products->internaldescript); ?>">

                        <?php $__errorArgs = ['internaldescript'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Measurement</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['measurement'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Measurement"
                            placeholder="measurement" 
                            name="measurement" 
                            value="<?php echo e(old('measurement') ?  old('measurement') : $products->measurement); ?>">

                        <?php $__errorArgs = ['measurement'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>StockInHand</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['stockinhand'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="stockinhand"
                            placeholder="stockinhand" 
                            name="stockinhand" 
                            value="<?php echo e(old('stockinhand') ?  old('stockinhand') : $products->stockinhand); ?>">

                        <?php $__errorArgs = ['stockinhand'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                   
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Currency</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['currency'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Currency"
                            placeholder="currency" 
                            name="currency" 
                            value="<?php echo e(old('currency') ?  old('currency') : $products->currency); ?>">

                        <?php $__errorArgs = ['currency'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Cost</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['Cost'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Cost"
                            placeholder="Cost" 
                            name="Cost" 
                            value="<?php echo e(old('Cost') ?  old('Cost') : $products->Cost); ?>">

                        <?php $__errorArgs = ['Cost'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>MRP_Price</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['mrpprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="MRP_Price"
                            placeholder="mrpprice" 
                            name="mrpprice" 
                            value="<?php echo e(old('mrpprice') ?  old('mrpprice') : $products->mrpprice); ?>">

                        <?php $__errorArgs = ['mrpprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Retail_Price</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['rprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Retail_Price"
                            placeholder="rprice" 
                            name="rprice" 
                            value="<?php echo e(old('rprice') ?  old('rprice') : $products->rprice); ?>">

                        <?php $__errorArgs = ['rprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Wholesale_Price</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['wprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Wholesale_Price"
                            placeholder="wprice" 
                            name="wprice" 
                            value="<?php echo e(old('wprice') ?  old('wprice') : $products->wprice); ?>">

                        <?php $__errorArgs = ['wprice'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Stock_Value</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['stockvalue'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="stockvalue"
                            placeholder="stockvalue" 
                            name="stockvalue" 
                            value="<?php echo e(old('stockvalue') ?  old('stockvalue') : $products->stockvalue); ?>" readonly>

                        <?php $__errorArgs = ['stockvalue'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    
                    <div class="col-sm-6 mb-3 mb-sm-0">
                        <span style="color:red;">*</span>Order_Level</label>
                        <input 
                            type="text" 
                            class="form-control form-control-user <?php $__errorArgs = ['orderlevel'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                            id="Order_Level"
                            placeholder="orderlevel" 
                            name="orderlevel" 
                            value="<?php echo e(old('orderlevel') ?  old('orderlevel') : $products->orderlevel); ?>">

                        <?php $__errorArgs = ['orderlevel'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    
                    <!-- ------------------------- -->
                    
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Serializable</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['serializable'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="serializable">
                            <option selected disabled>Select Status</option>
                            <option value="1" <?php echo e(old('serializable') ? ((old('serializable') == 1) ? 'selected' : '') : (($products->serializable == 1) ? 'selected' : '')); ?>>YES</option>
                            <option value="0" <?php echo e(old('serializable') ? ((old('serializable') == 0) ? 'selected' : '') : (($products->serializable == 0) ? 'selected' : '')); ?>>NO</option>
                        </select>
                        <?php $__errorArgs = ['serializable'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>


                  
                    
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Status</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="status">
                            <option selected disabled>Select Status</option>
                            <option value="1" <?php echo e(old('status') ? ((old('status') == 1) ? 'selected' : '') : (($products->status == 1) ? 'selected' : '')); ?>>Active</option>
                            <option value="0" <?php echo e(old('status') ? ((old('status') == 0) ? 'selected' : '') : (($products->status == 0) ? 'selected' : '')); ?>>Inactive</option>
                        </select>
                        <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                
                
                    
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Warehouses</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['entityid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="entityid">
                            <option selected disabled>Select warehouse</option>
                            <?php $__currentLoopData = $warehouses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $wrow): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($wrow->id); ?>" 
                                    <?php echo e(old('entityid') ? ((old('entityid') == $wrow->id) ? 'selected' : '') : (($products->entityid == $wrow->id) ? 'selected' : '')); ?>>
                                    <?php echo e($wrow->name); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['entityid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
               
            
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Manufactured</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['manufactured'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="manufactured">
                            <option selected disabled>Select</option>
                            <option value="1" <?php echo e(old('manufactured') ? ((old('status') == 1) ? 'selected' : '') : (($products->manufactured == 1) ? 'selected' : '')); ?>>YES</option>
                            <option value="0" <?php echo e(old('manufactured') ? ((old('status') == 0) ? 'selected' : '') : (($products->manufactured == 0) ? 'selected' : '')); ?>>NO</option>
                        </select>
                        <?php $__errorArgs = ['manufactured'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Category</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['categoryid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="categoryid">
                            <option selected disabled>Select Category</option>
                            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $catrows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($catrows->id); ?>" 
                                    <?php echo e(old('categoryid') ? ((old('categoryid') == $catrows->id) ? 'selected' : '') : (($products->categoryid == $catrows->id) ? 'selected' : '')); ?>>
                                    <?php echo e($catrows->category); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['categoryid'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                

                    
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>For_Sales</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['forsales'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="forsales">
                            <option selected disabled>Select_Purpose</option>
                            <option value="1" <?php echo e(old('forsales') ? ((old('forsales') == 1) ? 'selected' : '') : (($products->forsales == 1) ? 'selected' : '')); ?>>YES</option>
                            <option value="0" <?php echo e(old('forsales') ? ((old('forsales') == 0) ? 'selected' : '') : (($products->forsales == 0) ? 'selected' : '')); ?>>NO</option>
                        </select>
                        <?php $__errorArgs = ['forsales'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
              

                
                    <div class="col-sm-6 mb-3 mt-3 mb-sm-0">
                        <span style="color:red;">*</span>Product Type</label>
                        <select class="form-control form-control-user <?php $__errorArgs = ['type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="type">
                            <option selected disabled>Select_Purpose</option>
                            <option value="1" <?php echo e(old('type') ? ((old('type') == 1) ? 'selected' : '') : (($products->type == 1) ? 'selected' : '')); ?>>Primary_Item</option>
                            <option value="2" <?php echo e(old('type') ? ((old('type') == 2) ? 'selected' : '') : (($products->type == 2) ? 'selected' : '')); ?>>Secondary_Item</option>
                        </select>
                        <?php $__errorArgs = ['type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
            
                    </div>
                


            <div class="card-footer">
                <button type="submit" class="btn btn-success btn-user float-right mb-3">Update</button>
                <a class="btn btn-primary float-right mr-3 mb-3" href="<?php echo e(route('productlist.index')); ?>">Cancel</a>
            </div>
            
        </form>
    </div>
    </div>
</div>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>


    <script>
$('#stockinhand, #Cost').keyup(function(){
    var st = parseFloat($('#stockinhand').val()) || 0;
    var cst = parseFloat($('#Cost').val()) || 0;

    $('#stockvalue').val(st * cst);    
});
</script>
<script>
    $('#stockinhand, #Cost').change(function(){
    var st = parseFloat($('#stockinhand').val()) || 0;
    var cst = parseFloat($('#Cost').val()) || 0;

    $('#stockvalue').val(st * cst);    
});
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Pathman\Laravel_Samples\Production_Control\resources\views/inventroy/editinventory.blade.php ENDPATH**/ ?>