When a dividend is declared or in the case of the preferred dividends when a dividend is accumulated (not paid in the year), the company will recognize a current liability (assuming that the dividends are declared in the case of the preferred dividends). The double entry is the following:
Debit Retained Earnings
Credit Dividends Payable