You took precautions concerning the morning part to avoid gravely misleading results. You returned the empty string instead of a numeric resut then. Concerning the afternoon part the situation is the same. In addition you should return a clear error message for the ‘Total’ column if there was an error with one of the parts.
In addition you should consider to read my answer in this thread.
Edit 1 giving the amendment announced in my comment on the “I-don’t-know-answer”:
=IFERROR(IF(AND(B3>0;B3<1);IF(AND(C3>0;C3<13/24;C3>=B3);C3-B3;"test failed");"test failed")+IF(AND(D3>=13/24;D3<1);IF(AND(E3>0;E3<1;E3>=D3);E3-D3;"test failed");"test failed");"errors")
This isn’t exactly a monster formula. Nonetheless we should pursue clearer formulae and a structure of the sheets allowing for helper columns making everything easy.
No general purpose programmer would use that kind of bloated expressions. He (f/m) would inevitably use helper variables and control structures.
In fact you would need to also define what’s "Morning’ or ‘Afternoon’ exactly, and to check for compliance of the input with the definition … (See the clumsy attempt to do so exemplified by the 13/24 in my formula.)
Keeping worktimes, often in combination with the application of changing hourly rates is a ticklish thing, and not at all easily done with spreadsheet as soon as primages or work-times spanning more than one calendaric day occur.