title: Calling invoice number and customer email on success.phtml
body: <p>I need to call the invoice number and customer email on magento success.phtml grammatically. </p>
  
  <p>I need this for pre-populated email for resellerrating exit survey code. </p>
  
  <pre><code>&lt;link rel="stylesheet" href="https://www.resellerratings.com/images
  /js/dhtml_survey.css" type="text/css" /&gt;
  &lt;script type="text/javascript"&gt;
  seller_id =  XXXX;
  inv = "B5000";
  email_pass = "customer@someplace.com";
  document.write('&lt;'+ 'script type="text/javascript" src="https://www.resellerratings.com/images/js/popup_include.js"&gt;&lt;\/script&gt;');
  &lt;/script&gt;
  </code></pre>
  
  <p>I know how to call the order ID and Grandtotal:</p>
  
  <pre><code>     $order = Mage::getModel('sales/order')-&gt;loadByIncrementId(Mage::getSingleton('checkout/session')-&gt;getLastRealOrderId());
       $amount = number_format($order-&gt;getGrandTotal(),2);
  </code></pre>
  
  <p>I found this code somewhere on magento forums, but have no idea how to call out the invoice number and customer email for resellerratings. Help me out with this please.</p>
  
  <p>Regards, 
  Jon</p>