<?php $__env->startSection('content'); ?>
<?php if(session()->has('message')): ?>
<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
<div class="col-md-4 alert alert-success alert-dismissible" style="font-size:18px;font-weight:bold;width:400px;margin-left:15px">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <?php echo session('message'); ?>

              </div>
              </div> 
<?php endif; ?>

<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
        <div class="col-md-8">
          <!-- general form elements -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">Add New Quick Carta!  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="<?php echo e(url('/main/add')); ?>">
                        <?php echo e(csrf_field()); ?>

              <div class="box-body">
                
            
              <div class="form-group">
                <label>Choosw Supplier </label>
                <select class="form-control select2" onchange="showWasteOfSupplier(this.value)" style="width: 100%;" name="supplier_id" id="supplier_id" required>
                  <?php foreach( $suppliers as $supplier ): ?> 
                  <option value="<?php echo e($supplier->id); ?>"  ><?php echo e($supplier->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div class="form-group">
                <label>Choosw Wastes </label>
                <select class="form-control select2" 
                   style="width: 100%;" 
                   name="waste_id" id="waste_id" required>
                  <?php foreach( $wastes as $waste ): ?> 
                  <option value="<?php echo e($waste->id); ?>"  ><?php echo e($waste->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>


                <div class="form-group">
                <label>Packing Methods  - طريقة التعبئة </label>
                <select class="form-control select2" style="width: 100%;" name="packingmethod_id" id="packingmethod_id" required>
                  <?php foreach( $packingmethods as $packingmethod ): ?> 
                  <option value="<?php echo e($packingmethod->id); ?>"  ><?php echo e($packingmethod->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>

                <div class="form-group">

                <label>Physical Conditions  - الحالة الفيزيائية </label>
                <select class="form-control select2" style="width: 100%;" name="physicalcondition_id" id="physicalcondition_id" required>
                  <?php foreach( $physicalconditions as $physicalcondition ): ?> 
                  <option value="<?php echo e($physicalcondition->id); ?>"  ><?php echo e($physicalcondition->name); ?></option>
                  <?php endforeach; ?>
                </select> 
                </div>

                <div class="form-group">
                <label>Driver Name- السائق</label>
                <select class="form-control select2" style="width: 100%;" name="driver_id" id="driver_id" required>
                  <?php foreach( $drivers as $driver ): ?> 
                  <option value="<?php echo e($driver->id); ?>" ><?php echo e($driver->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>
                
                <div class="form-group">
                <label>Vehicle number - رقم السيارة  </label>
                <select class="form-control select2" style="width: 100%;" name="vehicle_id" id="vehicle_id" required>
                  <?php foreach( $vehicles as $vehicle ): ?> 
                  <option value="<?php echo e($vehicle->id); ?>"  ><?php echo e($vehicle->vehicle_num); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>


                <div class="form-group">
                <label> Suppervisor اسم المشرف   </label>
                <select class="form-control select2" style="width: 100%;" name="user_id" id="user_id" required>
                  <?php foreach( $users as $user ): ?> 
                  <option value="<?php echo e($user->id); ?>"  ><?php echo e($user->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>


                <div class="form-group">
                <label> Branch - الفرع </label>
                <select class="form-control select2" style="width: 100%;" name="branch_id" id="branch_id" required>
                  <?php foreach( $branchs as $branch ): ?> 
                  <option value="<?php echo e($branch->id); ?>"  ><?php echo e($branch->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>



                <div class="form-group">
                  <label for="exampleInputPassword1">quantity</label>
                  <input type="text" name="quantity"  value="" class="form-control"  placeholder="quantity " required>
                </div>
 
 
                 
 <div class="form-group" >
                      <label for="exampleInputPassword1">وقت الخروج</label>
                      <input type="datetime-local" name="created_at"  value="<?php echo e($datetime); ?>" step="1" class="form-control"  placeholder="Time Out " required>
                 </div>

                

                  

                  <div class="form-group">
                  <label for="exampleInputPassword1">وقت الدخول   </label>
                  <input type="datetime-local" name="updated_at"  value="<?php echo e($cenvertedTime); ?>" step="1" class="form-control"  placeholder="Time Out " required>
                  </div>
                

              
                 

                <div class="form-group">
                <label> Approved - Not Approved  </label>
                <select class="form-control " style="width: 100%;height:33px" name="approved" id="approved" required>
                <option value="notapproved"  >Not Approve</option>  
                <option value="approved"  >Approve</option>
                </select>
                </div>

                


                <div class="form-group" >
                <label> Customer اختيار جهة التدوير    </label>
                <select class="form-control select2" style="width: 100%;" name="customer_id" id="customer_id" required>
                <option value="-1"  >Waiting ...</option>  
                <?php foreach( $customers as $customer ): ?> 
                  <option value="<?php echo e($customer->id); ?>"  ><?php echo e($customer->name); ?></option>
                  <?php endforeach; ?>
                </select>
                </div>


                <div class="form-group">
                  <label for="exampleInputPassword1">comment</label>
                  <input type="text" name="comment"  value="" class="form-control"  placeholder="comment " >
                </div>
                 

              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" class="btn btn-success">Save</button>

                

              </div>
            </form>

          </div>    
</div>
         
      </div>



<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>