Skip to content

Business Rule Matrix

Rodrigo Silveira edited this page Aug 6, 2026 · 1 revision

6.1 Person rules

  • Person records are permanent.
  • Name, phone, email, CPF, and PIX must be unique if present.
  • A person can move across statuses without deleting history.

6.2 Collaborator rules

  • A collaborator journey is created from a person.
  • Default journey length is 90 days.
  • Extension days may be added by the administrator.
  • Projected end date is recalculated on extension change.
  • One person should generally have at most one active journey.
  • After journey end, business policy may enforce a minimum 30-day wait before a new journey. This should be configurable as a validation rule, with override permission for administrators.

6.3 Earnings rules

Daily wages

  • Earns daily rate for each worked period/day according to plan/accrual rules.
  • Currency is BRL unless business later adds another rule.

Salary

  • Earns daily normalized value based on monthly salary.
  • Currency is BRL.

Commission

  • Earns in gold grams.
  • Amount is tied to recorded production for assigned well and period.
  • Formula: grams_produced * collaborator_percentage.
  • Accrual waits if production is missing.

6.4 Sick-day rules

For commissioned collaborator:

  • May take up to 3 sick days.
  • Still earns full daily commission.
  • Pays 1 gram gold to substitute daily wager.
  • Substitute daily wager also earns normal daily wages.

System interpretation:

  • one commission credit for sick collaborator,
  • one gold debit for sick collaborator labeled Pay Daily Wager - Sick Substitution,
  • one gold credit for substitute daily wager labeled Sick Substitution Payment,
  • one BRL wage credit for substitute daily wager.

6.5 License rules

For commissioned collaborator:

  • May take a license through default end of journey.
  • Earns half of daily commission.
  • Other half goes to substitute daily wager.
  • Substitute daily wager does not earn normal daily wages for that substitution period.

System interpretation:

  • commissioned collaborator gets half commission credit,
  • substitute gets half commission credit,
  • substitute receives no daily wage credit for those substituted periods.

6.6 Expense rules

  • Expenses can be recorded in BRL or gold grams.
  • Expense line items snapshot unit and total prices at entry time.
  • Gold-priced expenses use current quote basis at transaction time.
  • PIX expenses are BRL-only.
  • Daily wager substitution payments may be generated automatically by earnings/accrual rules rather than manually entered.

6.7 Ledger rules

  • Every financial effect becomes one or more immutable ledger entries.
  • Reversal is additive, never destructive.
  • Balances are computed as sum(credits) - sum(debits) per currency.
  • Reversed entries remain visible with status markers.

6.8 Zero rules

  • Zeroing gold means paying out current positive gold balance during an active journey.
  • A zero operation creates a debit entry that offsets the available gold credit balance.
  • Zero cannot exceed available positive gold balance unless admin override is allowed.

6.9 Journey close rules

  • Closing a journey computes current BRL and gold balances.
  • Positive balances are payable.
  • Closing creates payout ledger entries to offset balances.
  • After close, collaborator status becomes finished.

Clone this wiki locally