Hello experts !
I am trying to figure out how to know if a Sales order (ref. https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesorder_get) has been paid or not. For other documents, it is easy via the status Paid, however on a Sales order there is no such status.
For now, I can get all the Sales shipment related to an order (via ordernumber), but here neither I cannot know if the shipment has been paid. I see that there is reference to an invoiceId in Customer payment, but can this ID also reference a Sales shipment ? The documentation is not very clear about the link between Customer payment and invoices.
Thank you very much for your help,
Julien