The district attorney of said judicial district shall receive no other fees nor other compensation for official service in said district court, and he shall represent the parishes of said judicial district and other public boards therein, in all matters of litigation in which said parishes or said boards may have an interest, and shall be their legal advisor when so requested, without extra compensation; provided that in any litigation or business necessitating the attention or assistance of said district attorney outside of his judicial district by either the parishes, school boards or other public board therein, said district attorney shall be allowed and paid his expenses and provided, further, that this section shall not apply to any fees that are recovered as penalties in a civil suit where attorney's fees are made a part of the damages or penalties by statute.
La. R.S. § 16:106