<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form-stock" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
                <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
            <h1><?php echo $heading_title; ?></h1>
            <ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
                <?php } ?>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <?php if ($error_warning) { ?>
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        <?php } ?>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $text_form; ?></h3>
            </div>
            <div class="panel-body">
                <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-stock" class="form-horizontal">

                    <div class="form-group">
                        <label class="col-sm-2 control-label"><?php echo $entry_stock_no; ?></label>
                        <div class="col-sm-10">
                            <input type="text" name="stock_id" value="<?=$stock_id;?>" placeholder="<?php echo $entry_stock_no; ?>" class="form-control" />
                        </div>

                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label"><?php echo $entry_name; ?></label>
                        <div class="col-sm-10">
                            <input type="text" name="name" value="<?=$name;?>" placeholder="<?php echo $entry_name; ?>" class="form-control" />
                            <?php if($error_name){ ?>
                                <div class="text-danger"><?php echo $error_name; ?></div>
                            <?php } ?>
                        </div>

                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label"><?php echo $entry_quantity; ?></label>
                        <div class="col-sm-10">
                            <input type="text" name="quantity" value="<?=$quantity;?>" placeholder="<?php echo $entry_quantity; ?>" class="form-control" />
                        </div>

                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label" for="input-category"><?php echo $entry_category; ?></label>
                        <div class="col-sm-10">
                            <select name="category" id="input-category" class="form-control">
                                <option value="0">Kategori seçiniz</option>
                                <?php foreach($categories as $category){ ?>
                                    <?php if($category['category_id'] == $category_id){ ?>
                                        <option value="<?=$category['category_id'];?>" selected><?=$category['name'];?></option>
                                    <?php }else{ ?>
                                        <option value="<?=$category['category_id'];?>"><?=$category['name'];?></option>
                                    <?php } ?>
                                <?php } ?>
                            </select>

                            <?php if($error_category){ ?>
                            <div class="text-danger"><?php echo $error_category; ?></div>
                            <?php } ?>

                        </div>
                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label" for="input-collection"><?php echo $entry_collection; ?></label>
                        <div class="col-sm-10">
                            <select name="collection" id="input-collection" class="form-control">
                                <option value="0">Koleksiyon seçiniz</option>
                                <?php foreach($collections as $collection){ ?>
                                    <?php if($collection['attribute_id'] == $collection_id){ ?>
                                        <option value="<?=$collection['attribute_id'];?>" selected><?=$collection['name'];?></option>
                                    <?php }else{ ?>
                                        <option value="<?=$collection['attribute_id'];?>"><?=$collection['name'];?></option>
                                    <?php } ?>

                                <?php } ?>
                            </select>
                            <?php if($error_collection){ ?>
                            <div class="text-danger"><?php echo $error_collection; ?></div>
                            <?php } ?>
                        </div>
                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label" for="input-color"><?php echo $entry_color; ?></label>
                        <div class="col-sm-10">
                            <select name="color" id="input-color" class="form-control">
                                <option value="0">Renk seçiniz</option>
                                <?php foreach($colors as $color){ ?>
                                    <?php if($color['attribute_id'] == $color_id){ ?>
                                        <option value="<?=$color['attribute_id'];?>" selected><?=$color['name'];?></option>
                                    <?php }else{ ?>
                                        <option value="<?=$color['attribute_id'];?>"><?=$color['name'];?></option>
                                    <?php } ?>

                                <?php } ?>
                            </select>

                            <?php if($error_color){ ?>
                            <div class="text-danger"><?php echo $error_color; ?></div>
                            <?php } ?>

                        </div>
                    </div>
					
					          <div class="form-group required">
                        <label class="col-sm-2 control-label">Kritik Stok</label>
                        <div class="col-sm-10">
                            <input type="text" name="kquantity" value="<?=$kquantity;?>" placeholder="Kritik Stok" class="form-control" />
                        </div>

                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label"><?php echo $entry_price; ?></label>
                        <div class="col-sm-10">
                            <input type="text" name="price" value="<?=$price;?>" placeholder="<?php echo $entry_price; ?>" class="form-control" />
                        </div>

                    </div>

                    <div class="form-group required">
                        <label class="col-sm-2 control-label"><?php echo $entry_price_cost; ?></label>
                        <div class="col-sm-10">
                            <input type="text" name="price_cost" value="<?=$price_cost;?>" placeholder="<?php echo $entry_price_cost; ?>" class="form-control" />
                        </div>

                    </div>





                </form>
            </div>
        </div>
    </div>
    </div>
<?php echo $footer; ?>