<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?= print_lang($app_lang,'mod_production_new_formula_add_view'); ?></h2>
        <ol class="breadcrumb">
            <li>
                <a class="url-elem" href="<?php echo url('/dashboard'); ?>"><?= print_lang($app_lang,'home'); ?></a>
            </li>
            <li>
                <a class="url-elem" href="<?php echo url('/new-production-formula'); ?>"><?= print_lang($app_lang,'mod_production_new_formula_add_view'); ?></a>
            </li>
            <li class="active">
                <strong><?= print_lang($app_lang,'mod_production_new_formula_add_breadcrumb'); ?></strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox-title">
        <h5><?= print_lang($app_lang,'fields_with'); ?> <strong class="text-danger">*</strong> <?= print_lang($app_lang,'are_mandatory'); ?></h5>
    </div>
    <div class="ibox-content">
        <!-- spinner -->
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
        <!-- spinner -->
        <div class="row">
            <div class="col-sm-12 b-r">
                <form role="form" id="new-production-formula-form" action="<?php echo url('/new-production-formula/save'); ?>">

                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'mod_production_new_formula_add_input_name'); ?> <strong class="text-danger">*</strong></label>
                                <input type="text" class="form-control cv-required" name="name" placeholder="<?= print_lang($app_lang,'mod_production_new_formula_add_input_name'); ?>">
                            </div>
                        </div>

                    </div>
                    <div class="new-production-formula-items-row">
                        <div class="row">
                            <div class="col-md-5">
                                <div class="form-group">
                                    <label><?= print_lang($app_lang,'mod_production_new_formula_add_input_item'); ?> <strong class="text-danger">*</strong></label>
                                    <select class="form-control chosen-select cv-required ex-cv-required new-production-formula-item" name="item[]">
                                        <option disabled="" value="" selected="">-- <?= print_lang($app_lang,'mod_production_new_formula_add_input_item'); ?> --</option>
                                        <?php foreach($items as $row){ if($row['type'] == 'sales'){continue;} ?>
                                            <option data-unit-name="<?= $row['purchase_unit_name']; ?>" value="<?= $row['uid']; ?>"><?= $row['name']; ?> (<?= $row['item_id']; ?>) (<?= $row['purchase_unit_name']; ?>)</option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-5">
                                <div class="form-group">
                                    <label><?= print_lang($app_lang,'mod_production_new_formula_add_input_percentage'); ?> <strong class="text-danger">*</strong></label>
                                    <input type="text" class="form-control cv-required ex-cv-required new-production-formula-percentage" name="percentage[]" value="1" placeholder="<?= print_lang($app_lang,'mod_production_new_formula_add_input_percentage'); ?>">
                                </div>
                            </div>

                            <div class="col-md-2">
                                <div class="form-group">
                                    <button class="btn btn-primary new-production-formula-items-trigger" type="button" style="margin-top: 22px;"><?= print_lang($app_lang,'mod_production_new_formula_add_input_add_to_list'); ?></button>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="row extra-mar-botm">
                        <div class="col-md-12 text-right">
                            <a class="btn btn-w-m btn-outline btn-danger url-elem" href="<?php echo url('/new-production-formula'); ?>"><?= print_lang($app_lang,'cancel'); ?></a>
                            <button class="btn btn-w-m btn-primary" type="submit"><?= print_lang($app_lang,'save'); ?></button>
                        </div>
                    </div>

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

</div>
