Use this script as the custom calculation script for the "Total" field.
This script assumes there are 2 fields, "Remaining Balance" and "Total":
var b = getField("Remaining Balance").value;
if (b > 3000){
getField("Total").value = 3000;
}
else getField("Total").value = b;
Hope this helps.