Dividends that are paid to shareholders must be taken into accounting or taxable profits?

Panwa: Company who pay dividends or share of profits must be paid from retained earnings in accounting only