DELETE T
--SELECT	*
FROM	pal_Template T
WHERE	templateName IN ('Statement Sales Body','Statement Sales Header')

INSERT [dbo].[pal_Template] ( [templateTypeId], [templateName], [templateContent]) VALUES ( 7, N'Statement Sales Body', N'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
    <head>
        <title>Invoice</title>
        <style type="text/css">
            td, a
            {
            font-family: Calibri;
            font-size: 11px;
            text-decoration: none;
            color: #000000;
            }
            .heading
            {
            font-size: 18px;
            font-weight: bold;
            }
            .title
            {
            font-size: 11px;
            }
            .titleAccount
            {
            font-size: 12px;
            }
            .titleDue
            {
            font-size: 16px;
            font-weight: bold;
            text-transform: uppercase;
            }
            .footer
            {
            text-align: center;
            font-size: 10px;
            }
        </style>
    </head>
    <body>
        {AccountLines}<br />
        {Totals}<br />
        {FootNotes}
    </body>
</html>')
GO
INSERT [dbo].[pal_Template] ([templateTypeId], [templateName], [templateContent]) VALUES ( 7, N'Statement Sales Header', N'<style type="text/css">
    .heading {
    font-size: large;
    color: #595959;
    }
    .subheading{
    font-size: medium;
    color: #595959;
    }
    .full {
    width: 100%;
    }
    .half {
    width: 50%;
    }
    .third {
    width: 33.3%;
    }
    .fourth {
    width: 25%;
    }
    .right {
    text-align: right;
    }
    .spacer {
    height: 20px;
    }
    .shim {
    height: 10px;
    }
    div {
    position: relative;
    float: left;
    }
</style>
<table class="full" cellpadding="0" cellspacing="0" border="0">
    <tbody>
        <tr>
            <td>{logo}</td>
            <td class="half heading right"><span style="font-family: ''MS Sans Serif'';">{heading}</span></td>
        </tr>
    </tbody>
</table>
<table>
    <tbody>
        <tr>
            <td class="spacer"></td>
        </tr>
    </tbody>
</table>
<table class="full" cellpadding="0" cellspacing="0" border="0">
    <tbody>
        <tr>
            <td class="third subheading"><span style="font-family: ''MS Sans Serif'';">TO</span></td>
            <td class="third subheading"><span style="font-family: ''MS Sans Serif'';">FROM</span></td>
            <td class="third" rowspan="3"><span style="font-family: ''MS Sans Serif'';">
            {QuoteNum}
            {QuoteDate}
            {InvoiceNum}
            {InvoiceDate}{ReceiptNum} {ReceiptDate} {StatementDate}
            {AccountNumber}
            {Reference}
            </span></td>
        </tr>
        <tr>
            <td><span style="font-family: ''MS Sans Serif'';">
            <strong>{oSales.title} {oSales.name} {oSales.surname}</strong><br />
            {oSales.postalAddress}
            </span></td>
            <td><span style="font-family: ''MS Sans Serif'';">
            <strong>{oSetup.customer}</strong><br />
            {oSetup.postalStreet}<br />
            {oSetup.postalSuburb}<br />
            {oSetup.postalCity}<br />
            {oSetup.postalCode}<br />
            </span></td>
        </tr>
        <tr>
            <td><span style="font-family: ''MS Sans Serif'';">
            <strong>{VATNumberLabel}</strong><br />
            {oSales.vatNum}
            </span></td>
            <td><span style="font-family: ''MS Sans Serif'';">
            <strong>{SetupVATNumberLabel}</strong><br />
            {oSetup.vatNum}
            </span></td>
        </tr>
    </tbody>
</table>')
GO
