could it be his teeth?
It does sound like teeth.
When you say they are nearly all through are they cut or fully 'grown'? I'm just thinking there may still be some movement of teeth that are already through and this could be painful. Another thing that springs to mind is oral hygiene, if he has had teeth a fair while and they aren't being brushed properly or if he's had juice in bottles etc there could be decay or swollen gums? I doubt it though.
If it is just short term it could be he is coming down with a cold and has a sore throat putting him off eating, or sometimes a cold makes things taste different and may put him off, or just loss of appetite from it.
Usually if something is putting them off after another few days they suddenly start eating lots again and make up for the lost calories. If it is longer term then I'd go see your doc or dentist to have him checked out.
Sounds like the evening meal is a different issue though. Many LOs don't eat much in the evening and 6pm is quite late to expect a full meal to go down. Mine won't eat beyond 5.15pm and even then it is more of a supper/snack than 'dinner'. So I make his main meal much earlier in the day.