69 lines
2.6 KiB
Plaintext
69 lines
2.6 KiB
Plaintext
@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"><i class="fa fa-cubes"></i> 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> |