Compare commits

..

No commits in common. "f73c434ca8ff003819b1d1a4a6695705527528a5" and "dfec11584c5f452dd7c3b164368b88f14a08c5a9" have entirely different histories.

2 changed files with 358 additions and 368 deletions

View File

@ -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 < 1) { if (quantity > maxQuantity || quantity < 0) {
if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 1; if (quantity > maxQuantity) quantity = maxQuantity; else quantity = 0;
$('#pvQuantity' + itemId).val(quantity); $('#pvQuantity' + itemId).val(quantity);
} }
@ -93,20 +93,16 @@
<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 + item.Quantity)); setupAutoCalculationGlobal(@(item.Id), @(item.ProductStockQuantity + item.ProductIncomingQuantity));
}); });
</script> </script>
} }
}
}
<table class="table table-hover table-bordered"> <table class="table table-hover table-bordered">
<col /> <col />
<col /> <col />
@ -124,7 +120,7 @@
} }
<thead> <thead>
<tr> <tr>
@* <th> @* <th>
@T("Admin.Orders.Products.Picture") @T("Admin.Orders.Products.Picture")
</th> </th>
*@ <th> *@ <th>
@ -166,13 +162,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">
<img src="@item.PictureThumbnailUrl" alt="" title="" /> <img src="@item.PictureThumbnailUrl" alt="" title="" />
</td> </td>
*@ <td style="width: 25%;" class="text-left"> *@ <td style="width: 25%;" class="text-left">
@ -291,7 +284,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 + item.Quantity)" min="1" <input name="pvQuantity@(item.Id)" type="number" max="@(item.ProductStockQuantity + item.ProductIncomingQuantity)" min="0"
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>
@ -310,7 +303,7 @@
</td> </td>
<td style="width: 80px;" class="text-center"> <td style="width: 80px;" class="text-center">
@if (item.IsMeasurable) @if(item.IsMeasurable)
{ {
<span class="badge badge-warning" disabled>Yes</span> <span class="badge badge-warning" disabled>Yes</span>
} }
@ -436,9 +429,6 @@
} }
</tr> </tr>
} }
}
}
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -219,8 +219,8 @@
UrlRead = new DataUrl("ProductList", "CustomProduct", null), UrlRead = new DataUrl("ProductList", "CustomProduct", null),
SearchButtonId = "search-products", SearchButtonId = "search-products",
Length = Model.PageSize, Length = Model.PageSize,
// Ordering = true, Ordering = true,
// ServerSide = false, ServerSide = false,
LengthMenu = Model.AvailablePageSizes, LengthMenu = Model.AvailablePageSizes,
Filters = new List<FilterParameter> Filters = new List<FilterParameter>
{ {