<?php $__env->startSection("body"); ?>

    <div class="main-cont">
        <div class="new-pur">
            <h6>All Products</h6>
            <hr>
            
            
            

            <div class="row">
                <!-- <input type="text" name="serial" id="serial"> -->
            </div>
            <br>
            <!-- <input value="find item" class="btn btn-primary" id="getitem"> -->
            <input type="text" id="serial" onchange="getItemStock()"  placeholder="Enter a serial">
            <input value="remove item" class="btn btn-primary" id="removeitem">
            <div id="data">
            <form action="/create_order" method="post">
                     <?php echo csrf_field(); ?>

                     <input type="text" name="customer_name" placeholder="Enter a Customer Name">
                        <!-- <input type="text"  name="customer_number" placeholder="Enter a Customer number"> -->
                        <input type="text"  name="customer_phone" placeholder="Enter a Customer phone">
                        <input type="text" name="customer_address" placeholder="Enter a Customer address">
                        <input type="text" name="customer_branch_number" value="<?php echo e($branch_number); ?>" readonly="readonly" placeholder="Enter a Customer branch number">
                        <input type="number" min="0" name="discount" value="0"  placeholder="Enter a Discount">
                        <input type="number" min="0" name="Tax_amount" value="0"  placeholder="Enter a Tax Amount">
                        <!-- <input type="text" id="serial" onchange="getItemStock()"  placeholder="Enter a serial"> -->
                        <!-- <input type="number" name="Net_amount" value=""  placeholder="Enter a Net Amount"> -->
                        <input type="hidden" name="created_by" value="<?php echo e($created_by); ?>"  >
                       <!-- type_master -->
                       <br>
                        <select name="customer_type">
                        <option value="5">تاجر</option>
                        <option value="6">عميل عام</option>
                        
                        </select>

                        <select name="order_type">
                        <option value="9">	بيع</option>
                        <option value="10"> مرتجع</option>
                        
                        </select>

                        <select name="payment_type">
                        <option value="13">	نقدى</option>
                        <option value="14"> فيزا</option>
                        
                        </select>
                        <br>
                <table id="example" class="table table-striped table-bordered" style="width:100%" dir="ltr">
                    <thead>
                    <tr>
                        <th>ref code</th>
                        <th>item quantity</th>
                        <th>item code</th>
                        <th>item length</th>
                        <th>item serial</th>
                        <th style="display:none" >item stock</th>



                    </tr>
                    </thead>
                    <tbody>


                    </tbody>


                    <tfoot>
                    <tr>
                        <th>ref code</th>
                        <th>item quantity</th>
                        <th>item code</th>
                        <th>item length</th>
                        <th>item serial</th>
                   


                    </tr>
                    </tfoot>
                </table>


                <button style="width: 19%;" class="btn-sv" name="Draft" value="draft">Draft</button>
                <button style="width: 19%;" class="btn-sv" name="Confirm" value="confirm">Confirm</button>
                        </form>
            </div>


        </div>


        <script type="text/javascript">


            $(document).ready(function () {

                $('#example tbody').on( 'click', 'tr', function () {

                    if ( $(this).hasClass('selected') ) {
                        $(this).removeClass('selected');
                    }
                    else {
                        table.$('tr.selected').removeClass('selected');
                        $(this).addClass('selected');
                    }

                } );
                $('#removeitem').click( function () {
                    table.row('.selected').remove().draw( false );
                } );

         
                var table = $('#example').DataTable();

                $('#example tbody ').on('click', 'tr', function () {
                    $(this).toggleClass('selected');
                    var checkbox = $(this).find("input[type='checkbox']");
                    checkbox.prop('checked', !checkbox.prop("checked"));


                });

                $('#button').click(function () {
                    alert(table.rows('.selected').data().length + ' row(s) selected');
                });
            });


            $(document).ready(function () {
                var table = $('#example2').DataTable();

                $('#example tbody ').on('click', 'tr', function () {
                    $(this).toggleClass('selected');
                    var checkbox = $(this).find("input[type='checkbox']");
                    checkbox.prop('checked', !checkbox.prop("checked"));


                });

                $('#button').click(function () {
                    alert(table.rows('.selected').data().length + ' row(s) selected');
                });
            });
        </script>
<script type="text/javascript" src="<?php echo e(asset('Js/ajaxSerial.js')); ?>"></script> 
<?php $__env->stopSection(); ?>


<?php echo $__env->make("include", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\khaled nabawy\Desktop\macpos\resources\views/itemwithserial.blade.php ENDPATH**/ ?>