elthran / BookingSystem

A working booking/calendar system for clients to take orders and create a schedule
0 stars 0 forks source link

Floats #20

Closed elthran closed 6 years ago

elthran commented 6 years ago

I want all prices to be stored to 2 decimal places always (either throw an error r round it if a user types in a 3+ decimal such as $55.765). And I want them to also display that way. So a cost of 5 should show as 5.00 always.

klondikemarlen commented 6 years ago

I believe you have 3 issues.

  1. Input validation -> restrict to 2 decimal places.
  2. Storage -> just store as a float, no restrictions
  3. Output formatting -> restrict to correct currency formatting (CAN == 2 decimal places).
elthran commented 6 years ago

And I'm sure you can easily solve all 3 of these issues in a few minutes :D

klondikemarlen commented 6 years ago

Looks like you set the Storage value to 2 decimal places. I guess I'll leave that for now.

klondikemarlen commented 6 years ago

Working on this issue in https://github.com/elthran/BookingSystem/tree/issue_20

klondikemarlen commented 6 years ago

Fixed in https://github.com/elthran/BookingSystem/pull/22