Jump to content

PDF Invoice tax details SOLVED


0121stephen

Recommended Posts

Ok, now we have an attachment without any clear question. I quote your question:

 

"I would like to remove the second in the top right of my invoice where my company details appear. "

 

And then I asked

 

"second what?"

 

We cannot just guess your questions. Ask clearly and you get an answer.

Link to comment
Share on other sites

Open the file invoice.tpl from your pdf directory. Quite at the beginning, you should find the fields corresponding to what you want to delete.

Before you make changes, make a copy of the file just in case you have to revert.

Link to comment
Share on other sites

Do you by any change know what piece of code I need to remove?  I have been using trial and error but have been getting nowhere.  The file seems to be pulling data from another my guess is the OrderInvoice.php file but when I remove code from this file I get a 500 error.  Any help is much appreciated.  I have copied the invoice.tpl file below.

 

{*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2016 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{$style_tab}


<table width="100%" id="body" border="0" cellpadding="0" cellspacing="0" style="margin:0;">
    <!-- Invoicing -->
    <tr>
        <td colspan="12">

            {$addresses_tab}

        </td>
    </tr>

    <tr>
        <td colspan="12" height="30"> </td>
    </tr>

    <!-- TVA Info -->
    <tr>
        <td colspan="12">

            {$summary_tab}

        </td>
    </tr>

    <tr>
        <td colspan="12" height="20"> </td>
    </tr>

    <!-- Product -->
    <tr>
        <td colspan="12">

            {$product_tab}

        </td>
    </tr>

    <tr>
        <td colspan="12" height="10"> </td>
    </tr>

    <!-- TVA -->
    <tr>
        <!-- Code TVA -->
        <td colspan="6" class="left">

            {$tax_tab}

        </td>
        <td colspan="1"> </td>
        <!-- Calcule TVA -->
        <td colspan="5" rowspan="5" class="right">

            {$total_tab}

        </td>
    </tr>
    
    {$note_tab}
    
    <tr>
        <td colspan="12" height="10"> </td>
    </tr>

    <tr>
        <td colspan="6" class="left">

            {$payment_tab}

        </td>
        <td colspan="1"> </td>
    </tr>

    <tr>
        <td colspan="6" class="left">

            {$shipping_tab}

        </td>
        <td colspan="1"> </td>
    </tr>

    <tr>
        <td colspan="12" height="10"> </td>
    </tr>

    <tr>
        <td colspan="7" class="left small">

            <table>
                <tr>
                    <td>
                        <p>{$legal_free_text|escape:'html':'UTF-8'|nl2br}</p>
                    </td>
                </tr>
            </table>

        </td>
    </tr>
    <!-- Hook -->
    {if isset($HOOK_DISPLAY_PDF)}
    <tr>
        <td colspan="12" height="30"> </td>
    </tr>

    <tr>
        <td colspan="2"> </td>
        <td colspan="10">
            {$HOOK_DISPLAY_PDF}
        </td>
    </tr>
    {/if}

</table>
 

Link to comment
Share on other sites

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!DOCTYPE HTML>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"><![endif]-->
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"><![endif]-->
<html lang="{$lang_iso}">
    <head>
        <meta charset="utf-8" />
        <title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
        <meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
        <meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}" />
{/if}
        <meta name="generator" content="PrestaShop" />
        <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
        <meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
        <link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />
{if isset($css_files)}
    {foreach from=$css_files key=css_uri item=media}
        <link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
    {/foreach}
{/if}
{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
    {$js_def}
    {foreach from=$js_files item=js_uri}
    <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
    {/foreach}
{/if}
        {$HOOK_HEADER}

        <!--[if IE 8]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso}">
    {if !isset($content_only) || !$content_only}
        {if isset($restricted_country_mode) && $restricted_country_mode}
            <div id="restricted-country">
                <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country|escape:'html':'UTF-8'}</span></p>
            </div>
        {/if}
        <div id="page">
            <div class="header-container">
                <header id="header">
                    <div class="banner">
                        <div class="container">
                            <div class="row">
                                {hook h="displayBanner"}
                            </div>
                        </div>
                    </div>
                    <div class="nav">
                        <div class="container">
                            <div class="row">
                                <nav>{hook h="displayNav"}</nav>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="container">
                            <div class="row">
                                <div id="header_logo">
                                    <a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>
                                </div>
                                {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>
                        </div>
                    </div>
                </header>
            </div>
            <div class="columns-container">
                <div id="columns" class="container">
                    {if $page_name !='index' && $page_name !='pagenotfound'}
                        {include file="$tpl_dir./breadcrumb.tpl"}
                    {/if}
                    <div id="slider_row" class="row">
                        <div id="top_column" class="center_column col-xs-12 col-sm-12">{hook h="displayTopColumn"}</div>
                    </div>
                    <div class="row">
                        {if isset($left_column_size) && !empty($left_column_size)}
                        <div id="left_column" class="column col-xs-12 col-sm-{$left_column_size|intval}">{$HOOK_LEFT_COLUMN}</div>
                        {/if}
                        {if isset($left_column_size) && isset($right_column_size)}{assign var='cols' value=(12 - $left_column_size - $right_column_size)}{else}{assign var='cols' value=12}{/if}
                        <div id="center_column" class="center_column col-xs-12 col-sm-{$cols|intval}">
    {/if}

Link to comment
Share on other sites

Sorry I didn't realise there were two.

 

{*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2016 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}


<table style="width: 100%">
<tr>
    <td style="width: 50%">
        {if $logo_path}
            <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" />
        {/if}
    </td>
    <td style="width: 50%; text-align: right;">
        <table style="width: 100%">
            <tr>
                <td style="font-weight: bold; font-size: 14pt; color: #444; width: 100%;">{if isset($header)}{$header|escape:'html':'UTF-8'|upper}{/if}</td>
            </tr>
            <tr>
                <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'html':'UTF-8'}</td>
            </tr>
            <tr>
                <td style="font-size: 14pt; color: #9E9F9E">{$title|escape:'html':'UTF-8'}</td>
            </tr>
        </table>
    </td>
</tr>
</table>

 

Link to comment
Share on other sites


Okay, I think it did the <> correct this time. Thanks. I have found a file called invoice.addresses-tab.tpl

 

{*

* 2007-2016 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/afl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2016 PrestaShop SA

* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*}

<table id="addresses-tab" cellspacing="0" cellpadding="0">

<tr>

<td width="33%"><span class="bold"> </span><br/><br/>

{if isset($order_invoice)}{$order_invoice->shop_address}{/if}

</td>

<td width="33%">{if $delivery_address}<span class="bold">{l s='Delivery Address' pdf='true'}</span><br/><br/>

{$delivery_address}

{/if}

</td>

<td width="33%"><span class="bold">{l s='Billing Address' pdf='true'}</span><br/><br/>

{$invoice_address}

</td>

</tr>

</table>

 

Link to comment
Share on other sites

Remove only this line

{if isset($order_invoice)}{$order_invoice->shop_address}{/if}

If you do so, the general format and positions remain as they are now.

If you change more, your text positions will change as well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...