If the posted entry has come from the SO module (gltr_tr_type = "SO"), the Document field (gltr_doc) should contain the invoice. You can obtain the sales order from a few different places, but the easiest way is probably via the Invoice History table (ih_hist where ih_inv_nbr = gltr_doc).