From ed8206cbce3d1b293f4f5e613def48aed6584d4b Mon Sep 17 00:00:00 2001 From: Laurent LE CORRE Date: Sat, 28 Mar 2020 09:46:23 +0100 Subject: [PATCH] =?UTF-8?q?Evolution=20n=C2=B00000019=20pour=20remise=20en?= =?UTF-8?q?=20page=20des=20factures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translations/fr-FR/ShopPdf.fr-FR.xlf | 15 ++-- web/classes/pdf/HTMLTemplateInvoice.php | 10 +-- web/pdf/invoice.product-tab.tpl | 43 ++++++----- web/pdf/invoice.total-tab.tpl | 73 ++++++++++--------- web/pdf/invoice.tpl | 2 +- 5 files changed, 80 insertions(+), 63 deletions(-) diff --git a/web/app/Resources/translations/fr-FR/ShopPdf.fr-FR.xlf b/web/app/Resources/translations/fr-FR/ShopPdf.fr-FR.xlf index 28b968a84..a56d41b77 100644 --- a/web/app/Resources/translations/fr-FR/ShopPdf.fr-FR.xlf +++ b/web/app/Resources/translations/fr-FR/ShopPdf.fr-FR.xlf @@ -190,7 +190,7 @@ Total Tax - Taxe totale + TVA totale Line: 40 @@ -244,17 +244,17 @@ Total Products - Total produits + Total produits (TTC) Line: 29 Total Discounts - Total Réductions + Réductions TTC Line: 40 Shipping Costs - Frais de livraison + Frais de port TTC Line: 51 @@ -272,6 +272,11 @@ Total (HT) Line: 74 + + Total (Tax incl.) + Total (TTC) + + Total Total @@ -322,7 +327,7 @@ Qty - Quantité + Qté Line: 31 diff --git a/web/classes/pdf/HTMLTemplateInvoice.php b/web/classes/pdf/HTMLTemplateInvoice.php index 525527e5f..8c32af873 100644 --- a/web/classes/pdf/HTMLTemplateInvoice.php +++ b/web/classes/pdf/HTMLTemplateInvoice.php @@ -114,19 +114,19 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate 'width' => 15, ), 'product' => array( - 'width' => 40, + 'width' => 42, ), 'quantity' => array( - 'width' => 8, + 'width' => 4, ), 'tax_code' => array( - 'width' => 8, + 'width' => 7, ), 'unit_price_tax_excl' => array( - 'width' => 0, + 'width' => 11, ), 'total_tax_excl' => array( - 'width' => 0, + 'width' => 10, ), ); diff --git a/web/pdf/invoice.product-tab.tpl b/web/pdf/invoice.product-tab.tpl index 6e8bfba7f..7ba614c08 100644 --- a/web/pdf/invoice.product-tab.tpl +++ b/web/pdf/invoice.product-tab.tpl @@ -22,21 +22,20 @@ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - +
- - + {if isset($layout.before_discount)} {/if} - + - + @@ -60,7 +59,7 @@ {/if} - @@ -69,14 +68,15 @@ {$order_detail.product_name} {/if} - - + @@ -89,12 +89,21 @@ {/if} {/if} - + + + + @@ -131,7 +140,7 @@ ({if $customization.quantity == 0}1{else}{$customization.quantity}{/if}) - {assign var=end value=($layout._colCount-3)} + {assign var=end value=($layout._colCount-2)} {for $var=0 to $end} - {/if} - - {/foreach} diff --git a/web/pdf/invoice.total-tab.tpl b/web/pdf/invoice.total-tab.tpl index 04a8227a9..d90d2f7d1 100644 --- a/web/pdf/invoice.total-tab.tpl +++ b/web/pdf/invoice.total-tab.tpl @@ -24,15 +24,49 @@ *}
{l s='Reference' d='Shop.Pdf' pdf='true'} {l s='Product' d='Shop.Pdf' pdf='true'}{l s='Unit Price' d='Shop.Pdf' pdf='true'}
{l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}
{l s='Unit Price' d='Shop.Pdf' pdf='true'}
{l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}
{l s='Tax Rate' d='Shop.Pdf' pdf='true'}{l s='Base price' d='Shop.Pdf' pdf='true'}
{l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}
{l s='Unit Price' d='Shop.Pdf' pdf='true'}
{l s='(Tax Incl.)' d='Shop.Pdf' pdf='true'}
{l s='Qty' d='Shop.Pdf' pdf='true'}{l s='Total' d='Shop.Pdf' pdf='true'}
{l s='(Tax excl.)' d='Shop.Pdf' pdf='true'}
{l s='Total' d='Shop.Pdf' pdf='true'}
{l s='(Tax Incl.)' d='Shop.Pdf' pdf='true'}
  + {$order_detail.product_name}
+ + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl_including_ecotax} {if $order_detail.ecotax_tax_excl > 0}
{{displayPrice currency=$order->id_currency price=$order_detail.ecotax_tax_excl}|string_format:{l s='ecotax: %s' d='Shop.Pdf' pdf='true'}} {/if}
{$order_detail.order_detail_tax_label} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl_including_ecotax} + {if $order_detail.ecotax_tax_incl > 0} +
+ {{displayPrice currency=$order->id_currency price=$order_detail.ecotax_tax_incl}|string_format:{l s='ecotax: %s' d='Shop.Pdf' pdf='true'}} + {/if} +
{$order_detail.product_quantity} - {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}
-- @@ -142,26 +151,26 @@ {/foreach} {/foreach} + {/foreach} - {assign var="shipping_discount_tax_incl" value="0"} {foreach from=$cart_rules item=cart_rule name="cart_rules_loop"} {if $smarty.foreach.cart_rules_loop.first}
- {l s='Discounts' d='Shop.Pdf' pdf='true'} + + {l s='Total Discounts' d='Shop.Pdf' pdf='true'}
+ {$cart_rule.name} - - {displayPrice currency=$order->id_currency price=$cart_rule.value_tax_excl} + + - {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
+ + + + + + {if $footer.total_taxes > 0} + + + + + {/if} + {if !$order->isVirtual()} + + + + + {/if} + {if $footer.product_discounts_tax_excl > 0} @@ -40,25 +74,11 @@ {l s='Total Discounts' d='Shop.Pdf' pdf='true'} {/if} - {if !$order->isVirtual()} - - - - - {/if} {if $footer.wrapping_tax_excl > 0} @@ -69,30 +89,13 @@ {/if} - - - - - {if $footer.total_taxes > 0} - - - - - {/if} +
+ {l s='Total (Tax excl.)' d='Shop.Pdf' pdf='true'} + + {displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_excl} +
+ {l s='Total Tax' d='Shop.Pdf' pdf='true'} + + {displayPrice currency=$order->id_currency price=$footer.total_taxes} +
{l s='Total Products' d='Shop.Pdf' pdf='true'} - {displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_excl} + {displayPrice currency=$order->id_currency price=$footer.products_before_discounts_tax_incl}
+ {l s='Shipping Costs' d='Shop.Pdf' pdf='true'} + + {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} +
- - {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_excl} + - {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
- {l s='Shipping Costs' d='Shop.Pdf' pdf='true'} - - {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} -
- {l s='Total (Tax excl.)' d='Shop.Pdf' pdf='true'} - - {displayPrice currency=$order->id_currency price=$footer.total_paid_tax_excl} -
- {l s='Total Tax' d='Shop.Pdf' pdf='true'} - - {displayPrice currency=$order->id_currency price=$footer.total_taxes} -
- {l s='Total' d='Shop.Pdf' pdf='true'} + {l s='Total (Tax incl.)' d='Shop.Pdf' pdf='true'} {displayPrice currency=$order->id_currency price=$footer.total_paid_tax_incl}
diff --git a/web/pdf/invoice.tpl b/web/pdf/invoice.tpl index 04e929fd5..3b530601e 100644 --- a/web/pdf/invoice.tpl +++ b/web/pdf/invoice.tpl @@ -82,7 +82,7 @@ - {$tax_tab} +{* {$tax_tab}*}