Forráskód Böngészése

Fixed some issues with new StockLocation.Stocktake functionality

frogsoftware 1 hete
szülő
commit
9960a5a8d7

+ 13 - 0
prs.classes/Entities/Stock/StockLocation/StockLocation.cs

@@ -124,6 +124,19 @@ namespace Comal.Classes
             {
                 return new Filter<StockMovementBatch>(x => x.Type).IsEqualTo(StockMovementBatchType.Stocktake);
             }
+
+            public override Columns<StockMovementBatch> DefineColumns()
+            {
+                return base.DefineColumns()
+                    .Add(x => x.Employee.Name)
+                    .Add(x => x.TimeStamp);
+            }
+
+            public override string FormatDisplay(CoreRow row)
+            {
+                return
+                    $"{row.Get<StockMovementBatch, DateTime>(x => x.TimeStamp):dd MMM yy} - {row.Get<StockMovementBatch, string>(x => x.Employee.Name)}";
+            }
         }
         [LookupDefinition(typeof(StocktakeLookup))]
         [EditorSequence("Stocktake",4)] 

+ 1 - 1
prs.classes/Entities/Stock/StockMovement/StockMovementBatchLink.cs

@@ -14,7 +14,7 @@ namespace Comal.Classes
         [NullEditor]
         public int Documents { get; set; }
 
-        [PopupEditor(typeof(StockMovementBatchLink))]
+        [PopupEditor(typeof(StockMovementBatch))]
         public override Guid ID { get; set; }
     }
 }