diff --git a/app/Models/BooksModel.php b/app/Models/BooksModel.php index e639f977..e5948ed9 100644 --- a/app/Models/BooksModel.php +++ b/app/Models/BooksModel.php @@ -31,7 +31,7 @@ class BooksModel extends Model { $builder = $this->builder(); $builder->select('books.book_id, books.title, books.price, books.duration, books.isactive, books.publisher, books.genre, books.language, books.publication_date, GROUP_CONCAT(category.name SEPARATOR \',\') as name'); - $builder->join('book_categories', 'book_categories.book_id = books.book_id', 'left'); + $builder->join('book_categories', 'book_categories.book_id = books.book_id and book_categories.isactive = 1', 'left'); $builder->join('category', 'category.id = book_categories.category_id', 'left'); $builder->where('books.business_id', $business_id); $builder->where('category.name !=', 'membership'); // Exclude books with the category name "membership" diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index f72db1be..e06606ea 100644 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -82,7 +82,7 @@ - +