Skip to content

DeliveryDateCalculator not used to get delivery date with restock timeΒ #2

@ahausamm

Description

@ahausamm

It seems like that the settings for excludeSaturday and excludeSunday are only used for the delivery date but not for the restock date.
This can lead to wrong dates when an article has zero stock and will be restocked.

Example 1: Article is in stock

Implementation works correct.

Sample data:

  • Current date: 2025-03-13
  • Delivery time: 1 - 2 days

Actual result:

  • Earliest: 2025-03-14
  • Latest: 2025-03-17

Example 2: Article is not in stock

Implementation ignores that with the restock time another weekend is in between.

Sample data:

  • Current date: 2025-03-13
  • Delivery time: 1 - 2 days
  • Restock time: 5 days

Actual result:

  • Earliest: 2025-03-19
  • Latest: 2025-03-22

Expected result:

  • Earliest: 2025-03-21
  • Latest: 2025-03-24

Possible fix:
The addition of the restock time should happen before using the DeliveryDateCalculator to calculate the restockDate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions