<form method="post" autocomplete="off" class="form-horizontal">
    <legend>Ledger</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>
        </div>
    </div>
    <div class="control-group">
        <label for="txtLedger" class="control-label">Ledger</label>

        <div class="controls">
            <input type="text" ng-autocomplete id="txtLedger" resource="Account" label="Name" model="info.Ledger" value="{{info.Ledger.Name}}"/>
            <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>Particulars</th>
                    <th>Type</th>
                    <th>Narration</th>
                    <th>Debit</th>
                    <th>Credit</th>
                    <th>Running</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in info.Body" ng-class="{true:'', false:'error'}[item.Posted]">
                    <td class="no-wrap">{{item.Date}}</td>
                    <td><a href="{{item.Url}}">{{item.Name}}</a></td>
                    <td class="no-wrap">{{item.Type}}</td>
                    <td>{{item.Narration}}</td>
                    <td class="right no-wrap">{{item.Debit}}</td>
                    <td class="right no-wrap">{{item.Credit}}</td>
                    <td class="right no-wrap">{{item.Running}}</td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <td class="no-wrap">{{info.Footer.Date}}</td>
                    <td>{{info.Footer.Name}}</td>
                    <td>{{info.Footer.Type}}</td>
                    <td>{{info.Footer.Narration}}</td>
                    <td class="right">{{info.Footer.Debit}}</td>
                    <td class="right">{{info.Footer.Credit}}</td>
                    <td class="right">{{info.Footer.Running}}</td>
                </tr>
                </tfoot>
            </table>
        </div>
        <button class="btn btn-info" ng-click="downloadTable()">Download <i class="icon-download-alt icon-white"></i></button>
    </div>
</form>
