Whenever you have a cake remaining at the end of a level on the display case or anywhere else, do not click on the last money remaining until after picking up the cake. You will not be penalized for the cake. Also, bake the most complex cake possible at the beginning of each level and put it on the stand. It almost always sells. If not, just hold it when you click on the last payment.
If you have a cake at the end of the round that has not sold, give the last customer their cake but do not pick up the money. Pick up the unsold cake and pick up the payment for the cake. You will not be charged for the cake that is in your hands. This will save you plenty of money when it comes to the double-layered cakes with decorations.