
<?php $__env->startSection('title','Add Account'); ?>
<?php $__env->startSection('main'); ?>
  <div class="container-fluid ">
    <div class="row">
      <div class="col-md-5">
            <div class="card mt-2">
          <div class="card-header ">
            Add New Account
          </div>
        <form action="<?php echo e(url('/account/add')); ?>" method="post">
            <?php echo csrf_field(); ?>
          <div class="card-body" id="card-sm">
                <div class="row mb-2 mb-md-0">
                  <div class="col-md-4"><p>Header Code</p></div>
                  <div class="col-md-8">
                      <input type="text" class="form-control form-control-sm" placeholder="301-Expense _ 701/Bank" name="header_code">
                      <span class="text-danger"><?php $__errorArgs = ['header_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>Enter Your Header Code <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?></span>
                  </div>
                </div>
                
                <div class="row mb-2 mb-md-0">
                  <div class="col-md-4"><p>Account ID</p></div>
                  <div class="col-md-8"><input name="company_id" type="text" class="form-control form-control-sm" disabled></div>
                </div>
                <div class="row mb-2 mb-md-0">
                  <div class="col-md-4"><p>Account Name *</p></div>
                  <div class="col-md-8">
                      <input type="text" value="<?php echo e(old('account_name')); ?>" name="account_name" class="form-control form-control-sm">
                      <span class="text-danger"><?php $__errorArgs = ['account_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>Enter Again Customer Name <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?></span>
                  </div>
                </div>   
                
                <div class="row mb-2 mb-md-0">
                  <div class="col-md-4"><p>Account Urdu</p></div>
                  <div class="col-md-8"><input type="text" value="<?php echo e(old('account_name_urdu')); ?>" name="account_name_urdu" class="form-control form-control-sm"></div>
                </div>      
                <div class="row mb-2 mb-md-0 d-none">
                  <div class="col-md-4"><p>Address ID *</p></div>
                  <div class="col-md-8"><input type="text" value="<?php echo e(old('address_id')); ?>" id="address_id" name="address_id" class="form-control form-control-sm"></div>
                </div>         
                <div class="row mb-2 mb-md-0 d-none">
                  <div class="col-md-4"><p>Address *</p></div>
                    <div class="col-md-8">
                        
                      <select class="form-control form-control-sm  m-bot15 d-none"  name="address" id="address">
                    <option value="<?php echo e(old('address')); ?>" selected>
                     <?php if(old('address')== null): ?>
                     Select Your address
                     <?php else: ?>
                     <?php echo e(old('address')); ?>

                     <?php endif; ?>
                     
                   <?php $__currentLoopData = $address; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                   <option data-id="<?php echo e($data->id); ?>" value="<?php echo e($data->address); ?>"><?php echo e($data->address); ?></option>
                   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                       

                    </select>

                        <span class="text-danger"><?php $__errorArgs = ['address_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>Enter your address or address id again <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?></span>
                    </div>
                </div>      
                
                <div class="row mb-2 mb-md-0 d-none">
                  <div class="col-md-4"><p>Area</p></div>
                  <div class="col-md-8"><input type="text" name="area" class="form-control form-control-sm"></div>
                </div>                    
                <div class="row mb-2 mb-md-0 d-none">
                  <div class="col-md-4"><p>Mobile</p></div>
                  <div class="col-md-8"><input type="text" name="mobile" class="form-control form-control-sm"></div>
                </div>         
                <div class="row mb-2 mb-md-0 d-none">
                  <div class="col-md-4"><p>Type</p></div>
                  <div class="col-md-8">
                                      <select class="form-select form-select-sm" name="type" aria-label="Default select example">
                                      <option selected>Expense</option>
                                      <option value="Wholesaler">Wholesaler</option>
                                      <option value="Retailer">Retailer</option>
                                    </select>
                  </div>
                </div>      
                
                  <div class="row mb-2 mb-md-0">
                  <div class="col-md-4 col-6"><p>Active Y/N</p></div>
                  <div class="col-md-8 col-6">
                      <div class="form-check form-switch">
                      <input class="form-check-input" type="checkbox" name="active" role="switch" id="flexSwitchCheckChecked" checked>
                      </div>
                  </div>
                </div>  



                <div class="row" id="cc">
                    <div class="col-md-4 offset-md-4 col-6">
                      <button type="submit" class="btn btn-primary btn-sm"  type="button">Save/Close</button>
                    </div>        
                    <div class="col-md-4 col-6 text-secondary" >
                      
                      <a href="/" class="btn btn-sm btn-danger">Cancel/Close</a>
                      
                    
                    </div>                           
                </div>
                
        </div>
        </form>

          <div class="card-footer text-muted text-md-end">
            <span>lastUpdatedPerson:- Fahad 2 days ago</span>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script>
     $('#address').change(function(){
       
       
       var selected = $(this).find('option:selected');    
        var address_id = selected.data('id');
        $('#address_id').val( address_id );
        
       
   });
   </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/adnanele/public_html/resources/views/account/add.blade.php ENDPATH**/ ?>