Skip to content

Commit

Permalink
add INVALIDATED ticket in order to handle manually modified records
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellone committed Mar 7, 2015
1 parent 1b606f6 commit f3e19f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/alfio/repository/TicketRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ List<Integer> selectTicketInCategoryForUpdate(@Bind("eventId") int eventId, @Bin
@Query("select count(*) from ticket where status in ('ACQUIRED', 'CHECKED_IN', 'PENDING') and category_id = :categoryId and event_id = :eventId")
Integer countConfirmedAndPendingTickets(@Bind("eventId") int eventId, @Bind("categoryId") int categoryId);

@Query("select count(*) from ticket where status not in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID') and category_id = :categoryId and event_id = :eventId")
@Query("select count(*) from ticket where status not in ('ACQUIRED', 'CHECKED_IN', 'TO_BE_PAID', 'INVALIDATED', 'CANCELLED') and category_id = :categoryId and event_id = :eventId")
Integer countNotSoldTickets(@Bind("eventId") int eventId, @Bind("categoryId") int categoryId);

@Query("update ticket set tickets_reservation_id = :reservationId, status = 'PENDING', user_language = :userLanguage where id in (:reservedForUpdate)")
Expand Down

0 comments on commit f3e19f1

Please sign in to comment.