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 CompanySetWagepermission /Personnelrole -
Add wage multiplier value (float) to CompanyMemberandLabor(whereLaboruses the default fromCompanyMemberif not explicitely set). Setting multiplier on either object type requiresCompanySetWagepermission -
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 hoursit will behours * multiplierfor each labor record)
Edited by andrew