Hi
I am trying to figure out the potential use of this great module (6.x-2.0-beta2) on my site. I hope to build a sample site for Japanese clients, and needs to set the currency to Japanese yen (JPY). So, I did as follows:
(1) Administer -> Store Administration -> Configuration -> Store Settings -> Format Settings
(2) Set the Currency Format to JPY
Then, I go back to set the Base Rates to, say, 25,000 JPY. Specifically, I input "25000" as a value to one of the base rates on a calendar. After saving the value, base rates are set to 999.999. After several attempts, I figured that base rates are not designed to exceed 1000.
I suspect that this is a part of validation, but for a use of Japanese currency, will make it impossible to implement for production sites. This may be a possible problem for US/EUR/GBP or other currencies for the class of room above standard rate.
Thank you and with best regards
ceel
Comments
Comment #1
willvincent CreditAttribution: willvincent commentedAs the module was initially designed in a VERY rushed way, and not for non-US use, the limit was set purely for display purposes.
Given the changes that larowlan is working on, this limitation can probably be removed.
Comment #2
larowlanHi ceel
I'm working on this in the coming week (as part of other work), when I designed the db, I didn't think about yen (clearly).
What do you think a reasonable amount would be, is 5 places plus 2 decimal enough (7 in total) or is it likely that a room might cost more than 99,999 JPY?
Lee
Comment #3
ceel CreditAttribution: ceel commentedThank you Lee and tcindie
I think it understandable that yen was ruled out at the initial display.
As far as I can check the hotel quote, 600,000 JPY is the highest rate offered by any hotel. i.e., I would like to make proposal of the limit of 999,999 JPY . But for the rate I am working with at the moment, 99,999 JPY works well.
Ceel
Comment #4
larowlanNew version (beta3) should resolve this, please install, run update.php and report back how you went.
Thanks
Comment #5
larowlanComment #6
larowlanComment #7
vlooivlerke CreditAttribution: vlooivlerke commentedSorry to open this, but I have this bug on the 6.x-2.0-Beta4 version
This bug also will not allow you to display prices over 1000 in views output, e.g priced from
Then the bug described above is also active in the rates section. 999.999
Comment #8
larowlanHi
Have you run update.php?
If so can you log in to your database and have a look at the output of the following:
This is for MySql only.
If you use table prefixing, add the prefix before hotel_booking_rate_calendars.
If you don't have command line access, can you paste a screenshot of the structure of the table from phpMyAdmin or similar?
It should look like this
The (9,3) is the important part, that means you have 9 digits for the price with three reserved for after the decimal place, ie up to 999999.999.
Thanks
Lee
Comment #9
vlooivlerke CreditAttribution: vlooivlerke commentedMine looks just like yours, except it states "No index defined!"
Any ideas
Thanks
Comment #10
larowlanHmm, your table looks ok - can you please provide steps to reproduce this?
Comment #11
vlooivlerke CreditAttribution: vlooivlerke commentedI did a fresh install of the beta4 version but had some pre installed modules active.
The problem started when I made my first price over 1000, prior to that it was working fine.
Do you think I should install/upgrade the current dev version, I see there is alot of changes.
I am working on a demo site and will post you a link shortly, would that help? I will not be able to give you access to the code.
Comment #12
larowlanHi
I've just tested this on a fresh install of the module.
I can't replicate it.
Is it possible that you're schema is cached - can you flush all of your caches and report back.
Failing that I can't see what else this could be
Comment #13
vlooivlerke CreditAttribution: vlooivlerke commentedOk here is my fix, but this i do not understand.
I edit the rates fields in the hotel_booking_rate_calendars table
I changed 9,3 to 9,2 and 0.000 to 0.00
Then after I update the table and brows it the currency shows correct with 2 decimals, like R1200.00 and not R1200.000
I flushed very hard, but no success, but this fix works so far.
Comment #14
limsherwin CreditAttribution: limsherwin commentedHello,
I would like to know if this base rate limit is fixed in version 7-alpha1 ?
I got the following errors:
PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value adjusted for column 'from_rate' at row 1: UPDATE {hotel_booking_room_types} SET from_rate=:db_update_placeholder_0 WHERE (nid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => 1000.000 [:db_condition_placeholder_0] => 47 ) in hotel_booking_set_room_from_rate() (line 546 of /home/grandmen/public_html/sites/all/modules/uc_hotel/hotel_booking/hotel_booking.util.inc).
I took at look hotel_booking_room_types table and saw that from_rate field is decimal(6,3). Can use phpMyAdmin to change to decimal(9,3) ?
Thanks,
Sherwin
Comment #15
larowlanYeah, that would work