MT#5879 Fix error in old invoice_templates is_active functionality.

Fix is specific for mr3.3

(cherry picked from commit 3429560087b9c83ee68ab39be9addaf9de2b689d)