I think this will do what you need for the percentage: (Kredittotal - Debettotal) / ((1 - (Kredittotal < 0) * 2) * Kredittotal)
You'll want to hide the field on the form if it contains "NaN" or "Infinity" - and you may want to set the data type to text to prevent validation errors. There is probably a fancy way to keep the formula from returning errors when Kredittotal is 0, but I am not very math-y. I'm not sure how to get a progress bar from dates.