See if just clicking a blank area of your layout outside of the portal refreshes the total. If so, you just need to commit records, not refresh the window. (your menu pic may be both committing and refreshing...)
I did have a COMMIT record somewhere towards the end of the script. I had to do a bit of house cleaning before I committed the record. But you're right. When I moved the COMMIT line further up the script, it functioned as expected. Thanks.