Compare commits
3 Commits
dfec11584c
...
f73c434ca8
| Author | SHA1 | Date |
|---|---|---|
|
|
f73c434ca8 | |
|
|
b12d1d3b81 | |
|
|
41bb80fc26 |
|
|
@ -22,8 +22,8 @@
|
|||
var discountInclTax = parseFloat($('#pvDiscountInclTax'+itemId).val()) || 0;
|
||||
var discountExclTax = parseFloat($('#pvDiscountExclTax'+itemId).val()) || 0;
|
||||
|
||||
if (quantity > maxQuantity || quantity < 0) {
|
||||
if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 0;
|
||||
if (quantity > maxQuantity || quantity < 1) {
|
||||
if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 1;
|
||||
$('#pvQuantity' + itemId).val(quantity);
|
||||
}
|
||||
|
||||
|
|
@ -93,16 +93,20 @@
|
|||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<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>
|
||||
$(function() {
|
||||
toggleOrderItemEditGlobal(false, @(item.Id));
|
||||
setupAutoCalculationGlobal(@(item.Id), @(item.ProductStockQuantity + item.ProductIncomingQuantity));
|
||||
setupAutoCalculationGlobal(@(item.Id), @(item.ProductStockQuantity + item.ProductIncomingQuantity + item.Quantity));
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
<table class="table table-hover table-bordered">
|
||||
<col />
|
||||
<col />
|
||||
|
|
@ -162,7 +166,10 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.ItemExtendeds)
|
||||
@{
|
||||
if (Model.ItemExtendeds != null)
|
||||
{
|
||||
foreach (var item in Model.ItemExtendeds)
|
||||
{
|
||||
<tr>
|
||||
@* <td class="text-center preview">
|
||||
|
|
@ -284,7 +291,7 @@
|
|||
<div id="pnlEditPvQuantity@(item.Id)">
|
||||
<div class="form-group row">
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -429,6 +436,9 @@
|
|||
}
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@
|
|||
UrlRead = new DataUrl("ProductList", "CustomProduct", null),
|
||||
SearchButtonId = "search-products",
|
||||
Length = Model.PageSize,
|
||||
Ordering = true,
|
||||
ServerSide = false,
|
||||
// Ordering = true,
|
||||
// ServerSide = false,
|
||||
LengthMenu = Model.AvailablePageSizes,
|
||||
Filters = new List<FilterParameter>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue