Yeah, it's irrelevant, nothing would cause the order in which the Body and Resistance are applied to matter. They are both applied at the same time, thus it ends up being -40 damage, given the attacking Pokemon is a Stage 2.
At least this is one IFDS question that can actually be answered without totally assuming things... *cough*unlikeCharizard*cough*
Just saw your next post, if an attack isnt affected by Resistance, you ignore the Resistance but apply the Body. So it would be -20.
If Gallade uses Sonic Blade on it, Sonic Blade places DAMAGE COUNTERS, the Body and all Resistances apply to DAMAGE. So Sonic Blade would not be affected in a negative way. You would do the normal actions for the attack.
Well, there is an order of operations for attack damage....
Base damage calculation
Effects on Attacking Pokemon
Weakness
Resistance
Effects on Defending Pokemon
Staraptor's Poke-Body would provide an effect on the Defending Pokemon -- it reduces your damage when you're defending -- so it is after Weakness and Resistance.
The order is not important in this particular situation, but it can be at other times, so it's good to know.