I am not completely sure what you are trying to do. In particular, I do not understand where you will be getting values of a, b, p, and gamma to know how to compute CM. The following code defines Sales and CM as functions and then the definition of Tsales is almost exactly as you wrote in your last post. (I put the t>0 test first as this should be slightly more efficient as neither Sales nor CM will be computed if t<=0.)
unprotect( gamma ); # allow use of gamma as a name, not he built-in constant
Sales := (t,p,gamma) -> (-100+p)*(1-exp((-1)*.11*t))/(-1+gamma)/(10.00000000*exp((-1)*.11*t)+1):
CM := (a,b,p,gamma) -> a+b*p/gamma:
CM0 := CM(1,1,0.5,0.1);
Tsales := piecewise( t>0 and Sales(t,25,0)<CM(a,b,p,gamma), Sales(t,25,0),
a,b,p,gamma := 1,1,.5,0.1:
plot( Tsales, t=-1..10 );
Now, if you want to make Tsales a function of t (or t, a, b, p, and gamma), that can be done.
Tsales2 := unapply( Tsales, t ):
plot( Tsales2, -1..10 );
You could also make a function that takes these parameters and an interval for t and produces the plot as it's value.
As you provide more information, we can provide additional pointers about how to reach your goals for this project.