Hello, I've got a question regarding the usage of 'to have p.p.'
Here is a dialogue that I've read.
A(customer): I ordered a stuffed animal for my child.
B(shop clerk): Let me check. Right. Didn't you get the delivery yet?
It was supposed to have been delivered yesterday.
A: Yes, I got the delivery, but it's not what I ordered........
Why does B say like an underlined sentence above? I mean, instead of the original sentence, what about saying like this-'It was supposed to be delivered yesterday'?
You can certainly say that.
I just want to know the difference in meaning, or usage between 'to(infinite) verb' and 'to have p.p(present perfect form)'.
"supposed to have been delivered" would also be correctly understood in this context, but in a different context "was supposed to have been delivered" can also mean 'was assumed to have been delivered'.
p.s. I wonder if my question is clear enough.

Please understand my poor English, and let me know if you are not sure of what my question is about.
Anyway, thank you so much for your great help in advance!