Hi @dimo_60
You will need to raise an invoice in QBO for the machine you're part-exchanging (attach a copy of the self-bill to this in QBO for your records).
Enter the Bill from the Supplier into QBO at full value.
Enter the Bill Payment into QBO for the actual payment amount.
Contra the balance in QBO - there are a few alternative methods for Contra (search on here).
Hope this helps.