package cron

// func JobMonthlyBookingReport() error {
// 	_ = godotenv.Load()
// 	db, err := gorm.Open(postgres.Open(os.Getenv("DATABASE_URL")), &gorm.Config{})
// 	if err != nil {
// 		return fmt.Errorf("error connecting to the database %w", err)
// 	}

// 	now := time.Now()
// 	log.Println("Start Monthly Booking Report job at:", now)

// 	ps, err := pdf.NewPdfClient(
// 		os.Getenv("HTMLDOCS_PROJECT_ID"),
// 		os.Getenv("HTMLDOCS_REPORT_PROJECT_ID"),
// 		os.Getenv("HTMLDOCS_URL"),
// 		os.Getenv("HTMLDOCS_KEY"),
// 	)
// 	if err != nil {
// 		return fmt.Errorf("error starting pdf service %w", err)
// 	}

// 	service, _ := booking.NewService(db, nil, ps)
// 	period := "monthly"
// 	month := int(now.Month())
// 	year := now.Year()

// 	err = service.BuildReport(service.Report(period, month, year), period, month, year)

// 	log.Printf("Executed Monthly Booking Report job at %v with errors: %s:", time.Now().Format(time.DateTime), err)
// 	return err
// }
