

<?php $__env->startSection('content'); ?>
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading"><?php echo e(_lang('Update Expense')); ?></div>

			<div class="panel-body">
		<form method="post" action="<?php echo e(route('transactions.update_expense', $id)); ?>" enctype="multipart/form-data">
    <?php echo e(csrf_field()); ?>  


				<div class="col-md-6">
				 <div class="form-group">
					<label class="control-label"><?php echo e(_lang('Trans Date')); ?></label>						
					<input type="text" class="form-control datepicker" name="trans_date" value="<?php echo e($transaction->trans_date); ?>" required>
				 </div>
				</div>
<!--<input type="hidden" name="account_id" value="1">-->


				<div class="col-md-6">
				 <div class="form-group">
					<label class="control-label"><?php echo e(_lang('Amount')." ".get_option('currency_symbol')); ?></label>						
					<input type="text" class="form-control float-field" name="amount" value="<?php echo e($transaction->amount); ?>" required>
				 </div>
				</div>


				<div class="col-md-6">
				 <div class="form-group">
					 
					<label class="control-label"><?php echo e(_lang('Payment to Account')); ?></label>						
					<select class="form-control select2" name="chart_id" required>
						<?php $__currentLoopData = $account_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
				<option value="<?php echo e($account['id']); ?>"  <?php if($transaction->chart_id == $account['id']): echo 'selected'; endif; ?>><?php echo e($account['account_name']); ?></option>
				<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
			</select>
				 </div>
				</div>
							
				<div class="col-md-6">
				 <div class="form-group">
					<label class="control-label"><?php echo e(_lang('Payment From Account')); ?></label>						
						<select class="form-control select2" name="account_id">
				<?php $__currentLoopData = $cash_and_bank; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
				<option value="<?php echo e($account['id']); ?>" <?php if($transaction->account_id == $account['id']): echo 'selected'; endif; ?>><?php echo e($account['account_name']); ?></option>
				<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
			</select>
				 </div>
				</div>

	<input type="hidden" name="trans_type" value="expense">
				<input type="hidden" name="dr_cr" value="dr">

			

				<div class="col-md-6">
				 <div class="form-group">
					<label class="control-label"><?php echo e(_lang('Attachment')); ?></label>						
					<input type="file" class="form-control appsvan-file" data-value="<?php echo e($transaction->attachment); ?>" name="attachment">
				 </div>
				</div>

				<div class="col-md-6">
				 <div class="form-group">
					<label class="control-label"><?php echo e(_lang('Note')); ?></label>						
					<textarea class="form-control" name="note"><?php echo e($transaction->note); ?></textarea>
				 </div>
				</div>

				
				<div class="col-md-12">
				  <div class="form-group">
					<button type="submit" class="btn btn-primary"><?php echo e(_lang('Update Expense')); ?></button>
				  </div>
				</div>
			</form>
			</div>
		</div>
	</div>
</div>

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



<?php echo $__env->make('layouts.backend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\hostel\resources\views/backend/accounting/transaction/expense/edit.blade.php ENDPATH**/ ?>