<?php $__env->startSection('content'); ?>

  <!-- page content -->

<div class="right_col" role="main">

  <div class="row x_panel">

    <div class="col-md-12 col-sm-12 col-xs-12">

    <h1> Add Transactions</h1>



<form action="<?php echo url('/'); ?>/admin/transactions/add" id="" class="form-horizontal " method="post" enctype="multipart/form-data">

<?php echo e(csrf_field()); ?>




    

	<!-- Tc_id Start -->

    <div class="form-group">

        <label for="tc_id" class="control-label col-md-3"> Trader Company </label>

          <div class="col-md-4">

          <select id="tc_id" name="tc_id" class="form-control select2" onchange="getTrader(this.value)">
            <option value="">Select</option>
            <?php

              foreach ($trader_company as $value) {

                echo '<option value="'.$value->tc_id.'"> '.$value->company_name.'</option>';

              }

            ?>

          </select>

        </div>

        <div class="col-sm-5">

         <div class="label label-danger"><?php echo e($errors->first("tc_id")); ?></div>

      </div>

    </div>

      <!-- Tc_id End -->





	<!-- Trader Start -->

    <div class="form-group">

        <label for="trader" class="control-label col-md-3"> Trader </label>

          <div class="col-md-4">

          <select id="trader" name="trader" class="form-control select2">
            <option value="">Select</option>
            <?php

              foreach ($traders as $value) {

                echo '<option value="'.$value->tl_id.'"> '.$value->name.'</option>';

              }

            ?>

          </select>

        </div>

        <div class="col-sm-5">

         <div class="label label-danger"><?php echo e($errors->first("trader")); ?></div>

      </div>

    </div>

      <!-- Trader End -->





	<!-- Farmer Start -->

    <div class="form-group">

        <label for="farmer" class="control-label col-md-3"> Farmer </label>

          <div class="col-md-4">

          <select id="farmer" name="farmer" class="form-control select2">
            <option value="">Select</option>
            <?php

              foreach ($farmers as $value) {

                echo '<option value="'.$value->f_id.'"> '.$value->name.'</option>';

              }

            ?>

          </select>

        </div>

        <div class="col-sm-5">

         <div class="label label-danger"><?php echo e($errors->first("farmer")); ?></div>

      </div>

    </div>

      <!-- Farmer End -->





	<!-- Buyer Start -->

    <div class="form-group">

        <label for="buyer" class="control-label col-md-3"> Buyer </label>

          <div class="col-md-4">

          <select id="buyer" name="buyer" class="form-control select2">
            <option value="">Select</option>
            <?php

              foreach ($buyers as $value) {

                echo '<option value="'.$value->b_id.'"> '.$value->name.'</option>';

              }

            ?>

          </select>

        </div>

        <div class="col-sm-5">

         <div class="label label-danger"><?php echo e($errors->first("buyer")); ?></div>

      </div>

    </div>

      <!-- Buyer End -->









	<!-- Amount Start -->

	<div class="form-group">

	  <label for="amount" class="col-sm-3 control-label"> Amount </label>

	  <div class="col-sm-4">

	    <input type="text" class="form-control" id="amount" name="amount" 

	    value="<?php echo e(old('amount')); ?>">

	  </div>

	  <div class="col-sm-5">

      <div class="label label-danger"><?php echo e($errors->first("amount")); ?></div>

      </div>

	</div> 

	<!-- Amount End -->





	





	<!-- Pay_type Start -->

	<div class="form-group">

	  <label for="pay_type" class="col-sm-3 control-label"> Pay Type </label>

	  <div class="col-sm-4">

      <select class="form-control" id="pay_type" name="pay_type">
        <option value="">Select</option>
        <option value="1" <?php if(old('pay_type')=='1'){echo  'selected';}?>>Cash</option>
        <option value="2" <?php if(old('pay_type')=='2'){echo  'selected';}?>>Cheque</option>
      </select>

	  </div>

	  <div class="col-sm-5">

      <div class="label label-danger"><?php echo e($errors->first("pay_type")); ?></div>

      </div>

	</div> 

	<!-- Pay_type End -->





	





	<!-- Bank_name Start -->

	<div class="form-group">

	  <label for="bank_name" class="col-sm-3 control-label"> Bank Name </label>

	  <div class="col-sm-4">

	    <input type="text" class="form-control" id="bank_name" name="bank_name" 

	    value="<?php echo e(old('bank_name')); ?>">

	  </div>

	  <div class="col-sm-5">

      <div class="label label-danger"><?php echo e($errors->first("bank_name")); ?></div>

      </div>

	</div> 

	<!-- Bank_name End -->





	





	<!-- Cheque_no Start -->

	<div class="form-group">

	  <label for="cheque_no" class="col-sm-3 control-label"> Cheque No. </label>

	  <div class="col-sm-4">

	    <input type="text" class="form-control" id="cheque_no" name="cheque_no" 

	    value="<?php echo e(old('cheque_no')); ?>">

	  </div>

	  <div class="col-sm-5">

      <div class="label label-danger"><?php echo e($errors->first("cheque_no")); ?></div>

      </div>

	</div> 

	<!-- Cheque_no End -->





	



	<!-- Status Start -->

	<div class="form-group">

        <label class="control-label col-md-3">Status</label>

         <div class=" col-md-4 switch">

                    <div class="onoffswitch">

     <input type="checkbox" class="onoffswitch-checkbox"  data-on-label="Yes" data-off-label="No"  name="status" value="0" id="status"  style="width:20px; height:20px;"/>

    <?php echo e($errors->first("status")); ?>


                        <label class="onoffswitch-label" for="status">

                            <span class="onoffswitch-switch"></span>

                            <span class="onoffswitch-inner"></span>

                        </label>

                    </div>

                </div>



      </div>

      <!-- Status End -->







  <div class="form-group">

    <div class="col-sm-3" >

      </div>

      <div class="col-sm-6">

    <button type="reset" class="btn btn-default ">Reset</button>

    <button type="submit" class="btn btn-info ">Submit</button>

      </div>

        <div class="col-sm-3" >

      </div>

  </div>

</form>







    </div>

  </div>

</div>

<!-- /page content -->

<script type="text/javascript">
  function getTrader(id)
  {
    console.log(id);
  }
</script>

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




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