Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/onegov/org/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'form': _('Selected Options'),
'manual': _('Discounts / Surcharges'),
'migration': _('Lump sum'),
'rounding': _('Rounding difference'),
}

PAYMENT_STATES: dict[PaymentState, str] = {
Expand Down
11 changes: 11 additions & 0 deletions src/onegov/org/forms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from operator import itemgetter
from purl import URL
from wtforms.fields import BooleanField
from wtforms.fields import DecimalField
from wtforms.fields import EmailField
from wtforms.fields import FieldList
from wtforms.fields import FloatField
Expand Down Expand Up @@ -2460,6 +2461,16 @@ class VATSettingsForm(Form):
validators=[InputRequired(), NumberRange(0, 100)],
)

price_rounding = DecimalField(
label=_('Rounding of invoice totals'),
description=_(
'If set, invoices include a rounding position so the total is '
'a multiple of this amount, for example 0.05. Leave empty to '
'disable rounding.'
),
validators=[Optional(), NumberRange(min=Decimal('0.01'))],
)


class ModuleActivationSettingsForm(Form):
show_newsletter = BooleanField(
Expand Down
31 changes: 24 additions & 7 deletions src/onegov/org/locale/de_CH/LC_MESSAGES/onegov.org.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2026-07-14 12:32+0200\n"
"POT-Creation-Date: 2026-07-16 15:23+0200\n"
"PO-Revision-Date: 2022-03-15 10:21+0100\n"
"Last-Translator: Marc Sommerhalder <marc.sommerhalder@seantis.ch>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -186,6 +186,9 @@ msgstr "Abzüge / Zuschläge"
msgid "Lump sum"
msgstr "Pauschalbetrag"

msgid "Rounding difference"
msgstr "Rundungsdifferenz"

msgid "Paid"
msgstr "Bezahlt"

Expand Down Expand Up @@ -3123,6 +3126,17 @@ msgstr ""
"Mehrwertsteuersatz in Prozent. Der Mehrwertsteuersatz wird auf alle Preise "
"in den Formularen angewendet."

msgid "Rounding of invoice totals"
msgstr "Rundung der Rechnungssummen"

msgid ""
"If set, invoices include a rounding position so the total is a multiple of "
"this amount, for example 0.05. Leave empty to disable rounding."
msgstr ""
"Wenn festgelegt, enthalten Rechnungen eine Rundungsposition, sodass die "
"Summe ein Vielfaches dieses Betrags ist, zum Beispiel 0.05. Leer lassen, um "
"die Rundung zu deaktivieren."

msgid "Enable newsletter"
msgstr "Newsletter aktivieren"

Expand Down Expand Up @@ -4508,8 +4522,8 @@ msgstr "Anzahl"
msgid "VAT"
msgstr "MwSt"

#. credit card
#.
#. credit card
msgid "Payment"
msgstr "Zahlung"

Expand Down Expand Up @@ -4886,9 +4900,6 @@ msgstr "Fehler"
msgid "Duration [s]"
msgstr "Abfragedauer [s]"

msgid "Alternatives"
msgstr "Alternativen"

msgid "Alternative login methods"
msgstr "Alternative Login-Methoden"

Expand All @@ -4904,6 +4915,9 @@ msgstr "Sie haben Ihr Passwort vergessen?"
msgid "Reset password"
msgstr "Passwort zurücksetzen"

msgid "Alternatives"
msgstr "Alternativen"

msgid "You are here"
msgstr "Sie sind hier"

Expand Down Expand Up @@ -5372,8 +5386,8 @@ msgstr ""
msgid "New customer message in Ticket ${link}"
msgstr "Neue Kunden Nachricht in Ticket ${link}"

#. Canonical text for ${link} is: "visit the request page"
#. Canonical text for ${link} is: "visit the request status page"
#. Canonical text for ${link} is: "visit the request page"
msgid "Please ${link} to reply."
msgstr "Bitte ${link} um zu antworten"

Expand Down Expand Up @@ -6603,8 +6617,8 @@ msgid "Delete availability period"
msgstr "Verfügbarkeitszeitraum löschen"

#.
#. type:ignore[attr-defined]
#. type:ignore[attr-defined] # trigger updates
#. type:ignore[attr-defined]
msgid "Your changes were saved"
msgstr "Ihre Änderungen wurden gespeichert"

Expand Down Expand Up @@ -7953,6 +7967,9 @@ msgstr "Kopfzeile"
msgid "Footer"
msgstr "Fusszeile"

msgid "Prices"
msgstr "Preise"

msgid "Data Retention Policy"
msgstr "Datensparsamkeit"

Expand Down
31 changes: 24 additions & 7 deletions src/onegov/org/locale/fr_CH/LC_MESSAGES/onegov.org.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2026-07-14 12:32+0200\n"
"POT-Creation-Date: 2026-07-16 15:23+0200\n"
"PO-Revision-Date: 2022-03-15 10:50+0100\n"
"Last-Translator: Marc Sommerhalder <marc.sommerhalder@seantis.ch>\n"
"Language-Team: French\n"
Expand Down Expand Up @@ -185,6 +185,9 @@ msgstr "Remises / Suppléments"
msgid "Lump sum"
msgstr "Montant forfaitaire"

msgid "Rounding difference"
msgstr "Différence d'arrondi"

msgid "Paid"
msgstr "Payé"

Expand Down Expand Up @@ -3135,6 +3138,17 @@ msgstr ""
"Il s'agit du taux de TVA en pourcentage. Le taux de TVA s'appliquera à tous "
"les prix dans les formulaires."

msgid "Rounding of invoice totals"
msgstr "Arrondi des totaux de facture"

msgid ""
"If set, invoices include a rounding position so the total is a multiple of "
"this amount, for example 0.05. Leave empty to disable rounding."
msgstr ""
"Si ce champ est défini, les factures contiennent une position d’arrondi afin "
"que le total soit un multiple de ce montant, par exemple 0,05. Laisser vide "
"pour désactiver l’arrondi."

msgid "Enable newsletter"
msgstr "Activer la newsletter"

Expand Down Expand Up @@ -4513,8 +4527,8 @@ msgstr "Quantité"
msgid "VAT"
msgstr "TVA"

#. credit card
#.
#. credit card
msgid "Payment"
msgstr "Paiement"

Expand Down Expand Up @@ -4895,9 +4909,6 @@ msgstr "Erreurs"
msgid "Duration [s]"
msgstr "Durée [s]"

msgid "Alternatives"
msgstr "Alternatives"

msgid "Alternative login methods"
msgstr "Méthodes de connexion alternatives"

Expand All @@ -4913,6 +4924,9 @@ msgstr "Avez-vous oublié votre mot de passe ?"
msgid "Reset password"
msgstr "Réinitialisez le mot de passe"

msgid "Alternatives"
msgstr "Alternatives"

msgid "You are here"
msgstr "Vous êtes ici"

Expand Down Expand Up @@ -5377,8 +5391,8 @@ msgstr ""
msgid "New customer message in Ticket ${link}"
msgstr "Nouveau message du client dans le ticket ${link}"

#. Canonical text for ${link} is: "visit the request page"
#. Canonical text for ${link} is: "visit the request status page"
#. Canonical text for ${link} is: "visit the request page"
msgid "Please ${link} to reply."
msgstr "Veuillez vous rendre sur ${link} pour répondre."

Expand Down Expand Up @@ -6615,8 +6629,8 @@ msgid "Delete availability period"
msgstr "Supprimer la période de disponibilité"

#.
#. type:ignore[attr-defined]
#. type:ignore[attr-defined] # trigger updates
#. type:ignore[attr-defined]
msgid "Your changes were saved"
msgstr "Vos modifications ont été enregistrées"

Expand Down Expand Up @@ -7961,6 +7975,9 @@ msgstr "En-tête"
msgid "Footer"
msgstr "Bas de page"

msgid "Prices"
msgstr "Prix"

msgid "Data Retention Policy"
msgstr "Politique de Conservation des Données"

Expand Down
31 changes: 24 additions & 7 deletions src/onegov/org/locale/it_CH/LC_MESSAGES/onegov.org.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2026-07-14 12:32+0200\n"
"POT-Creation-Date: 2026-07-16 15:23+0200\n"
"PO-Revision-Date: 2022-03-15 10:52+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -187,6 +187,9 @@ msgstr "Deduzioni / Supplementi"
msgid "Lump sum"
msgstr "Somma forfettaria"

msgid "Rounding difference"
msgstr "Differenza di arrotondamento"

msgid "Paid"
msgstr "Pagato"

Expand Down Expand Up @@ -3132,6 +3135,17 @@ msgstr ""
"Si tratta del tasso di IVA in percentuale. Il tasso di IVA si applicherà a "
"tutti i prezzi nei moduli."

msgid "Rounding of invoice totals"
msgstr "Arrotondamento dei totali delle fatture"

msgid ""
"If set, invoices include a rounding position so the total is a multiple of "
"this amount, for example 0.05. Leave empty to disable rounding."
msgstr ""
"Se impostato, le fatture includono una posizione di arrotondamento in modo "
"che il totale sia un multiplo di questo importo, ad esempio 0,05. Lasciare "
"vuoto per disattivare l’arrotondamento."

# ", assicurarsi di racchiudere il valore tra virgolette."
msgid "Enable newsletter"
msgstr "Attiva la newsletter"
Expand Down Expand Up @@ -4502,8 +4516,8 @@ msgstr "Quantità"
msgid "VAT"
msgstr "IVA"

#. credit card
#.
#. credit card
msgid "Payment"
msgstr "Pagamento"

Expand Down Expand Up @@ -4878,9 +4892,6 @@ msgstr "Errori"
msgid "Duration [s]"
msgstr "Durata [s]"

msgid "Alternatives"
msgstr "Alternative"

msgid "Alternative login methods"
msgstr "Metodi di accesso alternativi"

Expand All @@ -4896,6 +4907,9 @@ msgstr "Hai dimenticato la password?"
msgid "Reset password"
msgstr "Reimposta la password"

msgid "Alternatives"
msgstr "Alternative"

msgid "You are here"
msgstr "Ti trovi qui"

Expand Down Expand Up @@ -5355,8 +5369,8 @@ msgstr ""
msgid "New customer message in Ticket ${link}"
msgstr "Nuovo messaggio del cliente nel ticket ${link}"

#. Canonical text for ${link} is: "visit the request page"
#. Canonical text for ${link} is: "visit the request status page"
#. Canonical text for ${link} is: "visit the request page"
msgid "Please ${link} to reply."
msgstr "Per favore ${link} per rispondere."

Expand Down Expand Up @@ -6589,8 +6603,8 @@ msgid "Delete availability period"
msgstr "Elimina il periodo di disponibilità"

#.
#. type:ignore[attr-defined]
#. type:ignore[attr-defined] # trigger updates
#. type:ignore[attr-defined]
msgid "Your changes were saved"
msgstr "Le modifiche sono state salvate"

Expand Down Expand Up @@ -7923,6 +7937,9 @@ msgstr "Intestazione"
msgid "Footer"
msgstr "Piè di pagina"

msgid "Prices"
msgstr "Prezzi"

msgid "Data Retention Policy"
msgstr "Politica di Conservazione dei Dati"

Expand Down
4 changes: 4 additions & 0 deletions src/onegov/org/models/organisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
if TYPE_CHECKING:
from collections.abc import Iterator
from datetime import datetime
from decimal import Decimal
from markupsafe import Markup
from onegov.core.framework import Framework
from onegov.form.parser.core import ParsedField
Expand Down Expand Up @@ -326,6 +327,9 @@ def get_kaba_configuration(
# vat
vat_rate: dict_property[float | None] = meta_property(default=0.0)

# prices
price_rounding: dict_property[Decimal | None] = meta_property(default=None)

# RIS settings
ris_enabled: dict_property[bool] = meta_property(default=False)
ris_main_url: dict_property[str | None] = meta_property(default=None)
Expand Down
Loading