Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp
This commit is contained in:
commit
6ec77266a2
|
|
@ -15,6 +15,18 @@ namespace FruitBank.Common.Server
|
||||||
public static string MeasuringRevisorRoleSystemName = "MeasuringRevisor";
|
public static string MeasuringRevisorRoleSystemName = "MeasuringRevisor";
|
||||||
public static string IsMeasureableAttributeName = "IsMeasurable";
|
public static string IsMeasureableAttributeName = "IsMeasurable";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DateTime generic attribute on Product.
|
||||||
|
/// The start of the window during which this product is visible for preordering.
|
||||||
|
/// </summary>
|
||||||
|
public const string PreorderWindowStart = "PreorderWindowStart";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DateTime generic attribute on Product.
|
||||||
|
/// The end of the window during which this product is visible for preordering.
|
||||||
|
/// </summary>
|
||||||
|
public const string PreorderWindowEnd = "PreorderWindowEnd";
|
||||||
|
|
||||||
static FruitBankConst()
|
static FruitBankConst()
|
||||||
{
|
{
|
||||||
ProjectId = Guid.Parse(ProjectIdString);
|
ProjectId = Guid.Parse(ProjectIdString);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
using AyCode.Interfaces.EntityComment;
|
||||||
|
using FruitBank.Common.Interfaces;
|
||||||
|
using Mango.Nop.Core.Entities;
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
public class CustomerCredit: MgEntityBase, IEntityComment
|
||||||
|
{
|
||||||
|
public int CustomerId { get; set; }
|
||||||
|
public decimal CreditLimit { get; set; }
|
||||||
|
public string? Comment { get; set; }
|
||||||
|
public DateTime CreatedOnUtc { get; set; }
|
||||||
|
public DateTime UpdatedOnUtc { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
using FruitBank.Common.Enums;
|
||||||
|
using LinqToDB.Mapping;
|
||||||
|
using Mango.Nop.Core.Entities;
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
[Table(Name = FruitBankConstClient.PreOrderDbTableName)]
|
||||||
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PreOrderDbTableName)]
|
||||||
|
public class Preorder : MgEntityBase
|
||||||
|
{
|
||||||
|
public int CustomerId { get; set; }
|
||||||
|
public int StoreId { get; set; }
|
||||||
|
public DateTime DateOfReceipt { get; set; }
|
||||||
|
public PreorderStatus Status { get; set; }
|
||||||
|
public string? CustomerNote { get; set; }
|
||||||
|
public DateTime CreatedOnUtc { get; set; }
|
||||||
|
public DateTime UpdatedOnUtc { get; set; }
|
||||||
|
public int? OrderId { get; set; }
|
||||||
|
|
||||||
|
public List<PreorderItem> PreorderItems { get; set; } = new();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using FruitBank.Common.Enums;
|
||||||
|
using LinqToDB.Mapping;
|
||||||
|
using Mango.Nop.Core.Entities;
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Entities;
|
||||||
|
|
||||||
|
[Table(Name = FruitBankConstClient.PreOrderItemDbTableName)]
|
||||||
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PreOrderItemDbTableName)]
|
||||||
|
public class PreorderItem : MgEntityBase
|
||||||
|
{
|
||||||
|
public int PreorderId { get; set; }
|
||||||
|
public int ProductId { get; set; }
|
||||||
|
public int RequestedQuantity { get; set; }
|
||||||
|
public int FulfilledQuantity { get; set; }
|
||||||
|
public decimal UnitPriceInclTax { get; set; }
|
||||||
|
public PreorderItemStatus Status { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace FruitBank.Common.Enums;
|
||||||
|
|
||||||
|
public enum PreorderItemStatus
|
||||||
|
{
|
||||||
|
Pending = 0,
|
||||||
|
Fulfilled = 10,
|
||||||
|
PartiallyFulfilled = 20,
|
||||||
|
Dropped = 30
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
namespace FruitBank.Common.Enums;
|
||||||
|
|
||||||
|
public enum PreorderStatus
|
||||||
|
{
|
||||||
|
Pending = 0,
|
||||||
|
Confirmed = 10,
|
||||||
|
PartiallyFulfilled = 20,
|
||||||
|
Cancelled = 30
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ public static class FruitBankConstClient
|
||||||
public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
|
public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
|
||||||
//public static string BaseUrl = "https://localhost:44372"; //FrutiBank nop
|
//public static string BaseUrl = "https://localhost:44372"; //FrutiBank nop
|
||||||
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||||
|
//public static string BaseUrl = "https://fruitbank.mangoweb.hu"; //FrutiBank nop test
|
||||||
#if RELEASE
|
#if RELEASE
|
||||||
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -43,6 +44,9 @@ public static class FruitBankConstClient
|
||||||
public const string StockTakingDbTableName = "fbStockTaking";
|
public const string StockTakingDbTableName = "fbStockTaking";
|
||||||
public const string StockTakingItemDbTableName = "fbStockTakingItem";
|
public const string StockTakingItemDbTableName = "fbStockTakingItem";
|
||||||
public const string StockTakingItemPalletDbTableName = "fbStockTakingItemPallet";
|
public const string StockTakingItemPalletDbTableName = "fbStockTakingItemPallet";
|
||||||
|
public const string CustomerCreditDbTableName = "fbCustomerCredit";
|
||||||
|
public const string PreOrderDbTableName = "fbPreorder";
|
||||||
|
public const string PreOrderItemDbTableName = "fbPreorderItem";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,19 +46,19 @@
|
||||||
<DxTabPage Text="Rendelés tételek">
|
<DxTabPage Text="Rendelés tételek">
|
||||||
<GridDetailOrderItemDto OrderItemDtos="orderDto.OrderItemDtos" IsMasterGrid="false" />
|
<GridDetailOrderItemDto OrderItemDtos="orderDto.OrderItemDtos" IsMasterGrid="false" />
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
<DxTabPage Text="Mérések" Visible="@LoggedInModel.IsDeveloper">
|
<DxTabPage Text="Mérések" Visible="@LoggedInModel.IsAdministrator">
|
||||||
@{
|
@{
|
||||||
var orderItemPalletDtos = orderDto?.OrderItemDtos.SelectMany(oi => oi.OrderItemPallets).ToList() ?? [];
|
var orderItemPalletDtos = orderDto?.OrderItemDtos.SelectMany(oi => oi.OrderItemPallets).ToList() ?? [];
|
||||||
<GridDetailOrderItemPallets OrderItemPallets="orderItemPalletDtos" IsMasterGrid="false"/>
|
<GridDetailOrderItemPallets OrderItemPallets="orderItemPalletDtos" IsMasterGrid="false"/>
|
||||||
}
|
}
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
<DxTabPage Text="Rendelés jegyzetek" Visible="@LoggedInModel.IsDeveloper">
|
<DxTabPage Text="Rendelés jegyzetek" Visible="@LoggedInModel.IsAdministrator">
|
||||||
@{
|
@{
|
||||||
// var orderItemPalletDtos = orderDto?.OrderItemDtos.SelectMany(oi => oi.OrderItemPallets).ToList() ?? [];
|
// var orderItemPalletDtos = orderDto?.OrderItemDtos.SelectMany(oi => oi.OrderItemPallets).ToList() ?? [];
|
||||||
// <GridDetailOrderItemPallets OrderItemPallets="orderItemPalletDtos" IsMasterGrid="false" />
|
// <GridDetailOrderItemPallets OrderItemPallets="orderItemPalletDtos" IsMasterGrid="false" />
|
||||||
}
|
}
|
||||||
</DxTabPage>
|
</DxTabPage>
|
||||||
<DxTabPage Text="Speciális jellemzők" Visible="@LoggedInModel.IsDeveloper">
|
<DxTabPage Text="Speciális jellemzők" Visible="@LoggedInModel.IsAdministrator">
|
||||||
@{
|
@{
|
||||||
var genericAttributeDtos = new AcObservableCollection<GenericAttributeDto>(orderDto.GenericAttributes);
|
var genericAttributeDtos = new AcObservableCollection<GenericAttributeDto>(orderDto.GenericAttributes);
|
||||||
<GridGenericAttribute ParentDataItem="@orderDto" GenericAttributes="@genericAttributeDtos" />
|
<GridGenericAttribute ParentDataItem="@orderDto" GenericAttributes="@genericAttributeDtos" />
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)"/>
|
<MgGridToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)"/>
|
||||||
}
|
}
|
||||||
</ToolbarTemplate>
|
</ToolbarTemplate>
|
||||||
<GroupSummary>
|
@* <GroupSummary>
|
||||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||||
FieldName="Quantity"
|
FieldName="Quantity"
|
||||||
FooterColumnName="Quantity" />
|
FooterColumnName="Quantity" />
|
||||||
|
|
@ -84,7 +84,23 @@
|
||||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||||
FieldName="PriceInclTax"
|
FieldName="PriceInclTax"
|
||||||
FooterColumnName="PriceInclTax" />
|
FooterColumnName="PriceInclTax" />
|
||||||
|
</GroupSummary> *@
|
||||||
|
<GroupSummary>
|
||||||
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Count"
|
||||||
|
FieldName="Id"
|
||||||
|
ValueDisplayFormat="'{0} rendelés'" />
|
||||||
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Count"
|
||||||
|
FieldName="Id"
|
||||||
|
FooterColumnName="Id" />
|
||||||
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||||
|
FieldName="OrderTotal"
|
||||||
|
FooterColumnName="OrderTotal" />
|
||||||
</GroupSummary>
|
</GroupSummary>
|
||||||
|
<TotalSummary>
|
||||||
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Count"
|
||||||
|
FieldName="Id"
|
||||||
|
FooterColumnName="Id" />
|
||||||
|
</TotalSummary>
|
||||||
</MgGridBase>
|
</MgGridBase>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
<DxListEditorColumn FieldName="@nameof(Shipping.ShippingDate)" />
|
<DxListEditorColumn FieldName="@nameof(Shipping.ShippingDate)" />
|
||||||
<DxListEditorColumn FieldName="@nameof(Shipping.LicencePlate)" />
|
<DxListEditorColumn FieldName="@nameof(Shipping.LicencePlate)" />
|
||||||
<DxListEditorColumn FieldName="@nameof(Shipping.Comment)" />
|
<DxListEditorColumn FieldName="@nameof(Shipping.Comment)" />
|
||||||
|
<DxListEditorColumn FieldName="@nameof(Shipping.CargoCompany)" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</DxComboBoxSettings>
|
</DxComboBoxSettings>
|
||||||
</EditSettings>
|
</EditSettings>
|
||||||
|
|
|
||||||
|
|
@ -239,8 +239,10 @@
|
||||||
var quantityOnDocument = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.QuantityOnDocument));
|
var quantityOnDocument = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.QuantityOnDocument));
|
||||||
var measuredQuantity = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.MeasuredQuantity));
|
var measuredQuantity = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.MeasuredQuantity));
|
||||||
|
|
||||||
if (quantityOnDocument > 0 && quantityOnDocument > measuredQuantity) e.CssClass = "text-danger";
|
if (quantityOnDocument > 0 && quantityOnDocument > measuredQuantity)
|
||||||
//else if (quantityOnDocument <= measuredQuantity) e.CssClass = "text-success";
|
{ e.CssClass = "text-danger"; }
|
||||||
|
else if (quantityOnDocument < measuredQuantity)
|
||||||
|
{ e.CssClass = "text-success"; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<ApplicationId>com.mango.fruitbank</ApplicationId>
|
<ApplicationId>com.mango.fruitbank</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.0.1</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.2</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
|
||||||
<RunAOTCompilation>false</RunAOTCompilation>
|
<RunAOTCompilation>false</RunAOTCompilation>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue