Direct payments/receipts have to do with cash relating to the company and its capital (eg, loan, capital increase, loan payment, etc.). Therefore, their goal is to describe transactions that are not related to purchase or sales documents.
Respectively, for the same reason they do not participate in the contact statement do not reduce the amount due. If you have received / made a payment that you want it to affect the contact statement, you probably need to create an advance payment/receipt (if there is no sales/purchase document yet) or add a payment (so long as you create the corresponding document) instead of the direct receipt / payment.
For more information on document-related payments, please follow the instructions in the related article. Also, if you want to use an amount to pay off multiple documents, you can follow the instructions for bulk payments.