Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tzak902's avatar

Javascript total amount calculation is not done correctly

Hello, I have an issue with this code Line 161 https://github.com/webdev866/vouchermanager/blob/main/resources/views/admin/createVouchers/create.blade.php

When I select the date of the arrival and departure, it is calculated correctly however when I enter Room Price, it doesn't calculate and change the "nights" to "[object HTMLInputElement]"

What could be wrong?

0 likes
2 replies
tzak902's avatar

Thank you, there are only 2 issues here:

1.If i updated the departure date, the price doesn't update based on the new number of nights (duration) and I have to remove the price and enter it again. 2.I cannot save the form, it keeps saying nights field is required as if it is not detected.

Please or to participate in this conversation.