예제 #1
0
        internal ImportMovementPartialRejection PartialReject(Guid movementId,
                                                              DateTime rejectionDate,
                                                              string reason,
                                                              decimal actualQuantity,
                                                              ShipmentQuantityUnits actualUnit,
                                                              decimal rejectedQuantity,
                                                              ShipmentQuantityUnits rejectedUnit,
                                                              DateTime?wasteDisposedDate)
        {
            Guard.ArgumentNotDefaultValue(() => rejectionDate, rejectionDate);
            Guard.ArgumentNotDefaultValue(() => reason, reason);

            var rejection = new ImportMovementPartialRejection(movementId, rejectionDate, reason, actualQuantity, actualUnit, rejectedQuantity, rejectedUnit, wasteDisposedDate);

            return(rejection);
        }
예제 #2
0
 public ImportMovementSummary(ImportMovement movement,
                              ImportMovementReceipt receipt,
                              ImportMovementRejection rejection,
                              ImportMovementCompletedReceipt completedReceipt,
                              NotificationType notificationType,
                              string notificationNumber,
                              ShipmentQuantityUnits units,
                              ImportMovementPartialRejection partialRejection)
 {
     Movement           = movement;
     Receipt            = receipt;
     Rejection          = rejection;
     CompletedReceipt   = completedReceipt;
     NotificationType   = notificationType;
     NotificationNumber = notificationNumber;
     Units            = units;
     PartialRejection = partialRejection;
 }
예제 #3
0
        public static MovementTableData Load(ImportMovement movement,
                                             ImportMovementReceipt movementReceipt,
                                             ImportMovementRejection movementRejection,
                                             ImportMovementCompletedReceipt movementOperationReceipt,
                                             ImportMovementPartialRejection movementPartialRejection)
        {
            var data = new MovementTableData();

            if (movement != null)
            {
                data.Id              = movement.Id;
                data.Number          = movement.Number;
                data.PreNotification = movement.PrenotificationDate;
                data.ShipmentDate    = movement.ActualShipmentDate;
                data.IsCancelled     = movement.IsCancelled;
            }

            if (movementReceipt != null)
            {
                data.Received = movementReceipt.Date;
                data.Quantity = movementReceipt.Quantity;
                data.Unit     = movementReceipt.Unit;
            }

            if (movementPartialRejection != null)
            {
                data.Received            = movementPartialRejection.WasteReceivedDate;
                data.Quantity            = movementPartialRejection.ActualQuantity;
                data.Unit                = movementPartialRejection.ActualUnit;
                data.IsPartiallyRejected = true;
            }

            if (movementRejection != null)
            {
                data.Rejected = movementRejection.Date;
            }

            if (movementOperationReceipt != null)
            {
                data.RecoveredOrDisposedOf = movementOperationReceipt.Date;
            }

            return(data);
        }