Black Bookings and Beds24v2 initial Export bug/incompatibility

1 year 3 weeks ago - 1 year 3 weeks ago #46639 by Victor van Herpt Valdivia
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.
Last edit: 1 year 3 weeks ago by Victor van Herpt Valdivia.
1 year 3 weeks ago - 1 year 3 weeks ago #46640 by Victor van Herpt Valdivia
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: 1 year 3 weeks ago by Victor van Herpt Valdivia.
1 year 2 weeks ago #46650 by Vince Wooll
The following user(s) said Thank You: Victor van Herpt Valdivia
1 year 2 weeks ago #46651 by Vince Wooll
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.
Read this before you customise Jomres files
The following user(s) said Thank You: Victor van Herpt Valdivia


Vince portrait smallaladar

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. It has survived various versions of Mambo, then Joomla 1.0, 1.5, 1.6, 1.7, 2.5 and 3.

Aladar joined the project in 2010 after using Jomres for his own projects. He was active on the forum, helping other members of the community and eventually Vince invited him to join the team. He has since become an integral part of the project and has contributed significantly to it's development over the years.

Whilst not formally part of the Jomres project, Rodrigo Rocco and the team have become firm friends. Rod is a freelancer who specialises in doing custom work for Jomres users and developing custom plugins for the system that take advantage of it's modular design. He has built many useful extensions including his fabulous new Valentina Template Package.


Jomres and the Jomres Logo is trademarked and can't be used without written consent from the owner. 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 - 2018 Woollyinwales IT.