Repository navigation
fix: округлена ціна не змінюється при збереженні замовлення в адмінці (1.0.20) - #21
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Замовлення з вітрини зберігало округлену ціну, а в знижці лишались вихідні тип і значення. Форма замовлення постить усі знижки, тож ядро перераховувало ціну, і збереження без змін міняло суму.
Тепер, якщо налаштована знижка не дає фактичної ціни, у БД іде
absoluteз фактичною різницею, як у шляху адмін-замовлень.Перевірка на стоку 4.5.3 і форку з реальним кошиком: ціна 1000, акція 8.75 %,
round_final_price=1,cents=2, дві одиниці. На вітрині 913, сума 1826, після перерахунку 913. Без правки вийшло б 912.50. Модульні тести Promo: 103 на обох рушіях.