<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-- >
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <!--<button type="button" class="btn blue-madison pull-right myplusbtn" id="myplusbtn">Add Medicine</button>-->
                        <div class="actions" id="nestable_list_menu">
                            <a class="btn blue-madison pull-right myplusbtn loadnew" href="#" id="myplusbtn">
                                <i class="fa  fa-plus"></i>
                                Add new
                            </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->

                        <form class="bgwinupts" action="{$hosturl}/controllers/{$controllname}.php?ac=addnew" method="post" id="bgwinupts">
                            <div class="form-body">

                                <div class="col-md-4">
                                    <div class="form-group form-md-line-input has-success">
                                        <input type="text" class="form-control" id="form_control_1" placeholder="Invoice Number" name="invoicenumber" required>
                                        <label for="form_control_1">Invoice Number</label>
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="form-group form-md-line-input has-success">
                                        <input type="text" class="form-control datepickertoday" id="form_control_1" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="invoicedate">
                                        <label for="form_control_1">Invoice Date</label>
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="form-group form-md-line-input has-success">
                                        <input type="text" class="form-control" id="form_control_1" placeholder="Supplier Name" name="suppliername">
                                        <label for="form_control_1">Supplier Name</label>
                                    </div>
                                </div>
                            </div>

                            <!-- BEGIN PAGE CONTENT-->




                            <div class="col-md-12">
                                <!-- BEGIN CONDENSED TABLE PORTLET-->
                                <div class="portlet box green">

                                    <div class="portlet-body">
                                        <div class="table-scrollable">
                                            <table class="table table-condensed table-hover small_table">
                                                <thead>
                                                    <tr>

                                                        <th>Drug Name</th>
                                                        <th>Amount</th>
                                                        <th class="wds10">&nbsp;</th>

                                                    </tr>
                                                </thead>
                                                <tbody id="plusitem">
                                                    <tr>
                                                        <td class="wds60">
                                                            <div class="form-group form-md-line-input has-info">
                                                                <!--selectdrugs-->
                                                                <select class="form-control select2me selectonce selectoncedrug" id="drugname1" data-itr="1" data-placeholder="Select drug name..."  name="medicinenameitr1" required>
                                                                    <option value=""></option>
                                                                    {foreach $allMed as $med}
                                                                    <option  class="elementID" value="{$med->id}">{$med->drugname}</option>
                                                                    {/foreach}
                                                                </select>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div class="form-group form-md-line-input has-success">
                                                                <input type="text" class="form-control positivefloat" placeholder="Amount" name="medicineamount1" id="medicineamount1" required>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <button type="button" class="btn red minsprop hmt20"><i class="fa fa-close"></i></button>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <!-- END CONDENSED TABLE PORTLET-->
                            </div>













                            <input type="hidden" id="invoiceconn" name="invoiceconn" value="1" />
                            <!-- END PAGE CONTENT -->
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-2 pull-right">
                                        <input type="submit" class="btn green btn-block btn-lg" name="savenew" value="Save & new">
                                    </div>
                                    <div class="col-md-2 pull-right">
                                        <input type="submit" class="btn green btn-block btn-lg" name="save" value="Save">
                                    </div>

                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>





        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->
<div id="drugsload" style="display: none;">
    <option value=""></option>
    {foreach $allMed as $med}
    <option class="elementID" value="{$med->id}">{$med->drugname}</option>
    {/foreach}
</div>


