Bladeren bron

Fixed aggregates on JRI to use 'Qty' instead of 'Units' on explodable items

Kenric Nugteren 1 week geleden
bovenliggende
commit
f8250dfc99
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      prs.classes/Entities/Job/Requisitions/JobRequisitionItem.cs

+ 3 - 3
prs.classes/Entities/Job/Requisitions/JobRequisitionItem.cs

@@ -162,7 +162,7 @@ namespace Comal.Classes
                         .WithLink(x => x.JobRequisitionItem.ID, x => x.ID)
                 ).Else(
                     Formula(FormulaOperator.Divide,
-                        Aggregate<StockMovement>(AggregateCalculation.Sum, x => x.Property(x => x.Units))
+                        Aggregate<StockMovement>(AggregateCalculation.Sum, x => x.Property(x => x.Qty))
                             .WithLink(x => x.JobRequisitionItem.ID, x => x.ID),
                         Property(x => x.Dimensions.Value)
                     )
@@ -342,7 +342,7 @@ namespace Comal.Classes
                             Formula(FormulaOperator.Divide,
                                 Aggregate<StockMovement>(
                                         AggregateCalculation.Sum,
-                                        x => x.Property(x => x.Units))
+                                        x => x.Property(x => x.Qty))
                                     .WithLink(x => x.JobRequisitionItem.ID, x => x.ID)
                                     .WithLink(x => x.Style.ID, x => x.Style.ID),
                                 Property(x => x.Dimensions.Value)
@@ -411,7 +411,7 @@ namespace Comal.Classes
                     Formula(FormulaOperator.Divide,
                         Aggregate<StockMovement>(
                                 AggregateCalculation.Sum,
-                                x => x.Property(x => x.Issued),
+                                x => x.Property(x => x.Qty), // Using Qty here; Issued and Units should be the same
                                 Filter<StockMovement>.Where(x => x.Type).IsEqualTo(StockMovementType.Issue))
                             .WithLink(x => x.JobRequisitionItem.ID, x => x.ID)
                             .WithLink(x => x.Style.ID, x => x.Style.ID),