Every association of the character defined in section 8-326, shall be required, at least annually, to transfer the residue of earnings, after paying expenses and setting aside a sum for the reserve funds as herein provided, as a dividend to members holding share accounts. All such members shall participate in earnings pro rata to the withdrawal value of their respective accounts, except that an association may classify its share accounts according to the character, amount, or duration thereof, or regularity of additions thereto, and may agree in advance to pay an additional rate of earnings, over and above the minimum rate of earnings paid on share accounts, on accounts based on such classifications, and shall regulate such earnings in such manner that each share account in the same classification shall receive the same ratable portion of such additional earnings. Earnings may be declared on the withdrawal value of each share account at the beginning of the accounting period, plus additions thereto made during the period, less amounts previously withdrawn and amounts covered by notice for withdrawal which for earnings purposes shall be deducted from the latest previous additions thereto, computed at the declared rate for the time the funds have been invested determined as next provided. The date of investment shall be the date of actual receipt by the association of an account or an addition to an account, except that if the board of directors shall so determine, accounts in one or more classifications or additions thereto received by the association on or before a date not later than the twentieth day of the month, unless the day determined is not a business day and in such case it may be the next succeeding business day, shall receive earnings as if invested on the first day of the month in which such payments were received; and if the board shall make such determination, it also shall determine that payments received subsequent to such determination date shall either (1) receive earnings as if invested on the first day of the next succeeding month, or (2) receive earnings from the date of actual receipt by the association. The directors shall determine by resolution the method of calculating the amount of any earnings on share accounts as herein provided, and the time or times when earnings are to be declared, paid, or credited, but the association shall not be required to credit or pay dividends on inactive share accounts of fifty dollars or less.