<form method="post" autocomplete="off" class="form-horizontal">
    <legend>Purchase Entries</legend>
    <div class="control-group">
        <label for="txtStartDate" class="control-label">Date</label>

        <div class="controls">
            <datepicker id="txtStartDate" model="info.StartDate" ng-model="info.StartDate"></datepicker>
            <datepicker id="txtFinishDate" model="info.FinishDate" ng-model="info.FinishDate"></datepicker>
            <button class="btn btn-info" ng-click="show()">Show <i class="icon-eye-open icon-white"></i></button>
        </div>
    </div>
    <div class="control-group">
        <label for="gvGrid" class="control-label"></label>

        <div class="controls">
            <table id="gvGrid" class="table table-condensed table-bordered table-striped">
                <thead>
                <tr>
                    <th>Date</th>
                    <th>Supplier</th>
                    <th>Product</th>
                    <th class="right">Quantity</th>
                    <th class="right">Rate</th>
                    <th class="right">Tax</th>
                    <th class="right">Amount</th>
                </tr>
                </thead>
                <tbody ng-repeat="items in info.Body">
                <tr ng-repeat="item in items.Products">
                    <td ngm-if="$first" rowspan="{{items.Products.length}}">{{items.Date}}</td>
                    <td ngm-if="$first" rowspan="{{items.Products.length}}"><a href="{{items.Url}}">{{items.Supplier}}</a></td>
                    <td>{{item.Product}}</td>
                    <td class="right">{{item.Quantity}}</td>
                    <td class="right">{{item.Rate}}</td>
                    <td class="right">{{item.Tax}}</td>
                    <td class="right">{{item.Amount}}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</form>
