Mahmoud offers a SQL scrip with Purchase Order Receiving and Invoices Details (with Requisitions)
Dynamics GP Essentials: Purchase Order Receiving and Invoices Details (with Requisitions) – SQL Script
Sales, Purchasing & InventorySQL & DataDevelopment & Integration
Archived post from 2015. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.