<?php $__env->startSection('content'); ?>
	<div class="row">
    	<div class="col-lg-12">
    		<h1 class="page-header">Budget</h1>
    	</div>
    </div>
    <div class="row">
        <div class="col-lg-12">
	        <div class="panel panel-default">
	        	<?php if(session('status')): ?>
					<div class="alert alert-success">
						<?php echo e(session('status')); ?>

					</div>
				<?php endif; ?>
				<?php if(count($errors) > 0): ?>
					<div class="alert alert-danger">
						<strong>Whoops!</strong> There were some problems with your input.<br><br>
						<ul>
							<?php foreach($errors->all() as $error): ?>
								<li><?php echo e($error); ?></li>
							<?php endforeach; ?>
						</ul>
					</div>
				<?php endif; ?>
		        <div class="panel-heading">
	              Add Suffix to <strong><?php echo e($gl->description); ?> - <?php echo e($gl->number); ?></strong>
	            </div>
	            <div class="panel-body">
	            	<form id="theForm" class="form-horizontal" role="form" method="POST" action="<?php echo e(url('admin/budget/suffix')); ?>">
						<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
						<input type="hidden" name="glID" value="<?php echo e($gl->id); ?>">
						<div class="form-group">
							<div class="col-sm-12 col-md-3 morePadding morePadding2">
								<?php foreach(\App\Budget_suffix::orderBy('code')->get()->take(20) as $suffix): ?>
									<?php if($suffix->code !== 0): ?>
										<input type="checkbox" name="suffix[<?php echo e($suffix->id); ?>]" value="1" <?php echo e(\App\Budget_gl_suffix::where('gl','=',$gl->id)->where('suffix','=',$suffix->id)->exists() ? 'checked' : ''); ?>>
										<?php echo e($suffix->code); ?> - <?php echo e($suffix->name); ?><br>
									<?php else: ?>
										<input type="checkbox" checked disabled >
										<?php echo e($suffix->code); ?> - <?php echo e($suffix->name); ?><br>
									<?php endif; ?>
								<?php endforeach; ?>
							</div>
							<div class="col-sm-12 col-md-3 morePadding morePadding2">
								<?php foreach(\App\Budget_suffix::orderBy('code')->skip(20)->take(20)->get() as $suffix): ?>
									<input type="checkbox" name="suffix[<?php echo e($suffix->id); ?>]" value="1" <?php echo e(\App\Budget_gl_suffix::where('gl','=',$gl->id)->where('suffix','=',$suffix->id)->exists() ? 'checked' : ''); ?>>
									<?php echo e($suffix->code); ?> - <?php echo e($suffix->name); ?><br>
								<?php endforeach; ?>
							</div>
							<div class="col-sm-12 col-md-3 morePadding morePadding2">
								<?php foreach(\App\Budget_suffix::orderBy('code')->skip(40)->take(20)->get() as $suffix): ?>
									<input type="checkbox" name="suffix[<?php echo e($suffix->id); ?>]" value="1" <?php echo e(\App\Budget_gl_suffix::where('gl','=',$gl->id)->where('suffix','=',$suffix->id)->exists() ? 'checked' : ''); ?>>
									<?php echo e($suffix->code); ?> - <?php echo e($suffix->name); ?><br>
								<?php endforeach; ?>
							</div>
							<div class="col-sm-12 col-md-3 morePadding morePadding2">
								<?php foreach(\App\Budget_suffix::orderBy('code')->skip(60)->take(20)->get() as $suffix): ?>
									<input type="checkbox" name="suffix[<?php echo e($suffix->id); ?>]" value="1" <?php echo e(\App\Budget_gl_suffix::where('gl','=',$gl->id)->where('suffix','=',$suffix->id)->exists() ? 'checked' : ''); ?>>
									<?php echo e($suffix->code); ?> - <?php echo e($suffix->name); ?><br>
								<?php endforeach; ?>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-12 col-md-6 morePadding morePadding2">
								<button type="submit" class="btn btn-primary">
									Save
								</button>
							</div>
							<div class="col-sm-12 col-md-6 morePadding morePadding2">
								<input type="submit" name="submit" value="Save & Continue" class="btn btn-primary" style="float: right;">
							</div>
						</div>
					</form>	
	            </div>
		    </div>
	    </div>
	</div>
<?php $__env->stopSection(); ?>

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

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

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

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