improvements, fixes
This commit is contained in:
parent
71f2eab412
commit
343fb818c7
|
|
@ -168,12 +168,11 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
|
||||||
return RedirectToAction("List");
|
return RedirectToAction("List");
|
||||||
|
|
||||||
//prepare model
|
//prepare model
|
||||||
var model = await _orderModelFactory.PrepareOrderModelAsync(null, order);
|
var model = await _orderModelFactory.PrepareOrderModelExtendedAsync(null, order);
|
||||||
|
|
||||||
return View("~/Plugins/Misc.FruitBankPlugin/Areas/Admin/Views/Order/Edit.cshtml", model);
|
return View("~/Plugins/Misc.FruitBankPlugin/Areas/Admin/Views/Order/Edit.cshtml", model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<OrderListModelExtended> GetOrderListModelByFilter(OrderSearchModel searchModel)
|
public async Task<OrderListModelExtended> GetOrderListModelByFilter(OrderSearchModel searchModel)
|
||||||
{
|
{
|
||||||
//return _customOrderService.
|
//return _customOrderService.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@model OrderModel
|
@model Nop.Plugin.Misc.FruitBankPlugin.Models.Orders.OrderModelExtended
|
||||||
|
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
|
||||||
|
|
@ -307,6 +307,8 @@
|
||||||
Name = "orders-grid",
|
Name = "orders-grid",
|
||||||
UrlRead = new DataUrl("OrderList", "CustomOrder", null),
|
UrlRead = new DataUrl("OrderList", "CustomOrder", null),
|
||||||
SearchButtonId = "search-orders",
|
SearchButtonId = "search-orders",
|
||||||
|
Ordering = true,
|
||||||
|
ServerSide = false,
|
||||||
Length = Model.PageSize,
|
Length = Model.PageSize,
|
||||||
LengthMenu = Model.AvailablePageSizes,
|
LengthMenu = Model.AvailablePageSizes,
|
||||||
FooterCallback = !Model.IsLoggedInAsVendor ? "ordersfootercallback" : null,
|
FooterCallback = !Model.IsLoggedInAsVendor ? "ordersfootercallback" : null,
|
||||||
|
|
@ -348,11 +350,12 @@
|
||||||
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.CustomerCompany))
|
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.CustomerCompany))
|
||||||
{
|
{
|
||||||
Title = T("Admin.Orders.Fields.Customer").Text,
|
Title = T("Admin.Orders.Fields.Customer").Text,
|
||||||
|
Width = "150"
|
||||||
//Render = new RenderCustom("renderColumnCustomer")
|
//Render = new RenderCustom("renderColumnCustomer")
|
||||||
});
|
});
|
||||||
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.IsMeasurable))
|
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.IsMeasurable))
|
||||||
{
|
{
|
||||||
Title = T($"FruitBank.{nameof(OrderModelExtended.IsMeasurable)}?").Text,
|
Title = T($"FruitBank.{nameof(OrderModelExtended.IsMeasurable)}").Text,
|
||||||
Width = "80",
|
Width = "80",
|
||||||
Render = new RenderCustom("renderColumnIsMeasurable"),
|
Render = new RenderCustom("renderColumnIsMeasurable"),
|
||||||
ClassName = NopColumnClassDefaults.CenterAll
|
ClassName = NopColumnClassDefaults.CenterAll
|
||||||
|
|
@ -360,7 +363,7 @@
|
||||||
|
|
||||||
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.IsMeasured))
|
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.IsMeasured))
|
||||||
{
|
{
|
||||||
Title = T($"FruitBank.{nameof(OrderModelExtended.IsMeasured)}?").Text,
|
Title = T($"FruitBank.{nameof(OrderModelExtended.IsMeasured)}").Text,
|
||||||
Width = "80",
|
Width = "80",
|
||||||
Render = new RenderCustom("renderColumnIsMeasurable"),
|
Render = new RenderCustom("renderColumnIsMeasurable"),
|
||||||
ClassName = NopColumnClassDefaults.CenterAll
|
ClassName = NopColumnClassDefaults.CenterAll
|
||||||
|
|
@ -398,12 +401,6 @@
|
||||||
Width = "130"
|
Width = "130"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModelExtended.CustomerCompany))
|
|
||||||
{
|
|
||||||
Title = T("Admin.Orders.Fields.Customer").Text,
|
|
||||||
Width = "150"
|
|
||||||
//Render = new RenderCustom("renderColumnCustomer")
|
|
||||||
});
|
|
||||||
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModel.StoreName))
|
gridModel.ColumnCollection.Add(new ColumnProperty(nameof(OrderModel.StoreName))
|
||||||
{
|
{
|
||||||
Title = T("Admin.Orders.Fields.Store").Text,
|
Title = T("Admin.Orders.Fields.Store").Text,
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
@model OrderModel
|
@model Nop.Plugin.Misc.FruitBankPlugin.Models.Orders.OrderModelExtended
|
||||||
|
|
||||||
@using Nop.Core.Domain.Tax;
|
@using Nop.Core.Domain.Tax;
|
||||||
@using Nop.Core.Domain.Catalog;
|
@using Nop.Core.Domain.Catalog;
|
||||||
|
|
||||||
<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;">ANYÁD!!!!!
|
<div class="col-md-12" style="overflow-x: auto;">
|
||||||
@foreach (var item in Model.Items)
|
@foreach (var item in Model.Items)
|
||||||
{
|
{
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -20,6 +20,18 @@
|
||||||
// Function to automatically calculate and update total price
|
// Function to automatically calculate and update total price
|
||||||
function calculateTotal@(item.Id)() {
|
function calculateTotal@(item.Id)() {
|
||||||
// Get values
|
// Get values
|
||||||
|
|
||||||
|
@* var isMeasurable = ($('#pvIsMeasurable@(item.Id)').val()).toLowerCase() === "true"; *@
|
||||||
|
|
||||||
|
var isMeasurable = $($('#pvIsMeasurable@(item.Id)')).is(':checked');
|
||||||
|
console.log(isMeasurable);
|
||||||
|
console.log(($('#pvIsMeasurable@(item.Id)')));
|
||||||
|
console.log(($('#pvIsMeasurable@(item.Id)').val()));
|
||||||
|
console.log(($('#pvIsMeasurable@(item.Id)').val()).toLowerCase());
|
||||||
|
|
||||||
|
|
||||||
|
var netWeight = parseFloat($('#pvNetWeight@(item.Id)').val()) || 0;
|
||||||
|
|
||||||
var unitPriceInclTax = parseFloat($('#pvUnitPriceInclTax@(item.Id)').val()) || 0;
|
var unitPriceInclTax = parseFloat($('#pvUnitPriceInclTax@(item.Id)').val()) || 0;
|
||||||
var unitPriceExclTax = parseFloat($('#pvUnitPriceExclTax@(item.Id)').val()) || 0;
|
var unitPriceExclTax = parseFloat($('#pvUnitPriceExclTax@(item.Id)').val()) || 0;
|
||||||
var quantity = parseFloat($('#pvQuantity@(item.Id)').val()) || 0;
|
var quantity = parseFloat($('#pvQuantity@(item.Id)').val()) || 0;
|
||||||
|
|
@ -27,8 +39,8 @@
|
||||||
var discountExclTax = parseFloat($('#pvDiscountExclTax@(item.Id)').val()) || 0;
|
var discountExclTax = parseFloat($('#pvDiscountExclTax@(item.Id)').val()) || 0;
|
||||||
|
|
||||||
// Calculate totals
|
// Calculate totals
|
||||||
var totalInclTax = (unitPriceInclTax * quantity) - discountInclTax;
|
var totalInclTax = (unitPriceInclTax * (isMeasurable ? netWeight : quantity)) - discountInclTax;
|
||||||
var totalExclTax = (unitPriceExclTax * quantity) - discountExclTax;
|
var totalExclTax = (unitPriceExclTax * (isMeasurable ? netWeight : quantity)) - discountExclTax;
|
||||||
|
|
||||||
// Update total price fields
|
// Update total price fields
|
||||||
$('#pvPriceInclTax@(item.Id)').val(totalInclTax.toFixed(0));
|
$('#pvPriceInclTax@(item.Id)').val(totalInclTax.toFixed(0));
|
||||||
|
|
@ -117,12 +129,21 @@
|
||||||
<th>
|
<th>
|
||||||
@T("Admin.Orders.Products.Price")
|
@T("Admin.Orders.Products.Price")
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
@T("FruitBank.IsMeasurable")
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@T("FruitBank.StockQuantity")
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@T("Admin.Orders.Products.Quantity")
|
@T("Admin.Orders.Products.Quantity")
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@T("Admin.Orders.Products.Discount")
|
@T("FruitBank.NetWeight")
|
||||||
</th>
|
</th>
|
||||||
|
@* <th>
|
||||||
|
@T("Admin.Orders.Products.Discount")
|
||||||
|
</th> *@
|
||||||
<th>
|
<th>
|
||||||
@T("Admin.Orders.Products.Total")
|
@T("Admin.Orders.Products.Total")
|
||||||
</th>
|
</th>
|
||||||
|
|
@ -135,7 +156,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in Model.Items)
|
@foreach (var item in Model.ItemExtendeds)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center preview">
|
<td class="text-center preview">
|
||||||
|
|
@ -240,7 +261,7 @@
|
||||||
<input name="pvUnitPriceInclTax@(item.Id)" type="text" value="@item.UnitPriceInclTaxValue" id="pvUnitPriceInclTax@(item.Id)" class="form-control input-sm" />
|
<input name="pvUnitPriceInclTax@(item.Id)" type="text" value="@item.UnitPriceInclTaxValue" id="pvUnitPriceInclTax@(item.Id)" class="form-control input-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
@* <div class="form-group row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
@T("Admin.Orders.Products.Edit.ExclTax")
|
@T("Admin.Orders.Products.Edit.ExclTax")
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -248,19 +269,35 @@
|
||||||
<input name="pvUnitPriceExclTax@(item.Id)" type="text" value="@item.UnitPriceExclTaxValue" id="pvUnitPriceExclTax@(item.Id)" class="form-control input-sm" />
|
<input name="pvUnitPriceExclTax@(item.Id)" type="text" value="@item.UnitPriceExclTaxValue" id="pvUnitPriceExclTax@(item.Id)" class="form-control input-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
*@ </div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td style="width: 80px;" class="text-center">
|
||||||
|
<div><input type="checkbox" name="pvIsMeasurable@(item.Id)" id="pvIsMeasurable@(item.Id)" @(item.IsMeasurable ? " checked" : "") disabled /></div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td style="width: 80px;" class="text-center">
|
||||||
|
<div>@($"{item.ProductStockQuantity}{(item.ProductIncomingQuantity > 0 ? " (+"+item.ProductIncomingQuantity + ")" : string.Empty)}")</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td style="width: 10%;" class="text-center">
|
<td style="width: 10%;" class="text-center">
|
||||||
<div>@item.Quantity</div>
|
<div>@item.Quantity</div>
|
||||||
<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="text" value="@item.Quantity" id="pvQuantity@(item.Id)" class="form-control input-sm" />
|
<input name="pvQuantity@(item.Id)" type="number" max="@(item.ProductStockQuantity + item.ProductIncomingQuantity)" min="0"
|
||||||
</div>
|
value="@item.Quantity" id="pvQuantity@(item.Id)" class="form-control input-sm" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 15%;" class="text-center">
|
|
||||||
|
<td style="width: 80px;" class="text-center">
|
||||||
|
@* <div name="pvNetWeight@(item.Id)" id="pvNetWeight@(item.Id)">@item.NetWeight</div> *@
|
||||||
|
<div><input name="pvNetWeight@(item.Id)" id="pvNetWeight@(item.Id)" value='@item.NetWeight' disabled /></div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@* <td style="width: 15%;" class="text-center">
|
||||||
@if (Model.AllowCustomersToSelectTaxDisplayType)
|
@if (Model.AllowCustomersToSelectTaxDisplayType)
|
||||||
{
|
{
|
||||||
<div>@Html.Raw(item.DiscountInclTax)</div>
|
<div>@Html.Raw(item.DiscountInclTax)</div>
|
||||||
|
|
@ -302,8 +339,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td> *@
|
||||||
<td style="width: 15%;" class="text-center">
|
<td style="width: 15%;" class="text-center;">
|
||||||
@if (Model.AllowCustomersToSelectTaxDisplayType)
|
@if (Model.AllowCustomersToSelectTaxDisplayType)
|
||||||
{
|
{
|
||||||
<div>@Html.Raw(item.SubTotalInclTax)</div>
|
<div>@Html.Raw(item.SubTotalInclTax)</div>
|
||||||
|
|
@ -333,18 +370,18 @@
|
||||||
@T("Admin.Orders.Products.Edit.InclTax")
|
@T("Admin.Orders.Products.Edit.InclTax")
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<input name="pvPriceInclTax@(item.Id)" type="text" value="@item.SubTotalInclTaxValue" id="pvPriceInclTax@(item.Id)" class="form-control input-sm" />
|
<input name="pvPriceInclTax@(item.Id)" disabled type="text" value="@item.SubTotalInclTaxValue" id="pvPriceInclTax@(item.Id)" class="form-control input-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
@* <div class="form-group row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
@T("Admin.Orders.Products.Edit.ExclTax")
|
@T("Admin.Orders.Products.Edit.ExclTax")
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<input name="pvPriceExclTax@(item.Id)" type="text" value="@item.SubTotalExclTaxValue" id="pvPriceExclTax@(item.Id)" class="form-control input-sm" />
|
<input name="pvPriceExclTax@(item.Id)" disabled type="text" value="@item.SubTotalExclTaxValue" id="pvPriceExclTax@(item.Id)" class="form-control input-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>*@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@if (!Model.IsLoggedInAsVendor)
|
@if (!Model.IsLoggedInAsVendor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@ public class OrderItemDtoDbTable : MgDtoDbTableBase<OrderItemDto, OrderItem>
|
||||||
.LoadWith(oi => oi.ProductDto).ThenLoad(prod => prod.GenericAttributes);
|
.LoadWith(oi => oi.ProductDto).ThenLoad(prod => prod.GenericAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<OrderItemDto> GetByIdAsync(int orderItemId, bool loadRelations) => GetAll(loadRelations).Where(x => x.Id == orderItemId).FirstOrDefaultAsync(null);
|
public Task<OrderItemDto> GetByIdAsync(int orderItemId, bool loadRelations) => GetAll(loadRelations).Where(oi => oi.Id == orderItemId).FirstOrDefaultAsync(null);
|
||||||
|
|
||||||
public IQueryable<OrderItemDto> GetAllByOrderId(int orderId, bool loadRelations = true)=> GetAll(loadRelations).Where(o => o.OrderId == orderId);
|
public IQueryable<OrderItemDto> GetAllByOrderId(int orderId, bool loadRelations = true)=> GetAll(loadRelations).Where(oi => oi.OrderId == orderId);
|
||||||
|
|
||||||
|
public IQueryable<OrderItemDto> GetAllByIds(IEnumerable<int> orderItemIds, bool loadRelations = true) => GetAll(loadRelations).Where(oi => orderItemIds.Contains(oi.Id));
|
||||||
}
|
}
|
||||||
|
|
@ -167,21 +167,61 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Factories
|
||||||
orderDtosById ??= await _ctx.OrderDtos.GetAllByIds(orderListModel.Data.Select(x => x.Id)).ToDictionaryAsync(k => k.Id, v => v);
|
orderDtosById ??= await _ctx.OrderDtos.GetAllByIds(orderListModel.Data.Select(x => x.Id)).ToDictionaryAsync(k => k.Id, v => v);
|
||||||
var orderDto = orderDtosById[orderModelExtended.Id];
|
var orderDto = orderDtosById[orderModelExtended.Id];
|
||||||
|
|
||||||
orderModelExtended.IsMeasured = orderDto.IsMeasured;
|
PrepareOrderModelExtended(orderModelExtended, orderDto);
|
||||||
orderModelExtended.IsMeasurable = orderDto.IsMeasurable;
|
|
||||||
orderModelExtended.DateOfReceipt = orderDto.DateOfReceipt;
|
|
||||||
|
|
||||||
orderModelExtended.CustomerCompany = orderDto.Customer.Company;
|
|
||||||
|
|
||||||
//orderModelExtended.IsMeasurable = await ShouldMarkAsNeedsMeasurementAsync(orderModel);
|
|
||||||
//orderModelExtended.DateOfReceipt = await GetPickupDateTimeAsync(orderModel);
|
|
||||||
|
|
||||||
//Console.WriteLine(orderModelExtended.Id);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return orderListModelExtended;
|
return orderListModelExtended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void PrepareOrderModelExtended(OrderModelExtended orderModelExtended, OrderDto orderDto)
|
||||||
|
{
|
||||||
|
orderModelExtended.IsMeasured = orderDto.IsMeasured;
|
||||||
|
orderModelExtended.IsMeasurable = orderDto.IsMeasurable;
|
||||||
|
orderModelExtended.DateOfReceipt = orderDto.DateOfReceipt;
|
||||||
|
orderModelExtended.OrderTotal = !orderDto.IsComplete && orderDto.IsMeasurable ? "Kalkuláció alatt..." : orderModelExtended.OrderTotal;
|
||||||
|
orderModelExtended.CustomerCompany = orderDto.Customer.Company;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task<OrderModel> PrepareOrderModelAsync(OrderModel model, Order order, bool excludeProperties = false)
|
||||||
|
{
|
||||||
|
return await base.PrepareOrderModelAsync(model, order, excludeProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<OrderModelExtended> PrepareOrderModelExtendedAsync(OrderModel model, Order order, bool excludeProperties = false)
|
||||||
|
{
|
||||||
|
var orderModel = await base.PrepareOrderModelAsync(model, order, excludeProperties);
|
||||||
|
var orderModelExtended = new OrderModelExtended();
|
||||||
|
|
||||||
|
PropertyHelper.CopyPublicValueTypeProperties(orderModel, orderModelExtended);
|
||||||
|
|
||||||
|
var orderDto = await _ctx.OrderDtos.GetByIdAsync(order.Id, true);
|
||||||
|
PrepareOrderModelExtended(orderModelExtended, orderDto);
|
||||||
|
|
||||||
|
var orderItemDtosById = await _ctx.OrderItemDtos.GetAllByIds(orderModelExtended.Items.Select(oi => oi.Id)).ToDictionaryAsync(k => k.Id, v => v);
|
||||||
|
foreach (var orderItemModel in orderModelExtended.Items)
|
||||||
|
{
|
||||||
|
var orderItemModelExtended = new OrderItemModelExtended();
|
||||||
|
PropertyHelper.CopyPublicValueTypeProperties(orderItemModel, orderItemModelExtended);
|
||||||
|
|
||||||
|
var orderItemDto = orderItemDtosById[orderItemModelExtended.Id];
|
||||||
|
|
||||||
|
orderItemModelExtended.IsMeasured = orderItemDto.IsMeasured;
|
||||||
|
orderItemModelExtended.IsMeasurable = orderItemDto.IsMeasurable;
|
||||||
|
orderItemModelExtended.NetWeight = (decimal)orderItemDto.NetWeight;
|
||||||
|
orderItemModelExtended.ProductStockQuantity = orderItemDto.ProductDto!.StockQuantity;
|
||||||
|
orderItemModelExtended.ProductIncomingQuantity = orderItemDto.ProductDto.IncomingQuantity;
|
||||||
|
|
||||||
|
orderModelExtended.ItemExtendeds ??= new List<OrderItemModelExtended>();
|
||||||
|
orderModelExtended.ItemExtendeds.Add(orderItemModelExtended);
|
||||||
|
|
||||||
|
//var a = orderItemModelExtended;
|
||||||
|
//var gf= $"{a.ProductStockQuantity} {(a.ProductIncomingQuantity > 0 ? a.ProductIncomingQuantity.ToString() : string.Empty)}";
|
||||||
|
}
|
||||||
|
|
||||||
|
//orderModelExtended.Items.Clear();
|
||||||
|
return orderModelExtended;
|
||||||
|
}
|
||||||
|
|
||||||
// example async custom logic
|
// example async custom logic
|
||||||
private async Task<bool> ShouldMarkAsNeedsMeasurementAsync(OrderModel order)
|
private async Task<bool> ShouldMarkAsNeedsMeasurementAsync(OrderModel order)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,15 @@ using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
||||||
|
|
||||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders;
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders;
|
||||||
|
|
||||||
|
public interface IOrderItemModelExtended //: IMgOrderItemModelExtended, IMeasurable, IMeasured
|
||||||
|
{
|
||||||
|
bool IsMeasured { get; set; }
|
||||||
|
bool IsMeasurable { get; set; }
|
||||||
|
decimal NetWeight { get; set; }
|
||||||
|
int ProductStockQuantity { get; set; }
|
||||||
|
int ProductIncomingQuantity { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public interface IOrderModelExtended : IMgOrderModelExtended, IMeasurable, IMeasured
|
public interface IOrderModelExtended : IMgOrderModelExtended, IMeasurable, IMeasured
|
||||||
{
|
{
|
||||||
DateTime? DateOfReceipt { get; set; }
|
DateTime? DateOfReceipt { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,17 @@
|
||||||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
||||||
|
using Nop.Web.Areas.Admin.Models.Orders;
|
||||||
|
|
||||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders
|
||||||
{
|
{
|
||||||
|
public partial record OrderItemModelExtended : /*MgOrderItemModelExtended*/ OrderItemModel, IOrderItemModelExtended
|
||||||
|
{
|
||||||
|
public bool IsMeasured { get; set; }
|
||||||
|
public bool IsMeasurable { get; set; }
|
||||||
|
public decimal NetWeight { get; set; }
|
||||||
|
public int ProductStockQuantity { get; set; }
|
||||||
|
public int ProductIncomingQuantity { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public partial record OrderModelExtended : MgOrderModelExtended, IOrderModelExtended
|
public partial record OrderModelExtended : MgOrderModelExtended, IOrderModelExtended
|
||||||
{
|
{
|
||||||
public bool IsMeasured { get; set; }
|
public bool IsMeasured { get; set; }
|
||||||
|
|
@ -9,6 +19,8 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders
|
||||||
public DateTime? DateOfReceipt { get; set; }
|
public DateTime? DateOfReceipt { get; set; }
|
||||||
|
|
||||||
public string CustomerCompany { get; set; }
|
public string CustomerCompany { get; set; }
|
||||||
|
|
||||||
|
public IList<OrderItemModelExtended> ItemExtendeds { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue