Update Unapplied Cash Header

If we can confirm unapplied cash has been fully applied, but the cash still shows an open balance, this script can be run to update the unapplied cash header. First also confirm the applied cash shows correctly in the activity ledger and general ledger.  

Select sum(amount)

from AR_Unapplied_Cash_Detail

where Unapplied_Cash_Id = [Unapplied_Cash_Id] -- ID of Unapplied Cash Entry customer believes is wrong

update UC

set

used_amount = Amount

from AR_Unapplied_Cash uc