{"section":"known-issues","requestedLocale":"en","requestedSlug":"no-delivery-window-can-be-created-due-to-inconsistence-in-estimatedate-and-lastdeliveryday-for-high-timecost","locale":"en","slug":"no-delivery-window-can-be-created-due-to-inconsistence-in-estimatedate-and-lastdeliveryday-for-high-timecost","path":"docs/en/known-issues/Logistics/no-delivery-window-can-be-created-due-to-inconsistence-in-estimatedate-and-lastdeliveryday-for-high-timecost.md","branch":"main","content":"## Summary\n\n\n\nThe `estimateDate` takes into account the total delivery time but only considering the days that the carrier delivers, so in the case of this example it does not consider weekends.\nBut the `lastDeliveryDay` is calculated as calendar days (consecutive days), which is `today date + delivery time + maximum number of days` configured for scheduled delivery, as it count consecutive days, it will consider the weekends.\n\nFor the system to assemble the available delivery window, it will compare if:\n\n    lastDeliveryDay > estimateDate : TRUE\n\n\nAnd only if meets this condition it will create the delivery window.\n\nBut with a total transit `timecost` excessive high, there is an inconsistence with the variable `estimateDate` and `lastDeliveryDay`, the condition will return `false`, and therefore no delivery window will be created.\n\n\n\n##\n\n## Simulation\n\n\n\nChange the shipping configuration to the following:\n\n- Processing days and hours of warehouse with 100 days;\n- Timecost in the spreadsheet rate file with 1 day;\n- Remove weekends and holidays for the shipping policy configuration;\n- Schedule delivery for Monday to Friday from 0h to 23:59h;\n- Maximum delivery time in Schedule delivery configuration for 5 days;\n\nFor this configuration will lead to `lastDeliveryDay=10/05/2024` and the `estimateDate=14/06/2024`;\nAnd thus the condition will be false:\n\n    10/05/2024 > 14/06/2024 : FALSE\n\n\nand no delivery window will be created;\n\n\n\n##\n\n## Workaround\n\n\nThere is no workaround available."}