InventoryType from XML

Transaction updates
This commit is contained in:
2016-08-25 13:00:09 -04:00
parent 53ed1b3af9
commit a5fcb46e04
28 changed files with 471 additions and 70 deletions
@@ -27,7 +27,7 @@
</a>
</script>
<div class="form-group has-feedback" ng-class="vm.getValidationClass()" form-group-validation="Commodity">
<div class="form-group" form-group-validation="Commodity">
<label for="Commodity" class="control-label">Commodity</label>
<input name="Commodity" type="text"
ng-model="vm.commodity"
@@ -53,7 +53,7 @@
@inventory.FormGroupFor(m => m.ExpirationDate)
<div class="form-group has-feedback panel panel-default">
<div class="form-group panel panel-default">
<div class="panel-heading"><label>Quantity</label></div>
<div class="panel-body container-fluid">
<div class="row">
@@ -0,0 +1,69 @@
@using InventoryTraker.Web.Helpers
@model InventoryTraker.Web.Models.InventoryDistributeForm
@{
var distribution = Html.Angular().ModelFor("vm.distribution");
}
<form novalidate
name="vm.form"
ng-submit="vm.form.$valid && vm.save()">
<fieldset ng-disabled="vm.saving">
<div class="modal-header">
<h3 class="modal-title">Inventory Distribution</h3>
</div>
<div class="modal-body">
<div class="alert alert-info" ng-hide="vm.errorMessage != null">
Enter details for the inventory arrival below.
</div>
<div class="alert alert-danger" ng-show="vm.errorMessage != null">
{{vm.errorMessage}}
</div>
@distribution.FormGroupFor(m => m.Destination)
<table class="table" ng-class="vm.getValidationClass()">
<thead>
<tr>
<th>Name<br />Units per Case</th>
<th>Available Case Qty</th>
<th>Distribute Case Qty</th>
</tr>
</thead>
<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>
</td>
<td>{{inventory.quantity}}</td>
<td>
<div class="form-group" form-group-validation="DistributeQuantity{{inventory.name}}">
<input name="DistributeQuantity{{inventory.name}}" type="number"
class="form-control"
ng-model="inventory.distributeQuantity"
ng-max="{{inventory.quantity}}"
ng-min="0" />
</div>
</td>
</tr>
</tbody>
</table>
@distribution.FormGroupFor(m => m.DistributedDate)
@distribution.FormGroupFor(m => m.Memo)
</div>
<div class="modal-footer">
<button class="btn btn-success">Save</button>
<button type="button" class="btn" ng-click="$dismiss()">Cancel</button>
</div>
</fieldset>
</form>