IMO, the only serial number that matters is what is on the bottom plate of the Mac and in System Settings - About. As long it matches you are golden and should be able to use it for Applecare, etc. If it does not match, there has been some funny business and check with Apple.
This is the correct answer, but with something of a caveat:
If--as it sounds like is the case--the serial in About This Mac and the one printed on the bottom of the computer match, the that’s the serial number of the computer you have. It doesn’t matter in the slightest what any boxes or receipts might have on them, those aren’t the serial number of the actual computer that would be getting actual warranty service.
The caveat about it mattering, however, is what you get when you go to Apple’s coverage confirmation website,
checkcoverage.apple.com., and/or under System Settings in the AppleCare and Warranty section.
If one of those locations shows an acceptable coverage status and end date for when you bought your computer, then boxes and receipts don’t really matter, you have the coverage you expect to have.
If, however--the big caveat--the above
don’t show that you have any coverage, or show a coverage end date sooner than you were told you were getting when you purchased it, NOW the receipt does matter, because you’re going to need to contact Apple or work with whoever sold it to you to prove that you bought this specific computer brand new and it should have a different warranty start date than it currently does in their system. If your receipt doesn’t match what you have in your hands, and/or the store you bought it from is not willing or able to work with Apple to fix the issue, then you have a computer without the warranty you (presumably) paid for and absolutely no way to fix that. Even in this case, I’m pretty sure any and all boxes are irrelevant, unless it comes to returns.
I’m actually not sure these days whether it’s even possible to work with Apple directly (by providing a receipt) to fix the coverage start date on something purchased from a non-authorized reseller--I have done that in the past, but no idea if the process is still even an option. I got a bad warranty start date on an iPad I bought at Costco recently (I think the clerk at the register botched something up), but in that case I went to the store directly and the manager on duty made some calls to fix it, as they’re an authorized reseller.