[FIX] bug #4201 proper invoice of service from delivery with multiple pi...

Please read my bug report #4201 for a detailed scenario of the bug
Thanks to my collegue Benoît Guillot who gave me the idea on how to properly fix this bug