I don't recommend you get Robert Munsch for a 12-year-old. His books are funny, but they're mainly for elementary level. Also, Louis Sachar's Wayside School books (all of them, even the Arithmetic ones) are hilarious, but I remember reading them in 2nd and 3rd grade. Thirdly, 3 of my sisters (8, 13, and 16 yrs) and I read Diary of a Wimpy Kid, and we all thought it was not good. I wouldn't personally recommend it.
I'm not sure I can remember any books that were completely funny from start to finish, but all of these have funny parts in them and they are really good too.
Dogs Don't Tell Jokes, There's A Boy in the Girls' Bathroom ~ both by Louis Sachar
The View From Saturday ~ E L Konigsburg
Ruby Holler, Walk Two Moons ~ both by Sharon Creech
The Artemis Fowl books ~ Eoin Colfer
Alice's Adventures in Wonderland ~ Lewis Carroll
Through the Looking Glass and What Alice Found There ~ Lewis Carroll
Sammy Keyes and the Sisters of Mercy ~ Wendelin van Draanen
The Series of Unfortunate Events ~ Lemony Snickett, the books are hilarious!
Anne of Green Gables, The Invention of Hugo Cabret, Little Women, A Little Princess, The Secret Garden, Oliver Twist, Peter Pan, The Outsiders, Charlie and the Chocolate Factory (or anything else by Roald Dahl), Harry Potter, Love That Dog, The Circle of Magic Series, The King of Shadows, Holes, The Book Thief, Gathering Blue, The Silver Crown, Maniac Magee . . .
Eh, I think that's a good start. Clearly, I've read more YA and children's books than ones at my level.