<script type="text/javascript" src="<?php echo base_url();?>assets/js/statue.js"></script>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color">Statue and Books Edit</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <form action="<?php echo $form_action;?>" method="post" name="statue_form" enctype="multipart/form-data" method="post">    
                    <input type="hidden" name="hidden_id" value="<?php echo $statue->id;?>" />    
                    <div class="box box-danger">
                        <div class="box-body">
                            <ul class="error_container"></ul>
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <div class="form-group float-clear">
                                        <label>Ref. No</label>
                                        <input type="text" class="form-control readonly" name="code" placeholder="Auto Generated" autofocus readonly value="<?php echo $statue->code;?>" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Category Name<span class="required">*</span></label>
                                        <!--<select name="cat_id" class="form-control select2">
                                            <option value="">Select Category</option>
                                            <?php foreach($categories as $key=>$category) {?>
                                                <option value="<?php echo $category->id;?>"><?php echo $category->name;?></option>
                                            <?php } ?>
                                        </select>-->
                                        <input type="hidden" name="cat_id" value="<?php echo $statue->cat_id;?>" />
                                        <input type="type" name="cat_name" class="form-control readonly" value="<?php echo $statue->cat_name;?>" readonly />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Item Name<span class="required">*</span></label>
                                        <!--<select name="item_id" class="form-control select2">
                                            <option value="">Select Item</option>
                                            <?php foreach($items as $key=>$item) {?>
                                                <option value="<?php echo $item->id;?>"><?php echo $item->item_name;?></option>
                                            <?php } ?>
                                        </select>-->
                                        <input type="hidden" name="item_id" value="<?php echo $statue->item_id;?>" />
                                        <input type="type" name="item_name" class="form-control readonly" value="<?php echo $statue->item_name;?>" readonly />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Invoice No</label>
                                        <input type="text" class="form-control inv_no" name="inv_no" placeholder="Invoice No" value="<?php echo $statue->invoice_no;?>" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Invoice Date</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control datepicker inv_date" name="inv_date" placeholder="DD-MM-YYYY" value="<?php echo ($statue->invoice_date != '1970-01-01 00:00:00') ? date('d-m-Y',strtotime($statue->invoice_date)) : '';?>" />
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Vendor Name<span class="required">*</span></label>
                                        <select name="vendor_id" class="form-control select2">
                                            <option value="">Select Vendor</option>
                                            <?php foreach($vendors as $key=>$vendor) {?>
                                                <option value="<?php echo $vendor->id;?>" <?php echo ($vendor->id == $statue->vendor_id) ? 'selected' : '';?>><?php echo $vendor->name;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Shipping Advice No</label>
                                        <input type="text" class="form-control shipping_ad_no" name="shipping_ad_no" value="<?php echo $statue->ship_advice_no;?>" />
                                    </div>
                                </div>
                                
                                <div class="col-md-6">
                                    <div class="form-group float-clear">
                                        <label>Received Date</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control datepicker rec_date" name="rec_date" placeholder="DD-MM-YYYY" value="<?php echo ($statue->received_date != '1970-01-01 00:00:00') ? date('d-m-Y',strtotime($statue->received_date)) : '';?>" />
                                            <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Box No</label>
                                        <input type="text" class="form-control box_no" name="box_no" value="<?php echo $statue->box_no;?>" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Quantity<span class="required">*</span></label>
                                        <input type="hidden" class="form-control old_qty float_value" name="old_qty" value="<?php echo $statue->quantity;?>" />
                                        <input type="text" class="form-control qty float_value" name="qty" value="<?php echo $statue->quantity;?>" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Cost per Item<span class="required">*</span></label>
                                        <div class="input-group">
                                            <div class="input-group-addon">$</div>
                                            <input type="text" class="form-control cost_per_item float_value" name="cost_per_item" value="<?php echo $statue->cost_per_item;?>" />
                                        </div>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Total Amount</label>
                                        <!--<div class="input-group">
                                            <div class="input-group-addon">$</div>-->
                                            <input type="text" class="form-control total_amt float_value readonly" name="total_amt" value="<?php echo $statue->total_amount;?>" readonly />
                                        <!--</div>-->
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Description</label>
                                        <textarea class="form-control" name="desc"><?php echo $statue->description;?></textarea>
                                    </div>
                                </div>
                                
                            </div>
                        </div>
                        
                        <div class="box-footer form-actions float-clear">
                            <input class="btn reset" type="reset" value="Reset" />
                            <input type="submit" name="submit" value="Update" class="btn btn-success btn-primary" />
                        </div>
                    </div><!-- /.box -->
                </form>
            </div><!-- /.col-xs-12 -->
        </div><!-- /.row -->
    </section><!-- /.content -->
</aside>