Hi Brianmaric,
If all lines are cancelled then status of Sales table is also get cancelled, So logic around update method of sales table give you the desired outcomes.. You can use methods updated and updating in salesTableType class
Please mark as verified if the answer is helpful.
Regards
Reyaz