In order to generate invoice from sales order only for the fulfilled items, set the following preference:
- Goto Setup>Accounting>Accounting Preferences
- Click on the order management tab,
- Under the ‘invoicing’ section, uncheck the Invoice in Advance of Fulfillment checkbox.
Making this adjustment will ensure that invoice is generated only for fulfilled items