<?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('Account_Statement') ?></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_statement", $attrib)
                ?>

                <div class="col-md-5">
					<div class="form-group">
                        <?= lang("Account", "Account") ?>
                        <?php
						if($account != ''){
                        $acc[''] = "";
                        foreach ($account as $account) {
                            $acc[$account->Account_No] = $account->Account_No.' - '.$account->Name ;
                        }
                        echo form_dropdown('Account', $acc, (isset($_POST['Account']) ? $_POST['Account'] :""), 'class="form-control select" id="category" placeholder="' . lang("select") . " " . lang("Account") . '" style="width:100%"')
                        ?>
						<?php } else
						{
						 echo form_dropdown('Account','No account',(isset($_POST['Account']) ? $_POST['Account'] : ($transaction ? $transaction->account_id : '')), 'class="form-control select" id="category" placeholder="' . lang("select") . " " . lang("Account") . '" style="width:100%"')
                       ?>
<?php 					   }	?>
                    </div>
					<!--<div class="form-group">
                        <?= lang("Type", "Type") ?>
                       <?php
                        $opty = array('please_select' => lang('select'),'All_Transactions' => lang('All_Transactions'), 'Debit' => lang('Debit'), 'Credit' => lang('Credit'));
                        echo form_dropdown('type', $opty, (isset($_POST['type']) ? $_POST['type'] : ($transaction ? $transaction->type : '')), 'class="form-control" id="type"  required="required"');
                        ?>
					</div>-->
					<div class="form-group">
                        <?= lang("start_date", "start_date"); ?>
                        <?php echo form_input('start_date', (isset($_POST['start_date']) ? $_POST['start_date'] : ""), 'class="form-control datetime" id="start_date" required="required"'); ?>
                    </div>
					<div class="form-group">
                        <?= lang("end_date", "end_date"); ?>
                        <?php echo form_input('end_date', (isset($_POST['end_date']) ? $_POST['end_date'] : ""), 'class="form-control datetime" id="end_date" required="required"'); ?>
                    </div>
					<div class="form-group">
                        <?php echo form_submit('View', $this->lang->line("View"), 'class="btn btn-primary"'); ?>
                    </div>
				</div>
				
                
            <?= form_close(); ?>

            </div>

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

