<?php $__env->startSection('content'); ?>
    <style>
        .file-drag-handle, .glyphicon-plus-sign, .kv-file-upload, .kv-file-download, .fileinput-upload {
            display: none !important;
        }
    </style>
    <?php Fun::lang() ?>

    <div class="page">
        <div class=container>
            <div class="top-content">
                <div class="row">
                    <div class="col-sm-12 col-xs-12">
                        <div class="title-add">
                            <div class="pull-left">
                                <h3><?php echo e(__('administrator.edit_cutpiece')); ?></h3>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <?php echo Form::model($product, ['method' => 'PATCH','route' => ['cut-piece.update', $product->id],'enctype'=>'multipart/form-data','class'=>'jform']); ?>

            <div class="row" id="tabs">
                <div class="tab-content">
                    <div id="home" class="tab-pane fade in active">
                        <div class="col-sm-12">
                            <div class="master-form">
                                <div class="title-note">
                                    <h3>
                                        <span class="fa fa-exclamation-triangle"></span> <?php echo e(__('administrator.edit')); ?>

                                        <i>(<?php echo e(__('administrator.fields_in_red_are_required')); ?>)</i></h3>
                                </div>
                                <div class="form-group col-sm-12 col-xs-12">
                                    <div class="col-sm-2 col-xs-12 ">
                                        <label class="required" for="name"><?php echo e(__('administrator.item_name')); ?> </label>
                                    </div>
                                    <div class="col-sm-10 col-xs-12">
                                        <?php echo Form::text('product_name', ($product->product_name), array('placeholder' => __('administrator.item_name'),'class' => 'form-control input-sm','','maxlength'=>'50')); ?>

                                    </div>
                                </div>

                                <div class="form-group col-sm-12 col-xs-12">
                                    <div class="col-sm-2 col-xs-12 ">
                                        <label for="name" class="required"><?php echo e(__('administrator.currency')); ?></label>
                                    </div>
                                    <div class="col-sm-10 paddin-0">
                                        <div class="col-sm-12">
                                            <?php echo Form::select('currency', getCurrency(), null, ['placeholder' => __('administrator.please_select'),'class' => 'form-control select2','']); ?>

                                        </div>
                                    </div>
                                </div>
                                <div class="form-group col-sm-12 col-xs-12">
                                    <div class="col-sm-10 col-xs-10 col-md-10 col-sm-offset-2 col-xs-offset-2 col-md-offset-2">
                                        <table class="table table-bordered">
                                            <thead>
                                            <tr>
                                                <th>#</th>
                                                <th><label for=""
                                                           class="required"><?php echo e(__('administrator.qty_per_unit')); ?></label>
                                                </th>
                                                <th><label for="" class="required"><?php echo e(__('administrator.size')); ?></label>
                                                </th>
                                                <th><label for="" class="required"><?php echo e(__('administrator.cost')); ?></label>
                                                </th>
                                                <th><label for=""
                                                           class="required"><?php echo e(__('administrator.barcode')); ?></label></th>
                                                <th style="text-align: center" width="5%"><span
                                                            class="cursor button_success fa fa-plus"
                                                            id="add_unit"></span></th>
                                            </tr>
                                            </thead>
                                            <tbody id="tbody">
                                            <?php $__currentLoopData = $product_unit; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                    <td class="count_index<?php echo e($key+1); ?>"><?php echo e($key+1); ?></td>
                                                    <td><?php echo Form::text('qty[]', $row->qty_per_unit, array('placeholder' => __('administrator.qty_per_unit'),'class' => 'form-control input-sm number-only','readonly')); ?>

                                                        <?php echo Form::hidden('id[]', $row->id); ?></td>
                                                    <td><?php echo Form::select('size_id[]',$size, $row->size_id, array('placeholder' => __('administrator.size'),'class' => 'form-control input-sm size_id','readonly')); ?></td>
                                                    <td><?php echo Form::text('cost[]', $row->cost, array('placeholder' => __('administrator.cost'),'class' => 'form-control input-sm number-only cost','required')); ?></td>
                                                    <td><?php echo Form::text('barcode_child[]', $row->barcode, array('placeholder' => __('administrator.barcode'),'class' => 'form-control input-sm','readonly')); ?></td>
                                                    <td style="text-align: center">
                                                        <span class="cursor button_danger fa <?php echo e(($row->qty_per_unit==1?' fa-ban ':' remove_row fa-close ')); ?>"></span>
                                                    </td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>

                                <div class="form-group col-sm-12 col-xs-12">
                                    <div class="col-sm-2 col-xs-12 ">
                                        <label for="name"><?php echo e(__('administrator.qty_alert')); ?><span id="unit_name"
                                                                                                  style="color:#c53d3d"></span></label>
                                    </div>
                                    <div class="col-sm-10 col-xs-12">
                                        <?php echo Form::text('qty_alert', null, array('placeholder' => __('administrator.qty_alert'),'class' => 'form-control input-sm')); ?>

                                    </div>
                                </div>
                                <div class="form-group col-sm-12 col-xs-12">
                                    <div class="col-sm-2 col-xs-12 ">
                                        <label for="name"><?php echo e(__('administrator.note')); ?></label>
                                    </div>
                                    <div class="col-sm-10 col-xs-12">
                                        <?php echo Form::textarea('note', null, array('placeholder' => __('administrator.note'),'class' => 'form-control input-sm no-resize','rows'=>4)); ?>

                                    </div>
                                </div>
                                <div class="col-sm-12 col-xs-12">
                                    <div class="form-group footer-save">
                                        <button type="submit" class=" button_primary pull-right"><span
                                                    class="fa fa-save"></span> <?php echo e(__('administrator.save')); ?></button>
                                        <button type="button" onClick="history.go(-1)"
                                                class=" button_warning pull-right">
                                            <span class=" fa fa-arrow-circle-left"></span> <?php echo e(__('administrator.back')); ?>

                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php echo Form::close(); ?>

        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script type="text/javascript">

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make(branchMenu(), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/administrator/setup-item/product-cut-piece/edit.blade.php ENDPATH**/ ?>