=== NetBookings ===
Contributors: netchameleon
Tags: booking, room booking, venue hire, village hall, booking calendar
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Room and hall bookings with an availability calendar, your approval, hourly rates by type of group, emails and PDF invoices.

== Description ==

NetBookings takes booking requests for a hall, room or space from your own website. Customers see which days are free, choose a date and times, and send a request. You approve or reject it from the dashboard or straight from the email, and NetBookings sends the confirmation and the invoice.

It was made for village and church halls, community centres, sports clubs and other venues run by volunteers, who need bookings to be simple for everyone.

= What it does =

* **Booking form** with a live price as customers fill it in. Put it on any page with a shortcode, or with the Elementor widget.
* **Availability calendar** by month, week or day, showing free, part-booked, full and unavailable days.
* **Your approval**: requests wait as Pending until you approve or reject them, in the dashboard or with one click from the email.
* **Hourly rates by type of group**, such as local groups, charities and private hire, plus optional extras like a tea urn or projector.
* **Several dates in one request**, billed with one combined invoice.
* **Emails** to you and the customer at each step, with templates and a design you can change.
* **PDF invoices** sent on approval, paid by bank transfer or on the day, with reminders when they're 3, 7 and 14 days overdue. Mark them paid in one click.
* **Blocked dates** for maintenance or your own events.
* **Google Calendar sync** (optional): approved bookings go into your calendar, and events in it block those times.
* **Customer accounts** (optional): customers can tick a box to get a login and see their bookings.

= Settings in one place =

Day to day, NetBookings has just four screens: All Bookings, Blocked Dates, Invoices and Settings. Settings has a tab for each part: Rooms & spaces (your room, prices and extras), General, Payments, Emails, Google Calendar and Help.

= NetBookings Pro =

NetBookings is complete for one room. The separate NetBookings Pro add-on, from netchameleon.co.uk, adds more rooms, appointments and visits (trades, garages, spas, salons, coaches), tables and places (cafés, restaurants, classes, tours), instant confirmation and payments online by card or PayPal. Without it, those tabs show what they do, once, and nothing else on your site changes. Nothing in NetBookings is locked or time-limited.

= Part of the Netchameleon Suite =

NetBookings sits in the shared Netchameleon menu with other Netchameleon plugins, such as NetForms and NetCookies. It works on its own.

== Installation ==

1. Install and activate NetBookings.
2. Go to **NetBookings → Settings → Rooms & spaces**. Choose your type of venue, name your room and set your hourly prices. Save.
3. On **General**, add your hall or business name and the email address for booking requests.
4. On **Payments**, add your bank details and invoice details.
5. Make a page, for example "Book the hall", and add the shortcodes `[net_calendar]` and `[net_booking_form]`.

== Frequently Asked Questions ==

= Which shortcodes are there? =

`[net_booking_form]` shows the booking form, and `[net_calendar]` the availability calendar. `[net_booking_form type="rooms"]` books just your rooms and spaces; with NetBookings Pro, `type="appointments"` and `type="tables"` give those forms. On its own, `[net_booking_form]` lets customers choose from everything you take bookings for. Elementor users can use the NetBookings widgets instead.

= Do customers have to pay online? =

No. Invoices are paid by bank transfer or on the day, and you mark them paid. Taking deposits and balances online by card or PayPal is part of NetBookings Pro.

= Can I approve bookings from my phone? =

Yes. The email you get for each request has Approve and Reject links. They work once, and only for someone signed in who can manage bookings.

= Can I have more than one room? =

NetBookings handles one room or space. NetBookings Pro adds more, each with its own diary.

= Who can manage bookings? =

Administrators. The plugin uses its own capability, `vhb_manage`, which you can give to other roles with a role editor.

= Is anything deleted when I uninstall? =

No. Bookings, invoices and settings stay in the database so nothing is lost by accident.

== External services ==

NetBookings works without any outside service. Google Calendar sync is off until you connect it on Settings → Google Calendar:

* **Google Calendar** (Google OAuth and the Calendar API): when connected, approved bookings (date, times, room and the booker's name) are added to your chosen calendar, and events from that calendar are read so those times can't be double-booked. Your Google sign-in token is stored on your site. [Terms](https://policies.google.com/terms), [Privacy policy](https://policies.google.com/privacy).

Online payments by card or PayPal are part of NetBookings Pro, not this plugin.

== Screenshots ==

1. The booking form, with the price shown as customers fill it in.
2. The availability calendar by month.
3. Settings → Rooms & spaces: your venue, room and hourly prices.
4. All bookings, with Approve and Reject links.
5. A booking, with its invoice and payment status.

== Changelog ==

= 3.3.0 =
* New settings page in the Netchameleon Suite layout, with tabs by how you take bookings: Rooms & spaces, Appointments & visits and Tables & places, then General, Payments, Google Calendar and Help. Each booking tab has a "What's your business?" list (village hall, plumber, garage, spa, salon, coach, café, restaurant, classes, tours) that fills in the wording and starting settings.
* Rooms & spaces holds your room, hourly prices and extras, so the separate Pricing and Extras screens are gone from the menu. Appointments & visits and Tables & places need NetBookings Pro and show as a preview without it.
* Each tab has its own booking form: [net_booking_form type="rooms"], type="appointments" or type="tables". [net_booking_form] still works as before.
* New: services can ask customers their own questions, such as "Vehicle registration" or "Any allergies?". Answers are required and kept with the booking.
* Changed: online payments (Stripe and PayPal deposits and balances) are now part of NetBookings Pro. Invoices, paid by bank transfer or on the day, stay in NetBookings, and so does Google Calendar sync. NetBookings itself no longer contacts Stripe or PayPal.
* Quick start is replaced by the settings tabs. NetBookings is down to four screens: All Bookings, Blocked Dates, Invoices and Settings. Email templates and design are on Settings → Emails, and extras are a card on Rooms & spaces, one block per extra. Old links to the separate screens still open.
* A café set up with Quick start in 3.2 appears on the Tables & places tab automatically.
* Security and WordPress.org clean-up: everything printed is escaped, form input is unslashed and sanitised, redirects stay on your site, and the Google Calendar sign-in now checks it was started by you. Needs WordPress 6.3 or newer.
* All Bookings has a section for each kind of booking (Rooms & spaces, Appointments & visits, Tables & places), each with how many are waiting for your approval and columns to suit: who's booking for rooms; the job, who with and the customer's answers for appointments; how many people for tables. The status links now show counts.
* Deposit and balance emails are only listed on the Emails tab when NetBookings Pro's online payments are installed.
* Email and calendar errors are only written to the PHP error log when debug logging is switched on.

= 3.2.0 =
* New: Quick start (NetBookings → Quick start). Pick what you take bookings for (hall or meeting room hire, café or restaurant tables, appointments with a person, garage and workshop slots, or classes and group sessions), answer a few questions, and NetBookings sets up the rooms or resources, the service and, if you like, a draft page with the booking form. Hall hire works in NetBookings; the other types need NetBookings Pro and show a PRO badge without it.
* Quick start also lists every booking form on the site with how it books and its shortcode.
* New: slot services can start every so many minutes, separately from their length, so bookings can overlap: café tables kept for 90 minutes with booking times every 30 minutes. Services without it work as before.
* New: fully booked times. The booking form now lists every time for a fixed-slot service, with full ones marked "Full". Picking a full time says so ("8:00pm is fully booked for 2 people", or "only has room for 1 person") and offers the three nearest free times as buttons. When a whole day is full, the form says so and offers the next free day, up to two weeks ahead, with a button to show it.
* New: table sizes for cafés and restaurants. A room can list its tables (say four for 2, six for 4 and one for 6), and each booking gets the smallest free table that seats the whole party, so a couple doesn't take a table for six, and a time shows as full once no table that size is free, even with odd seats spare. The café Quick start asks for your tables, and the largest party is capped at your biggest table. Rooms without tables count places as before.
* Capacity is now counted exactly: the places in use are the most held at any one moment, so two bookings that don't overlap each other no longer both count against a third. Rooms (one booking at a time) work as before.
* A one-off, dismissible pointer to Quick start shows on NetBookings screens while a site has only its first service.
* The Netchameleon menu and Suite Overview now use the Netchameleon chameleon icon. Shared hub updated to 0.7.1.

= 3.1.5 =
* Renamed the shared plugin family to the Netchameleon Suite. The shared admin menu is now called "Netchameleon" (page title "Netchameleon Suite") and sits between Tools and Settings. Shared hub updated to 0.7.0: class Netchameleon_Suite, menu slug ncsuite, filters netchameleon_suite_plugins, netchameleon_suite_catalogue, netchameleon_suite_menu_position and netchameleon_suite_fold_menus. The overview's list of other plugins is now headed "More from Netchameleon", and plugin links point to each plugin's own page and to netchameleon.co.uk/plugins/.

= 3.1.4 =
* New: the Pro screens, Rooms & Resources and Services, appear in the menu with a PRO badge as read-only previews of your room and services, with a link to NetBookings Pro. Nothing on them can be changed without Pro.
* Suite menu: shared hub updated to 0.6.1, so PRO badges show in the tab bar and admin menu.

= 3.1.3 =
* Suite menu: the shared menu now sits just above Settings in the WordPress admin menu, instead of directly under Dashboard. Shared hub updated to 0.6.0.

= 3.1.2 =
* Suite menu: shared hub updated to 0.5.2. The retired SMTP mailer is no longer listed (NetCampaigns handles sending), and every product now uses its one-word name, e.g. NetClassified and NetConnect.

= 3.1.1 =
* Suite menu: shared hub updated to 0.5.1. Netchameleon Campaigns is listed under its new name, NetCampaigns, and the menu uses the Netchameleon orange.

= 3.1.0 =
* New: Services. Each service sets how customers pick a time (any start and end, or fixed slots with a gap after each), its price (group-type hourly rate, per hour, per booking, per person or flat), whether you approve bookings or they're confirmed instantly, and the most people per booking.
* New: a service can need several resources at once, e.g. a workshop bay and a mechanic. Customers can choose (e.g. their stylist) or get whoever is free.
* New: resources have a capacity (how many bookings or people at the same time) and their own weekly opening hours.
* New: the booking form asks which service, shows available slots with places left, and asks for party size where it applies. The [net_booking_form] shortcode and Elementor widget can be fixed to one service with service="…".
* New: {{service}} and {{quantity}} email tags.
* Changed: NetBookings is complete for one room. More rooms and resources, extra services, fixed slots, party sizes, two resources per booking, opening hours and instant confirmation are set up with the NetBookings Pro add-on. Anything already set up keeps taking bookings without Pro.
* New: shortcodes are now [net_booking_form], [net_calendar], [net_deposit_page] and [net_balance_page]. The old [vhb_…] names still work, so existing pages need no changes.
* New: choose your own invoice number prefix (Settings → Invoices). "INV-" stays the default.
* Updating creates a "Room hire" service that works exactly like before (any start and end, group-type rates, your approval), using all your rooms.

= 3.0.0 =
* New: Rooms & Resources. Add more than one room (or other bookable resource); each has its own availability, so different rooms can be booked at the same time.
* New: customers choose a room on the booking form and calendars once there is more than one. The [vhb_booking_form] and [vhb_calendar] shortcodes and the Elementor widgets can be fixed to one room with resource="…".
* New: blocked dates can close one room or all of them.
* New: {{resource}} email tag, and the room appears in booking emails and the admin screens.
* New: choose which room the connected Google Calendar belongs to.
* Updating from 2.x creates one room named after your hall and moves every existing booking onto it, so nothing changes until you add a second room.

= 1.0.0 =
* Initial release
