<?php $__env->startSection('title'); ?>
    Expenses Tracking Page
<?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>

<?php $__env->stopSection(); ?>
<!-- page content -->
<?php $__env->startSection('content'); ?>
    <div class="right_col" role="main">
        <div class="">
            <div class="page-title">
                <div class="title_left">
                    <h3>Expenses Management</h3>
                </div>
                <div class="title_right">
                    <div class="col-md-12 col-sm-12 col-xs-12 form-group top_search">
                        <div class="row">
                            <div class="col-md-6"></div>
                            <div class="col-md-3">
                                <div class="input-group">
                                    <a href="<?php echo e(route('expensesheading.create')); ?>" class="btn btn-xs btn-primary">Add Heading</a>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="input-group">
                                    <a href="<?php echo e(route('expenses.list')); ?>" class="btn btn-xs btn-primary">View expenses</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
            <?php if(Session::has('success_message')): ?>
                <div class="alert alert-success">
                    <?php echo e(Session::get('success_message')); ?>

                </div>
            <?php endif; ?>
            <?php if(Session::has('error_message')): ?>
                <div class="alert alert-danger">
                    <?php echo e(Session::get('error_message')); ?>

                </div>
            <?php endif; ?>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>Entry Expenses Amount</h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                       aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                           <div class="row">
                               <div class="col-sm-3"></div>
                               <div class="col-sm-6">
                                    <form action="<?php echo e(route('expenses.store')); ?>" method="post">
                                        <?php echo e(csrf_field()); ?>

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Date *</label>
                                            <div class="col-sm-9">
                                                <input id="datepicker" type="text" name="expense_date"  class="form-control input-sm" data-zdp_readonly_element="true" value="<?php echo e(date('d-m-Y')); ?>" placeholder="dd-mm-yyyy">
                                                <p class="error-sms"><?php echo e($errors->first('expense_date')); ?></p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1">Ex. Type *</label>
                                            <div class="col-sm-9">
                                                <select name="type_name"  class="form-control input-sm select2">
                                                    <option value="">-Select Type-</option>
                                                    <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ty): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($ty->id); ?>" <?php echo e($ty->id == old('type_name') ? 'selected' : ''); ?>><?php echo e($ty->type_name); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select> 
                                                <p class="error-sms"><?php echo e($errors->first('type_name')); ?></p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1-1">Amount </label>
                                            <div class="col-sm-9">
                                                <input type="text" id="form-field-1-1" name="expense_amount" value="<?php echo e(old('expense_amount')); ?>" placeholder="Expense Amount" class="form-control input-sm">
                                                <p class="error-sms"><?php echo e($errors->first('expense_amount')); ?></p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1-1">Description </label>
                                            <div class="col-sm-9">
                                                <input type="text" id="form-field-1-1" name="description" value="<?php echo e(old('description')); ?>" placeholder="Expense Description" class="form-control input-sm">
                                                <p class="error-sms"><?php echo e($errors->first('description')); ?></p>
                                            </div>
                                        </div>
                                        <div class="box-footer">
                                            <button type="submit" name="btnSave" class="btn btn-primary btn-block" >Expenses Enty Save</button>
                                        </div>
                                    </form>
                               </div>
                               <div class="col-sm-3"></div>
                           </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /page content -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>

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