<!-- 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">Basic 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">Basic</li>
				</ol>
			</div>
		</div>
	</div>
</section>

<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<!-- Small boxes (Stat box) -->
		<div class="row">
			<div class="col-md-12">
				<form id="frmBasic" action="settings/basic" method="post">
					<div class="card card-primary">
						<div class="card-header">
							<h3 class="card-title">Basic Settings</h3>
						</div>

						<div class="card-body">
							<div class="row">
								<div class="col-md-6">
									<div class="form-group">
										<label for="ac_payable">Supplier Chart of Account</label>
										<select name="ac_payable" id="ac_payable" class="form-control select2">
											<option value="">Root</option>
											<?php echo $payable_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_receivable">Customer Chart of Account</label>
										<select name="ac_receivable" id="ac_receivable" class="form-control select2">
											<option value="">Root</option>
											<?php echo $receivable_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_cash">Cash Book Chart of Account</label>
										<select name="ac_cash" id="ac_cash" class="form-control select2">
											<option value="">Root</option>
											<?php echo $cash_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_bank">Bank Book Chart of Account</label>
										<select name="ac_bank" id="ac_bank" class="form-control select2">
											<option value="">Root</option>
											<?php echo $bank_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_sales">Sales Chart of Account</label>
										<select name="ac_sales" id="ac_sales" class="form-control select2">
											<option value="">Root</option>
											<?php echo $sales_tree; ?>
										</select>
									</div>
								</div>

								<div class="col-md-6">
									<div class="form-group">
										<label for="ac_purchase">Purchase Chart of Account</label>
										<select name="ac_purchase" id="ac_purchase" class="form-control select2">
											<option value="">Root</option>
											<?php echo $purchase_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_inventory">Inventory Chart of Account</label>
										<select name="ac_inventory" id="ac_inventory" class="form-control select2">
											<option value="">Root</option>
											<?php echo $inventory_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_cogs">Cost of Goods Sold Chart of Account</label>
										<select name="ac_cogs" id="ac_cogs" class="form-control select2">
											<option value="">Root</option>
											<?php echo $cogs_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="ac_tax">Sales TAX Chart of Account</label>
										<select name="ac_tax" id="ac_tax" class="form-control select2">
											<option value="">Root</option>
											<?php echo $tax_tree; ?>
										</select>
									</div>
									<div class="form-group">
										<label for="tax_rate">Default Sales TAX Rate (%)</label>
										<input type="text" name="tax_rate" id="tax_rate" class="form-control" value="<?php echo $tax_rate; ?>">
									</div>
								</div>
							</div>
						</div>

						<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
						<?php if ( count( $settings ) > 0 ): ?>
							<input type="hidden" name="id" value="<?php echo $settings['id']; ?>">
						<?php endif;?>

						<div class="card-footer">
							<input type="submit" class="btn bg-gradient-primary" value="Save Changes">
							<input type="reset" class="btn bg-gradient-danger" value="Cancel">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</section>