PAYMENT FORM: Changet a for loop for a do while on dates inputs js to optimize the checks it has to do