Made edit to generate bill function