<!-- Content Header (Page header) -->
<section class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0">Default Chart of Account Settings</h1>
			</div>

			<div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
					<li class="breadcrumb-item"><a href="dashboard">Dashboard</a></li>
					<li class="breadcrumb-item"><a href="settings">Settings</a></li>
					<li class="breadcrumb-item active">Default Chart of Account</li>
				</ol>
			</div>
		</div>
	</div>
</section>

<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<div class="row mb-4">
			<div class="col-md-12">
				<?php $this->load->view( 'flash_message' );?>
			</div>

			<div class="col-lg-3 col-md-6">
				<a href="settings/chart-save" class="btn btn-block bg-gradient-primary"><i class="fa fa-plus"></i>&nbsp;&nbsp;&nbsp;<strong>Add New Default Chart of Account</strong></a>
			</div>
		</div>

		<!-- Small boxes (Stat box) -->
		<div class="row">
			<div class="col-12">
				<div class="card">
					<div class="card-header">
						<h3 class="card-title">Default Chart of Account List</h3>
					</div>

					<div class="card-body">
						<table id="data-table" class="table table-bordered table-hover">
							<thead>
								<tr>
									<th>Code of Account</th>
									<th>Name of Account</th>
									<th>Account Class</th>
									<th>Created</th>
									<th>Status</th>
									<th class="col-md-2 text-center">Actions</th>
								</tr>
							</thead>
							<tbody>
								<?php foreach ( $charts as $chart ): ?>
									<tr>
										<td><?php echo $chart['code']; ?></td>
										<td><?php echo $chart['name']; ?></td>
										<td><span class="label label-info"><?php echo $chart['type']; ?></span></td>
										<td><?php echo date( 'jS M, Y ', strtotime( $chart['created_at'] ) ); ?></td>
										<td><?php if ( $chart['status'] == 'Active' ): ?><span class="label label-success">Active</span><?php else: ?><span class="label label-important">Inactive</span><?php endif;?></td>
										<td class="col-md-2 text-center">
											<a class="btn-sm btn-warning" href="settings/chart-save/<?php echo $chart['id']; ?>"><i class="fa fa-edit"></i> Edit</a>
											<a class="btn-sm btn-danger del" href="settings/chart-delete/<?php echo $chart['id']; ?>"><i class="fa fa-trash"></i> Delete</a>
										</td>
									</tr>
								<?php endforeach;?>
							</tbody>
							<tfoot>
								<tr>
									<th>Code of Account</th>
									<th>Name of Account</th>
									<th>Account Class</th>
									<th>Created</th>
									<th>Status</th>
									<th class="col-md-2 text-center">Actions</th>
								</tr>
							</tfoot>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>