Update: this solution seems working correctly with prices (unsure about discounts etc) but only if "number of decimals" is set to 0 at shop parameters and corresponding rounding is enabled.
Edit History
Update: this solution seems working correctly with prices (unsure about discounts etc) but only if "number of decimals" is set to 0 at shop parameters.