5696-ReclamacionesFueraDePlazoLanded #1532

Merged
alexm merged 3 commits from 5696-ReclamacionesFueraDePlazoLanded into master 2023-05-17 13:04:25 +00:00
1 changed files with 4 additions and 1 deletions

View File

@ -194,7 +194,10 @@ class Controller extends Section {
} }
createClaim() { createClaim() {
const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime(); const today = new Date();
today.setHours(0, 0, 0, 0);
const timeDifference = today.getTime() - new Date(this.ticket.landed).getTime();
const pastDays = Math.floor(timeDifference / 86400000); const pastDays = Math.floor(timeDifference / 86400000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim) if (pastDays >= this.ticketConfig[0].daysForWarningClaim)