You can configure the time of purchase invoice generation by navigating to the below form and apply the changes. This gives user the flexibility to create invoice based on incoming shipment received or Invoice based on purchase order or invoice based on purchase order lines.

Navigate to Settings>> General settings>> Purchases and refer the screen grab to apply the changes.