empty order fix
This commit is contained in:
parent
b12d1d3b81
commit
f73c434ca8
|
|
@ -22,8 +22,8 @@
|
||||||
var discountInclTax = parseFloat($('#pvDiscountInclTax'+itemId).val()) || 0;
|
var discountInclTax = parseFloat($('#pvDiscountInclTax'+itemId).val()) || 0;
|
||||||
var discountExclTax = parseFloat($('#pvDiscountExclTax'+itemId).val()) || 0;
|
var discountExclTax = parseFloat($('#pvDiscountExclTax'+itemId).val()) || 0;
|
||||||
|
|
||||||
if (quantity > maxQuantity || quantity < 0) {
|
if (quantity > maxQuantity || quantity < 1) {
|
||||||
if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 0;
|
if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 1;
|
||||||
$('#pvQuantity' + itemId).val(quantity);
|
$('#pvQuantity' + itemId).val(quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,16 +93,20 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-12" style="overflow-x: auto;">
|
<div class="col-md-12" style="overflow-x: auto;">
|
||||||
@foreach (var item in Model.ItemExtendeds)
|
@{
|
||||||
|
if (Model.ItemExtendeds != null)
|
||||||
|
{
|
||||||
|
foreach (var item in Model.ItemExtendeds)
|
||||||
{
|
{
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
toggleOrderItemEditGlobal(false, @(item.Id));
|
toggleOrderItemEditGlobal(false, @(item.Id));
|
||||||
setupAutoCalculationGlobal(@(item.Id), @(item.ProductStockQuantity + item.ProductIncomingQuantity));
|
setupAutoCalculationGlobal(@(item.Id), @(item.ProductStockQuantity + item.ProductIncomingQuantity + item.Quantity));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
<table class="table table-hover table-bordered">
|
<table class="table table-hover table-bordered">
|
||||||
<col />
|
<col />
|
||||||
<col />
|
<col />
|
||||||
|
|
@ -162,7 +166,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in Model.ItemExtendeds)
|
@{
|
||||||
|
if (Model.ItemExtendeds != null)
|
||||||
|
{
|
||||||
|
foreach (var item in Model.ItemExtendeds)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
@* <td class="text-center preview">
|
@* <td class="text-center preview">
|
||||||
|
|
@ -284,7 +291,7 @@
|
||||||
<div id="pnlEditPvQuantity@(item.Id)">
|
<div id="pnlEditPvQuantity@(item.Id)">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-md-8 offset-md-2">
|
<div class="col-md-8 offset-md-2">
|
||||||
<input name="pvQuantity@(item.Id)" type="number" max="@(item.ProductStockQuantity + item.ProductIncomingQuantity)" min="0"
|
<input name="pvQuantity@(item.Id)" type="number" max="@(item.ProductStockQuantity + item.ProductIncomingQuantity + item.Quantity)" min="1"
|
||||||
value="@item.Quantity" id="pvQuantity@(item.Id)" class="form-control input-sm" />
|
value="@item.Quantity" id="pvQuantity@(item.Id)" class="form-control input-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -429,6 +436,9 @@
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue