Auto Calculate Sales Tax when an order line is deleted

Hi,

I am trying to find a way of auto calculating sales tax when an order line is deleted.

I have ran a trace and identified the SalesOrder.SetReadyToCalc method is fired when the ‘Calculate Tax’ is launched from the ‘Actions Menu’.

I know I need to fire the ‘this.oTrans.SetReadyToCalc();’ command, but the methods called when a line is deleted I am struggling to identify the event that deletes the line.

If i place the code after the Update event on the OrderAdapter the code gets caught in a loop as I’m guessing there is an update with the SetReadyToCalc’ method.

Has anyone managed this?

Thanks,

Andrew.

How about preventing line deletion until the ReadyToProcess is unchecked?

They may still forget to put it back but…

Hi Mark,

The current issue is that the ‘Calculate Tax’ is occasionally forgotten and I’m pretty certain the ‘Ready To Process’ would be forgotten, so I’ll end up replacing one problem with another.

Thanks anyway for raising the option.

Cheers,

Andrew.

Yeah, anything left to “remember to do this” doesn’t always go well…