I deleted the Original Invoice and Quote PDF manager. How do I get them back?

I was changing the Logo in the PDF editor and somehow deleted the pdf template layout. How can I restore the original out of the box templates for Quote and Invoice?

  • Hi David Dlugosz,

    You should be able to update these directly from the database setting the Deleted = 0 on the 'pdfmanager' table. I am not aware of any way to restore these templates from within Sugar. If you're using an On-Demand instance, please contact our Support team to have this value changed.

    To help you out, here is the HTML from a 7.7 Quote and Invoice template that you can try inserting into a new template:

    Quote:

    <table border="0" cellspacing="2"><tbody><tr><td rowspan="4" width="100%"><img src="./themes/default/images/pdf_logo.jpg" alt="" /></td>
    <td width="60%"><strong>Quote</strong></td>
    <td width="60%"> </td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Quote number:</td>
    <td width="75%">{$fields.quote_num}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Sales Person:</td>
    <td width="75%">{if isset($fields.assigned_user_link.name)}{$fields.assigned_user_link.name}{/if}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Valid until:</td>
    <td width="75%">{$fields.date_quote_expected_closed}</td>
    </tr></tbody></table><p> </p>
    <table style="width:50%;" border="0" cellspacing="2"><tbody><tr style="color:#ffffff;" bgcolor="#4B4B4B"><td>Bill To</td>
    <td>Ship To</td>
    </tr><tr><td>{$fields.billing_contact_name}</td>
    <td>{$fields.shipping_contact_name}</td>
    </tr><tr><td>{$fields.billing_account_name}</td>
    <td>{$fields.shipping_account_name}</td>
    </tr><tr><td>{$fields.billing_address_street}</td>
    <td>{$fields.shipping_address_street}</td>
    </tr><tr><td>{if $fields.billing_address_city!=""}{$fields.billing_address_city},{/if} {if $fields.billing_address_state!=""}{$fields.billing_address_state},{/if} {$fields.billing_address_postalcode}</td>
    <td>{if $fields.shipping_address_city!=""}{$fields.shipping_address_city},{/if} {if $fields.shipping_address_state!=""}{$fields.shipping_address_state},{/if} {$fields.shipping_address_postalcode}</td>
    </tr><tr><td>{$fields.billing_address_country}</td>
    <td>{$fields.shipping_address_country}</td>
    </tr></tbody></table><p> </p>
    {foreach from=$product_bundles item="bundle"}
    <p> </p>
    <h3>{$bundle.name}</h3>
    <table style="width:100%;" border="0"><tbody><tr style="color:#ffffff;" bgcolor="#4B4B4B"><td width="70%">Quantity</td>
    <td width="100%">Part Number</td>
    <td width="100%">Quoted Line Item</td>
    <td width="70%">List Price</td>
    <td width="70%">Unit Price</td>
    <td width="70%">Ext. Price</td>
    <td width="70%">Discount:</td>
    </tr><tr><td width="70%">{if isset($product.quantity)}{$product.quantity}{/if}</td>
    <td width="100%">{if isset($product.mft_part_num)}{$product.mft_part_num}{/if}</td>
    <td width="100%">{if isset($product.name)}{$product.name}{/if}{if isset($product.list_price)}<br />{$product.description}{/if}</td>
    <td align="right" width="70%">{if isset($product.list_price)}{$product.list_price}{/if}</td>
    <td align="right" width="70%">{if isset($product.discount_price)}{$product.discount_price}{/if}</td>
    <td align="right" width="70%">{if isset($product.ext_price)}{$product.ext_price}{/if}</td>
    <td align="right" width="70%">
        {if isset($product.discount_amount)}
            {if !empty($product.discount_select)}
                {sugar_number_format var=$product.discount_amount}%
            {else}
                {sugar_currency_format var=$product.discount_amount currency_id=$product.currency_id}
            {/if}
        {/if}</td>
    </tr></tbody></table><table><tbody><tr><td><hr /></td>
    </tr></tbody></table><table style="width:100%;margin:auto;" border="0"><tbody><tr><td width="100%"> </td>
    <td width="45%">Subtotal:</td>
    <td align="right" width="45%">{$bundle.subtotal}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Discount:</td>
    <td align="right" width="45%">{$bundle.deal_tot}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Discounted Subtotal:</td>
    <td align="right" width="45%">{$bundle.new_sub}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Tax:</td>
    <td align="right" width="45%">{$bundle.tax}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Shipping:</td>
    <td align="right" width="45%">{$bundle.shipping}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Total</td>
    <td align="right" width="45%">{$bundle.total}</td>
    </tr></tbody></table><p> </p>
    <p> </p>
    {/foreach}
    <p> </p>
    <p> </p>
    <table><tbody><tr><td><hr /></td>
    </tr></tbody></table><p> </p>
    <table style="width:100%;margin:auto;" border="0"><tbody><tr><td width="100%"> </td>
    <td style="font-weight:bold;" colspan="2" align="center" width="100%"><b>Grand Total</b></td>
    <td width="75%"> </td>
    <td align="right" width="75%"> </td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Currency:</td>
    <td width="75%">{$fields.currency_iso}</td>
    <td width="75%">Subtotal:</td>
    <td align="right" width="75%">{$fields.subtotal}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td align="right" width="75%"> </td>
    <td width="75%">Discount:</td>
    <td align="right" width="75%">{$fields.deal_tot}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td width="75%"> </td>
    <td width="75%">Discounted Subtotal:</td>
    <td align="right" width="75%">{$fields.new_sub}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Tax Rate:</td>
    <td width="75%">{$fields.taxrate_value}</td>
    <td width="75%">Tax:</td>
    <td align="right" width="75%">{$fields.tax}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Shipping Provider:</td>
    <td width="75%">{$fields.shipper_name}</td>
    <td width="75%">Shipping:</td>
    <td align="right" width="75%">{$fields.shipping}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td width="75%"> </td>
    <td width="75%">Total</td>
    <td align="right" width="75%">{$fields.total}</td>
    </tr></tbody></table><p> </p>
    <table><tbody><tr><td><hr /></td>
    </tr></tbody></table>
    

    Invoice:

    <table border="0" cellspacing="2"><tbody><tr><td rowspan="6" width="100%"><img src="./themes/default/images/pdf_logo.jpg" alt="" /></td>
    <td width="60%"><strong>Invoice</strong></td>
    <td width="60%"> </td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Invoice number:</td>
    <td width="75%">{$fields.quote_num}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Sales Person:</td>
    <td width="75%">{if isset($fields.assigned_user_link.name)}{$fields.assigned_user_link.name}{/if}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Valid until:</td>
    <td width="75%">{$fields.date_quote_expected_closed}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Purchase Order Num:</td>
    <td width="75%">{$fields.purchase_order_num}</td>
    </tr><tr><td bgcolor="#DCDCDC" width="75%">Payment Terms:</td>
    <td width="75%">{$fields.payment_terms}</td>
    </tr></tbody></table><p> </p>
    <table style="width:50%;" border="0" cellspacing="2"><tbody><tr style="color:#ffffff;" bgcolor="#4B4B4B"><td>Bill To</td>
    <td>Ship To</td>
    </tr><tr><td>{$fields.billing_contact_name}</td>
    <td>{$fields.shipping_contact_name}</td>
    </tr><tr><td>{$fields.billing_account_name}</td>
    <td>{$fields.shipping_account_name}</td>
    </tr><tr><td>{$fields.billing_address_street}</td>
    <td>{$fields.shipping_address_street}</td>
    </tr><tr><td>{if $fields.billing_address_city!=""}{$fields.billing_address_city},{/if} {if $fields.billing_address_state!=""}{$fields.billing_address_state},{/if} {$fields.billing_address_postalcode}</td>
    <td>{if $fields.shipping_address_city!=""}{$fields.shipping_address_city},{/if} {if $fields.shipping_address_state!=""}{$fields.shipping_address_state},{/if} {$fields.shipping_address_postalcode}</td>
    </tr><tr><td>{$fields.billing_address_country}</td>
    <td>{$fields.shipping_address_country}</td>
    </tr></tbody></table><p> </p>
    {foreach from=$product_bundles item="bundle"}
    <p> </p>
    <h3>{$bundle.name}</h3>
    <table style="width:100%;" border="0"><tbody><tr style="color:#ffffff;" bgcolor="#4B4B4B"><td width="70%">Quantity</td>
    <td width="100%">Part Number</td>
    <td width="100%">Quoted Line Item</td>
    <td width="70%">List Price</td>
    <td width="70%">Unit Price</td>
    <td width="70%">Ext. Price</td>
    <td width="70%">Discount:</td>
    </tr><tr><td width="70%">{if isset($product.quantity)}{$product.quantity}{/if}</td>
    <td width="100%">{if isset($product.mft_part_num)}{$product.mft_part_num}{/if}</td>
    <td width="100%">{if isset($product.name)}{$product.name}{/if}{if isset($product.list_price)}<br />{$product.description}{/if}</td>
    <td align="right" width="70%">{if isset($product.list_price)}{$product.list_price}{/if}</td>
    <td align="right" width="70%">{if isset($product.discount_price)}{$product.discount_price}{/if}</td>
    <td align="right" width="70%">{if isset($product.ext_price)}{$product.ext_price}{/if}</td>
    <td align="right" width="70%">
        {if isset($product.discount_amount)}
            {if !empty($product.discount_select)}
                {sugar_number_format var=$product.discount_amount}%
            {else}
                {sugar_currency_format var=$product.discount_amount currency_id=$product.currency_id}
            {/if}
        {/if}</td>
    </tr></tbody></table><table><tbody><tr><td><hr /></td>
    </tr></tbody></table><table style="width:100%;margin:auto;" border="0"><tbody><tr><td width="100%"> </td>
    <td width="45%">Subtotal:</td>
    <td align="right" width="45%">{$bundle.subtotal}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Discount:</td>
    <td align="right" width="45%">{$bundle.deal_tot}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Discounted Subtotal:</td>
    <td align="right" width="45%">{$bundle.new_sub}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Tax:</td>
    <td align="right" width="45%">{$bundle.tax}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Shipping:</td>
    <td align="right" width="45%">{$bundle.shipping}</td>
    </tr><tr><td width="100%"> </td>
    <td width="45%">Total</td>
    <td align="right" width="45%">{$bundle.total}</td>
    </tr></tbody></table><p> </p>
    <p> </p>
    {/foreach}
    <p> </p>
    <p> </p>
    <table><tbody><tr><td><hr /></td>
    </tr></tbody></table><p> </p>
    <table style="width:100%;margin:auto;" border="0"><tbody><tr><td width="100%"> </td>
    <td style="font-weight:bold;" colspan="2" align="center" width="100%"><b>Grand Total</b></td>
    <td width="75%"> </td>
    <td align="right" width="75%"> </td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Currency:</td>
    <td width="75%">{$fields.currency_iso}</td>
    <td width="75%">Subtotal:</td>
    <td align="right" width="75%">{$fields.subtotal}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td align="right" width="75%"> </td>
    <td width="75%">Discount:</td>
    <td align="right" width="75%">{$fields.deal_tot}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td width="75%"> </td>
    <td width="75%">Discounted Subtotal:</td>
    <td align="right" width="75%">{$fields.new_sub}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Tax Rate:</td>
    <td width="75%">{$fields.taxrate_value}</td>
    <td width="75%">Tax:</td>
    <td align="right" width="75%">{$fields.tax}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%">Shipping Provider:</td>
    <td width="75%">{$fields.shipper_name}</td>
    <td width="75%">Shipping:</td>
    <td align="right" width="75%">{$fields.shipping}</td>
    </tr><tr><td width="100%"> </td>
    <td width="75%"> </td>
    <td width="75%"> </td>
    <td width="75%">Total</td>
    <td align="right" width="75%">{$fields.total}</td>
    </tr></tbody></table><p> </p>
    <table><tbody><tr><td><hr /></td>
    </tr></tbody></table>
    

    I hope this helps!
    Alex