diff --git a/htdocs/bookcal/class/booking.class.php b/htdocs/bookcal/class/booking.class.php index fab4cd6ba95..897936f995b 100644 --- a/htdocs/bookcal/class/booking.class.php +++ b/htdocs/bookcal/class/booking.class.php @@ -122,6 +122,7 @@ class Booking extends CommonObject 'email' => array('type'=>'varchar(128)', 'label'=>'email', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>-1,), 'start' => array('type'=>'datetime', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>-1,), 'duration' => array('type'=>'integer', 'label'=>'Duration', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>-1,), + 'fk_bookcal_availability' => array('type'=>'integer:Availabilities:bookcal/class/availabilities.class.php', 'label'=>'AvailabilityId', 'enabled'=>'1', 'position'=>49, 'notnull'=>1, 'visible'=>-1,), ); public $rowid; public $ref; @@ -143,6 +144,7 @@ class Booking extends CommonObject public $email; public $start; public $duration; + public $fk_bookcal_availability; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql index df3f6384d23..d327bd56183 100644 --- a/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql +++ b/htdocs/install/mysql/tables/llx_bookcal_booking-bookcal.sql @@ -35,6 +35,7 @@ CREATE TABLE llx_bookcal_booking( lastname varchar(128) NOT NULL, email varchar(128) NOT NULL, start datetime NOT NULL, - duration integer NOT NULL + duration integer NOT NULL, + fk_bookcal_availability integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb;