How do make a table closed automatically immediately after printing bill

my tables are not locked even after printing bill

By default they lock. So what did you change.