Which accounting method records income when it is earned rather than when it is received during the period or not?

Which accounting method records income when it is earned rather than when it is received during the period or not?