<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<?php 
//print_r($categories);die();
?>
<div class="box">
    <div class="box-header">
        <h2 class="blue"><i class="fa-fw fa fa-plus"></i><?= lang('Add New Account') ?></h2>
    </div>
    <div class="box-content">
        <div class="row">
            <div class="col-lg-12">
			<?php 
                $attrib = array('data-toggle' => 'validator', 'role' => 'form');
                echo admin_form_open_multipart("transaction/save_account", $attrib)
                ?>
				
                <div class="col-md-5">
					 <!--<div class="form-group">
                                    <?= lang("date", "date"); ?>
                                    <?php echo form_input('date', (isset($_POST['date']) ? $_POST['date'] : ""), 'class="form-control input-tip datetime" id="date" required="required"'); ?>
                     </div>-->
					
					<div class="form-group">
                        <?= lang("account_category", "account_category") ?> <b>*</b>
                      <?php
						
                        $ty[''] = "";
                        foreach ($account_category as $types) {
                            $ty[$types->id] = $types->name ;
                        }
                        echo form_dropdown('account_category', $ty, (isset($_POST['account_category']) ? $_POST['account_category'] :""), 'class="form-control select"  placeholder="' . lang("select") . " " . lang("account_category") . '" style="width:100%" required="required"')
                        ?>
						
					</div>
					<div class="form-group">
                        <?= lang("type", "type") ?> <b>*</b>
                      <?php
						//print_r($type);
                        $typ[''] = "";
                        foreach ($type as $types) {
                            $typ[$types->id] = $types->name ;
                        }
                        echo form_dropdown('type', $typ, (isset($_POST['type']) ? $_POST['type'] :""), 'class="form-control select"  placeholder="' . lang("select") . " " . lang("type") . '" style="width:100%" required="required"')
                        ?>
						
					</div>
					<div class="form-group">
                        <?= lang("Account_Name", "Account_Name") ?>
                        <?= form_input('Name', (isset($_POST['Name']) ? $_POST['Name'] :  ""), 'class="form-control tip" id="Name" required="required"') ?>
                    </div>
					<div class="form-group">
                        <?= lang("Account_Belong_to", "Account_Belong_to") ?>
						<?php
                        $opty = array(''  =>'Select Type','1' => lang('income'), '2' => lang('expense'), '3' => lang('income/expense'),'0' => lang('none'));
                        echo form_dropdown('belongs_to', $opty, (isset($_POST['belongs_to']) ? $_POST['belongs_to'] :""), 'class="form-control" id="belongs_to"  required="required"');
                        ?>
						
                    </div>
					
					
					<div class="form-group">
                        <?php echo form_submit('Add_Account', $this->lang->line("Add_Account"), 'class="btn btn-primary"'); ?>
                    </div>
				</div>
				
                
            <?= form_close(); ?>

            </div>

        </div>
    </div>
</div>

