The costs of the action shall be fixed and allowed by the court and shall include a reasonable attorney’s fee, interest, penalties, and other charges and advances as provided in this division, and when so fixed and allowed by the court shall be included in the judgment.