From 6d640923e0c3e65464943a4dd6ca389a957166f1 Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Wed, 4 Nov 2020 17:33:19 +0100 Subject: [PATCH] Clarification de la facture, avec HT, TTC, remise, FDP... --- local/I18n/fr_FR.php | 7 ++++ templates/pdf/default2020/I18n/fr_FR.php | 17 ++++---- templates/pdf/default2020/invoice.html | 53 +++++++++++++++++------- 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/local/I18n/fr_FR.php b/local/I18n/fr_FR.php index b6251283..77a7d9c4 100644 --- a/local/I18n/fr_FR.php +++ b/local/I18n/fr_FR.php @@ -1,4 +1,11 @@ [ + 'Discount' => 'Remise TTC', + 'Postage' => 'Frais de livraison TTC', + 'Total products with tax' => 'Total matériel TTC', + 'Total taxes' => 'Total taxes', + 'Total with tax' => 'Total TTC', + ], ]; diff --git a/templates/pdf/default2020/I18n/fr_FR.php b/templates/pdf/default2020/I18n/fr_FR.php index ca74d341..fb7919ce 100755 --- a/templates/pdf/default2020/I18n/fr_FR.php +++ b/templates/pdf/default2020/I18n/fr_FR.php @@ -1,6 +1,7 @@ 'Réf. combinaison : ', 'Customer Number' => 'Numéro de client', 'DELIVERY' => 'LIVRAISON', 'Delivery address' => 'Adresse de livraison', @@ -14,20 +15,20 @@ return [ 'Payment module' => 'Module de paiement', 'Phone: ' => 'Tél.: ', 'Postage' => 'Frais de livraison', - 'Postage without tax' => 'Frais de livraison HT', 'Product' => 'Produit', + 'Product ref : ' => 'Réf. produit : ', 'Quantity' => 'Quantité', 'Ref' => 'Réf.', 'Tax' => 'Taxe', - 'Total taxes' => 'Total taxes', 'Taxed total' => 'Total TTC', 'Total' => 'Total', - 'Total with tax' => 'Sous-total matériel TTC', - 'Total without tax' => 'Sous-total matériel HT', + 'Total products with tax' => 'Total products with tax', + 'Total products without tax' => 'Total matériel HT', + 'Total taxes' => 'Total taxes', + 'Total with tax' => 'Total matériel TTC', + 'Total without tax' => 'Sous-total HT', 'Unit taxed price' => 'Prix unitaire TTC', 'Unit. price' => 'Prix unitaire', - 'delivery.imprint' => 'delivery.imprint', - 'invoice.imprint' => 'invoice.imprint', 'page' => 'page', 'product' => 'Produit', -]; +); diff --git a/templates/pdf/default2020/invoice.html b/templates/pdf/default2020/invoice.html index 1242ba98..5f11c0e8 100644 --- a/templates/pdf/default2020/invoice.html +++ b/templates/pdf/default2020/invoice.html @@ -237,6 +237,9 @@

{intl l="Quantity"}

{intl l="Taxed total"}

+ + {$totalItemsPriceWtTaxes = 0} + {loop type="order_product" name="order-products" order=$ID} {if $WAS_IN_PROMO == 1} {assign "realPrice" $PROMO_PRICE} @@ -250,6 +253,8 @@ {assign "realTotalPrice" $TOTAL_TAXED_PRICE} {/if} + {$totalItemsPriceWtTaxes = $totalItemsPriceWtTaxes + ($realPrice * $QUANTITY)} + {$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY} @@ -311,19 +316,11 @@ - {if $DISCOUNT} + - - - - {/if} - - - - - - - + + + {strip} {capture name="tax"} @@ -348,6 +345,14 @@ {/if} {/capture} {/strip} + + + + + + + + {if $smarty.capture.tax ne ""} @@ -355,10 +360,30 @@ {$smarty.capture.tax nofilter} {/if} + + - - + + + + + + + + + + + + + + {if $DISCOUNT} + + + + + {/if} +

{intl l="Discount"}

{format_money number=$DISCOUNT currency_id=$CURRENCY}

{intl l="Total without tax"}

{format_money number={$TOTAL_AMOUNT - $POSTAGE_UNTAXED} currency_id=$CURRENCY}

{intl l="Postage"}

{format_money number=$POSTAGE currency_id=$CURRENCY}

{intl l="Total products without tax"}

{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}

{intl l="Total without tax"}

{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}

{intl l="Total taxes"}

{intl l="Total with tax"}

{format_money number={$TOTAL_TAXED_AMOUNT - $POSTAGE} currency_id=$CURRENCY}

{intl l="Total products with tax"}

{format_money number={$totalItemsPriceWtTaxes + $TOTAL_TAX} currency_id=$CURRENCY}

{intl l="Postage"}

{format_money number=$POSTAGE currency_id=$CURRENCY}

{intl l="Total with tax"}

{format_money number={$totalItemsPriceWtTaxes + $TOTAL_TAX + $POSTAGE} currency_id=$CURRENCY}

{intl l="Discount"}

-{format_money number=$DISCOUNT currency_id=$CURRENCY}

{intl l="Total"}

{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$CURRENCY}