You avoid JE for anything that uses names, for AP, AR, Sales, Sales Taxes, QB Payroll, QB Inventory.
You need a bank account and name it Barter or Clearing.
Process the amount being swapped, as Receive Payment from the Customer Name and Deposit to Barter Bank. Use Barter Bank to pay that same amount as the portion of the Bill you owe. For this one date, then, Barter Bank ends at 0. That's how you know you did it right.
Now process the rest of the funds; one of you likely still owes the other in reality. That part is the Real Banking to be done.