diff --git a/internal/repository/booking/pg_store.go b/internal/repository/booking/pg_store.go index 0807b23..bec8417 100644 --- a/internal/repository/booking/pg_store.go +++ b/internal/repository/booking/pg_store.go @@ -52,6 +52,7 @@ func (ps *PgStore) List(from, to time.Time) ([]*booking.Line, error) { from bookings join items on bookings.id = items.booking_id where "to" between ? and ? + and canceled = false group by bookings.id order by id desc; `, from, to). @@ -69,6 +70,7 @@ func (ps *PgStore) CardTotal(from, to time.Time) (float64, error) { from bookings join items on bookings.id = items.booking_id where "to" between ? and ? + and canceled = false and payment_method = 'Card' group by booking_id) as t; `, from, to).