Prevent table pre-write script from executing during invoicing

I have a script that is triggering on table pre-write of the SO_SalesOrderHeader.  The script is triggering during invoicing, since the table is updated.  Is there a way to make an exception and prevent the script from triggering during the sales journal update?

Thanks!