Direct payments/receipts have to do with cash relating to the company and its capital (eg, capital increase, loan payments, 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 and 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 have created the corresponding invoice) instead of using a direct transaction.
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.