changes to support new invoice template features, #28080