| 12345678910111213141516171819202122232425 |
- using Comal.Classes;
- using InABox.Core;
- using InABox.Mobile;
- namespace PRS.Mobile
- {
- public class StockLocationLastStockTakeConverter : AbstractConverter<StockLocationShell, string>
- {
-
- public bool Active { get; set; }
-
- protected override string? Convert(StockLocationShell? value, object? parameter = null)
- {
- return !Active || value == null
- ? ""
- : !value.CurrentStocktake.IsEmpty()
- ? "Stocktake In Progress"
- : value.StocktakeFrequency == StockTakeFrequency.Never
- ? value.LastStocktake.IsEmpty()
- ? $"Last Stocktake : Never"
- : $"Last Stocktake : {value.LastStocktake:dd MMM yy}"
- : $"Stocktake Due : {value.NextStocktake:dd MMM yy}";
- }
- }
- }
|