Skip to main content

pres.overtime_and_premium_rules

Schema: pres
English table: pres.overtime_and_premium_rules
Italian original table: pres.tabstra
Description: Configuration for automatic overtime and shift premium calculations based on time bands and progressive thresholds.

Overview

  • Columns: 23
  • Primary key: id
  • Outgoing foreign keys: 2
  • Incoming foreign keys: 0
  • Indexes: 0

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOInternal surrogate primary key.
opr_rule_idstr_idintegerNOUnique internal identifier for the rule entry.
opr_codecod_strcharacter(4)NO''::bpcharUnique mnemonic code for the rule set.
tenant_idtenant_idintegerNOTenant identifier for multi-tenancy isolation.
opr_descriptionstr_descrizionecharacter(40)NO''::bpcharExtended description of the overtime/premium rule.
opr_group_idstr_regolanumeric(1,0)NO0Identifier to group multiple lines into a single logical rule.
opr_sequence_orderstr_riganumeric(2,0)NO0Priority/Execution order of the rule line within the group.
opr_calculation_typestr_tipocharacter(1)NO''::bpcharType of rule: S=Overtime (Straordinario), M=Premium (Maggiorazione), etc.
opr_progressive_threshold_hoursstr_prog_orenumeric(5,2)NO0Hours threshold after which this rule applies (progressive overtime).
opr_start_time_hhmmstr_dalle_orenumeric(4,0)NO0Start of the time band for validity (expressed as HHMM).
opr_end_time_hhmmstr_alle_orenumeric(4,0)NO0End of the time band for validity (expressed as HHMM).
opr_target_reason_codestr_causalecharacter(4)NO''::bpcharThe justification code (attendance_reasons) to be generated.
opr_valid_days_maskstr_giornicharacter(10)NO''::bpcharString mask representing valid days (e.g., 1234567 for Mon-Sun).
opr_application_modestr_modonumeric(1,0)NO0Calculation logic mode (e.g., daily total, band-based, etc.).
opr_ignore_intervalsstr_ignora_internumeric(1,0)NO0Flag to ignore specific break intervals during calculation.
opr_auth_overtime_reason_codestr_caus_aut_straocharacter(4)NO''::bpcharReason code to use if the overtime is formally authorized.
opr_auth_surplus_reason_codestr_caus_aut_esuberocharacter(4)NO''::bpcharReason code applied to unauthorized extra time (surplus).
opr_valid_from_weekstr_sett_dalintegerNO0Starting week of validity for the rule (used in cyclical rotations).
opr_valid_to_weekstr_sett_alintegerNO0Ending week of validity for the rule.
opr_shift_type_filterstr_turniintegerYES3Filter for specific shift types (e.g., morning, afternoon, night).
opr_use_custom_expressionstr_use_exprbooleanYESfalseBoolean flag to enable script-based calculation logic.
opr_custom_expressionstr_expressiontextYES''::textThe actual script or expression for advanced calculation logic.
_deleted_deletedbooleanNOfalseSoft delete flag.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_opr_target_attendance_reasontenant_id, opr_target_reason_codepres.attendance_reasonstenant_id, ar_codeCASCADERESTRICT
fk_opr_tenanttenant_idcloud.tenantsten_internal_idCASCADECASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_overtime_and_premium_rulesid
  • Unique: c_uk_opr_tenant_rule_idtenant_id, opr_rule_id

Indexes

No indexes detected.