diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 11a68cc88..2f4b434f9 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -164,6 +164,8 @@ * #2693 [fixed] - Booking product page - add to cart button js error +* #2707 [fixed] Getting exception when generate invoice in appointment booking + ## **v1.0.0 (24th of February 2020)** - *Release* diff --git a/packages/Webkul/BookingProduct/src/Type/Booking.php b/packages/Webkul/BookingProduct/src/Type/Booking.php index 7b112062a..66cc7fd95 100644 --- a/packages/Webkul/BookingProduct/src/Type/Booking.php +++ b/packages/Webkul/BookingProduct/src/Type/Booking.php @@ -128,6 +128,10 @@ class Booking extends Virtual { $bookingProduct = $this->getBookingProduct($this->product->id); + if (! $bookingProduct) { + return false; + } + if (in_array($bookingProduct->type, ['default', 'rental', 'table'])) { return true; }