joeferraro / MavensMate-SublimeText

Sublime Text plugin for Salesforce developers. Aims to replace the Eclipse-based Force.com IDE.
http://mavensmate.com
GNU General Public License v3.0
290 stars 119 forks source link

Attempt to compile VF page that compiles OK via SF UI produces weird error #384

Closed alan-birchenough closed 10 years ago

alan-birchenough commented 10 years ago

I am currently using version 3.5.0 of the Mavensmate app. I am attempting to use Mavensmate -> Compile Active File to compile a VisualForce page that compiles fine when saved via the Salesforce UI.

The error I get in the Mavensmate window is: common.apex.runtime.bytecode.BytecodeExecutionContext cannot be cast to common.apex.runtime.impl.Execution (Line: 1)

I include the corresponding log text below to aid analysis of this issue:

--------------------------------------------
---------- NEW OPERATION REQUESTED ---------
--------------------------------------------

compile
Namespace(client='SUBLIME_TEXT_3', format='json', operation='compile', quiet=False, respond_with_html=False, ui_switch=False, verbose=False)
{u'files': [u'/Users/alanbirchenough/Documents/SFDC/mm_workspace/SignDealz Developer Sandbox/src/pages/SigndealzSalesInvoicePrint.page'], u'project_name': u'SignDealz Developer Sandbox', 'verbose': False, 'args': Namespace(client='SUBLIME_TEXT_3', format='json', operation='compile', quiet=False, respond_with_html=False, ui_switch=False, verbose=False), 'client': 'SUBLIME_TEXT_3', 'ui': False, u'workspace': u'/Users/alanbirchenough/Documents/SFDC/mm_workspace', 'operation': 'compile'}

--------------------------------------------
GETTING USER INFO
sending to (https://cs10.salesforce.com/services/Soap/u/29.0/00DJ0000002hagb)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:partner.soap.sforce.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:partner.soap.sforce.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:SessionHeader>
         <tns:sessionId>00DJ0000002hagb!AQsAQCxfmot8x1gJ7pA4u9_skbxKDGN2A0euQtJmp0GnEO5sdcw.j5nYpf6V2Z.k_ftVFkFBr64WTLPL7XdPpSOk9ncYvGPn</tns:sessionId>
      </tns:SessionHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:getUserInfo/>
   </ns1:Body>
</SOAP-ENV:Envelope>
headers = {'SOAPAction': u'""', 'Content-Type': 'text/xml; charset=utf-8', u'User-Agent': u'MavensMate'}
http succeeded:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><LimitInfoHeader><limitInfo><current>269</current><limit>5000000</limit><type>API REQUESTS</type></limitInfo></LimitInfoHeader></soapenv:Header><soapenv:Body><getUserInfoResponse><result><accessibilityMode>false</accessibilityMode><currencySymbol>$</currencySymbol><orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit><orgDefaultCurrencyIsoCode>USD</orgDefaultCurrencyIsoCode><orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments><orgHasPersonAccounts>false</orgHasPersonAccounts><organizationId>00DJ0000002hagbMAA</organizationId><organizationMultiCurrency>false</organizationMultiCurrency><organizationName>Signdealz</organizationName><profileId>00eA0000000rF3gIAE</profileId><roleId>00EA0000000vAFYMA2</roleId><sessionSecondsValid>7200</sessionSecondsValid><userDefaultCurrencyIsoCode xsi:nil="true"/><userEmail>arlene.kocurek@iconatg.com</userEmail><userFullName>Icon @Signdealz</userFullName><userId>005A0000004UzTBIA0</userId><userLanguage>en_US</userLanguage><userLocale>en_US</userLocale><userName>iconatg@signdealz.org.developer</userName><userTimeZone>America/Chicago</userTimeZone><userType>Standard</userType><userUiSkin>Theme3</userUiSkin></result></getUserInfoResponse></soapenv:Body></soapenv:Envelope>
(GetUserInfoResult){
   accessibilityMode = False
   currencySymbol = "$"
   orgAttachmentFileSizeLimit = 5242880
   orgDefaultCurrencyIsoCode = "USD"
   orgDisallowHtmlAttachments = False
   orgHasPersonAccounts = False
   organizationId = "00DJ0000002hagbMAA"
   organizationMultiCurrency = False
   organizationName = "Signdealz"
   profileId = "00eA0000000rF3gIAE"
   roleId = "00EA0000000vAFYMA2"
   sessionSecondsValid = 7200
   userDefaultCurrencyIsoCode = None
   userEmail = "arlene.kocurek@iconatg.com"
   userFullName = "Icon @Signdealz"
   userId = "005A0000004UzTBIA0"
   userLanguage = "en_US"
   userLocale = "en_US"
   userName = "iconatg@signdealz.org.developer"
   userTimeZone = "America/Chicago"
   userType = "Standard"
   userUiSkin = "Theme3"
 }
retrieve request: 
{u'ApexPage': [u'SigndealzSalesInvoicePrint']}
----> 
{'name': u'ApexPage', 'members': [u'SigndealzSalesInvoicePrint']}
{u'inFolder': False, u'xmlName': u'ApexPage', u'suffix': u'page', u'directoryName': u'pages', u'metaFile': True}
---request payload---
{'apiVersion': u'29.0', 'unpackaged': {'types': [{'name': u'ApexPage', 'members': [u'SigndealzSalesInvoicePrint']}]}}
sending to (https://cs10.salesforce.com/services/Soap/m/29.0/00DJ0000002hagb)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://soap.sforce.com/2006/04/metadata" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://soap.sforce.com/2006/04/metadata" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:SessionHeader>
         <tns:sessionId>00DJ0000002hagb!AQsAQCxfmot8x1gJ7pA4u9_skbxKDGN2A0euQtJmp0GnEO5sdcw.j5nYpf6V2Z.k_ftVFkFBr64WTLPL7XdPpSOk9ncYvGPn</tns:sessionId>
      </tns:SessionHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:retrieve>
         <ns0:retrieveRequest>
            <ns0:apiVersion>29.0</ns0:apiVersion>
            <ns0:unpackaged>
               <ns0:types>
                  <ns0:members>SigndealzSalesInvoicePrint</ns0:members>
                  <ns0:name>ApexPage</ns0:name>
               </ns0:types>
            </ns0:unpackaged>
         </ns0:retrieveRequest>
      </ns0:retrieve>
   </ns1:Body>
</SOAP-ENV:Envelope>
headers = {'SOAPAction': u'""', 'Content-Type': 'text/xml; charset=utf-8', u'User-Agent': u'MavensMate'}
http succeeded:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata"><soapenv:Body><retrieveResponse><result><done>false</done><id>09SJ0000001MvGJMA0</id><state>Queued</state></result></retrieveResponse></soapenv:Body></soapenv:Envelope>
sending to (https://cs10.salesforce.com/services/Soap/m/29.0/00DJ0000002hagb)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://soap.sforce.com/2006/04/metadata" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://soap.sforce.com/2006/04/metadata" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:SessionHeader>
         <tns:sessionId>00DJ0000002hagb!AQsAQCxfmot8x1gJ7pA4u9_skbxKDGN2A0euQtJmp0GnEO5sdcw.j5nYpf6V2Z.k_ftVFkFBr64WTLPL7XdPpSOk9ncYvGPn</tns:sessionId>
      </tns:SessionHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:checkStatus>
         <ns0:asyncProcessId>09SJ0000001MvGJMA0</ns0:asyncProcessId>
      </ns0:checkStatus>
   </ns1:Body>
</SOAP-ENV:Envelope>
headers = {'SOAPAction': u'""', 'Content-Type': 'text/xml; charset=utf-8', u'User-Agent': u'MavensMate'}
http succeeded:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata"><soapenv:Body><checkStatusResponse><result><done>true</done><id>09SJ0000001MvGJMA0</id><state>Completed</state></result></checkStatusResponse></soapenv:Body></soapenv:Envelope>
sending to (https://cs10.salesforce.com/services/Soap/m/29.0/00DJ0000002hagb)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://soap.sforce.com/2006/04/metadata" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://soap.sforce.com/2006/04/metadata" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:SessionHeader>
         <tns:sessionId>00DJ0000002hagb!AQsAQCxfmot8x1gJ7pA4u9_skbxKDGN2A0euQtJmp0GnEO5sdcw.j5nYpf6V2Z.k_ftVFkFBr64WTLPL7XdPpSOk9ncYvGPn</tns:sessionId>
      </tns:SessionHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:checkRetrieveStatus>
         <ns0:asyncProcessId>09SJ0000001MvGJMA0</ns0:asyncProcessId>
      </ns0:checkRetrieveStatus>
   </ns1:Body>
</SOAP-ENV:Envelope>
headers = {'SOAPAction': u'""', 'Content-Type': 'text/xml; charset=utf-8', u'User-Agent': u'MavensMate'}
http succeeded:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/2006/04/metadata"><soapenv:Body><checkRetrieveStatusResponse><result><fileProperties><createdById>005A0000004UzTBIA0</createdById><createdByName>Icon @Signdealz</createdByName><createdDate>2014-05-27T19:48:10.000Z</createdDate><fileName>unpackaged/pages/SigndealzSalesInvoicePrint.page</fileName><fullName>SigndealzSalesInvoicePrint</fullName><id>066J0000000Dj13IAC</id><lastModifiedById>005A0000004UzTBIA0</lastModifiedById><lastModifiedByName>Icon @Signdealz</lastModifiedByName><lastModifiedDate>2014-05-27T20:10:57.000Z</lastModifiedDate><manageableState>unmanaged</manageableState><type>ApexPage</type></fileProperties><fileProperties><createdById>005A0000004UzTBIA0</createdById><createdByName>Icon @Signdealz</createdByName><createdDate>2014-05-27T20:34:57.360Z</createdDate><fileName>unpackaged/package.xml</fileName><fullName>unpackaged/package.xml</fullName><id></id><lastModifiedById>005A0000004UzTBIA0</lastModifiedById><lastModifiedByName>Icon @Signdealz</lastModifiedByName><lastModifiedDate>2014-05-27T20:34:57.360Z</lastModifiedDate><manageableState>unmanaged</manageableState><type>Package</type></fileProperties><id>09SJ0000001MvGJMA0</id><zipFile>UEsDBBQACAgIAFyku0QAAAAAAAAAAAAAAAAwAAAAdW5wYWNrYWdlZC9wYWdlcy9TaWduZGVhbHpTYWxlc0ludm9pY2VQcmludC5wYWdl7V3tc9u40f+evwJRnmt6rW3ZTtK7+uxMFVm5eOq3Wr508nzJUCJkcY4iOSSVWM34fy/eSAIEQAAU5SjXcOZ8EbH4AbtYLBaLFx57Cbw/Srw7CLLci3wv9YdxlKdxGML0pDc9vPv4cRr73ln0KQ6mEP3oAZDN48/voOdjipkXZrAHssCHE4/7zcDG+SqE2RzCPCvTQAojlNdDb748DWZ//r/hMkWv8mtUi73ES70FzGGa7SXg5AREyzDcYX+fJ/7s+Y8PvddPngD2HD/d3QVjD5UBWBUR+gwiOPSvWZyCfI7/H4bx5yC6A+/fgoWX/r5MANjdfV2hECl88tLAm4QQfMKMZBiUYfbQq3AJcX0VEnno9SsosWZ/0T3gzejXs0swvLr+APrgejC+HYF3o5uRPkeRka93TQxE1mbGMNlb1MjDOIzTHtA9jOVn++Tpgb4FLNWKN782QBewo5ejwduXLrCNdW5T2/MggpZCePHm1ejvByLsHNWq+kleEViQrxKUJ4f3eX+aZT2RBj+T2F/t5P5OPt8B8wPwRSKYIVZ3Z94iCFdH72Hqe5G3AwaIAdQL3sHwE8yDKXqTeVG2m8E0mP2ihsiC/8Cjn/ZeJblMMMWcH315KurDg0z4ILyRkvfgwgtCkGPhypx8Dvx8fnS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eLfl5n9iQuY2WstS1rQibd4kN+bPtnVZUdNoGAV/N78qiIXlsaSjGJAImnP/Dn4FYysh0n3ABX4oELB1k9AFQSwcI1lH7Ca8AAAD1AAAAUEsBAhQAFAAICAgAXKS7RB5zAyP9EgAAEKQAADAAAAAAAAAAAAAAAAAAAAAAAHVucGFja2FnZWQvcGFnZXMvU2lnbmRlYWx6U2FsZXNJbnZvaWNlUHJpbnQucGFnZVBLAQIUABQACAgIAFyku0Th92SG3gAAAPYBAAA5AAAAAAAAAAAAAAAAAFsTAAB1bnBhY2thZ2VkL3BhZ2VzL1NpZ25kZWFselNhbGVzSW52b2ljZVByaW50LnBhZ2UtbWV0YS54bWxQSwECFAAUAAgICABcpLtE1lH7Ca8AAAD1AAAAFgAAAAAAAAAAAAAAAACgFAAAdW5wYWNrYWdlZC9wYWNrYWdlLnhtbFBLBQYAAAAAAwADAAkBAACTFQAAAAA=</zipFile></result></checkRetrieveStatusResponse></soapenv:Body></soapenv:Envelope>
sending to (https://cs10.salesforce.com/services/Soap/u/29.0/00DJ0000002hagb)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:partner.soap.sforce.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:partner.soap.sforce.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <tns:SessionHeader>
         <tns:sessionId>00DJ0000002hagb!AQsAQCxfmot8x1gJ7pA4u9_skbxKDGN2A0euQtJmp0GnEO5sdcw.j5nYpf6V2Z.k_ftVFkFBr64WTLPL7XdPpSOk9ncYvGPn</tns:sessionId>
      </tns:SessionHeader>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:query>
         <ns0:queryString>Select LastModifiedById, LastModifiedDate, LastModifiedBy.Name, Markup From ApexPage Where Name = &apos;SigndealzSalesInvoicePrint&apos;</ns0:queryString>
      </ns0:query>
   </ns1:Body>
</SOAP-ENV:Envelope>
headers = {'SOAPAction': u'""', 'Content-Type': 'text/xml; charset=utf-8', u'User-Agent': u'MavensMate'}
http succeeded:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.partner.soap.sforce.com"><soapenv:Header><LimitInfoHeader><limitInfo><current>272</current><limit>5000000</limit><type>API REQUESTS</type></limitInfo></LimitInfoHeader></soapenv:Header><soapenv:Body><queryResponse><result xsi:type="QueryResult"><done>true</done><queryLocator xsi:nil="true"/><records xsi:type="sf:sObject"><sf:type>ApexPage</sf:type><sf:Id xsi:nil="true"/><sf:LastModifiedById>005A0000004UzTBIA0</sf:LastModifiedById><sf:LastModifiedDate>2014-05-27T20:10:57.000Z</sf:LastModifiedDate><sf:LastModifiedBy xsi:type="sf:sObject"><sf:type>User</sf:type><sf:Id xsi:nil="true"/><sf:Name>Icon @Signdealz</sf:Name></sf:LastModifiedBy><sf:Markup>&lt;apex:page standardController=&quot;c2g__codaInvoice__c&quot;  showHeader=&quot;false&quot; sidebar=&quot;false&quot; standardStylesheets=&quot;false&quot;  renderas=&quot;{!if($CurrentPage.parameters.p == null, null, &apos;pdf&apos;)}&quot;&gt;

        &lt;!-- Sales Invoice reference for the following VF markup  --&gt;
        &lt;apex:variable var=&quot;salesInvoice&quot; value=&quot;{!c2g__codaInvoice__c}&quot;/&gt;

        &lt;!-- ************************* BEGIN COPY / PASTE HERE ******************************** --&gt;

        &lt;!-- Styles --&gt;
        &lt;apex:variable var=&quot;styleFontColor&quot;                         value=&quot;#000000&quot; /&gt;
        &lt;apex:variable var=&quot;styleHeaderBGColor&quot;                     value=&quot;#E4EAF4&quot; /&gt;
        &lt;apex:variable var=&quot;styleHeaderFontColor&quot;                   value=&quot;#000000&quot; /&gt;
        &lt;apex:variable var=&quot;styleLineColor&quot;                         value=&quot;#3B5E91&quot; /&gt;
        &lt;head&gt;
            &lt;style type=&quot;text/css&quot;&gt;
                body,td,th, h1 {
                font-family:Verdana, Arial, Helvetica, sans-serif;
                font-size:7.5pt;
                color:{!styleFontColor};
                }

                .email table{
                width:100%;
                border-collapse:collapse;
                margin-bottom:10px;
                }

                .email table.tableSummary{
                width:250px;
                }

                .email table.tableDescription{
                width:68%;
                margin-top:10px;
                margin-bottom:5px;
                }

                .email table.noBottomMargin{
                margin-bottom:0px;
                }

                .email table.tableTaxSummary, .email table.tableAdditional {
                margin-top:10px;
                margin-bottom:0px;
                }

                .email table h1{
                font-size:20px;
                font-weight:700;
                text-transform:uppercase;
                text-align:right;
                margin:0;
                }

                .email table td,
                .email table th{
                padding:5px;
                }
                .email table th{
                background-color:{!styleHeaderBGColor};
                color:{!styleHeaderFontColor};
                }

                .email table th.nobg{
                background-color:transparent;
                color:{!styleFontColor};
                }

                .email table td.noPadding{
                padding:0px;
                }
                .email table td.noPaddingLeft{
                padding-left:0px;
                }

                .email table td.alignTop{
                vertical-align:top;
                }

                .email table .textAlignLeft{
                text-align:left;
                }
                .email table .textAlignCenter{
                text-align:center;
                }
                .email table .textAlignRight{
                text-align:right;
                }

                .email table.boxed{
                border-left:1px solid {!styleLineColor};
                border-top:1px solid {!styleLineColor};
                }

                .email table.boxed th, .email table.boxed td{
                border-left:1px solid {!styleLineColor};
                border-top:1px solid {!styleLineColor};
                }

                .email table.boxedNoTop{
                border-top:none;
                border-left:none;
                }

                .email table.boxedNoBottom{
                border-bottom:none;
                }

                .email table.boxedNoTop td.boxedNoTop{
                border-top:none ;
                }

                .email table.boxed th{
                border-right:1px solid {!styleLineColor};
                border-bottom:1px solid {!styleLineColor};
                }

                .email table.boxed th.noLines{
                border-right:1px solid {!styleLineColor};
                border-left:none;
                border-top:none;
                border-bottom:none;
                }

                .email table.boxed td{
                border-right:1px solid {!styleLineColor};
                border-bottom:1px solid {!styleLineColor};
                }

                .email table.boxed td.widthLineNumbers{width:15pt;}
                .email table.boxed td.widthSmall{width:45pt;}
                .email table.boxed td.widthMedium{width:75pt;}

                .widthMedium{width:75pt;}

                .email table.boxed td span.description{
                font-size:85%;
                font-style:italic;
                display:block;
                }

                .boxedtop {
                border-top:1px solid {!styleLineColor};
                }

                .boxed {
                border-left:1px solid {!styleLineColor};
                border-right:1px solid {!styleLineColor};
                border-bottom:1px solid {!styleLineColor};
                }

                table { page-break-inside:auto }
                tr    { page-break-inside:avoid; page-break-after:auto }

                @page {
                    @bottom-right {content:&quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
                               font-family:Verdana, Arial, Helvetica, sans-serif;
                               font-size:7.5pt;
                               font-weight:bold;
                               padding-bottom;25px;
                  }
                }
              &lt;/style&gt;
        &lt;/head&gt;

        &lt;!-- RECORD TYPE --&gt;
        &lt;apex:variable var=&quot;taxType&quot; value=&quot;{!salesInvoice.c2g__OwnerCompany__r.RecordType.Name}&quot;/&gt;

        &lt;!-- LABEL VARIABLES --&gt;

        &lt;!-- Invoice Title --&gt;
        &lt;apex:variable var=&quot;lblInvoice&quot;                     value=&quot;BOLLOCKS&quot; /&gt;

        &lt;!-- Company info --&gt;
        &lt;apex:variable var=&quot;lblPhone&quot;                       value=&quot;Phone: &quot; /&gt;
        &lt;apex:variable var=&quot;lblFax&quot;                         value=&quot;Fax: &quot; /&gt;
        &lt;apex:variable var=&quot;lblVATRegistrationNumber&quot;       value=&quot;VAT Registration Number: &quot; /&gt;

        &lt;!-- Invoice Header --&gt;
        &lt;apex:variable var=&quot;lblBillingAddress&quot;              value=&quot;Billing Address&quot; /&gt;
        &lt;apex:variable var=&quot;lblShippingAddress&quot;             value=&quot;Shipping Address&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceGroup&quot;                value=&quot;Invoice Group&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceNumber&quot;               value=&quot;Invoice Number&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceDate&quot;                 value=&quot;Invoice Date&quot; /&gt;
        &lt;apex:variable var=&quot;lblCustomerVATNumber&quot;           value=&quot;Customer Vat Number&quot; /&gt;
        &lt;apex:variable var=&quot;lblCustomerReference&quot;           value=&quot;Customer Reference&quot; /&gt;
        &lt;apex:variable var=&quot;lblShippingMethod&quot;              value=&quot;Shipping Method&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceCurrency&quot;             value=&quot;Invoice Currency&quot; /&gt;
        &lt;apex:variable var=&quot;lblDueDate&quot;                     value=&quot;Due Date&quot; /&gt;

        &lt;!-- Payment Schedule --&gt;
        &lt;apex:variable var=&quot;lblPaymentSchedules&quot;            value=&quot;Payment Schedule&quot; /&gt;
        &lt;apex:variable var=&quot;lblPaymentSchedulesDueDate&quot;     value=&quot;Due Date&quot; /&gt;
        &lt;apex:variable var=&quot;lblPaymentSchedulesAmount&quot;      value=&quot;Amount&quot; /&gt;

        &lt;!-- Invoice Description --&gt;
        &lt;apex:variable var=&quot;lblInvoiceDescription&quot;          value=&quot;Invoice Description&quot; /&gt;

        &lt;!-- Invoice Lines --&gt;
        &lt;apex:variable var=&quot;lblProductName&quot;                 value=&quot;Product Name&quot; /&gt;
        &lt;apex:variable var=&quot;lblProductCode&quot;                 value=&quot;Product Code: &quot; /&gt;
        &lt;apex:variable var=&quot;lblQuantity&quot;                    value=&quot;Quantity&quot; /&gt;
        &lt;apex:variable var=&quot;lblUnitPrice&quot;                   value=&quot;Unit Price&quot; /&gt;
        &lt;apex:variable var=&quot;lblTaxCode&quot;                     value=&quot;Tax Code&quot; /&gt;
        &lt;apex:variable var=&quot;lblTaxValue&quot;                    value=&quot;Tax Value&quot; /&gt;
        &lt;apex:variable var=&quot;lblNetValue&quot;                    value=&quot;Net Value&quot; /&gt;

        &lt;!-- Invoice Total --&gt;
        &lt;apex:variable var=&quot;lblInvoiceNetTotal&quot;             value=&quot;Net Total&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceTaxTotal&quot;             value=&quot;Tax Total&quot; /&gt;
        &lt;apex:variable var=&quot;lblInvoiceTotal&quot;                value=&quot;Invoice Total&quot; /&gt;

        &lt;!-- Tax Summary --&gt;
        &lt;apex:variable var=&quot;lbltaxsummary&quot;                   value=&quot;Tax Summary&quot; /&gt;
        &lt;apex:variable var=&quot;lbltaxRate&quot;                      value=&quot;Tax Rate&quot; /&gt;
        &lt;apex:variable var=&quot;lblnetValue&quot;                    value=&quot;Net Value&quot; /&gt;
        &lt;apex:variable var=&quot;lbltaxValue&quot;                    value=&quot;Tax Value&quot; /&gt;
        &lt;apex:variable var=&quot;lblproductCode&quot;                 value=&quot;Product Code&quot; /&gt;

        &lt;!-- Discount Summary --&gt;
        &lt;apex:variable var=&quot;lblsettlementdiscounts&quot;      value=&quot;Settlement Discounts&quot; /&gt;
        &lt;apex:variable var=&quot;lblpaymentdate&quot;              value=&quot;Payment Date&quot; /&gt;
        &lt;apex:variable var=&quot;lblValue&quot;                    value=&quot;Value&quot; /&gt;

        &lt;!-- Currency Symbol --&gt;
        &lt;apex:variable var=&quot;invoiceCurrencySymbol&quot; value=&quot;&quot;/&gt;
        &lt;apex:variable var=&quot;invoiceFormat0dp&quot; value=&quot;&quot;/&gt;
        &lt;apex:variable var=&quot;invoiceFormat2dp&quot; value=&quot;&quot;/&gt;
        &lt;ffbext:currencysymbol iso=&quot;{!salesInvoice.c2g__InvoiceCurrency__r.Name}&quot; symbolVar=&quot;invoiceCurrencySymbol&quot; /&gt;

        &lt;div class=&quot;email&quot;&gt;

            &lt;!-- LOGO --&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__LogoURL__c != &apos;&apos;}&quot;&gt;
                            &lt;img src=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__LogoURL__c}&quot;/&gt;
                        &lt;/apex:outputPanel&gt;
                    &lt;/td&gt;
                    &lt;td&gt;
                        &lt;h1&gt;{!lblInvoice}&lt;/h1&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;

            &lt;!-- COMPANY DETAILS --&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Street__c},&amp;nbsp;&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Street__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__City__c},&amp;nbsp;&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__City__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__StateProvince__c},&amp;nbsp;&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__StateProvince__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__ZipPostCode__c},&amp;nbsp;&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__ZipPostCode__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Country__c}&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Country__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;{!lblPhone}{!salesInvoice.c2g__OwnerCompany__r.c2g__Phone__c}&amp;nbsp;&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Phone__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                            &lt;apex:outputText value=&quot;{!lblFax}{!salesInvoice.c2g__OwnerCompany__r.c2g__Fax__c}&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Fax__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;{!lblVATRegistrationNumber}{!salesInvoice.c2g__OwnerCompany__r.c2g__ECCountryCode__c}{!salesInvoice.c2g__OwnerCompany__r.c2g__VATRegistrationNumber__c}&quot; rendered=&quot;{!taxType==&apos;VAT&apos;}&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Website__c}&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__Website__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__ContactEmail__c}&quot; rendered=&quot;{!salesInvoice.c2g__OwnerCompany__r.c2g__ContactEmail__c!=&apos;&apos;}&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;&amp;nbsp;&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;apex:outputText value=&quot;&amp;nbsp;&quot; escape=&quot;false&quot;/&gt;
                        &lt;/div&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;

            &lt;!-- INVOICE ADDRESS AND INFORMATION--&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;th class=&quot;nobg textAlignLeft&quot;&gt;{!lblBillingAddress}&lt;/th&gt;
                    &lt;th class=&quot;nobg textAlignLeft&quot;&gt;{!lblShippingAddress}&lt;/th&gt;
                    &lt;td rowspan=&quot;2&quot; class=&quot;alignTop&quot;&gt;

                        &lt;!-- SUT --&gt;
                        &lt;apex:outputPanel rendered=&quot;{!taxType==&apos;SUT&apos;}&quot; layout=&quot;none&quot;&gt;
                            &lt;table  class=&quot;boxed&quot;&gt;
                                &lt;tr&gt;
                                    &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceNumber}&lt;/th&gt;
                                    &lt;td&gt;{!salesInvoice.Name}&lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;tr&gt;
                                    &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceDate}&lt;/th&gt;
                                    &lt;td&gt;
                                        &lt;apex:outputText value=&quot;{0,date,MM/dd/yyyy}&quot;&gt;
                                            &lt;apex:param value=&quot;{!salesInvoice.c2g__InvoiceDate__c}&quot;/&gt;
                                        &lt;/apex:outputText&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                            &lt;/table&gt;
                        &lt;/apex:outputPanel&gt;

                        &lt;!-- VAT --&gt;
                        &lt;apex:outputPanel rendered=&quot;{!taxType==&apos;VAT&apos;}&quot; layout=&quot;none&quot;&gt;
                            &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__InvoiceGroup__r.Name!=&apos;&apos;}&quot;&gt;
                                &lt;table class=&quot;boxed&quot;&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceGroup}&lt;/th&gt;
                                        &lt;td&gt;{!salesInvoice.c2g__InvoiceGroup__r.Name}&lt;/td&gt;
                                    &lt;/tr&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceNumber}&lt;/th&gt;
                                        &lt;td&gt;{!salesInvoice.Name}&lt;/td&gt;
                                    &lt;/tr&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceDate}&lt;/th&gt;
                                        &lt;td&gt;
                                            &lt;apex:outputText value=&quot;{0,date,dd/MM/yyyy}&quot;&gt;
                                                &lt;apex:param value=&quot;{!salesInvoice.c2g__InvoiceDate__c}&quot;/&gt;
                                            &lt;/apex:outputText&gt;
                                        &lt;/td&gt;
                                    &lt;/tr&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblCustomerVATNumber}&lt;/th&gt;
                                        &lt;td&gt;
                                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__Account__r.c2g__CODAECCountryCode__c}{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c}&quot; rendered=&quot;{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c!=&apos;&apos;}&quot;/&gt;
                                        &lt;/td&gt;
                                    &lt;/tr&gt;
                                &lt;/table&gt;
                            &lt;/apex:outputPanel&gt;
                            &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__InvoiceGroup__r.Name == &apos;&apos;}&quot;&gt;
                                &lt;table class=&quot;boxed&quot;&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceNumber}&lt;/th&gt;
                                        &lt;td&gt;{!salesInvoice.Name}&lt;/td&gt;
                                    &lt;/tr&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblInvoiceDate}&lt;/th&gt;
                                        &lt;td&gt;
                                            &lt;apex:outputText value=&quot;{0,date,dd/MM/yyyy}&quot;&gt;
                                                &lt;apex:param value=&quot;{!salesInvoice.c2g__InvoiceDate__c}&quot;/&gt;
                                            &lt;/apex:outputText&gt;
                                        &lt;/td&gt;
                                    &lt;/tr&gt;
                                    &lt;tr&gt;
                                        &lt;th class=&quot;textAlignRight&quot;&gt;{!lblCustomerVATNumber}&lt;/th&gt;
                                        &lt;td&gt;
                                            &lt;apex:outputText value=&quot;{!salesInvoice.c2g__Account__r.c2g__CODAECCountryCode__c}{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c}&quot; rendered=&quot;{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c!=&apos;&apos;}&quot;/&gt;
                                        &lt;/td&gt;
                                    &lt;/tr&gt;
                                &lt;/table&gt;
                            &lt;/apex:outputPanel&gt; 
                        &lt;/apex:outputPanel&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td class=&quot;alignTop&quot;&gt;
                        &lt;p&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.Name!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.Name}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.BillingStreet!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.BillingStreet}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.BillingCity!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.BillingCity}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.BillingState!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.BillingState}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.BillingPostalCode!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.BillingPostalCode}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.BillingCountry!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;{!salesInvoice.c2g__Account__r.BillingCountry}&lt;/apex:outputText&gt;
                        &lt;/p&gt;
                    &lt;/td&gt;
                    &lt;td class=&quot;alignTop&quot;&gt;
                        &lt;p&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.Name!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.Name}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.ShippingStreet!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.ShippingStreet}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.ShippingCity!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.ShippingCity}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.ShippingState!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.ShippingState}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.ShippingPostalCode!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;
                                {!salesInvoice.c2g__Account__r.ShippingPostalCode}&lt;br/&gt;
                            &lt;/apex:outputText&gt;
                            &lt;apex:outputText rendered=&quot;{!salesInvoice.c2g__Account__r.ShippingCountry!=&apos;&apos;}&quot; escape=&quot;false&quot;&gt;{!salesInvoice.c2g__Account__r.ShippingCountry}&lt;/apex:outputText&gt;
                        &lt;/p&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;

            &lt;!-- INVOICE DETAILS --&gt;
            &lt;table class=&quot;boxed&quot;&gt;
                &lt;tr&gt;
                    &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblCustomerReference}&lt;/th&gt;
                    &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblShippingMethod}&lt;/th&gt;
                    &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblInvoiceCurrency}&lt;/th&gt;
                    &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblDueDate}&lt;/th&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td class=&quot;textAlignCenter&quot;&gt;{!salesInvoice.c2g__CustomerReference__c}&lt;/td&gt;
                    &lt;td class=&quot;textAlignCenter&quot;&gt;{!salesInvoice.c2g__ShippingMethod__c}&lt;/td&gt;
                    &lt;td class=&quot;textAlignCenter&quot;&gt;{!salesInvoice.c2g__InvoiceCurrency__r.Name}&lt;/td&gt;
                    &lt;td class=&quot;textAlignCenter&quot;&gt;
                        &lt;apex:outputText value=&quot;{!salesInvoice.c2g__PaymentSchedule__c}&quot; rendered=&quot;{!salesInvoice.c2g__PaymentSchedule__c!=&apos;&apos;}&quot;/&gt;
                        &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__PaymentSchedule__c==&apos;&apos;}&quot;&gt;
                            &lt;apex:outputText value=&quot;{0,date,M/d/yyyy}&quot; rendered=&quot;{!taxType==&apos;SUT&apos;}&quot;&gt;
                                &lt;apex:param value=&quot;{!salesInvoice.c2g__DueDate__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;

                            &lt;apex:outputText value=&quot;{0,date,d/M/yyyy}&quot; rendered=&quot;{!taxType==&apos;VAT&apos;}&quot;&gt;
                                &lt;apex:param value=&quot;{!salesInvoice.c2g__DueDate__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;
                        &lt;/apex:outputPanel&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;

            &lt;!-- As the following fields are not directly or explicitly referenced elsewhere, 
                 the following hidden, but explicit references are needed to ensure they are loaded --&gt;
            &lt;apex:repeat value=&quot;{!salesInvoice.c2g__InvoiceLineItems__r}&quot; var=&quot;line&quot; rendered=&quot;false&quot;&gt;
                &lt;apex:outputText rendered=&quot;false&quot;&gt;
                {!line.c2g__LineNumber__c} {!line.c2g__Product__r.Name} {!line.c2g__Product__r.ProductCode} {!line.c2g__LineDescription__c}
                {!line.c2g__Quantity__c} {!line.c2g__UnitPrice__c} {!line.c2g__NetValue__c} {!line.c2g__TaxValueTotal__c}
                {!line.c2g__TaxCode1__c} {!line.c2g__TaxCode2__c} {!line.c2g__TaxCode3__c}
                {!line.c2g__TaxRate1__c} {!line.c2g__TaxRate2__c} {!line.c2g__TaxRate3__c}
                {!line.c2g__TaxCode1__r.Name} {!line.c2g__TaxCode2__r.Name} {!line.c2g__TaxCode3__r.Name}
                {!line.c2g__TaxValue1__c}{!line.c2g__TaxValue2__c}{!line.c2g__TaxValue3__c}
                &lt;/apex:outputText&gt;
            &lt;/apex:repeat&gt;

            &lt;apex:repeat value=&quot;{!salesInvoice.c2g__InvoiceInstallmentLineItems__r}&quot; var=&quot;line&quot; rendered=&quot;false&quot;&gt;
                &lt;apex:outputText rendered=&quot;false&quot;&gt;
                {!line.c2g__LineNumber__c} {!line.c2g__DueDate__c} {!line.c2g__Amount__c} 
                &lt;/apex:outputText&gt; 
            &lt;/apex:repeat&gt;          

            &lt;!-- INVOICE LINES --&gt;
            &lt;apex:variable var=&quot;lineNumber&quot; value=&quot;{!0}&quot; /&gt;
            &lt;ffbext:salesinvoicelinesorter salesInvoice=&quot;{!salesInvoice}&quot; var=&quot;line&quot; styleClass=&quot;boxed noBottomMargin&quot;&gt;
                &lt;apex:variable var=&quot;lineNumber&quot; value=&quot;{!lineNumber+1}&quot; /&gt;
                &lt;apex:outputText rendered=&quot;{!lineNumber==1}&quot;&gt;
                    &lt;thead&gt;
                        &lt;tr&gt;
                            &lt;th&gt;&amp;nbsp;&lt;/th&gt;
                            &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblProductName}&lt;/th&gt;
                            &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblQuantity}&lt;/th&gt;
                            &lt;th class=&quot;textAlignRight&quot;&gt;{!lblUnitPrice}&lt;/th&gt;
                            &lt;th class=&quot;textAlignCenter&quot;&gt;{!lblTaxCode}&lt;/th&gt;
                            &lt;th class=&quot;textAlignRight&quot;&gt;{!lblTaxValue}&lt;/th&gt;
                            &lt;th class=&quot;textAlignRight widthMedium&quot;&gt;{!lblnetValue}&lt;/th&gt;
                        &lt;/tr&gt;
                    &lt;/thead&gt;
                &lt;/apex:outputText&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;apex:outputText value=&quot;{0,number,0}&quot;&gt;
                             &lt;apex:param value=&quot;{!line.c2g__LineNumber__c}&quot;/&gt; 
                        &lt;/apex:outputText&gt;
                    &lt;/td&gt;
                    &lt;td&gt;
                        {!line.c2g__Product__r.Name}&lt;br/&gt;
                        &lt;span class=&quot;description&quot;&gt;{!lblproductCode}: {!line.c2g__Product__r.ProductCode}&lt;/span&gt;
                        &lt;span class=&quot;description&quot;&gt;{!line.c2g__LineDescription__c}&lt;/span&gt;
                        &lt;ffbext:salesinvoicecustomfield salesInvoice=&quot;{!salesInvoice}&quot; headerFields=&quot;false&quot; lineId=&quot;{!line.Id}&quot; customFieldsVar=&quot;CustomFields1&quot;&gt;
                            &lt;apex:repeat value=&quot;{!CustomFields1}&quot; var=&quot;customField&quot;&gt;
                                &lt;span class=&quot;description&quot;&gt;{!customField.fieldName}: {!customField.fieldValue}&lt;/span&gt;
                            &lt;/apex:repeat&gt;
                         &lt;/ffbext:salesinvoicecustomfield&gt;
                    &lt;/td&gt;
                    &lt;td class=&quot;textAlignRight&quot;&gt;
                        &lt;apex:outputText value=&quot;{0,number,0.00}&quot;&gt;
                             &lt;apex:param value=&quot;{!line.c2g__Quantity__c}&quot;/&gt; 
                        &lt;/apex:outputText&gt;              
                    &lt;/td&gt;
                    &lt;td class=&quot;textAlignRight widthMedium&quot;&gt;
                        &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                             {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!line.c2g__UnitPrice__c}&quot;/&gt; 
                        &lt;/apex:outputText&gt;              
                    &lt;/td&gt;
                    &lt;apex:outputText rendered=&quot;{!taxType==&apos;SUT&apos;}&quot;&gt;
                        &lt;td&gt;
                            {!line.c2g__TaxCode1__r.Name}
                        &lt;/td&gt;
                        &lt;td class=&quot;textAlignRight&quot;&gt;
                            &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!line.c2g__TaxValueTotal__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;
                        &lt;/td&gt;
                        &lt;td class=&quot;textAlignRight&quot;&gt;
                            &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!line.c2g__NetValue__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;
                       &lt;/td&gt;
                    &lt;/apex:outputText&gt;
                    &lt;apex:outputText rendered=&quot;{!taxType==&apos;VAT&apos;}&quot;&gt;
                        &lt;td&gt;
                            {!line.c2g__TaxCode1__r.Name}
                        &lt;/td&gt;
                        &lt;td class=&quot;textAlignRight&quot;&gt;
                            &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!line.c2g__TaxValueTotal__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;
                        &lt;/td&gt;
                        &lt;td class=&quot;textAlignRight widthMedium&quot;&gt;
                            &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!line.c2g__NetValue__c}&quot;/&gt;
                            &lt;/apex:outputText&gt;
                       &lt;/td&gt;

                    &lt;/apex:outputText&gt;
                &lt;/tr&gt;
            &lt;/ffbext:salesinvoicelinesorter&gt;

            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td class=&quot;noPadding&quot;&gt;                    
                        &lt;!-- Tax Summary --&gt;
                        &lt;ffbext:salesinvoicetaxtotals salesInvoice=&quot;{!salesInvoice}&quot; summariesVar=&quot;TaxSummaries&quot;&gt;
                            &lt;apex:dataTable value=&quot;{!TaxSummaries}&quot; var=&quot;TaxSummary&quot; styleClass=&quot;boxed tableTaxSummary&quot; headerClass=&quot;textAlignCenter&quot;&gt;
                                &lt;apex:facet name=&quot;header&quot;&gt;{!lbltaxsummary}&lt;/apex:facet&gt;  
                                &lt;apex:column headerClass=&quot;textAlignCenter widthMedium&quot;  styleClass=&quot;alignTop textAlignCenter widthMedium&quot;&gt;
                                    &lt;apex:facet name=&quot;header&quot;&gt;{!lblTaxCode}&lt;/apex:facet&gt;
                                    &lt;apex:outputText &gt;
                                        {!TaxSummary.taxCode}
                                    &lt;/apex:outputText&gt;
                                &lt;/apex:column&gt;

                                &lt;apex:column headerClass=&quot;textAlignCenter widthMedium&quot; styleClass=&quot;alignTop textAlignCenter widthMedium&quot; rendered=&quot;{!taxType==&apos;VAT&apos;}&quot;&gt;
                                    &lt;apex:facet name=&quot;header&quot;&gt;{!lbltaxRate}&lt;/apex:facet&gt;
                                    &lt;apex:outputText &gt;
                                        {!TaxSummary.taxRate}
                                    &lt;/apex:outputText&gt;
                                &lt;/apex:column&gt;

                                &lt;apex:column headerClass=&quot;textAlignCenter widthMedium&quot; styleClass=&quot;alignTop textAlignCenter widthMedium&quot; rendered=&quot;{!taxType==&apos;VAT&apos;}&quot;&gt;
                                    &lt;apex:facet name=&quot;header&quot;&gt;{!lblnetValue}&lt;/apex:facet&gt;
                                    &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,###.00}&quot;&gt;
                                        {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!TaxSummary.netValue}&quot;/&gt;
                                    &lt;/apex:outputText&gt;
                                &lt;/apex:column&gt;

                                &lt;apex:column headerClass=&quot;textAlignCenter widthMedium&quot; styleClass=&quot;alignTop textAlignCenter widthMedium&quot;&gt;
                                    &lt;apex:facet name=&quot;header&quot;&gt;{!lbltaxValue}&lt;/apex:facet&gt;
                                    &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                        {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!TaxSummary.taxValue}&quot;/&gt;
                                    &lt;/apex:outputText&gt;
                                &lt;/apex:column&gt;
                            &lt;/apex:dataTable&gt;
                        &lt;/ffbext:salesinvoicetaxtotals&gt;                  
                    &lt;/td&gt;

                    &lt;!-- Summary Values --&gt;
                    &lt;td class=&quot;alignTop noPadding&quot;&gt;
                        &lt;table class=&quot;boxed boxedNoTop boxedNoBottom&quot;&gt;
                            &lt;tr&gt;
                                &lt;th class=&quot;nobg noLines textAlignRight&quot;&gt;{!lblInvoiceNetTotal}&lt;/th&gt;
                                &lt;td class=&quot;textAlignRight widthMedium boxedNoTop&quot; style=&quot;width:100px&quot;&gt; 
                                    &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,###.00}&quot;&gt;
                                        {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!salesInvoice.c2g__NetTotal__c}&quot;/&gt;
                                    &lt;/apex:outputText&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;th class=&quot;nobg noLines textAlignRight&quot;&gt;{!lblInvoiceTaxTotal}&lt;/th&gt;
                                &lt;td class=&quot;textAlignRight widthMedium&quot;&gt;
                                    &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                        {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!salesInvoice.c2g__TaxTotal__c}&quot;/&gt;
                                    &lt;/apex:outputText&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;th class=&quot;nobg noLines textAlignRight&quot;&gt;{!lblInvoiceTotal}&lt;/th&gt;
                                &lt;td class=&quot;textAlignRight widthMedium&quot;&gt;
                                    &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,###.00}&quot;&gt;
                                        {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!salesInvoice.c2g__InvoiceTotal__c}&quot;/&gt;
                                    &lt;/apex:outputText&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;

           &lt;!-- Discount Summary --&gt;    
           &lt;ffbext:salesinvoicediscount transId=&quot;{!salesInvoice.c2g__Transaction__c}&quot; anyValueVar=&quot;anyValue&quot; discountSummariesVar=&quot;DiscountSummaries&quot;&gt;
                    &lt;table class=&quot;tableDescription&quot;&gt;
                        &lt;tr&gt;
                            &lt;td class=&quot;noPadding&quot;&gt;                    
                                    &lt;apex:dataTable value=&quot;{!DiscountSummaries}&quot; var=&quot;DiscountSummary&quot;  styleClass=&quot;boxed noBottomMargin textAlignCenter&quot; headerClass=&quot;textAlignCenter&quot;&gt;
                                        &lt;apex:facet name=&quot;header&quot;&gt;{!lblsettlementdiscounts}&lt;/apex:facet&gt;
                                        &lt;apex:column headerClass=&quot;textAlignCenter&quot; styleClass=&quot;alignTop textAlignCenter widthMedium&quot;&gt;
                                            &lt;apex:facet name=&quot;header&quot;&gt;{!lblpaymentdate}&lt;/apex:facet&gt;
                                                &lt;apex:outputText value=&quot;{0,date,dd/MM/yyyy}&quot;&gt;
                                                    &lt;apex:param value=&quot;{!DiscountSummary.discountDate}&quot;/&gt;
                                                &lt;/apex:outputText&gt;  
                                        &lt;/apex:column&gt;

                                        &lt;apex:column headerClass=&quot;textAlignCenter&quot; styleClass=&quot;alignTop textAlignCenter widthMedium&quot; &gt;
                                            &lt;apex:facet name=&quot;header&quot;&gt;{!lblValue}&lt;/apex:facet&gt;
                                            &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,##0.00}&quot;&gt;
                                                {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!DiscountSummary.discountValue}&quot;/&gt;
                                            &lt;/apex:outputText&gt;  
                                        &lt;/apex:column&gt;
                                    &lt;/apex:dataTable&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
           &lt;/ffbext:salesinvoicediscount&gt;                   

            &lt;!-- PAYMENT SCHEDULES --&gt;
            &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__PaymentSchedule__c!=&apos;&apos;}&quot; layout=&quot;block&quot;&gt;    
                &lt;ffbext:salesinvoiceschedulelinesorter salesInvoice=&quot;{!salesInvoice}&quot; var=&quot;line&quot; &gt;
                    &lt;table class=&quot;tableDescription&quot;&gt;
                        &lt;tr&gt;
                            &lt;td class=&quot;noPadding&quot;&gt;                    
                                &lt;apex:dataTable value=&quot;{!line}&quot; var=&quot;installmentLineItem&quot; styleClass=&quot;boxed&quot; headerClass=&quot;textaligncenter&quot; style=&quot;width:40%&quot;&gt;
                                    &lt;apex:facet name=&quot;header&quot;&gt;{!lblPaymentSchedules}&lt;/apex:facet&gt;

                                    &lt;apex:column styleClass=&quot;textAlignCenter&quot; headerClass=&quot;textaligncenter&quot;&gt;
                                        &lt;apex:facet name=&quot;header&quot;&gt;&amp;nbsp;&lt;/apex:facet&gt;
                                        &lt;apex:outputText value=&quot;{0,number,0}&quot;&gt;
                                            &lt;apex:param value=&quot;{!installmentLineItem.c2g__LineNumber__c}&quot;/&gt;
                                        &lt;/apex:outputText&gt;
                                    &lt;/apex:column&gt;

                                    &lt;apex:column headerClass=&quot;textaligncenter&quot;&gt;
                                        &lt;apex:facet name=&quot;header&quot;&gt;
                                            {!lblPaymentSchedulesDueDate}
                                        &lt;/apex:facet&gt;
                                        &lt;apex:outputText value=&quot;{0,date,M/d/yyyy}&quot; rendered=&quot;{!taxType==&apos;SUT&apos;}&quot;&gt;
                                            &lt;apex:param value=&quot;{!installmentLineItem.c2g__DueDate__c}&quot;/&gt;
                                        &lt;/apex:outputText&gt;
                                        &lt;apex:outputText value=&quot;{0,date,d/M/yyyy}&quot; rendered=&quot;{!taxType==&apos;VAT&apos;}&quot;&gt;
                                            &lt;apex:param value=&quot;{!installmentLineItem.c2g__DueDate__c}&quot;/&gt;
                                        &lt;/apex:outputText&gt;
                                    &lt;/apex:column&gt;

                                    &lt;apex:column styleClass=&quot;textAlignRight&quot;  headerClass=&quot;textaligncenter&quot;&gt;
                                        &lt;apex:facet name=&quot;header&quot;&gt;
                                            &lt;apex:outputPanel &gt;{!lblPaymentSchedulesAmount}&lt;/apex:outputPanel&gt;
                                        &lt;/apex:facet&gt;
                                        &lt;apex:outputText value=&quot;{0,number,#,###,###,###,###,###.00}&quot;&gt;
                                            {!invoiceCurrencySymbol}&lt;apex:param value=&quot;{!installmentLineItem.c2g__Amount__c}&quot;/&gt;
                                        &lt;/apex:outputText&gt;
                                    &lt;/apex:column&gt;
                                &lt;/apex:dataTable&gt;                       
                               &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/ffbext:salesinvoiceschedulelinesorter&gt;
                &lt;/apex:outputPanel&gt;

            &lt;!-- Custom Fields --&gt; 
            &lt;div class=&quot;hspacer&quot;&gt;&lt;/div&gt;
            &lt;apex:outputpanel &gt;    
                &lt;ffbext:salesinvoicecustomfield salesInvoice=&quot;{!salesInvoice}&quot; headerFields=&quot;true&quot; customFieldsVar=&quot;CustomFields2&quot;&gt;
                    &lt;table style=&quot;width:405px&quot; class=&quot;boxed tableAdditional&quot;&gt;
                        &lt;tr&gt;
                            &lt;th colspan=&quot;2&quot; style=&quot;headerpadding rightline aligncenter&quot;&gt;Additional Information&lt;/th&gt;
                        &lt;/tr&gt;
                        &lt;apex:repeat value=&quot;{!CustomFields2}&quot; var=&quot;customField&quot;&gt;
                            &lt;tr&gt;
                              &lt;td style=&quot;alignleft bottomline boxed boxedtop&quot;&gt;{!customField.fieldName}&lt;/td&gt;
                              &lt;td style=&quot;alignleft bottomline boxed boxedtop&quot;&gt;{!customField.fieldValue}&lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/apex:repeat&gt;
                    &lt;/table&gt;
                 &lt;/ffbext:salesinvoicecustomfield&gt;
            &lt;/apex:outputpanel&gt;            

            &lt;!-- Description --&gt;
            &lt;apex:outputPanel rendered=&quot;{!salesInvoice.c2g__InvoiceDescription__c!=&apos;&apos;}&quot; layout=&quot;block&quot;&gt;
                &lt;table class=&quot;boxed tableDescription&quot;&gt;
                    &lt;tr&gt;
                        &lt;th class=&quot;textAlignLeft&quot;&gt;{!lblInvoiceDescription}&lt;/th&gt;
                    &lt;/tr&gt;

                    &lt;tr&gt;
                        &lt;td&gt;{!salesInvoice.c2g__InvoiceDescription__c}&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/table&gt;
            &lt;/apex:outputPanel&gt;

            &lt;!-- Printed Text  --&gt;
            &lt;table class=&quot;tableDescription&quot;&gt;
                    &lt;ffbext:salesinvoicetext salesInvoice=&quot;{!salesInvoice}&quot; textSummariesVar=&quot;TextSummaries&quot;&gt;
                            &lt;apex:repeat value=&quot;{!TextSummaries}&quot; var=&quot;textSummary&quot;&gt;
                                &lt;tr&gt;
                                    &lt;th style=&quot;width:68%&quot; class=&quot;boxed boxedtop&quot; &gt;{!textSummary.textHeader}&lt;/th&gt;
                                    &lt;td&gt;&lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;tr&gt;
                                    &lt;td class=&quot;boxed&quot; style=&quot;width:68%&quot;&gt;
                                            &lt;apex:outputText escape=&quot;false&quot; value=&quot;{!textSummary.textValue}&quot;/&gt;
                                        &lt;/td&gt;
                                    &lt;td&gt;&lt;/td&gt;    
                                &lt;/tr&gt;
                                &lt;/apex:repeat&gt;
                     &lt;/ffbext:salesinvoicetext&gt;                  
                &lt;/table&gt;

        &lt;/div&gt;

        &lt;!-- As the following fields are not directly or explicitly referenced elsewhere, 
             the following hidden, but explicit references are needed to ensure they are loaded --&gt;
        &lt;apex:outputText rendered=&quot;false&quot;&gt;
        {!salesInvoice.c2g__TaxCode2__c}
        {!salesInvoice.c2g__Transaction__c}
        {!salesInvoice.c2g__PrintedText1Heading__c}
        {!salesInvoice.c2g__PrintedText1Text__c}
        {!salesInvoice.c2g__PrintedText2Heading__c}
        {!salesInvoice.c2g__PrintedText2Text__c}
        {!salesInvoice.c2g__PrintedText3Heading__c}
        {!salesInvoice.c2g__PrintedText3Text__c}
        {!salesInvoice.c2g__PrintedText4Heading__c}
        {!salesInvoice.c2g__PrintedText4Text__c}
        {!salesInvoice.c2g__PrintedText5Heading__c}
        {!salesInvoice.c2g__PrintedText5Text__c}
        {!salesInvoice.c2g__InvoiceInstallmentLineItems__r}
        &lt;/apex:outputText&gt;

        &lt;!-- ************************* END COPY / PASTE HERE ******************************** --&gt;       

&lt;/apex:page&gt;</sf:Markup></records><size>1</size></result></queryResponse></soapenv:Body></soapenv:Envelope>
Updating existing member
{"Body": "<apex:page standardController=\"c2g__codaInvoice__c\"  showHeader=\"false\" sidebar=\"false\" standardStylesheets=\"false\"  renderas=\"{!if($CurrentPage.parameters.p == null, null, 'pdf')}\">\n\n        <!-- Sales Invoice reference for the following VF markup  -->\n        <apex:variable var=\"salesInvoice\" value=\"{!c2g__codaInvoice__c}\"/>\n        \n        <!-- ************************* BEGIN COPY / PASTE HERE ******************************** -->\n        \n        <!-- Styles -->\n        <apex:variable var=\"styleFontColor\"                         value=\"#000000\" />\n        <apex:variable var=\"styleHeaderBGColor\"                     value=\"#E4EAF4\" />\n        <apex:variable var=\"styleHeaderFontColor\"                   value=\"#000000\" />\n        <apex:variable var=\"styleLineColor\"                         value=\"#3B5E91\" />\n        <head>\n            <style type=\"text/css\">\n                body,td,th, h1 {\n                font-family:Verdana, Arial, Helvetica, sans-serif;\n                font-size:7.5pt;\n                color:{!styleFontColor};\n                }\n            \n                .email table{\n                width:100%;\n                border-collapse:collapse;\n                margin-bottom:10px;\n                }\n            \n                .email table.tableSummary{\n                width:250px;\n                }\n            \n                .email table.tableDescription{\n                width:68%;\n                margin-top:10px;\n                margin-bottom:5px;\n                }\n                \n                .email table.noBottomMargin{\n                margin-bottom:0px;\n                }\n                \n                .email table.tableTaxSummary, .email table.tableAdditional {\n                margin-top:10px;\n                margin-bottom:0px;\n                }\n            \n                .email table h1{\n                font-size:20px;\n                font-weight:700;\n                text-transform:uppercase;\n                text-align:right;\n                margin:0;\n                }\n            \n                .email table td,\n                .email table th{\n                padding:5px;\n                }\n                .email table th{\n                background-color:{!styleHeaderBGColor};\n                color:{!styleHeaderFontColor};\n                }\n            \n                .email table th.nobg{\n                background-color:transparent;\n                color:{!styleFontColor};\n                }\n            \n                .email table td.noPadding{\n                padding:0px;\n                }\n                .email table td.noPaddingLeft{\n                padding-left:0px;\n                }\n            \n                .email table td.alignTop{\n                vertical-align:top;\n                }\n            \n                .email table .textAlignLeft{\n                text-align:left;\n                }\n                .email table .textAlignCenter{\n                text-align:center;\n                }\n                .email table .textAlignRight{\n                text-align:right;\n                }\n            \n                .email table.boxed{\n                border-left:1px solid {!styleLineColor};\n                border-top:1px solid {!styleLineColor};\n                }\n            \n                .email table.boxed th, .email table.boxed td{\n                border-left:1px solid {!styleLineColor};\n                border-top:1px solid {!styleLineColor};\n                }\n            \n                .email table.boxedNoTop{\n                border-top:none;\n                border-left:none;\n                }\n                \n                .email table.boxedNoBottom{\n                border-bottom:none;\n                }\n                \n                .email table.boxedNoTop td.boxedNoTop{\n                border-top:none ;\n                }\n            \n                .email table.boxed th{\n                border-right:1px solid {!styleLineColor};\n                border-bottom:1px solid {!styleLineColor};\n                }\n            \n                .email table.boxed th.noLines{\n                border-right:1px solid {!styleLineColor};\n                border-left:none;\n                border-top:none;\n                border-bottom:none;\n                }\n            \n                .email table.boxed td{\n                border-right:1px solid {!styleLineColor};\n                border-bottom:1px solid {!styleLineColor};\n                }\n            \n                .email table.boxed td.widthLineNumbers{width:15pt;}\n                .email table.boxed td.widthSmall{width:45pt;}\n                .email table.boxed td.widthMedium{width:75pt;}\n                \n                .widthMedium{width:75pt;}\n            \n                .email table.boxed td span.description{\n                font-size:85%;\n                font-style:italic;\n                display:block;\n                }\n                \n                .boxedtop {\n                border-top:1px solid {!styleLineColor};\n                }\n                    \n                .boxed {\n                border-left:1px solid {!styleLineColor};\n                border-right:1px solid {!styleLineColor};\n                border-bottom:1px solid {!styleLineColor};\n                }\n                \n                table { page-break-inside:auto }\n                tr    { page-break-inside:avoid; page-break-after:auto }\n                \n                @page {\n                    @bottom-right {content:\"Page \" counter(page) \" of \" counter(pages);\n                               font-family:Verdana, Arial, Helvetica, sans-serif;\n                               font-size:7.5pt;\n                               font-weight:bold;\n                               padding-bottom;25px;\n                  }\n                }\n              </style>\n        </head>\n        \n        <!-- RECORD TYPE -->\n        <apex:variable var=\"taxType\" value=\"{!salesInvoice.c2g__OwnerCompany__r.RecordType.Name}\"/>\n    \n        <!-- LABEL VARIABLES -->\n    \n        <!-- Invoice Title -->\n        <apex:variable var=\"lblInvoice\"                     value=\"INVOICE\" />\n    \n        <!-- Company info -->\n        <apex:variable var=\"lblPhone\"                       value=\"Phone: \" />\n        <apex:variable var=\"lblFax\"                         value=\"Fax: \" />\n        <apex:variable var=\"lblVATRegistrationNumber\"       value=\"VAT Registration Number: \" />\n    \n        <!-- Invoice Header -->\n        <apex:variable var=\"lblBillingAddress\"              value=\"Billing Address\" />\n        <apex:variable var=\"lblShippingAddress\"             value=\"Shipping Address\" />\n        <apex:variable var=\"lblInvoiceGroup\"                value=\"Invoice Group\" />\n        <apex:variable var=\"lblInvoiceNumber\"               value=\"Invoice Number\" />\n        <apex:variable var=\"lblInvoiceDate\"                 value=\"Invoice Date\" />\n        <apex:variable var=\"lblCustomerVATNumber\"           value=\"Customer Vat Number\" />\n        <apex:variable var=\"lblCustomerReference\"           value=\"Customer Reference\" />\n        <apex:variable var=\"lblShippingMethod\"              value=\"Shipping Method\" />\n        <apex:variable var=\"lblInvoiceCurrency\"             value=\"Invoice Currency\" />\n        <apex:variable var=\"lblDueDate\"                     value=\"Due Date\" />\n    \n        <!-- Payment Schedule -->\n        <apex:variable var=\"lblPaymentSchedules\"            value=\"Payment Schedule\" />\n        <apex:variable var=\"lblPaymentSchedulesDueDate\"     value=\"Due Date\" />\n        <apex:variable var=\"lblPaymentSchedulesAmount\"      value=\"Amount\" />\n    \n        <!-- Invoice Description -->\n        <apex:variable var=\"lblInvoiceDescription\"          value=\"Invoice Description\" />\n    \n        <!-- Invoice Lines -->\n        <apex:variable var=\"lblProductName\"                 value=\"Product Name\" />\n        <apex:variable var=\"lblProductCode\"                 value=\"Product Code: \" />\n        <apex:variable var=\"lblQuantity\"                    value=\"Quantity\" />\n        <apex:variable var=\"lblUnitPrice\"                   value=\"Unit Price\" />\n        <apex:variable var=\"lblTaxCode\"                     value=\"Tax Code\" />\n        <apex:variable var=\"lblTaxValue\"                    value=\"Tax Value\" />\n        <apex:variable var=\"lblNetValue\"                    value=\"Net Value\" />\n    \n        <!-- Invoice Total -->\n        <apex:variable var=\"lblInvoiceNetTotal\"             value=\"Net Total\" />\n        <apex:variable var=\"lblInvoiceTaxTotal\"             value=\"Tax Total\" />\n        <apex:variable var=\"lblInvoiceTotal\"                value=\"Invoice Total\" />\n    \n        <!-- Tax Summary -->\n        <apex:variable var=\"lbltaxsummary\"                   value=\"Tax Summary\" />\n        <apex:variable var=\"lbltaxRate\"                      value=\"Tax Rate\" />\n        <apex:variable var=\"lblnetValue\"                    value=\"Net Value\" />\n        <apex:variable var=\"lbltaxValue\"                    value=\"Tax Value\" />\n        <apex:variable var=\"lblproductCode\"                 value=\"Product Code\" />\n        \n        <!-- Discount Summary -->\n        <apex:variable var=\"lblsettlementdiscounts\"      value=\"Settlement Discounts\" />\n        <apex:variable var=\"lblpaymentdate\"              value=\"Payment Date\" />\n        <apex:variable var=\"lblValue\"                    value=\"Value\" />\n        \n        <!-- Currency Symbol -->\n        <apex:variable var=\"invoiceCurrencySymbol\" value=\"\"/>\n        <apex:variable var=\"invoiceFormat0dp\" value=\"\"/>\n        <apex:variable var=\"invoiceFormat2dp\" value=\"\"/>\n        <ffbext:currencysymbol iso=\"{!salesInvoice.c2g__InvoiceCurrency__r.Name}\" symbolVar=\"invoiceCurrencySymbol\" />\n    \n        <div class=\"email\">\n\n            <!-- LOGO -->\n            <table>\n                <tr>\n                    <td>\n                        <apex:outputPanel rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__LogoURL__c != ''}\">\n                            <img src=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__LogoURL__c}\"/>\n                        </apex:outputPanel>\n                    </td>\n                    <td>\n                        <h1>{!lblInvoice}</h1>\n                    </td>\n                </tr>\n            </table>\n    \n            <!-- COMPANY DETAILS -->\n            <table>\n                <tr>\n                    <td>\n                        <div>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Street__c},&nbsp;\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Street__c!=''}\" escape=\"false\"/>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__City__c},&nbsp;\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__City__c!=''}\" escape=\"false\"/>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__StateProvince__c},&nbsp;\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__StateProvince__c!=''}\" escape=\"false\"/>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__ZipPostCode__c},&nbsp;\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__ZipPostCode__c!=''}\" escape=\"false\"/>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Country__c}\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Country__c!=''}\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"{!lblPhone}{!salesInvoice.c2g__OwnerCompany__r.c2g__Phone__c}&nbsp;\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Phone__c!=''}\" escape=\"false\"/>\n                            <apex:outputText value=\"{!lblFax}{!salesInvoice.c2g__OwnerCompany__r.c2g__Fax__c}\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Fax__c!=''}\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"{!lblVATRegistrationNumber}{!salesInvoice.c2g__OwnerCompany__r.c2g__ECCountryCode__c}{!salesInvoice.c2g__OwnerCompany__r.c2g__VATRegistrationNumber__c}\" rendered=\"{!taxType=='VAT'}\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Website__c}\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__Website__c!=''}\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__ContactEmail__c}\" rendered=\"{!salesInvoice.c2g__OwnerCompany__r.c2g__ContactEmail__c!=''}\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"&nbsp;\" escape=\"false\"/>\n                        </div>\n                        <div>\n                            <apex:outputText value=\"&nbsp;\" escape=\"false\"/>\n                        </div>\n                    </td>\n                </tr>\n            </table>\n    \n            <!-- INVOICE ADDRESS AND INFORMATION-->\n            <table>\n                <tr>\n                    <th class=\"nobg textAlignLeft\">{!lblBillingAddress}</th>\n                    <th class=\"nobg textAlignLeft\">{!lblShippingAddress}</th>\n                    <td rowspan=\"2\" class=\"alignTop\">\n    \n                        <!-- SUT -->\n                        <apex:outputPanel rendered=\"{!taxType=='SUT'}\" layout=\"none\">\n                            <table  class=\"boxed\">\n                                <tr>\n                                    <th class=\"textAlignRight\">{!lblInvoiceNumber}</th>\n                                    <td>{!salesInvoice.Name}</td>\n                                </tr>\n                                <tr>\n                                    <th class=\"textAlignRight\">{!lblInvoiceDate}</th>\n                                    <td>\n                                        <apex:outputText value=\"{0,date,MM/dd/yyyy}\">\n                                            <apex:param value=\"{!salesInvoice.c2g__InvoiceDate__c}\"/>\n                                        </apex:outputText>\n                                    </td>\n                                </tr>\n                            </table>\n                        </apex:outputPanel>\n    \n                        <!-- VAT -->\n                        <apex:outputPanel rendered=\"{!taxType=='VAT'}\" layout=\"none\">\n                            <apex:outputPanel rendered=\"{!salesInvoice.c2g__InvoiceGroup__r.Name!=''}\">\n                                <table class=\"boxed\">\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblInvoiceGroup}</th>\n                                        <td>{!salesInvoice.c2g__InvoiceGroup__r.Name}</td>\n                                    </tr>\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblInvoiceNumber}</th>\n                                        <td>{!salesInvoice.Name}</td>\n                                    </tr>\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblInvoiceDate}</th>\n                                        <td>\n                                            <apex:outputText value=\"{0,date,dd/MM/yyyy}\">\n                                                <apex:param value=\"{!salesInvoice.c2g__InvoiceDate__c}\"/>\n                                            </apex:outputText>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblCustomerVATNumber}</th>\n                                        <td>\n                                            <apex:outputText value=\"{!salesInvoice.c2g__Account__r.c2g__CODAECCountryCode__c}{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c}\" rendered=\"{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c!=''}\"/>\n                                        </td>\n                                    </tr>\n                                </table>\n                            </apex:outputPanel>\n                            <apex:outputPanel rendered=\"{!salesInvoice.c2g__InvoiceGroup__r.Name == ''}\">\n                                <table class=\"boxed\">\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblInvoiceNumber}</th>\n                                        <td>{!salesInvoice.Name}</td>\n                                    </tr>\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblInvoiceDate}</th>\n                                        <td>\n                                            <apex:outputText value=\"{0,date,dd/MM/yyyy}\">\n                                                <apex:param value=\"{!salesInvoice.c2g__InvoiceDate__c}\"/>\n                                            </apex:outputText>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <th class=\"textAlignRight\">{!lblCustomerVATNumber}</th>\n                                        <td>\n                                            <apex:outputText value=\"{!salesInvoice.c2g__Account__r.c2g__CODAECCountryCode__c}{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c}\" rendered=\"{!salesInvoice.c2g__Account__r.c2g__CODAVATRegistrationNumber__c!=''}\"/>\n                                        </td>\n                                    </tr>\n                                </table>\n                            </apex:outputPanel> \n                        </apex:outputPanel>\n                    </td>\n                </tr>\n                <tr>\n                    <td class=\"alignTop\">\n                        <p>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.Name!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.Name}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.BillingStreet!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.BillingStreet}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.BillingCity!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.BillingCity}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.BillingState!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.BillingState}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.BillingPostalCode!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.BillingPostalCode}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.BillingCountry!=''}\" escape=\"false\">{!salesInvoice.c2g__Account__r.BillingCountry}</apex:outputText>\n                        </p>\n                    </td>\n                    <td class=\"alignTop\">\n                        <p>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.Name!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.Name}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.ShippingStreet!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.ShippingStreet}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.ShippingCity!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.ShippingCity}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.ShippingState!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.ShippingState}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.ShippingPostalCode!=''}\" escape=\"false\">\n                                {!salesInvoice.c2g__Account__r.ShippingPostalCode}<br/>\n                            </apex:outputText>\n                            <apex:outputText rendered=\"{!salesInvoice.c2g__Account__r.ShippingCountry!=''}\" escape=\"false\">{!salesInvoice.c2g__Account__r.ShippingCountry}</apex:outputText>\n                        </p>\n                    </td>\n                </tr>\n            </table>\n    \n            <!-- INVOICE DETAILS -->\n            <table class=\"boxed\">\n                <tr>\n                    <th class=\"textAlignCenter\">{!lblCustomerReference}</th>\n                    <th class=\"textAlignCenter\">{!lblShippingMethod}</th>\n                    <th class=\"textAlignCenter\">{!lblInvoiceCurrency}</th>\n                    <th class=\"textAlignCenter\">{!lblDueDate}</th>\n                </tr>\n                <tr>\n                    <td class=\"textAlignCenter\">{!salesInvoice.c2g__CustomerReference__c}</td>\n                    <td class=\"textAlignCenter\">{!salesInvoice.c2g__ShippingMethod__c}</td>\n                    <td class=\"textAlignCenter\">{!salesInvoice.c2g__InvoiceCurrency__r.Name}</td>\n                    <td class=\"textAlignCenter\">\n                        <apex:outputText value=\"{!salesInvoice.c2g__PaymentSchedule__c}\" rendered=\"{!salesInvoice.c2g__PaymentSchedule__c!=''}\"/>\n                        <apex:outputPanel rendered=\"{!salesInvoice.c2g__PaymentSchedule__c==''}\">\n                            <apex:outputText value=\"{0,date,M/d/yyyy}\" rendered=\"{!taxType=='SUT'}\">\n                                <apex:param value=\"{!salesInvoice.c2g__DueDate__c}\"/>\n                            </apex:outputText>\n    \n                            <apex:outputText value=\"{0,date,d/M/yyyy}\" rendered=\"{!taxType=='VAT'}\">\n                                <apex:param value=\"{!salesInvoice.c2g__DueDate__c}\"/>\n                            </apex:outputText>\n                        </apex:outputPanel>\n                    </td>\n                </tr>\n            </table>\n    \n            <!-- As the following fields are not directly or explicitly referenced elsewhere, \n                 the following hidden, but explicit references are needed to ensure they are loaded -->\n            <apex:repeat value=\"{!salesInvoice.c2g__InvoiceLineItems__r}\" var=\"line\" rendered=\"false\">\n                <apex:outputText rendered=\"false\">\n                {!line.c2g__LineNumber__c} {!line.c2g__Product__r.Name} {!line.c2g__Product__r.ProductCode} {!line.c2g__LineDescription__c}\n                {!line.c2g__Quantity__c} {!line.c2g__UnitPrice__c} {!line.c2g__NetValue__c} {!line.c2g__TaxValueTotal__c}\n                {!line.c2g__TaxCode1__c} {!line.c2g__TaxCode2__c} {!line.c2g__TaxCode3__c}\n                {!line.c2g__TaxRate1__c} {!line.c2g__TaxRate2__c} {!line.c2g__TaxRate3__c}\n                {!line.c2g__TaxCode1__r.Name} {!line.c2g__TaxCode2__r.Name} {!line.c2g__TaxCode3__r.Name}\n                {!line.c2g__TaxValue1__c}{!line.c2g__TaxValue2__c}{!line.c2g__TaxValue3__c}\n                </apex:outputText>\n            </apex:repeat>\n            \n            <apex:repeat value=\"{!salesInvoice.c2g__InvoiceInstallmentLineItems__r}\" var=\"line\" rendered=\"false\">\n                <apex:outputText rendered=\"false\">\n                {!line.c2g__LineNumber__c} {!line.c2g__DueDate__c} {!line.c2g__Amount__c} \n                </apex:outputText> \n            </apex:repeat>          \n                \n            <!-- INVOICE LINES -->\n            <apex:variable var=\"lineNumber\" value=\"{!0}\" />\n            <ffbext:salesinvoicelinesorter salesInvoice=\"{!salesInvoice}\" var=\"line\" styleClass=\"boxed noBottomMargin\">\n                <apex:variable var=\"lineNumber\" value=\"{!lineNumber+1}\" />\n                <apex:outputText rendered=\"{!lineNumber==1}\">\n                    <thead>\n                        <tr>\n                            <th>&nbsp;</th>\n                            <th class=\"textAlignCenter\">{!lblProductName}</th>\n                            <th class=\"textAlignCenter\">{!lblQuantity}</th>\n                            <th class=\"textAlignRight\">{!lblUnitPrice}</th>\n                            <th class=\"textAlignCenter\">{!lblTaxCode}</th>\n                            <th class=\"textAlignRight\">{!lblTaxValue}</th>\n                            <th class=\"textAlignRight widthMedium\">{!lblnetValue}</th>\n                        </tr>\n                    </thead>\n                </apex:outputText>\n                <tr>\n                    <td>\n                        <apex:outputText value=\"{0,number,0}\">\n                             <apex:param value=\"{!line.c2g__LineNumber__c}\"/> \n                        </apex:outputText>\n                    </td>\n                    <td>\n                        {!line.c2g__Product__r.Name}<br/>\n                        <span class=\"description\">{!lblproductCode}: {!line.c2g__Product__r.ProductCode}</span>\n                        <span class=\"description\">{!line.c2g__LineDescription__c}</span>\n                        <ffbext:salesinvoicecustomfield salesInvoice=\"{!salesInvoice}\" headerFields=\"false\" lineId=\"{!line.Id}\" customFieldsVar=\"CustomFields1\">\n                            <apex:repeat value=\"{!CustomFields1}\" var=\"customField\">\n                                <span class=\"description\">{!customField.fieldName}: {!customField.fieldValue}</span>\n                            </apex:repeat>\n                         </ffbext:salesinvoicecustomfield>\n                    </td>\n                    <td class=\"textAlignRight\">\n                        <apex:outputText value=\"{0,number,0.00}\">\n                             <apex:param value=\"{!line.c2g__Quantity__c}\"/> \n                        </apex:outputText>              \n                    </td>\n                    <td class=\"textAlignRight widthMedium\">\n                        <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                             {!invoiceCurrencySymbol}<apex:param value=\"{!line.c2g__UnitPrice__c}\"/> \n                        </apex:outputText>              \n                    </td>\n                    <apex:outputText rendered=\"{!taxType=='SUT'}\">\n                        <td>\n                            {!line.c2g__TaxCode1__r.Name}\n                        </td>\n                        <td class=\"textAlignRight\">\n                            <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                {!invoiceCurrencySymbol}<apex:param value=\"{!line.c2g__TaxValueTotal__c}\"/>\n                            </apex:outputText>\n                        </td>\n                        <td class=\"textAlignRight\">\n                            <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                {!invoiceCurrencySymbol}<apex:param value=\"{!line.c2g__NetValue__c}\"/>\n                            </apex:outputText>\n                       </td>\n                    </apex:outputText>\n                    <apex:outputText rendered=\"{!taxType=='VAT'}\">\n                        <td>\n                            {!line.c2g__TaxCode1__r.Name}\n                        </td>\n                        <td class=\"textAlignRight\">\n                            <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                {!invoiceCurrencySymbol}<apex:param value=\"{!line.c2g__TaxValueTotal__c}\"/>\n                            </apex:outputText>\n                        </td>\n                        <td class=\"textAlignRight widthMedium\">\n                            <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                {!invoiceCurrencySymbol}<apex:param value=\"{!line.c2g__NetValue__c}\"/>\n                            </apex:outputText>\n                       </td>\n                \n                    </apex:outputText>\n                </tr>\n            </ffbext:salesinvoicelinesorter>\n                        \n            <table>\n                <tr>\n                    <td class=\"noPadding\">                    \n                        <!-- Tax Summary -->\n                        <ffbext:salesinvoicetaxtotals salesInvoice=\"{!salesInvoice}\" summariesVar=\"TaxSummaries\">\n                            <apex:dataTable value=\"{!TaxSummaries}\" var=\"TaxSummary\" styleClass=\"boxed tableTaxSummary\" headerClass=\"textAlignCenter\">\n                                <apex:facet name=\"header\">{!lbltaxsummary}</apex:facet>  \n                                <apex:column headerClass=\"textAlignCenter widthMedium\"  styleClass=\"alignTop textAlignCenter widthMedium\">\n                                    <apex:facet name=\"header\">{!lblTaxCode}</apex:facet>\n                                    <apex:outputText >\n                                        {!TaxSummary.taxCode}\n                                    </apex:outputText>\n                                </apex:column>\n        \n                                <apex:column headerClass=\"textAlignCenter widthMedium\" styleClass=\"alignTop textAlignCenter widthMedium\" rendered=\"{!taxType=='VAT'}\">\n                                    <apex:facet name=\"header\">{!lbltaxRate}</apex:facet>\n                                    <apex:outputText >\n                                        {!TaxSummary.taxRate}\n                                    </apex:outputText>\n                                </apex:column>\n        \n                                <apex:column headerClass=\"textAlignCenter widthMedium\" styleClass=\"alignTop textAlignCenter widthMedium\" rendered=\"{!taxType=='VAT'}\">\n                                    <apex:facet name=\"header\">{!lblnetValue}</apex:facet>\n                                    <apex:outputText value=\"{0,number,#,###,###,###,###,###.00}\">\n                                        {!invoiceCurrencySymbol}<apex:param value=\"{!TaxSummary.netValue}\"/>\n                                    </apex:outputText>\n                                </apex:column>\n        \n                                <apex:column headerClass=\"textAlignCenter widthMedium\" styleClass=\"alignTop textAlignCenter widthMedium\">\n                                    <apex:facet name=\"header\">{!lbltaxValue}</apex:facet>\n                                    <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                        {!invoiceCurrencySymbol}<apex:param value=\"{!TaxSummary.taxValue}\"/>\n                                    </apex:outputText>\n                                </apex:column>\n                            </apex:dataTable>\n                        </ffbext:salesinvoicetaxtotals>                  \n                    </td>\n    \n                    <!-- Summary Values -->\n                    <td class=\"alignTop noPadding\">\n                        <table class=\"boxed boxedNoTop boxedNoBottom\">\n                            <tr>\n                                <th class=\"nobg noLines textAlignRight\">{!lblInvoiceNetTotal}</th>\n                                <td class=\"textAlignRight widthMedium boxedNoTop\" style=\"width:100px\"> \n                                    <apex:outputText value=\"{0,number,#,###,###,###,###,###.00}\">\n                                        {!invoiceCurrencySymbol}<apex:param value=\"{!salesInvoice.c2g__NetTotal__c}\"/>\n                                    </apex:outputText>\n                                </td>\n                            </tr>\n                            <tr>\n                                <th class=\"nobg noLines textAlignRight\">{!lblInvoiceTaxTotal}</th>\n                                <td class=\"textAlignRight widthMedium\">\n                                    <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                        {!invoiceCurrencySymbol}<apex:param value=\"{!salesInvoice.c2g__TaxTotal__c}\"/>\n                                    </apex:outputText>\n                                </td>\n                            </tr>\n                            <tr>\n                                <th class=\"nobg noLines textAlignRight\">{!lblInvoiceTotal}</th>\n                                <td class=\"textAlignRight widthMedium\">\n                                    <apex:outputText value=\"{0,number,#,###,###,###,###,###.00}\">\n                                        {!invoiceCurrencySymbol}<apex:param value=\"{!salesInvoice.c2g__InvoiceTotal__c}\"/>\n                                    </apex:outputText>\n                                </td>\n                            </tr>\n                        </table>\n                    </td>\n                </tr>\n            </table>\n           \n           <!-- Discount Summary -->    \n           <ffbext:salesinvoicediscount transId=\"{!salesInvoice.c2g__Transaction__c}\" anyValueVar=\"anyValue\" discountSummariesVar=\"DiscountSummaries\">\n                    <table class=\"tableDescription\">\n                        <tr>\n                            <td class=\"noPadding\">                    \n                                    <apex:dataTable value=\"{!DiscountSummaries}\" var=\"DiscountSummary\"  styleClass=\"boxed noBottomMargin textAlignCenter\" headerClass=\"textAlignCenter\">\n                                        <apex:facet name=\"header\">{!lblsettlementdiscounts}</apex:facet>\n                                        <apex:column headerClass=\"textAlignCenter\" styleClass=\"alignTop textAlignCenter widthMedium\">\n                                            <apex:facet name=\"header\">{!lblpaymentdate}</apex:facet>\n                                                <apex:outputText value=\"{0,date,dd/MM/yyyy}\">\n                                                    <apex:param value=\"{!DiscountSummary.discountDate}\"/>\n                                                </apex:outputText>  \n                                        </apex:column>\n                \n                                        <apex:column headerClass=\"textAlignCenter\" styleClass=\"alignTop textAlignCenter widthMedium\" >\n                                            <apex:facet name=\"header\">{!lblValue}</apex:facet>\n                                            <apex:outputText value=\"{0,number,#,###,###,###,###,##0.00}\">\n                                                {!invoiceCurrencySymbol}<apex:param value=\"{!DiscountSummary.discountValue}\"/>\n                                            </apex:outputText>  \n                                        </apex:column>\n                                    </apex:dataTable>\n                            </td>\n                        </tr>\n                    </table>\n           </ffbext:salesinvoicediscount>                   \n            \n            <!-- PAYMENT SCHEDULES -->\n            <apex:outputPanel rendered=\"{!salesInvoice.c2g__PaymentSchedule__c!=''}\" layout=\"block\">    \n                <ffbext:salesinvoiceschedulelinesorter salesInvoice=\"{!salesInvoice}\" var=\"line\" >\n                    <table class=\"tableDescription\">\n                        <tr>\n                            <td class=\"noPadding\">                    \n                                <apex:dataTable value=\"{!line}\" var=\"installmentLineItem\" styleClass=\"boxed\" headerClass=\"textaligncenter\" style=\"width:40%\">\n                                    <apex:facet name=\"header\">{!lblPaymentSchedules}</apex:facet>\n                    \n                                    <apex:column styleClass=\"textAlignCenter\" headerClass=\"textaligncenter\">\n                                        <apex:facet name=\"header\">&nbsp;</apex:facet>\n                                        <apex:outputText value=\"{0,number,0}\">\n                                            <apex:param value=\"{!installmentLineItem.c2g__LineNumber__c}\"/>\n                                        </apex:outputText>\n                                    </apex:column>\n                    \n                                    <apex:column headerClass=\"textaligncenter\">\n                                        <apex:facet name=\"header\">\n                                            {!lblPaymentSchedulesDueDate}\n                                        </apex:facet>\n                                        <apex:outputText value=\"{0,date,M/d/yyyy}\" rendered=\"{!taxType=='SUT'}\">\n                                            <apex:param value=\"{!installmentLineItem.c2g__DueDate__c}\"/>\n                                        </apex:outputText>\n                                        <apex:outputText value=\"{0,date,d/M/yyyy}\" rendered=\"{!taxType=='VAT'}\">\n                                            <apex:param value=\"{!installmentLineItem.c2g__DueDate__c}\"/>\n                                        </apex:outputText>\n                                    </apex:column>\n                    \n                                    <apex:column styleClass=\"textAlignRight\"  headerClass=\"textaligncenter\">\n                                        <apex:facet name=\"header\">\n                                            <apex:outputPanel >{!lblPaymentSchedulesAmount}</apex:outputPanel>\n                                        </apex:facet>\n                                        <apex:outputText value=\"{0,number,#,###,###,###,###,###.00}\">\n                                            {!invoiceCurrencySymbol}<apex:param value=\"{!installmentLineItem.c2g__Amount__c}\"/>\n                                        </apex:outputText>\n                                    </apex:column>\n                                </apex:dataTable>                       \n                               </td>\n                        </tr>\n                    </table>\n                </ffbext:salesinvoiceschedulelinesorter>\n                </apex:outputPanel>\n\n            <!-- Custom Fields --> \n            <div class=\"hspacer\"></div>\n            <apex:outputpanel >    \n                <ffbext:salesinvoicecustomfield salesInvoice=\"{!salesInvoice}\" headerFields=\"true\" customFieldsVar=\"CustomFields2\">\n                    <table style=\"width:405px\" class=\"boxed tableAdditional\">\n                        <tr>\n                            <th colspan=\"2\" style=\"headerpadding rightline aligncenter\">Additional Information</th>\n                        </tr>\n                        <apex:repeat value=\"{!CustomFields2}\" var=\"customField\">\n                            <tr>\n                              <td style=\"alignleft bottomline boxed boxedtop\">{!customField.fieldName}</td>\n                              <td style=\"alignleft bottomline boxed boxedtop\">{!customField.fieldValue}</td>\n                            </tr>\n                        </apex:repeat>\n                    </table>\n                 </ffbext:salesinvoicecustomfield>\n            </apex:outputpanel>            \n            \n            <!-- Description -->\n            <apex:outputPanel rendered=\"{!salesInvoice.c2g__InvoiceDescription__c!=''}\" layout=\"block\">\n                <table class=\"boxed tableDescription\">\n                    <tr>\n                        <th class=\"textAlignLeft\">{!lblInvoiceDescription}</th>\n                    </tr>\n    \n                    <tr>\n                        <td>{!salesInvoice.c2g__InvoiceDescription__c}</td>\n                    </tr>\n                </table>\n            </apex:outputPanel>\n    \n            <!-- Printed Text  -->\n            <table class=\"tableDescription\">\n                    <ffbext:salesinvoicetext salesInvoice=\"{!salesInvoice}\" textSummariesVar=\"TextSummaries\">\n                            <apex:repeat value=\"{!TextSummaries}\" var=\"textSummary\">\n                                <tr>\n                                    <th style=\"width:68%\" class=\"boxed boxedtop\" >{!textSummary.textHeader}</th>\n                                    <td></td>\n                                </tr>\n                                <tr>\n                                    <td class=\"boxed\" style=\"width:68%\">\n                                            <apex:outputText escape=\"false\" value=\"{!textSummary.textValue}\"/>\n                                        </td>\n                                    <td></td>    \n                                </tr>\n                                </apex:repeat>\n                     </ffbext:salesinvoicetext>                  \n                </table>\n\n        </div>\n        \n        <!-- As the following fields are not directly or explicitly referenced elsewhere, \n             the following hidden, but explicit references are needed to ensure they are loaded -->\n        <apex:outputText rendered=\"false\">\n        {!salesInvoice.c2g__TaxCode2__c}\n        {!salesInvoice.c2g__Transaction__c}\n        {!salesInvoice.c2g__PrintedText1Heading__c}\n        {!salesInvoice.c2g__PrintedText1Text__c}\n        {!salesInvoice.c2g__PrintedText2Heading__c}\n        {!salesInvoice.c2g__PrintedText2Text__c}\n        {!salesInvoice.c2g__PrintedText3Heading__c}\n        {!salesInvoice.c2g__PrintedText3Text__c}\n        {!salesInvoice.c2g__PrintedText4Heading__c}\n        {!salesInvoice.c2g__PrintedText4Text__c}\n        {!salesInvoice.c2g__PrintedText5Heading__c}\n        {!salesInvoice.c2g__PrintedText5Text__c}\n        {!salesInvoice.c2g__InvoiceInstallmentLineItems__r}\n        </apex:outputText>\n                \n        <!-- ************************* END COPY / PASTE HERE ******************************** -->       \n    \n</apex:page>", "ContentEntityId": "066J0000000Dj13IAC", "MetadataContainerId": "1dcJ00000004o8sIAA"}
Starting new HTTPS connection (1): cs10.salesforce.com
"POST /services/data/v29.0/tooling/sobjects/ApexPageMember HTTP/1.1" 400 None
----> post to tooling member failed
Starting new HTTPS connection (1): cs10.salesforce.com
"PATCH /services/data/v29.0/tooling/sobjects/ApexPageMember/402J0000000DFvD HTTP/1.1" 204 0
{"IsRunTests": false, "MetadataContainerId": "1dcJ00000004o8sIAA", "IsCheckOnly": false}
Starting new HTTPS connection (1): cs10.salesforce.com
"POST /services/data/v29.0/tooling/sobjects/ContainerAsyncRequest HTTP/1.1" 201 None
Starting new HTTPS connection (1): cs10.salesforce.com
"GET /services/data/v29.0/tooling/query/?q=Select+Id%2C+MetadataContainerId%2C+MetadataContainerMemberId%2C+State%2C+IsCheckOnly%2C+CompilerErrors%2C+ErrorMsg+FROM+ContainerAsyncRequest+WHERE+Id%3D%271drJ0000000QQwSIAW%27 HTTP/1.1" 200 None
Starting new HTTPS connection (1): cs10.salesforce.com
"GET /services/data/v29.0/tooling/query/?q=Select+Id%2C+MetadataContainerId%2C+MetadataContainerMemberId%2C+State%2C+IsCheckOnly%2C+CompilerErrors%2C+ErrorMsg+FROM+ContainerAsyncRequest+WHERE+Id%3D%271drJ0000000QQwSIAW%27 HTTP/1.1" 200 None
---------------------
result from command execution
{"MetadataContainerId": "1dcJ00000004o8sIAA", "ErrorMsg": null, "CompilerErrors": "[{\"id\":\"066J0000000Dj13IAC\",\"name\":\"SigndealzSalesInvoicePrint\",\"line\":1,\"problem\":\"common.apex.runtime.bytecode.BytecodeExecutionContext cannot be cast to common.apex.runtime.impl.Execution\",\"extent\":\"ApexPage\"}]", "IsCheckOnly": false, "State": "Failed", "MetadataContainerMemberId": null, "attributes": {"url": "/services/data/v29.0/tooling/sobjects/ContainerAsyncRequest/1drJ0000000QQwSIAW", "type": "ContainerAsyncRequest"}, "Id": "1drJ0000000QQwSIAW"}
<type 'str'>
---------------------

---------------------
RESPONDING TO REQUEST
---------------------

{"MetadataContainerId": "1dcJ00000004o8sIAA", "ErrorMsg": null, "CompilerErrors": "[{\"id\":\"066J0000000Dj13IAC\",\"name\":\"SigndealzSalesInvoicePrint\",\"line\":1,\"problem\":\"common.apex.runtime.bytecode.BytecodeExecutionContext cannot be cast to common.apex.runtime.impl.Execution\",\"extent\":\"ApexPage\"}]", "IsCheckOnly": false, "State": "Failed", "MetadataContainerMemberId": null, "attributes": {"url": "/services/data/v29.0/tooling/sobjects/ContainerAsyncRequest/1drJ0000000QQwSIAW", "type": "ContainerAsyncRequest"}, "Id": "1drJ0000000QQwSIAW"}
joeferraro commented 10 years ago

Does it compile in the Developer Console?

alan-birchenough commented 10 years ago

No it doesn't. Same error.

On Tue, May 27, 2014 at 3:43 PM, Joe Ferraro notifications@github.comwrote:

Does it compile in the Developer Console?

— Reply to this email directly or view it on GitHubhttps://github.com/joeferraro/MavensMate-SublimeText/issues/384#issuecomment-44332656 .

joeferraro commented 10 years ago

then it's a Tooling API issue. To workaround the issue for now, toggle mm_compile_with_tooling_api to false. This will force MavensMate to use the metadata API (which the Salesforce UI uses).

alan-birchenough commented 10 years ago

I guess that points the finger clearly at our friends at Salesforce and not at Mavensmate.

alan-birchenough commented 10 years ago

OK - I will do that. Thanks.

joeferraro commented 10 years ago

:+1: