Evolution n°0000019 pour remise en page des factures

This commit is contained in:
2020-03-28 09:46:23 +01:00
parent 239479d854
commit ed8206cbce
5 changed files with 80 additions and 63 deletions

View File

@@ -190,7 +190,7 @@
<body> <body>
<trans-unit id="b602e0d0c6a72053d0a5be60cb2f8126" approved="yes"> <trans-unit id="b602e0d0c6a72053d0a5be60cb2f8126" approved="yes">
<source>Total Tax</source> <source>Total Tax</source>
<target xml:lang="fr" state="translated">Taxe totale</target> <target xml:lang="fr" state="translated">TVA totale</target>
<note>Line: 40</note> <note>Line: 40</note>
</trans-unit> </trans-unit>
<trans-unit id="ad0d28cdd9113d3ce911bc064b137cde" approved="yes"> <trans-unit id="ad0d28cdd9113d3ce911bc064b137cde" approved="yes">
@@ -244,17 +244,17 @@
<body> <body>
<trans-unit id="b0f79042ac83c64f3ccc42268c8ade26" approved="yes"> <trans-unit id="b0f79042ac83c64f3ccc42268c8ade26" approved="yes">
<source>Total Products</source> <source>Total Products</source>
<target xml:lang="fr" state="translated">Total produits</target> <target xml:lang="fr" state="translated">Total produits (TTC)</target>
<note>Line: 29</note> <note>Line: 29</note>
</trans-unit> </trans-unit>
<trans-unit id="dd704458c6b79d0e86d171f1523918c3" approved="yes"> <trans-unit id="dd704458c6b79d0e86d171f1523918c3" approved="yes">
<source>Total Discounts</source> <source>Total Discounts</source>
<target xml:lang="fr" state="translated">Total Réductions</target> <target xml:lang="fr" state="translated">Réductions TTC</target>
<note>Line: 40</note> <note>Line: 40</note>
</trans-unit> </trans-unit>
<trans-unit id="f54bdce4ab4d26c259216da67b9d6431" approved="yes"> <trans-unit id="f54bdce4ab4d26c259216da67b9d6431" approved="yes">
<source>Shipping Costs</source> <source>Shipping Costs</source>
<target xml:lang="fr" state="translated">Frais de livraison</target> <target xml:lang="fr" state="translated">Frais de port TTC</target>
<note>Line: 51</note> <note>Line: 51</note>
</trans-unit> </trans-unit>
<trans-unit id="b00b85425e74ed2c85dc3119b78ff2c3" approved="yes"> <trans-unit id="b00b85425e74ed2c85dc3119b78ff2c3" approved="yes">
@@ -272,6 +272,11 @@
<target xml:lang="fr" state="translated">Total (HT)</target> <target xml:lang="fr" state="translated">Total (HT)</target>
<note>Line: 74</note> <note>Line: 74</note>
</trans-unit> </trans-unit>
<trans-unit id="eed1808b8206c5a62cc6407f85cf95bc" approved="yes">
<source>Total (Tax incl.)</source>
<target xml:lang="fr" state="translated">Total (TTC)</target>
<note></note>
</trans-unit>
<trans-unit id="96b0141273eabab320119c467cdcaf17" approved="yes"> <trans-unit id="96b0141273eabab320119c467cdcaf17" approved="yes">
<source>Total</source> <source>Total</source>
<target xml:lang="fr" state="translated">Total</target> <target xml:lang="fr" state="translated">Total</target>
@@ -322,7 +327,7 @@
</trans-unit> </trans-unit>
<trans-unit id="03ab340b3f99e03cff9e84314ead38c0" approved="yes"> <trans-unit id="03ab340b3f99e03cff9e84314ead38c0" approved="yes">
<source>Qty</source> <source>Qty</source>
<target xml:lang="fr" state="translated">Quantité</target> <target xml:lang="fr" state="translated">Qté</target>
<note>Line: 31</note> <note>Line: 31</note>
</trans-unit> </trans-unit>
<trans-unit id="adcf8d924285bef43f517d8f6c040e97" approved="yes"> <trans-unit id="adcf8d924285bef43f517d8f6c040e97" approved="yes">

View File

@@ -114,19 +114,19 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
'width' => 15, 'width' => 15,
), ),
'product' => array( 'product' => array(
'width' => 40, 'width' => 42,
), ),
'quantity' => array( 'quantity' => array(
'width' => 8, 'width' => 4,
), ),
'tax_code' => array( 'tax_code' => array(
'width' => 8, 'width' => 7,
), ),
'unit_price_tax_excl' => array( 'unit_price_tax_excl' => array(
'width' => 0, 'width' => 11,
), ),
'total_tax_excl' => array( 'total_tax_excl' => array(
'width' => 0, 'width' => 10,
), ),
); );

View File

@@ -22,21 +22,20 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<table class="product" width="100%" cellpadding="4" cellspacing="0"> <table class="product" width="100%" cellpadding="2" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th class="product header small" width="{$layout.reference.width}%">{l s='Reference' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.reference.width}%">{l s='Reference' d='Shop.Pdf' pdf='true'}</th>
<th class="product header small" width="{$layout.product.width}%">{l s='Product' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.product.width}%">{l s='Product' d='Shop.Pdf' pdf='true'}</th>
<th class="product header-right small" width="{$layout.unit_price_tax_excl.width}%">{l s='Unit Price' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.unit_price_tax_excl.width}%">{l s='Unit Price' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}</th>
<th class="product header small" width="{$layout.tax_code.width}%">{l s='Tax Rate' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.tax_code.width}%">{l s='Tax Rate' d='Shop.Pdf' pdf='true'}</th>
{if isset($layout.before_discount)} {if isset($layout.before_discount)}
<th class="product header small" width="{$layout.unit_price_tax_excl.width}%">{l s='Base price' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.unit_price_tax_excl.width}%">{l s='Base price' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}</th>
{/if} {/if}
<th class="product header small" width="{$layout.unit_price_tax_excl.width}%">{l s='Unit Price' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax Incl.)' d='Shop.Pdf' pdf='true'}</th>
<th class="product header small" width="{$layout.quantity.width}%">{l s='Qty' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.quantity.width}%">{l s='Qty' d='Shop.Pdf' pdf='true'}</th>
<th class="product header-right small" width="{$layout.total_tax_excl.width}%">{l s='Total' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}</th> <th class="product header small" width="{$layout.total_tax_excl.width}%">{l s='Total' d='Shop.Pdf' pdf='true'} <br /> {l s='(Tax Incl.)' d='Shop.Pdf' pdf='true'}</th>
</tr> </tr>
</thead> </thead>
@@ -60,7 +59,7 @@
{/if} {/if}
</td> </td>
<td width="5%">&nbsp;</td> <td width="5%">&nbsp;</td>
<td width="80%"> <td width="75">
{$order_detail.product_name} {$order_detail.product_name}
</td> </td>
</tr> </tr>
@@ -69,14 +68,15 @@
{$order_detail.product_name} {$order_detail.product_name}
{/if} {/if}
</td> </td>
<td class="product right"> <!-- Prix unitaire (HT) //-->
<td class="product center">
{displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl_including_ecotax} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl_including_ecotax}
{if $order_detail.ecotax_tax_excl > 0} {if $order_detail.ecotax_tax_excl > 0}
<br> <br>
<small>{{displayPrice currency=$order->id_currency price=$order_detail.ecotax_tax_excl}|string_format:{l s='ecotax: %s' d='Shop.Pdf' pdf='true'}}</small> <small>{{displayPrice currency=$order->id_currency price=$order_detail.ecotax_tax_excl}|string_format:{l s='ecotax: %s' d='Shop.Pdf' pdf='true'}}</small>
{/if} {/if}
</td> </td>
<!-- Taux de taxe //-->
<td class="product center"> <td class="product center">
{$order_detail.order_detail_tax_label} {$order_detail.order_detail_tax_label}
</td> </td>
@@ -89,12 +89,21 @@
{/if} {/if}
</td> </td>
{/if} {/if}
<!-- Prix unitaire (TTC) //-->
<td class="product center">
{displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl_including_ecotax}
{if $order_detail.ecotax_tax_incl > 0}
<br>
<small>{{displayPrice currency=$order->id_currency price=$order_detail.ecotax_tax_incl}|string_format:{l s='ecotax: %s' d='Shop.Pdf' pdf='true'}}</small>
{/if}
</td>
<!-- Quantité //-->
<td class="product center"> <td class="product center">
{$order_detail.product_quantity} {$order_detail.product_quantity}
</td> </td>
<!-- Total (TTC) //-->
<td class="product right"> <td class="product right">
{displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl_including_ecotax} {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl_including_ecotax}
</td> </td>
</tr> </tr>
@@ -131,7 +140,7 @@
({if $customization.quantity == 0}1{else}{$customization.quantity}{/if}) ({if $customization.quantity == 0}1{else}{$customization.quantity}{/if})
</td> </td>
{assign var=end value=($layout._colCount-3)} {assign var=end value=($layout._colCount-2)}
{for $var=0 to $end} {for $var=0 to $end}
<td class="center"> <td class="center">
-- --
@@ -142,26 +151,26 @@
<!--if !$smarty.foreach.custo_foreach.last--> <!--if !$smarty.foreach.custo_foreach.last-->
{/foreach} {/foreach}
{/foreach} {/foreach}
{/foreach} {/foreach}
<!-- END PRODUCTS --> <!-- END PRODUCTS -->
<!-- CART RULES --> <!-- CART RULES -->
{assign var="shipping_discount_tax_incl" value="0"} {assign var="shipping_discount_tax_incl" value="0"}
{foreach from=$cart_rules item=cart_rule name="cart_rules_loop"} {foreach from=$cart_rules item=cart_rule name="cart_rules_loop"}
{if $smarty.foreach.cart_rules_loop.first} {if $smarty.foreach.cart_rules_loop.first}
<tr class="discount"> <tr class="discount">
<th class="header" colspan="{$layout._colCount}"> <th class="header" colspan="{$layout._colCount + 1}">
{l s='Discounts' d='Shop.Pdf' pdf='true'} {l s='Total Discounts' d='Shop.Pdf' pdf='true'}
</th> </th>
</tr> </tr>
{/if} {/if}
<tr class="discount"> <tr class="discount">
<td class="white right" colspan="{$layout._colCount - 1}"> <td class="white right" colspan="{$layout._colCount - 2}">
{$cart_rule.name} {$cart_rule.name}
</td> </td>
<td class="right white"> <td class="right white" colspan=2>
- {displayPrice currency=$order->id_currency price=$cart_rule.value_tax_excl} - {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}

View File

@@ -24,15 +24,49 @@
*} *}
<table id="total-tab" width="100%"> <table id="total-tab" width="100%">
<tr>
<td class="grey">
{l s='Total (Tax excl.)' d='Shop.Pdf' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_excl}
</td>
</tr>
{if $footer.total_taxes > 0}
<tr>
<td class="grey">
{l s='Total Tax' d='Shop.Pdf' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_taxes}
</td>
</tr>
{/if}
<tr> <tr>
<td class="grey" width="50%"> <td class="grey" width="50%">
{l s='Total Products' d='Shop.Pdf' pdf='true'} {l s='Total Products' d='Shop.Pdf' pdf='true'}
</td> </td>
<td class="white" width="50%"> <td class="white" width="50%">
{displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_excl} {displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_incl}
</td> </td>
</tr> </tr>
{if !$order->isVirtual()}
<tr>
<td class="grey" width="50%">
{l s='Shipping Costs' d='Shop.Pdf' pdf='true'}
</td>
<td class="white" width="50%">
{if $footer.shipping_tax_excl > 0}
{displayPrice currency=$order->id_currency price=$footer.shipping_tax_incl}
{else}
{l s='Free Shipping' d='Shop.Pdf' pdf='true'}
{/if}
</td>
</tr>
{/if}
{if $footer.product_discounts_tax_excl > 0} {if $footer.product_discounts_tax_excl > 0}
<tr> <tr>
@@ -40,25 +74,11 @@
{l s='Total Discounts' d='Shop.Pdf' pdf='true'} {l s='Total Discounts' d='Shop.Pdf' pdf='true'}
</td> </td>
<td class="white" width="50%"> <td class="white" width="50%">
- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_excl} - {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
</td> </td>
</tr> </tr>
{/if} {/if}
{if !$order->isVirtual()}
<tr>
<td class="grey" width="50%">
{l s='Shipping Costs' d='Shop.Pdf' pdf='true'}
</td>
<td class="white" width="50%">
{if $footer.shipping_tax_excl > 0}
{displayPrice currency=$order->id_currency price=$footer.shipping_tax_excl}
{else}
{l s='Free Shipping' d='Shop.Pdf' pdf='true'}
{/if}
</td>
</tr>
{/if}
{if $footer.wrapping_tax_excl > 0} {if $footer.wrapping_tax_excl > 0}
<tr> <tr>
@@ -69,30 +89,13 @@
</tr> </tr>
{/if} {/if}
<tr class="bold">
<td class="grey">
{l s='Total (Tax excl.)' d='Shop.Pdf' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_paid_tax_excl}
</td>
</tr>
{if $footer.total_taxes > 0}
<tr class="bold">
<td class="grey">
{l s='Total Tax' d='Shop.Pdf' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_taxes}
</td>
</tr>
{/if}
<tr class="bold big"> <tr class="bold big">
<td class="grey"> <td class="grey">
{l s='Total' d='Shop.Pdf' pdf='true'} {l s='Total (Tax incl.)' d='Shop.Pdf' pdf='true'}
</td> </td>
<td class="white"> <td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_paid_tax_incl} {displayPrice currency=$order->id_currency price=$footer.total_paid_tax_incl}
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -82,7 +82,7 @@
<!-- Code TVA --> <!-- Code TVA -->
<td colspan="6" class="left"> <td colspan="6" class="left">
{$tax_tab} {* {$tax_tab}*}
</td> </td>
<td colspan="1">&nbsp;</td> <td colspan="1">&nbsp;</td>