Fixes ISSUE-53485: Fixes reprintable invoice email sending when working from the POS
Fixes the error that we were having when sending via email reprintable invoices from the POS. With this patch, we properly recognize if the document we are working with is an order or an invoice, and then we properly handle it.
Related MR
Edited by Gonzalo Fernández García