Hi,
Please update your code as shown below and it updates sales tax group on all the items to VAT where moduleType is Purchase order or sales order.
static void Jobs10(Args _args)
{
InventTableModule tm;
ttsBegin;
update_recordSet tm setting TaxItemGroupId = “VAT”
where (tm.ModuleType == ModuleInventPurchSales::Purch || tm.ModuleType == ModuleInventPurchSales::Sales);
ttsCommit;
info("Items Sales Tax goup have been updated");
}