Add transaction type
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<table class="table" ng-class="vm.getValidationClass()">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name<br />Units per Case</th>
|
||||
<th>Name<br/>Units per Case<br/>Expiration Date</th>
|
||||
<th>Available Case Qty</th>
|
||||
<th>Distribute Case Qty</th>
|
||||
</tr>
|
||||
@@ -34,14 +34,13 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="inventory in vm.quantities" inventory="inventory">
|
||||
<td>
|
||||
<label class="control-label" for="DistributeQuantity{{inventory.name}}">
|
||||
{{inventory.name}}<br />
|
||||
{{inventory.unitsPerCase}} / {{inventory.containerType}}
|
||||
</label>
|
||||
{{inventory.name}}<br />
|
||||
{{inventory.unitsPerCase}} / {{inventory.containerType}}<br/>
|
||||
Exp: {{inventory.expirationDate | date:'shortDate'}}
|
||||
</td>
|
||||
<td>{{inventory.quantity}}</td>
|
||||
<td>
|
||||
<div class="form-group" form-group-validation="DistributeQuantity{{inventory.name}}">
|
||||
<div class="form-group col-sm-7" form-group-validation="DistributeQuantity{{inventory.name}}">
|
||||
<input name="DistributeQuantity{{inventory.name}}" type="number"
|
||||
class="form-control"
|
||||
ng-model="inventory.distributeQuantity"
|
||||
|
||||
@@ -28,15 +28,17 @@
|
||||
cellTemplate: '<div class="ui-grid-cell-contents" ' +
|
||||
'title="{{row.entity.name}}' +
|
||||
'\r{{row.entity.unitsPerCase}} / {{row.entity.containerType}}' +
|
||||
'\rExp Date: {{row.entity.expirationDate | date:shortDate}}' +
|
||||
'\rAdd Date: {{row.entity.addedDate | date:shortDate}}">' +
|
||||
'\rExp Date: {{row.entity.expirationDate | date:\'shortDate\'}}' +
|
||||
'\rAdd Date: {{row.entity.addedDate | date:\'shortDate\'}}">' +
|
||||
'<a href="" ng-click="vm.edit()"><i class="fa fa-edit"></i></a> ' +
|
||||
'{{row.entity.name}}</div>'
|
||||
},
|
||||
{ field: 'transactionType', name: 'Type', width: "10%" },
|
||||
{ field: 'memo', cellTooltip: true },
|
||||
{ field: 'transactionDate', name: 'Transaction Date', cellFilter: "date:MM/dd/yyyy", width: "15%" },
|
||||
{ field: 'addedQuantity', name: 'Add Qty', width: "10%", enableSorting: false },
|
||||
{ field: 'removedQuantity', name: 'Remove Qty', width: "10%", enableSorting: false },
|
||||
{ field: 'transactionDate', name: 'Transaction Date', cellFilter: "date:'shortDate'", width: "15%" },
|
||||
{ field: 'previousQuantity', name: 'Prev Qty', width: "10%", enableSorting: false },
|
||||
{ field: 'addedQuantity', name: 'Add Qty', width: "10%", enableSorting: false, cellFilter: "hideZero" },
|
||||
{ field: 'removedQuantity', name: 'Remove Qty', width: "10%", enableSorting: false, cellFilter: "hideZero" },
|
||||
{ field: 'currentQuantity', name: 'Current Qty', width: "15%", enableSorting: false }
|
||||
],
|
||||
onRegisterApi: function(gridApi) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
(function () {
|
||||
window.app.filter('hideZero', hideZero);
|
||||
|
||||
function hideZero() {
|
||||
return function (input) {
|
||||
|
||||
return input > 0 ? input : '';
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user