Deduct Tips From Cash, Tax Issue

The way the bar works is when a tip is received from debit/credit the server will take the amount that was tipped from the till. I would like to be able to take the amount that is tipped in a debit/credit transaction and add that amount to debit/credit and subtract it from cash so that the till can be counted at the end of shift and the amount that was made should be correct account wise. I tried following this post: Credit Card Tip (specifically emre’s solution) but changed a couple things in the transaction information to try to accomplish this but it has not been working correctly and I think the HST tax is messing it up a bit. Any help would be appreciated. (pictures in the comments)


I solved my problem, just a couple setting modifications.