<!-- 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 box grey-cascade">


                </div>
            </div>

        </div>
        <div class="row">

            <div class="col-md-12">
                <!-- BEGIN SAMPLE TABLE PORTLET-->

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

                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <select class="select2me form-control" id="doctorId" name="doctorId"  style="width: 100%" required>
                                    <option value=""></option>
                                    {foreach $doctors as $doctor}
                                    <option value="{$doctor.user_id}">{$doctor.user_name}</option>
                                    {/foreach}
                                </select>
                                <label for="doctorId">Doctor Name</label>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <label style="text-align: center;width: 100%;">OR</label>
                        </div>
                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <input type="text" class="form-control"  id="doctorName" name="doctorName"  required>
                                <label for="doctorName">Doctor Name</label>
                            </div>
                        </div>

                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <select class="select2me form-control" id="patientId" name="patientId"   style="width: 100%" required>
                                    <option value=""></option>
                                    {foreach $allPatients as $patient}
                                    <option value="{$patient->id}">{$patient->wifename}</option>
                                    {/foreach}
                                </select>
                                <label for="patientId">Patient Name</label>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <label style="text-align: center;width: 100%;">OR</label>
                        </div>
                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <input type="text" class="form-control"  id="patientName" name="patientName"  required>
                                <label for="patientName">Patient Name</label>
                            </div>
                        </div>

                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <input type="text" class="form-control datepicker" value="{$today}"  name="receiptDate" id="receiptDate" readonly="readonly">
                                <label for="receiptDate">Recepit Date</label>
                            </div>
                        </div>
                        <div class="col-md-2">

                        </div>

                        <div class="col-md-5">
                            <div class="form-group form-md-line-input has-success">
                                <select class="form-control" id="storeId"  name="storeId" required>
                                    <option value=""> Choose store</option>
                                    {foreach $stores as $data}
                                    <option  value="{$data['id']}">{$data['name']}</option>
                                    {/foreach}
                                </select>
                                <label for="storeId">Store</label>
                            </div>
                        </div>

                        <div class="clearfix"></div>
                    </div>

                    <div class="portlet box green">
                        <a class="btn  pull-right" style="color: #fafcfb;" href="javascript:;" id="newDrugExportRow">
                            <i class="fa  fa-plus"></i>
                            Add new
                        </a>
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="fa fa-comments"></i>Prescription Drugs  
                            </div>
                            <div class="tools">

                            </div>
                        </div>
                        <div class="portlet-body">
                            <div class="table-scrollable">
                                <table class="table table-striped table-hover" id="prescriptionDurgsTable">
                                    <thead>
                                        <tr>
                                            <th class="wds35">Drug Name</th>
                                            <th class="wds10">Valid To</th>
                                            <th class="wds10">Available</th>
                                            <th class="wds10">Amount</th>
                                            <th class="wds10">&nbsp;</th>
                                        </tr>
                                    </thead>
                                    <tbody id="plusitem">

                                    </tbody>
                                </table>

                                <input type="hidden" id="itr" name="itr" value="0" />
                                <input type="hidden" id="receiptCaching" name="receiptCaching" value="1" />
                                <input type="hidden" id="type" name="type" value="external" />
                            </div>
                            <div class="form-actions">
                                <div class="row" id="cachReceipt" style="display: none;">
                                    <div class="col-md-12 pull-right" style="text-align: right;" >
                                        <a href="javascript:;" class="btn green" id="cachReceiptBtn">Cash
                                        </a>
                                    </div>
                                </div>
                                <div class="row" id="cantCachReceiptDiv">
                                    <div class="col-md-12 pull-right" style="text-align: right;" >
                                        <p class="btn green" id="cantCachReceipt"> Choose Store First ...</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <!-- END SAMPLE TABLE PORTLET-->
            </div>

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