implement AvailableQuantity; ui improvements
This commit is contained in:
parent
1d19bd0e37
commit
9a94bc6c06
|
|
@ -339,7 +339,7 @@
|
|||
IsMasterCheckBox = true,
|
||||
Render = new RenderCheckBox("checkbox_orders"),
|
||||
ClassName = NopColumnClassDefaults.CenterAll,
|
||||
Width = "50"
|
||||
Width = "30"
|
||||
},
|
||||
new ColumnProperty(nameof(OrderModel.CustomOrderNumber))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -241,7 +241,12 @@
|
|||
IsMasterCheckBox = true,
|
||||
Render = new RenderCheckBox("checkbox_products"),
|
||||
ClassName = NopColumnClassDefaults.CenterAll,
|
||||
Width = "40"
|
||||
Width = "30"
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModel.Id))
|
||||
{
|
||||
Title = "Id", //T("Admin.Catalog.Products.Fields.Id").Text
|
||||
Width = "30"
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModel.PictureThumbnailUrl))
|
||||
{
|
||||
|
|
@ -261,12 +266,21 @@
|
|||
},
|
||||
new ColumnProperty(nameof(ProductModel.FormattedPrice))
|
||||
{
|
||||
Title = T("Admin.Catalog.Products.Fields.Price").Text
|
||||
Title = T("Admin.Catalog.Products.Fields.Price").Text,
|
||||
Width = "100",
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModelExtended.AvailableQuantity))
|
||||
{
|
||||
Title = "Elérhető"//T("Admin.Catalog.Products.Fields.Tare").Text
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModel.StockQuantityStr))
|
||||
{
|
||||
Title = T("Admin.Catalog.Products.Fields.StockQuantity").Text
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModelExtended.IncomingQuantity))
|
||||
{
|
||||
Title = "Bejövő"//T("Admin.Catalog.Products.Fields.Tare").Text
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModelExtended.NetWeight))
|
||||
{
|
||||
Title = "Súly(kg)"//T("Admin.Catalog.Products.Fields.NetWeight").Text
|
||||
|
|
@ -275,10 +289,6 @@
|
|||
{
|
||||
Title = "Tára(kg)"//T("Admin.Catalog.Products.Fields.Tare").Text
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModelExtended.IncomingQuantity))
|
||||
{
|
||||
Title = "Bejövő"//T("Admin.Catalog.Products.Fields.Tare").Text
|
||||
},
|
||||
new ColumnProperty(nameof(ProductModelExtended.IsMeasurable))
|
||||
{
|
||||
Title = "Mérendő?",//T("Admin.Catalog.Products.Fields.Tare").Text
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Factories
|
|||
orderItemModelExtended.NetWeight = (decimal)orderItemDto.NetWeight;
|
||||
orderItemModelExtended.ProductStockQuantity = orderItemDto.ProductDto!.StockQuantity;
|
||||
orderItemModelExtended.ProductIncomingQuantity = orderItemDto.ProductDto.IncomingQuantity;
|
||||
orderItemModelExtended.ProductAvailableQuantity = orderItemDto.ProductDto.AvailableQuantity;
|
||||
//orderItemModelExtended.SubTotalInclTax = !orderDto.IsComplete && orderItemDto.IsMeasurable ? "kalkuláció alatt..." : orderItemModelExtended.SubTotalInclTax;
|
||||
|
||||
orderModelExtended.ItemExtendeds ??= new List<OrderItemModelExtended>();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class CustomProductModelFactory : MgProductModelFactory<ProductListModelE
|
|||
productModelExtended.NetWeight = productDto.NetWeight;
|
||||
productModelExtended.IsMeasurable = productDto.IsMeasurable;
|
||||
productModelExtended.IncomingQuantity = productDto.IncomingQuantity;
|
||||
productModelExtended.AvailableQuantity = productDto.AvailableQuantity;
|
||||
|
||||
productModelExtended.StockQuantityStr = productModelExtended.StockQuantity.ToString();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase;
|
||||
using AyCode.Interfaces.Entities;
|
||||
|
||||
public interface IMgModelExtended
|
||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase;
|
||||
|
||||
public interface IMgModelExtended //: IEntityInt
|
||||
{
|
||||
}
|
||||
|
|
@ -3,13 +3,12 @@ using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
|||
|
||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders;
|
||||
|
||||
public interface IOrderItemModelExtended //: IMgOrderItemModelExtended, IMeasurable, IMeasured
|
||||
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; }
|
||||
int ProductAvailableQuantity { get; set; }
|
||||
}
|
||||
|
||||
public interface IOrderModelExtended : IMgOrderModelExtended, IMeasurable, IMeasured
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders
|
|||
public decimal NetWeight { get; set; }
|
||||
public int ProductStockQuantity { get; set; }
|
||||
public int ProductIncomingQuantity { get; set; }
|
||||
public int ProductAvailableQuantity { get; set; }
|
||||
}
|
||||
|
||||
public partial record OrderModelExtended : MgOrderModelExtended, IOrderModelExtended
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
using FruitBank.Common.Interfaces;
|
||||
using AyCode.Interfaces.Entities;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
||||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.ProductModels;
|
||||
|
||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Products;
|
||||
|
||||
public interface IProductModelExtended : IMgProductModelExtended, IMeasurable, ITare, IMeasuringNetWeight, IIncomingQuantity
|
||||
public interface IProductModelExtended : IMgProductModelExtended, IMeasurable, ITare, IMeasuringNetWeight, IIncomingQuantity, IAvailableQuantity
|
||||
{
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.OrderModels;
|
||||
using Nop.Plugin.Misc.FruitBankPlugin.Models.MgBase.ProductModels;
|
||||
|
||||
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Products
|
||||
|
|
@ -10,6 +11,8 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Products
|
|||
public double Tare { get; set; }
|
||||
public double NetWeight { get; set; }
|
||||
public int IncomingQuantity { get; set; }
|
||||
|
||||
public int AvailableQuantity { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public class CustomPriceCalculationService : PriceCalculationService
|
|||
|
||||
if (order.OrderTotal == prevOrderTotal) return false;
|
||||
|
||||
_logger.Error($"order.OrderTotal({order.OrderTotal}) == prevOrderTotal({prevOrderTotal})");
|
||||
_logger.Info($"order.OrderTotal({order.OrderTotal}) == prevOrderTotal({prevOrderTotal})");
|
||||
|
||||
order.OrderSubtotalInclTax = order.OrderTotal;
|
||||
order.OrderSubtotalExclTax = order.OrderTotal;
|
||||
|
|
|
|||
Loading…
Reference in New Issue