new expense system - custom PHP code revised