In hook_civicrm_pre, the params passed to your function include qfKey and entryURL — at least sometimes. The entry URL is in a format that's pretty obvious, but it seems like depending on URL parsing would make for brittle code. So what about qfKey?
qfKey is a form key based on form name, the current user session ID, a private key unique to the ...
A couple of quick thoughts:
upgrade to Webform CiviCRM 5.x (we’re no longer supporting 4.x)
what is your PHP version?
always switch off notices on production sites: goto admin/config/developement/logging and set to -> None
open an issue on our drupal.org webform_civicrm project page and give us exact steps to reproduce
This question is similar to Send or print membership invoices
Renewal Invoices for Memberships is a new CiviCRM extension designed to solve this problem. Please see https://github.com/agileware/au.com.agileware.renewalinvoices
Welcome to StackExchange. You can find many people who will do this on a paid basis at https://civicrm.org/partners-contributors
If you want to do it yourself and have specific questions then ask away on this site.
If you describe what your charity is, it may just resonate with someone willing to offer more substantial pro-bono help - but that's an ...