You need to stick a barcode on the location (shelf, box, etc) like they do in a warehouse. Scan the book, check it is correct, scan the location to book it in. Doesn't have a barcode, put it in another area for later. I wrote a sketch of exactly this once...
Ish. It would help with inventory anyway, by comparing data at point of scanning and point of sale - “we sold the last Stephen King, sorry”, “we do have a Twilight recorded, so it’s there, but you’ll have to find it...”