<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">


        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->


        <div class="portlet box green tabbable">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-gift"></i>All Prescriptions
                </div>
            </div>
            <div class="portlet-body">
                <div class=" portlet-tabs">
                    <a class="btn blue  pull-right" style="margin-bottom: 5px; margin-top: 5px;"   href="{$hosturl}/controllers/receipt.php?ac=index">
                        <i class="fa  fa-plus"></i>
                        Add external Prescription 
                    </a>
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="#portlet_tab2_3" data-toggle="tab" aria-expanded="true">
                                New Prescriptions</a>
                        </li>
                        <li class="">
                            <a href="#portlet_tab2_2" data-toggle="tab" aria-expanded="false">
                                Cashed Prescriptions </a>
                        </li>

                    </ul>

                    <div class="tab-content">

                        <div class="tab-pane" id="portlet_tab2_2">

                            <div class="portlet light bg-inverse">
                                <div class="form-body">
                                    <div class="col-md-6">
                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control datepicker searchReceipt"  readonly="readonly"  id="searchValue12" data-type="cached"  value="{$today}"/>
                                            <label for="searchValue12">Date From</label>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control datepicker searchReceipt"  readonly="readonly" id="searchValue22" data-type="cached"   value="{$today}"/>
                                            <label for="searchValue22">Date To</label>
                                        </div>
                                    </div>
                                </div>

                                <input type="hidden" id="receiptCaching" name="receiptCaching" value="1" />

                                <table class="table table-bordered table-striped  dataTableReceipt">
                                    <thead>
                                        <tr>
                                            <th>Doctor Name</th>
                                            <th>Patient Name</th>
                                            <th>Receipt Date</th>
                                            <th>Receipt Type</th>
                                            <th class="wds1">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody id="cachedReceiptTable">

                                        {foreach $allreceipt as $datarow}

                                        {if $datarow->status eq 1}
                                        <tr>
                                            <td>{$datarow->doctorname}</td>
                                            <td>{$datarow->patientname}</td>
                                            <td>{$datarow->receiptdate}</td>
                                            <td>{if $datarow->type == 0}Internal{else}External{/if}</td>
                                            <td>
                                                <a class="btn blue btn-xs" style=" float: left;" href="{$hosturl}/controllers/receipt.php?ac=details&id={$datarow->id}" >
                                                    <i class="fa fa-eye"></i> details

                                                </a>
                                            </td>
                                        </tr>
                                        {/if}

                                        {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="tab-pane active" id="portlet_tab2_3">
                            <div class="portlet light bg-inverse">
                                <div class="form-body">
                                    <div class="col-md-6">
                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control datepicker searchReceipt"  readonly="readonly"  id="searchValue11" data-type="new"   value="{$today}"/>
                                            <label for="searchValue11">Date From</label>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group form-md-line-input has-success">
                                            <input type="text" class="form-control datepicker searchReceipt"  readonly="readonly" id="searchValue21"   data-type="new"    value="{$today}"/>
                                            <label for="searchValue21">Date To</label>
                                        </div>
                                    </div>
                                </div>


                                <table class="table table-bordered table-striped  dataTableReceipt">
                                    <thead>
                                        <tr>
                                            <th>Doctor Name</th>
                                            <th>Patient Name</th>
                                            <th>Receipt Date</th>
                                            <th class="wds1">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody id="newReceiptTable">

                                        {foreach $allreceipt as $datarow}
                                        {if $datarow->status eq 0}
                                        <tr>
                                            <td>{$datarow->doctorname}</td>
                                            <td>{$datarow->patientname}</td>

                                            <td>{$datarow->receiptdate}</td>
                                            <td>
                                                <a class="btn blue btn-xs" style=" float: left;" href="{$hosturl}/controllers/receipt.php?ac=showdetails&id={$datarow->id}" >
                                                    <i class="fa fa-eye"></i> Cashing

                                                </a>
                                            </td>
                                        </tr>
                                        {/if}

                                        {/foreach}
                                    </tbody>
                                </table>
                            </div>

                        </div>

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












    <!-- END PAGE CONTENT-->
</div>

<!-- END CONTENT -->



