<div class="content-header">
    <div class="row">
        <div class="col-md-8">
            <h2>{{::vm.translate.get('Stock History')}}</h2>
        </div>
    </div>
</div>

<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">{{::vm.translate.get('Stock History')}}</h3>
                        <div class="card-tools">

                        </div>
                    </div>
                    <div class="card-body p-0 table-responsive">
                        <table class="table table-striped order-item-list">
                            <thead>
                                <tr>
                                    <th>{{::vm.translate.get('Product Name')}}</th>
                                    <th>{{::vm.translate.get('Created On')}}</th>
                                    <th>{{::vm.translate.get('Created By')}}</th>
                                    <th>{{::vm.translate.get('Adjusted Quantity')}}</th>
                                    <th>{{::vm.translate.get('Note')}}</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in vm.history">
                                    <td>{{item.name}}</td>
                                    <td>{{item.createdOn | date:'medium'}}</td>
                                    <td>{{item.fullName}}</td>
                                    <td>{{item.adjustedQuantity}}</td>
                                    <td>{{item.note}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="card-footer">
                        <div>
                            <div ng-show="!vm.isLoading" colspan="3">{{vm.tableStateRef.pagination.totalItemCount | number:0}} {{::vm.translate.get('records found')}}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div>
            <button ui-sref="stocks" class="btn btn-default">{{::vm.translate.get('Back')}}</button>
        </div>
    </div>
</section>