Credit system

Some period of time after a labor record is closed (7d maybe) the credits for that labor are added to the user's account.

  • Add CompanySetWage permission / Personnel role
  • Add wage multiplier value (float) to CompanyMember and Labor (where Labor uses the default from CompanyMember if not explicitely set). Setting multiplier on either object type requires CompanySetWage permission
  • Labor records need a new field marking them as paid or not (this might be in a special index)
  • Add process that checks for eligible/unpaid labor records, transfers the credits (labor time * multiplier) to the user attached to the labor record
  • Update costs algorithm to use the labor multiplier (so instead of hours it will be hours * multiplier for each labor record)
Edited by andrew