translator_directory.models.time_report
Attributes
Classes
Mixin providing created/modified timestamps for all records. |
Module Contents
- class translator_directory.models.time_report.TranslatorTimeReport[source]
Bases:
onegov.core.orm.Base,onegov.core.orm.mixins.TimestampMixinMixin providing created/modified timestamps for all records.
The columns are deferred loaded as this is primarily for logging and future forensics.
- translator: sqlalchemy.orm.relationship[translator_directory.models.translator.Translator][source]
- property night_hours_decimal: decimal.Decimal[source]
Return night hours in decimal format for calculations.
- property weekend_holiday_hours_decimal: decimal.Decimal[source]
Return weekend/holiday hours in decimal format for calculations.
- property day_hours_decimal: decimal.Decimal[source]
Return day hours (total - night) in decimal format.
- property night_hourly_rate: decimal.Decimal[source]
Return night hourly rate (base rate + 50% surcharge).
- calculate_compensation_breakdown() dict[str, decimal.Decimal][source]
Calculate detailed compensation breakdown.
Returns a dictionary with all compensation components: - day_pay: Payment for day hours (base rate) - night_pay: Payment for night hours (base rate + 50% surcharge) - night_surcharge: Just the surcharge portion for night hours - weekend_surcharge: Weekend surcharge (only on non-night hours) - urgent_surcharge: Urgent surcharge (25% on top of everything) - total_surcharges: Sum of all surcharges - subtotal: Total work compensation (before travel/meal) - travel: Travel compensation - meal: Meal allowance - total: Final total compensation