From the above error message I can understand that you are trying to add variants for a product for which you have already made some invoices.
We want to inform you that variants cannot be added for this product since it has transactions. We request you to delete the product and add with variants again.