<!-- 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="form-actions">
            <div class="row">
                <div class="col-md-2 pull-right">
                    <button class="btn green btn-block btn-lg" onclick="print()">Print</button>
                </div>
            </div>
        </div>
        <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>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->

                        <form action="{$hosturl}/controllers/{$controllname}.php?ac=update" method="post">
                            <input type="hidden" name="billID" id="billID" value="{$billdetails->id}" />
                            <input type="hidden" name="mycounter" value="{$drugsinbill|@count}"/>
                            <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" disabled="disabled" readonly="readonly" id="form_control_1" value="{$billdetails->invoicenum}" placeholder="Invoice Number" name="invoicenumberup" 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 date-picker" disabled="disabled" readonly="readonly" id="form_control_1" value="{$billdetails->invoicedate}" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="invoicedateup">
                                        <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" disabled="disabled" readonly="readonly" id="form_control_1" value="{$billdetails->suppliers}" placeholder="Supplier Name" name="suppliernameup">
                                        <label for="form_control_1">Supplier Name</label>
                                    </div>
                                </div>
                            </div>
                            <!-- BEGIN PAGE CONTENT-->
                            <ul id="plusitemprop">

                                {assign var=i value=1}
                                {foreach $drugsinbill as $med}

                                <li class="row " style="list-style: none;">
                                    <input type="hidden" name="billId{$i}" id="billId" value="{$med->ddetails->id}"  />
                                    <div class="col-md-7">

                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control" disabled="disabled" readonly="readonly"  value="{$med->ddetails->drugname}" placeholder="Amount" name="medicineamount{$i}">
                                            <!--<label>Drug Name</label>-->
                                        </div>




                                    </div>
                                    <div class="col-md-4">
                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control" disabled="disabled" readonly="readonly" value="{$med->amount}" placeholder="Amount" name="medicineamount{$i}">
                                            <!--<label>Amount</label>-->
                                        </div>
                                    </div>

                                </li>
                                {capture assign=i}{$i+1}{/capture}
                                {/foreach}
                            </ul>

                            <input type="hidden" id="invoiceconn" name="invoiceconn" value="1" />
                            <!-- END PAGE CONTENT -->

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