15 lines
606 B
C#
15 lines
606 B
C#
using LinqToDB.Mapping;
|
|
using Mango.Nop.Core.Entities;
|
|
|
|
namespace FruitBank.Common.Entities;
|
|
|
|
[Table(Name = FruitBankConstClient.StockTakingDbTableName)]
|
|
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.StockTakingDbTableName)]
|
|
public class StockTaking : MgStockTaking<StockTakingItem>
|
|
{
|
|
public override bool IsReadyForClose()
|
|
{
|
|
if (StockTakingItems == null || StockTakingItems.Count == 0) return false;
|
|
return StockTakingItems.Where(stockTakingItem => stockTakingItem is { IsRequiredForMeasuring: true, IsInvalid: false }).All(x => x.IsMeasured);
|
|
}
|
|
} |