Master Copy 23/5/14

improved geninvoice.php