<script type="text/javascript" src="<?php echo base_url();?>assets/js/item.js"></script>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color">Item Add</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <?php $general = get_general_setting();?>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <form action="<?php echo $form_action;?>" method="post" name="item_form" enctype="multipart/form-data" method="post" onsubmit="return autoValidate();">    
                    <input type="hidden" name="hidden_item_id" value="" />    
                    <div class="box box-danger">
                        <div class="box-body">
                            <ul class="error_container"></ul>
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <?php if($general->is_category == 1) {?>
                                        <div class="form-group float-clear">
                                            <label>Category Name<span class="required">*</span></label>
                                            <select name="category_id" class="form-control select2">
                                                <option value="">Select Category Name</option>
                                                    <?php foreach($category as $key=>$value) {?>
                                                        <option value="<?php echo $value->id;?>"><?php echo $value->category_name;?></option>
                                                    <?php } ?>
                                            </select>
                                        </div>
                                    <?php } ?>
                                    
                                    <div class="form-group float-clear">
                                        <label>Name<span class="required">*</span></label>
                                        <input type="text" class="form-control"  name="item_name" placeholder="Name" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Name (T)</label>
                                        <div class="input-group">
                                            <input type="text" class="form-control multi tamil-name input-tamil"  name="tamil_item_name" placeholder="jkpH;bgah;" onclick="set_tamil_keypad(this);" />
                                            <div class="input-group-addon"><i class="fa fa-keyboard-o"></i></div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Price<span class="required">*</span></label>
                                        <div class="input-group">
                                            <div class="input-group-addon">$</div>
                                            <input type="text" class="form-control float_value" name="price" />
                                        </div>
                                    </div>
                                    
                                    <!--<div class="form-group float-clear">
                                        <label>Priority</label>
                                        <select name="proirity" class="form-control select2">
                                            <option value="">Select</option>
                                            <option value="1">1</option>
                                            <option value="2">2</option>
                                        </select>
                                    </div>-->
                                    
                                    <div class="form-group float-clear">
                                        <label>Receipt</label>
                                        <select name="receipt" class="form-control select2">
                                            <option value="1">With Name</option>
                                            <option value="0">Without Name</option>
                                        </select>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Inventory</label>
                                        <input type="checkbox" class="form-control" name="is_inventory" value="1" />
                                    </div>
                                    
                                     <div class="form-group float-clear" id="inv-cat-wrap" style="display: none;">
                                        <label>Inventory Category<span class="required">*</span></label>
                                        <select name="inv_cat" class="form-control select2">
                                            <option value="">Select Inv. Category Name</option>
                                            <?php foreach( $inv_cats as $k => $inv_cat ) : ?>
                                                <option value="<?php echo $inv_cat['id']; ?>"><?php echo $inv_cat['name']; ?></option>
                                            <?php endforeach; ?>
                                        </select>
                                        <input type="hidden" name="inv_item" value="" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Is Scan</label>
                                        <input type="checkbox" class="form-control" name="is_scan" value="1" /> <span style="color: #999; font-size: 10px;">(Item will be displayed in Scan(Kioask))</span>
                                    </div>
                                    
                                    <div class="form-group form_group_div" style="display:<?php echo ($general->is_category == 1) ? 'none' : 'block';?>">
                                        <label>Color (Top)</label>
                                        <div class="input-group colorpicker" style="padding-left: 12px;">
                                            <input type="text" class="form-control my-colorpicker1" name="color_top" value="<?php echo 'rgba('.rand(80,250).','.rand(80,250).','.rand(80,250).',1)'; ?>" style="width: 258px;" />
                                            <div class="input-group-addon"><i></i></div>
                                        </div><!-- /.input group -->
                                    </div>
                                    
                                    <div class="form-group form_group_div" style="display:<?php echo ($general->is_category == 1) ? 'none' : 'block';?>">
                                        <label>Color (Bottom)</label>
                                        <div class="input-group colorpicker" style="padding-left: 12px;">
                                            <input type="text" class="form-control my-colorpicker1" name="color_bottom" value="<?php echo 'rgba('.rand(0,180).','.rand(0,180).','.rand(0,180).',1)'; ?>" style="width: 258px;" />
                                            <div class="input-group-addon"><i></i></div>
                                        </div><!-- /.input group -->
                                    </div>
                                </div>
                                
                                <div class="col-md-6">
                                    <div class="form-group float-clear">
                                        <label>Footer Receipt</label>
                                        <input type="checkbox" class="form-control" name="is_enable" value="1" />
                                    </div>
                                    <div class="form-group float-clear">
                                        <label>God Name</label>
                                        <select name="god_name" class="form-control select2">
                                            <option value="1">With God Name</option>
                                            <option value="0">Without God Name</option>
                                        </select>
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Order Sequence</label>
                                        <input type="text" class="form-control integer_value" name="seq_no" maxlength="50" value="<?php #echo $seq_no;?>" />
                                    </div>
                                    
                                    <div class="form-group float-clear">
                                        <label>Prefix</label>
                                        <input type="text" class="form-control" name="prefix" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label>Upload Image</label>
                                        <input type="file" class="form-control img_file" name="image" data-value="" data-allowed_exetnsions="<?php echo implode('|', image_extensions());?>" />
                                        <!-- Eg: data-allowed_size 2 MB -->
                                        <div class="img_preview"></div>
                                        <span class="allowed_type">File should be <b><i><?php echo strtoupper(implode(', ', image_extensions()));?></i></b>  file format</span>
                                    </div>
									
									<div class="form-group" style="display:<?php echo ($general->gst > 0) ? 'block' : 'none';?>">
                                        <label>Inclusive of GST</label>
                                        <input type="checkbox" class="form-control" name="gst" class="gst" value="<?php echo ($general->gst > 0) ? 1 : 0;?>" />
                                    </div>
                                    
                                    <div class="form-group">
                                        <label class="leftcol">Status</label>
                                        <div>
                                            <label for="status" style="width: 32%;"><input type="radio" name="status" value="1"  checked /> &nbsp;&nbsp;Active</label> 
                                            <label for="status" style="width: 32%;"><input type="radio" name="status" value="0" /> &nbsp;&nbsp;Inactive</label> 
                                        </div>
                                    </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="Save" class="btn btn-success btn-primary" />
                        </div>
                    </div><!-- /.box -->
                </form>
            </div><!-- /.col-xs-12 -->
        </div><!-- /.row -->
    </section><!-- /.content -->
</aside>
<style>
    .colorpicker:before {
        display: none;
    }
</style>