ADD period to invoice analysis and clean code