Forum


Black Bookings and Beds24v2 initial Export bug/incompatibility

More
3 weeks 3 days ago - 3 weeks 3 days ago #46639 by Victor van Herpt Valdivia
Victor van Herpt Valdivia created the topic: Black Bookings and Beds24v2 initial Export bug/incompatibility
Hi,
one of my clients has a jomres installation and is trying to use beds24v2. When you try to export the bookings from an existing property, it will ignore all the black bookings (black bookings are synchronized when created though).

Apparently, in Beds24v2, when you press the 'Export bookings' button, bookings will synchronize, but 'black bookings' won't make it on this initial export, only if you create them again, they'll appear on Beds24.

I checked and this is due to the 'Black Bookings' plugin not adding a timestamp to the contracts table, and the 'Beds24v2' plugin filtering the contracts by the timestamp column (In the get_all_local_bookings() function from beds24v2_bookings.class.php, line 124).

I attach a patch for the black bookings plugin (I post it here, as the plugins aren't on GitHub) that simply adds the (missing?) timestamp value to the save class (as in all the other contracts). I think this fixes the issue, unless there is a specific reason to not to add the timestamp to black bookings. Is there?

Also, in order to get the current black bookings to export in the initial export, i suggest running a sql query such as the following:
UPDATE `PREFIX_jomres_contracts` c JOIN `PREFIX_jomres_room_bookings` b ON c.contract_uid = b.contract_uid SET c.timestamp = c.last_changed WHERE c.timestamp = NULL AND b.black_booking = 1
(obviously, remove or change "PREFIX_" with the appropiate prefix in your configuration)

This will copy the last_changed column date to the timestamp column, therefore 'activating' the export of those items.
Attachments:
Last Edit: 3 weeks 3 days ago by Victor van Herpt Valdivia.
More
3 weeks 3 days ago - 3 weeks 3 days ago #46640 by Victor van Herpt Valdivia
Victor van Herpt Valdivia replied the topic: Black Bookings and Beds24v2 initial Export bug/incompatibility
As a sidenote, I don't really understand why the Beds24v2 initial export is filtered by the timestamp, instead of filtering by the arrival/departure dates (that all contracts, including black bookings have them, and I understand those are the most important dates in a booking when checking availability).
Then, Beds24v2 could be changed to filter for bookings that are arriving since 1 year ago and departing in the future (regadless of when they are created, availability is important anyways), for instance.
Last Edit: 3 weeks 3 days ago by Victor van Herpt Valdivia.
More
2 weeks 4 days ago #46650 by Vince Wooll
Vince Wooll replied the topic: Black Bookings and Beds24v2 initial Export bug/incompatibility

Follow me on twitter
Do not send me PMs, if you need to contact me use the ticket system.
The following user(s) said Thank You: Victor van Herpt Valdivia
More
2 weeks 4 days ago #46651 by Vince Wooll
Vince Wooll replied the topic: Black Bookings and Beds24v2 initial Export bug/incompatibility
Just to let you know that I'm not ignoring this and will look into your observations when I have the time.

Follow me on twitter
Do not send me PMs, if you need to contact me use the ticket system.
The following user(s) said Thank You: Victor van Herpt Valdivia

ABOUT US

Developed and maintained by Vince Wooll and Aladar Barthi, *Jomres* was initially *conceived* in early 2005 as a Mambo based solution to a client’s hotel management needs. While it wasn't originally expected to be an online booking system it quickly morphed into one as users requested more and more features.

As the number of feature requests grew Vince knew that he would need to dedicate more time to the project and in July 2005 Jomres was formally released as a commercial project. Since then, Jomres has become one of *Mambo’s, and now Joomla’s,* longest running projects, having survived various versions of Mambo, then Joomla 1.0, 1.5, 1.6, 1.7, 2.5 and 3.

Jomres is a trademark of Woollyinwales IT and can't be used without written consent from the owner.

www.jomres.net is not affiliated with or endorsed by the Joomla! Project, Open Source Matters or the Wordpress project. The Joomla! & Wordpress names and logos are used under a limited license granted by Open Source Matters and the Wordpress Projects.

© Copyright 2005 - 2017 Woollyinwales IT.