rounding auf product.round_price() umstellen #7

Closed
opened 2025-01-28 16:22:25 +00:00 by mdsfred · 0 comments
Member
def round_price(value, rounding=None):
    "Round price using the price digits"
    if isinstance(value, int):
        return Decimal(value)
    return value.quantize(
        Decimal(1) / 10 ** price_digits[1], rounding=rounding)
``` def round_price(value, rounding=None): "Round price using the price digits" if isinstance(value, int): return Decimal(value) return value.quantize( Decimal(1) / 10 ** price_digits[1], rounding=rounding) ```
mdsfred added the
invalid
label 2025-01-28 16:22:37 +00:00
mdsfred self-assigned this 2025-01-28 16:22:40 +00:00
mdsfred added reference 7.0 2025-01-29 09:07:39 +00:00
mdsfred removed reference 7.0 2025-01-29 09:07:44 +00:00
mdsfred added reference refs/tags/ver-7.0.14 2025-01-29 09:07:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mds-public/edocument_xrechnung#7
No description provided.