Fixed allocation date for customer payments entry, additional fixes for strict sql...