<?php
$created = can_action('36', 'created');
$edited = can_action('36', 'edited');
$deleted = can_action('36', 'deleted');
$currency = $this->db->where('code', config_item('default_currency'))->get('tbl_currencies')->row();
?>

<?= message_box('success'); ?>
<?= message_box('error'); ?>

<div class="space-y-4">
	<?php ob_start(); ?>
		<table class="erp-table table table-striped DataTables min-w-[980px] whitespace-nowrap" id="DataTables" width="100%">
			<thead class="text-xs uppercase text-muted-foreground">
				<tr>
					<th class="py-2 px-3"><?= lang('account') ?></th>
					<th class="py-2 px-3"><?= lang('description') ?></th>
					<th class="py-2 px-3"><?= lang('account_number') ?></th>
					<th class="py-2 px-3"><?= lang('phone') ?></th>
					<th class="py-2 px-3"><?= lang('balance') ?></th>
					<?php $show_custom_fields = custom_form_table(21, null);
					if (!empty($show_custom_fields)) {
						foreach ($show_custom_fields as $c_label => $v_fields) {
							if (!empty($c_label)) { ?>
								<th class="py-2 px-3"><?= $c_label ?> </th>
					<?php }
						}
					} ?>
					<th class="py-2 px-3 text-right"><?= lang('action') ?></th>
				</tr>
			</thead>
			<tbody></tbody>
		</table>
	<?php
	$table_markup = ob_get_clean();
	echo $this->load->view('admin/common/erp/table_shell', array(
		'table' => $table_markup,
	), true);
	?>
	<script type="text/javascript">
		list = base_url + "admin/account/accountList";
	</script>
</div>
