Good to see you, global2000.
In QuickBooks Desktop, the customized columns are non-calculating fields. We can only manually enter information in it.
What I can suggest is to create a new item for retention. Then, add it when you create a new invoice. These are the steps in creating a retention item:
Create a new invoice as usual, then add the retention item.
If you're using QuickBooks Online, customized columns are still non-calculating fields. You'll want to do the same workaround.
Here's a guide in recording invoice payments in QuickBooks Online. That article will show the steps on how to properly enter customer payments.
Keep in touch if you need more help. The Community Team is always here for you.