<?php $__env->startSection('content'); ?>
 
<?php if(session()->has('message')): ?>
<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
        <?php 
        $type= session('type') ;
         ?>
        <div class="col-md-4 alert alert-<?php echo e($type); ?> 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; ?>
<br/>
<div class="row">
<div class="col-md-1" style="margin-left:-50px"></div>
  <div class="col-md-6">
      <div class="card " >
          <div class="card-header" style="background-color: #2C4E71;">
            <h3 class="card-title" style="color:#FFF">تحويل من حساب الي حساب </h3>
          </div>
          <!-- /.card-header -->
          <!-- form start -->
        <form   role="form" method="POST" action="<?php echo e(url('/safe_account_transfer/create')); ?>">
                        <?php echo e(csrf_field()); ?>

          <div class="box-body">
                
            <div class="card-body">
                   
            
            <fieldset class="border p-2 col-md-12" style="width:100%">
               <legend  class="w-auto">Transfer From</legend>
               <div class="row" style="margin:20px">
                      <div class="form-group col-md-8">
                        <label>From Safe Account  - من حساب خزنة   </label>
                        <select class="form-control select2 select2-hidden-accessible"   style="width: 100%;" name="safe_account_id_from" id="safe_account_id_from" required>
                          <?php foreach( $accounts as $account ): ?> 
                          <option value="<?php echo e($account->id); ?>"  ><?php echo e($account->payment_method->name); ?> -- <?php echo e($account->branch->name); ?> </option>
                          <?php endforeach; ?>
                        </select>
                      </div>
                      <div class="form-group col-md-4">
                          <label for="exampleInputPassword1">Amount  </label>
                          <input type="number"  min="1" id="amount" name="amount" class="form-control"  placeholder="Amount from " required>
                      </div>
                      </div> 
                 </fieldset><br/>
            
                 <div style="text-align: center;">
                  <img src='<?php echo e(asset("theme/dist/img/arrow.png")); ?>' alt="Egwaste"  style="height:40px"   />
                 </div>
                 

                 <fieldset class="border p-2 col-md-12" style="width:100%">
               <legend  class="w-auto">Transfer To</legend>
               <div class="row" style="margin:20px">
                      <div class="form-group col-md-12" >
                        <label>To Safe Account  - الي حساب خزنة </label>
                        <select class="form-control select2 select2-hidden-accessible"   style="width: 100%;" name="safe_account_id_to" id="safe_account_id_to" required>
                        <?php foreach( $accounts as $account ): ?> 
                          <option value="<?php echo e($account->id); ?>"  ><?php echo e($account->payment_method->name); ?> -- <?php echo e($account->branch->name); ?> </option>
                          <?php endforeach; ?>
                        </select>
                      </div>
                       
                      </div>
                 </fieldset>
                 <br/><br/>
                  
            </div>
                <!-- /.box-body -->
  
            <div class="card-footer">
              <button type="submit" class="btn btn-info">Transfer</button>
            </div>  

          </div>
        </form>
      </div>
  </div>
    
  <div class="col-md-5" style="margin-top:-20px">
    <div class="card-body">
                <table id="example20" class="table table-bordered ">
                  <thead>
                  
                 <tr >
                  
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الرصيد    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> أسم الحساب    </th>


                 </tr>
                 </thead>
              <tbody>
                           
                <?php foreach( $accounts as $account ): ?>   
                 
                 
                <tr>
                 
                <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($account->balance); ?></td>
                <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" ><?php echo e($account->payment_method->name); ?>-<?php echo e($account->branch->name); ?></td>
                
                  

                </tr>
               <?php endforeach; ?>
                </tbody>
                </table>
              </div>
              <!-- /.card-body -->  
  </div>
  <div class="col-md-.5"></div>
</div>
<br/><br/><br/>

 


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