Recording Separate Contributions in a Membership Webform
Webform-CiviCRM integration was designed to be able to sign up multiple members plus collect a contribution. It will save a single contribution record containing a separate line-item for each (2 memberships + a donation = 3 line items).

There are some key settings that are required:


Contributions (in Webform CiviCRM section): Should be set to your Donation Contribution page and not your Membership Contribution page if you created one
Memberships Tab (in Webform CiviCRM section): Should be set to one


With those settings above and any other data that you would like to collect you will be able to receive a donation and membership purchase on the same transaction.

Adding some examples:



So on a contribution level these look like Donations -> so you must pull LineItem reports; this one is a good one (from Fuzion's Extended Reports): civicrm/report/price/contributionbased?reset=1



Adding some more screenshots:

Contribution page config (also enabled a Payment Processor); but I don't even have Membership section enabled here;



Webform CiviCRM config [I've hidden Membership type as there really is only one];