The bug
On servers, all players (on LAN servers, all players except the host) get displayed an incorrect price for discounted trades. Instead of the original price being displayed crossed out and the discounted price standing next to it, the discounted price is crossed out and an incorrect price stands next to it (that price being the original price discounted twice).
This is how it looks to the host of a LAN world / to the server:
[media]This is how it looks to all the other players:
[media]To reproduce
by @unknown
Create a new singleplayer world (superflat for convenience, creative).
Summon on a safe spot a villager, assign him the mason profession by placing down a stonecutter.
Open the world to you LAN and let a second account join.
Give the hero of the village status effect to both players:
/effect give @a hero_of_the_village 999 1 true
Try to trade with the mason one account, then the other.
❌ The guest account is displaying the incorrect price
Video
[media]Original report
Server side inventories do not apply the advertised price, instead applying the original full price. This is applicable to both buy and sell trades. If the world is copied to saves folder and played as a single player world, the proper price will be applied to the trade.
How to produce:
1. Download server jar file from most recent patch notes page.
2. Create server.
3. Trade with villagers on server.
Side Note: This bug also affects Realms servers.
Related issues
is cloned by
is duplicated by
Attachments
Comments

Can confirm.
You should update the title for more visibility, something like: "Villager trades do no apply discount on dedicated servers".

Great Idea! If you don't mind I'm going to use your title.
Can confirm for 1.14-pre5.
Can confirm for 1.14.

Villager trades do apply discount, but it is displayed wrongly. Trade cost is (original_price - x)
, but it displayed as (original_price - x - x)
.
Indeed, this is my testing trade:
[media]
You can see it is displayed as selling 8 clay instead of 9, but after doing some research I found that the normal trade is 10 and remains the same for all mason. So what happens is the price slot is replaced by the discounted price, and the discounted slot is replaced by the discounted price applied twice. Also makes sense with the trades on the attached video.
Please update this ticket accordingly: Villager trade GUI shows incorrect price when a discount is applied on dedicated server.

Confirming this bug is also present on Realms servers, took awhile to figure out I had to pay the not-full-full price.

What I've found is that the discounted price is used for buying gear, but only if the player has at least as many emeralds as the original. I had the hero affect, and I could buy gear that normally cost 11 for 1, but only of I had 11 emeralds.

I had this bug on Pre-Release 5. Made an entire raid farm just to be disappointed that the trades weren't being discounted server side. Although, I haven't had any issues with this on a fresh, 1.14 world, indicating this might be a converting issue.

Playing on a fresh world. This bug affects my server as well

This also happens on our Realms world, huge bummer.
Reproduction steps on a new world open to LAN and 2 accounts
With the first account, the "host", create a new singleplayer world (superflat for convenience, creative).
Summon on a safe spot a villager, assign him the mason profession by placing down a stonecutter.
Open the world to your LAN and join with a second account, the "client".
Give the hero of the village status effect to both players:
/effect give @a hero_of_the_village 999 1 true
Try to trade with the mason with the host, then with the client.
-> The host account (the one playing on "integrated server") has the correct trade displaying:
[media]
-> The client account (the one playing on "vanilla server") who joined the world has the incorrect trade displaying:
We can see the prices are just shifted by one extra discount operation. In both cases, the villager will only accept the price as displayed to the host account.

I believe the hero of the village effect is just to get the discounted trades quicker rather than trading with them. I don't know if my bug is the same or not. see MC-149880

From what I can tell, it seems as though the server is only sending the discounted price to the client account, which is being confused as the full price, and thus the discount is applied twice. This obviously would be fixed by either sending both prices to the client or just the full price and the discount factor. I may be wrong though.
To No Thanks,
it seems as though your bug is different although possibly related, with again the client side of the game being confused as the what the server side is actually doing.

I was wondering what was causing this! Had this exact same issue except on a friend group realm.

Can confirm on my friends 1.14 Release realm

I have this problem too on my realm

This bug can also be seen in this video, in 2:25, when he trades emeralds for the chestplate that shows 1 emerald as cost but gets 5 emeralds deducted instead -> https://www.youtube.com/watch?v=poK7CzjWsGM
I'm hoping it gets fixed soon, it can be really misleading, completely broken display

I'm not sure how to re-open this, but this is still NOT resolved in 1.14.1 pre-1, see MC-151282

Anqing, is that in pre-release 1, or 2? I cannot currently test this and would like to not incorrectly mark affected versions.
I cannot reproduce this in 1.14.1-pre1 and assumed that the 1.14.1-pre1 being added to affected versions in MC-151282 was a mistake. @unknown, if you want your ticket to be reopened, please leave a comment on that ticket.

I also was unable to reproduce this in 1.14.1-pre2, The trades and their GUIs are working on my dedicated server.
The same issue still exists, but only for villagers that previously were zombie villagers and have been cured. See MC-151282.

Still A Major Problem, Mods no help marking everything resolved.
@unknown, this particular issue has been fixed in 1.14.1 Pre-Release 1, though a similar issue still exists. A report about that issue, MC-151282, is still left open.