pas.models.settlement_run
Classes
Abrechnungslauf |
Module Contents
- class pas.models.settlement_run.SettlementRun[source]
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.ContentMixin
,onegov.core.orm.mixins.TimestampMixin
,onegov.search.ORMSearchable
Abrechnungslauf
- es_public = False[source]
Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.
- es_properties[source]
Returns the type mapping of this model. Each property in the mapping will be read from the model instance.
The returned object needs to be a dict or an object that provides a
to_dict
method.Internally, onegov.search stores differing languages in different indices. It does this automatically through langauge detection, or by manually specifying a language.
Note that objects with multiple languages are not supported (each object is supposed to have exactly one language).
Onegov.search will automatically insert the right analyzer for types like these.
There’s currently only limited support for properties here, namely objects and nested mappings do not work! This is going to be added in the future though.
- property es_suggestion: str[source]
Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.
If a single string is returned, the completion input equals the completion output. (My Title -> My Title)
If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)
- description: dict_property[str | None][source]
- classmethod get_run_number_for_year(session: sqlalchemy.orm.Session, year: int) int [source]
Computes the run number for a given year.
As per customer requirement: No rule mandates 4 payments yearly, but wages must be reported by the 10th.
Run breakdown: - Q1: January to March - Q2: April to June - Q3: July to September - Q4: October to November - Q5: December
Why 5 runs? The decision to split the fourth quarter ensures that settlement runs are confined to a single calendar year. This avoids situations where a settlement overlaps into two different years, which could cause issues due to differing cost-of-living adjustments (COLA) applicable to each year. Handling settlements across two fiscal years would incrase complexity.
Thus, we have 5 yearly runs.