What is the ruling on stores rounding up pennies and taking them without the customer’s knowledge?
Question

I want to ask about the situation of a worker (the cashier who works in a shop). Prices of goods are written on a price list for customers. For example, the price for a carton of milk is written as 7.68 dirhams, but when the customer goes to the cashier to pay, he registers it as 8 dirhams, because he has been instructed by the management of the shop that anything above 0.60 is to be counted as one dirham. … Everyone knows this rule, because the company has many branches… What I want to say is that many people who are good at maths, meaning that they are not illiterate, know that 0.97 or 0.87 or 0.60 will be rounded up to one dirham, and that 0.50 or less will be rounded up to half a  dirham. We may add that it is not possible to give that fraction back to the purchaser in change, because it is not available at all, meaning that it is not  possible to give him one dirham and 0.44 of a dirham.… Finally I would like to ask you: is it permissible to work as a cashier, based on the details given above?
Praise be to Allah.It is not permissible for the store to take any of the customer’s money except with his knowledge and consent, even if it is a small amount, such as the change asked about here.
If the price of the item is 9.90 dirhams, it is not permissible to count it as ten except with the consent of the customer, because Allah, may He be glorified and exalted, says (interpretation of the meaning): {O you who have believed, do not consume one another's wealth unjustly but only [in lawful] business by mutual consent} [an-Nisa’ 4:29].
And the Prophet (blessings and peace of Allah be upon him) said: “It is not permissible to take a person’s wealth except with his willing consent.” Narrated by Ahmad (20172); classed as authentic by al-Albani in Sahih al-Jami‘ (7662).
And he (blessings and peace of Allah be upon him) said: “Your blood, your wealth and your honour are sacred to you, as sacred as this day of yours, in this month of yours, in this land of yours. Let those who are present convey it to those who are absent.” Narrated by al-Bukhari (67) and Muslim (16779).
And he (blessings and peace of Allah be upon him) said: “The whole of a Muslim is sacred to another Muslim, his blood, his wealth and his honour.” Narrated by Muslim (2564).
These texts indicate that the wealth of a Muslim is sacred, and it makes no difference whether his wealth is great or small.
Muslim (137) narrated from Abu Umamah that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever swears an oath in order to unlawfully take the property of another Muslim, Allah will decree Hell for him and forbid Paradise to him.” A man said: Even if it is something small, O Messenger of Allah? He said: “Even if it is a twig from an arak tree.”
Ibn Hazm (may Allah have mercy on him) said: It is not permissible to take anyone’s wealth unless it is based on a religious text or certain scholarly consensus. It is not permissible for anyone to stipulate a financial penalty that was not stipulated in the Qur’an or by the Messenger of Allah (blessings and peace of Allah be upon him). Anyone who does that is transgressing the limits set by Allah, is regarding haram wealth as lawful and is prescribing something for which Allah, may He be exalted, has not given permission."(Al-Muhalla  6/186).
If the customer is owed change, but the shop does not have that precise amount, he may be given some candy or the like instead, or the shop may offer to give it on his behalf in charity, and a box should be made available for that.
Conclusion:
It is obligatory to inform the customer of the amount of change that is due to him. If the customer agrees [to round it up], there is nothing wrong with that, otherwise it is haram to take it.
If the cashier is able to take this obligatory action, it is permissible for him to work in that job, otherwise it is prohibited, because of what his work involves of participating in consuming people’s wealth unlawfully.
And Allah knows best.