Exemple #1
0
        public static void Dismantle(this Pallet pallet, Order order)
        {
            foreach (PalletItem palletItem in pallet.PalletItems)
            {
                OrderLine orderLine = order
                                      .OrderLines
                                      .GetOrderLinesByInventoryId(palletItem.Sku.InventoryId)
                                      .FirstOrDefault();

                // Original Java Code Does NOT Null Check

                orderLine.CaseQuantityRemaining += palletItem.Quantity;
            }

            pallet.NextLayerNumber    = 1;
            pallet.UnstablePercentage = 0.0;
            pallet.UnstablePackageIds.Clear();
        }
Exemple #2
0
        // ---

        public static int HowManyCasesFit(this Pallet pallet, Package package, double buildToPct, double overflow) =>
        (int)Math.Floor(((buildToPct + overflow) - pallet.GetPercentageFull()) * (package.CasesPerLayer * package.LayersPerPallet));