De-dupe code in invoice services