formm_earnings table properly related thru foreignkey