novicePresta Posted January 15, 2014 Share Posted January 15, 2014 (edited) [RESOLU] - Bonjour, Dans la facture.pdf, je rencontre une écriture "incorrecte" : prestashop 1.5.5 : on a dans l'ordre Produit - Prix unitaire(HT) - Prix unitaire(TTC) - Réduction - Qté - Total à payer Le prix unitaire ttc = prix avec réduction. Est-il possible d'afficher le prix unitaire TTC avant la réduction (le client pourrait se retourner...) ? Je n'ai rien trouvé sur le sujet avec P 1.5.5 merci pour votre aide Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted January 17, 2014 Share Posted January 17, 2014 Utilisez-vous v1.5.6.1 maintenant? Are you using v1.5.6.1 now? Link to comment Share on other sites More sharing options...
Le-cathare Posted January 17, 2014 Share Posted January 17, 2014 Bonjour Je souhaite faire pareil Link to comment Share on other sites More sharing options...
tuk66 Posted January 17, 2014 Share Posted January 17, 2014 Version, version, version. Différentes versions ont des erreurs. Link to comment Share on other sites More sharing options...
Massilia Web Posted January 17, 2014 Share Posted January 17, 2014 Bonjour, J'ai la 1.5.6.1 avec le même problème de prix directement remisé sur la facture, comment faire pour affiché également le prix initiale ? Merci bien. Link to comment Share on other sites More sharing options...
novicePresta Posted January 17, 2014 Author Share Posted January 17, 2014 Bonjour, ... Et non je suis toujours sur prestashop 1.5.5.0 merci Link to comment Share on other sites More sharing options...
CodeShaker Posted January 17, 2014 Share Posted January 17, 2014 (edited) Bonjour à tous, Je vous propose le code ci-dessous pour afficher le prix non remisé (fonctionne avec remise % et montant) : {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl}*(({$order_detail.reduction_percent/100)+1)} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} Doit à mon avis fonctionner sur toutes les versions de Prestashop. Edited January 17, 2014 by thech4n (see edit history) 1 Link to comment Share on other sites More sharing options...
novicePresta Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) [RESOLU] merci pour la pour la réponse... et comme je suis "novice... est-ce dans invoice.tpl que je dois mettre le code ? très cordialement Edited January 17, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
Massilia Web Posted January 17, 2014 Share Posted January 17, 2014 Merci également pour la réponse, mais pareillement, dans quel fichier doit on modifier le code ? Cordialement. Link to comment Share on other sites More sharing options...
novicePresta Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) [RESOLU] dans quel fichier faut le rajouter ou remplacer une partie du code ? merci Edited January 17, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
novicePresta Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) [RESOLU] J'ai trouvé c'est dans --> Web --> pdf --> invoice.tpl remplacer vers ligne 148 par le nouveau. Il fut vérifier si OK j'espère vous avoir aidé... Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
CodeShaker Posted January 17, 2014 Share Posted January 17, 2014 Oui excusez-moi, oui voila à inclure dans dans le fichier /pdf/invoice.tpl. L'ensemble du code est en HTML4 donc assez simple (ajuster bien quand même la taille des colonnes avec les %) 1 Link to comment Share on other sites More sharing options...
novicePresta Posted January 18, 2014 Author Share Posted January 18, 2014 (edited) [RESOLU] - [VOIR MESSAGE D'APRES] Bonjour, merci mais le code ne fonctionne pas, j'ai une page blanche. je suis en 1.5.5 cordialement Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
novicePresta Posted January 18, 2014 Author Share Posted January 18, 2014 (edited) [RESOLU] - merci pour l'aide, pour infos : Le code envoyé dans le retour de mail est le bon (ci-après) ; mais j'ai le montant ttc qui s'afiche aussi dans réduction (est-ce correct pour le client) ? voir captEcran joint {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl}*1,{$order_detail.reduction_percent}{else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} merci pour votre aide Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
CodeShaker Posted January 18, 2014 Share Posted January 18, 2014 (edited) Bonjour, Arf oui j'hésitais beaucoup avec cette version, mais comme je n'étais pas au bureau je ne pouvais pas vérifier. Vous voulez l'affichage de la réduction et du prix remisé dans la même colonne? Si oui utiliser plutôt ce code : {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{$order_detail.reduction_amount} : {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} -{$order_detail.reduction_percent}% : {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl}*1,{$order_detail.reduction_percent} {else} -- {/if} (A placer et remplacer le contenu de la colonne "Réduction" (entre les balises <td>), affichera par exemple 10% : 10,50 € ou -- si aucune réduction) Si non, donnez moi la liste des colonne de votre facture idéale avec vos contraintes et je vous fait cela. Edited January 18, 2014 by thech4n (see edit history) 2 Link to comment Share on other sites More sharing options...
novicePresta Posted January 19, 2014 Author Share Posted January 19, 2014 (edited) [RESOLU] - Bonsoir et merci de votre retour : La liste des colonnes est parfaite si je peux obtenir ceci : Je veux l'affichage du "Prix unitaire TTC" dans sa colonne, le montant de la remise dans colonne "Réduction" et donc le prix remisé dans la colonne "total à payer TTC" ? (et non le prix remisé dans la colonne "Prix unitaire TTC"). Si aucune réduction, si + simple pour vous on peut laisser -- J'ai çà avec votre nouveau code : voir captEcran : J'AI CA Il me faut ceci : : voir captEcran : ilMeFautCA MERCI DE VOTRE GRANDE AIDE... a bientôt Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
Massilia Web Posted January 20, 2014 Share Posted January 20, 2014 Bonjour, Effectivement, il faudrait intégrer le prix initiale non soldé et non remisé quelque part dans la facture. Je suis sur la 1.5.6.1 le code ci dessus n'affiche que les prix remisés. L'idéal serait d'inclure le Prix Non remisé (TTC) quelque part dans la facture. Exemple : Nom Produit - Prix Non remisé TTC - Prix unitaire(HT) - Prix unitaire(TTC) - Réduction - Qté - Total à payer Merci bien Link to comment Share on other sites More sharing options...
Massilia Web Posted January 20, 2014 Share Posted January 20, 2014 J'y arrive avec le code suivant me permettant de recalculer le prix d'origine grasse au prix remisé et au pourcentage de la remise. {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{$order_detail.reduction_amount} : {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount}{else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} <!-- ajouter le prix sans remise --> {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl/(1-$order_detail.reduction_percent/100)} -{$order_detail.reduction_percent}% {else} --{/if} Cordialement 1 Link to comment Share on other sites More sharing options...
CodeShaker Posted January 20, 2014 Share Posted January 20, 2014 (edited) Bonjour, @novicePresta, ci-joint le code du fichier invoice.tpl modifié suivant votre demande. (Je ne peux pas actuellement attacher de fichier à mon post) Libellé / Prix Unitaire HT / Prix Unitaire TTC / Remise / Quantité / Prix Unitaire TTC Remisé Je vous aussi commenté pour que vous y voyez plus clair. Note : Changer le texte de la dernière colonne car ce n'est plus le "Prix Total TTC" {* * 2007-2013 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-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <div style="font-size: 8pt; color: #444"> <table> <tr><td> </td></tr> </table> <!-- ADDRESSES --> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%"> {if !empty($delivery_address)} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br /> {$delivery_address} </td> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br /> {$invoice_address} </td> </tr> </table> {else} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing & Delivery Address.' pdf='true'}</span><br /> {$invoice_address} </td> <td style="width: 50%"> </td> </tr> </table> {/if} </td> </tr> </table> <!-- / ADDRESSES --> <div style="line-height: 1pt"> </div> <!-- PRODUCTS TAB --> <table style="width: 100%"> <tr> <td style="width: 15%; padding-right: 7px; text-align: right; vertical-align: top; font-size: 7pt;"> <!-- CUSTOMER INFORMATION --> <b>{l s='Order Number:' pdf='true'}</b><br /> {$order->getUniqReference()}<br /> <br /> <b>{l s='Order Date:' pdf='true'}</b><br /> {dateFormat date=$order->date_add full=0}<br /> <br /> <b>{l s='Payment Method:' pdf='true'}</b><br /> <table style="width: 100%;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} </table> <br /> <!-- / CUSTOMER INFORMATION --> </td> <td style="width: 85%; text-align: right"> <table style="width: 100%; font-size: 8pt;"> <tr style="line-height:4px;"> <!--NOM COLONNE LIBELLE PRODUIT--> <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 45%">{l s='Product / Reference' pdf='true'}</td> <!--NOM COLONNE PRIX UNITAIRE HT NON REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%">{l s='Unit Price' pdf='true'} <br />{l s='(Tax Excl.)' pdf='true'}</td> {/if} <!--NOM COLONNE PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%"> {l s='Unit Price' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> <!--NOM COLONNE MONTANT/POURCENTAGE DE LA REMISE--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%">{l s='Discount' pdf='true'}</td> <!--NOM COLONNE QUANTITE COMMANDE--> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 10%">{l s='Qty' pdf='true'}</td> <!--NOM COLONNE PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique)--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: {if !$tax_excluded_display}15%{else}25%{/if}"> <!--Penser à modifier dans le fichier /pdf/lang/fr.php afin d'indiquer ici le "Prix unitaire remisé" HT ou TTC suivant configuration--> {l s='Total' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> </tr> <!-- PRODUCTS --> {foreach $order_details as $order_detail} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};"> <!--CONTENU COLONNE LIBELLE PRODUIT--> <td style="text-align: left; width: 45%">{$order_detail.product_name}</td> <!--CONTENU COLONNE PRIX UNITAIRE HT NON REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="text-align: right; width: 10%"> {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} </td> {/if} <!--CONTENU COLONNE PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="text-align: right; width: 10%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl+$order_detail.reduction_amount} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {/if} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl*1,$order_detail.reduction_percent} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl*1,$order_detail.reduction_percent} {/if} {else} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} {/if} </td> <!--CONTENU COLONNE MONTANT/POURCENTAGE DE LA REMISE--> <td style="text-align: right; width: 10%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} -{$order_detail.reduction_percent}% {else} -- {/if} </td> <!--CONTENU COLONNE QUANTITE COMMANDE--> <td style="text-align: center; width: 10%">{$order_detail.product_quantity}</td> <!--CONTENU COLONNE PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique)--> <td style="width: 15%; text-align: right; width: {if !$tax_excluded_display}15%{else}25%{/if}"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} </td> </tr> {foreach $order_detail.customizedDatas as $customizationPerAddress} {foreach $customizationPerAddress as $customizationId => $customization} <tr style="line-height:6px;background-color:{$bgcolor}; "> <td style="line-height:3px; text-align: left; width: 60%; vertical-align: top"> <blockquote> {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} {$customization_infos.name}: {$customization_infos.value} {if !$smarty.foreach.custo_foreach.last}<br /> {else} <div style="line-height:0.4pt"> </div> {/if} {/foreach} {/if} {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} {/if} </blockquote> </td> <td style="text-align: right; width: 15%"></td> <td style="text-align: center; width: 10%; vertical-align: top">({$customization.quantity})</td> <td style="width: 15%; text-align: right;"></td> </tr> {/foreach} {/foreach} {/foreach} <!-- END PRODUCTS --> <!-- CART RULES --> {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor}" text-align="left"> <td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td> <td> {if $tax_excluded_display} - {$cart_rule.value_tax_excl} {else} - {$cart_rule.value} {/if} </td> </tr> {/foreach} <!-- END CART RULES --> </table> <table style="width: 100%"> {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Excl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Incl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}</td> </tr> {else} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {/if} {if $order_invoice->total_discount_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Vouchers' pdf='true'}</td> <td style="width: 15%; text-align: right;">-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl + $shipping_discount_tax_incl)}</td> </tr> {/if} {if $order_invoice->total_wrapping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Wrapping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} {/if} </td> </tr> {/if} {if $order_invoice->total_shipping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} {/if} </td> </tr> {/if} {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Tax' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}</td> </tr> {/if} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td> </tr> </table> </td> </tr> </table> <!-- / PRODUCTS TAB --> <div style="line-height: 1pt"> </div> {$tax_tab} {if isset($order_invoice->note) && $order_invoice->note} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$order_invoice->note|nl2br}</td> </tr> </table> {/if} {if isset($HOOK_DISPLAY_PDF)} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$HOOK_DISPLAY_PDF}</td> </tr> </table> {/if} </div> Edited January 20, 2014 by thech4n (see edit history) 1 Link to comment Share on other sites More sharing options...
novicePresta Posted January 23, 2014 Author Share Posted January 23, 2014 (edited) [RESOLU] - Bonjour, je relis le code sans arrêt, je ne vois pas ou est l'erreur, car j'ai page blanche au téléchargement de la facture... Pouvez-vous me donner le bon code qui fonctionne s'il vous plait ? Cordialement Edited January 28, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
CodeShaker Posted January 23, 2014 Share Posted January 23, 2014 Bonjour, Après quelques tests et quelques modification, ci-dessous un code qui fonctionne : - J'ai corrigé le calcul du tarif TTC non remisé - Ajouter une colonne "Total" dans le cas quantité > 1 - J'ai pas encore trouvé comment retrouver le prix HT non remisé donc j'ai déplacé la colonne au bon endroit {* * 2007-2013 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-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <div style="font-size: 8pt; color: #444"> <table> <tr><td> </td></tr> </table> <!-- ADDRESSES --> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%"> {if !empty($delivery_address)} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br /> {$delivery_address} </td> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br /> {$invoice_address} </td> </tr> </table> {else} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing & Delivery Address.' pdf='true'}</span><br /> {$invoice_address} </td> <td style="width: 50%"> </td> </tr> </table> {/if} </td> </tr> </table> <!-- / ADDRESSES --> <div style="line-height: 1pt"> </div> <!-- PRODUCTS TAB --> <table style="width: 100%"> <tr> <td style="width: 15%; padding-right: 7px; text-align: right; vertical-align: top; font-size: 7pt;"> <!-- CUSTOMER INFORMATION --> <b>{l s='Order Number:' pdf='true'}</b><br /> {$order->getUniqReference()}<br /> <br /> <b>{l s='Order Date:' pdf='true'}</b><br /> {dateFormat date=$order->date_add full=0}<br /> <br /> <b>{l s='Payment Method:' pdf='true'}</b><br /> <table style="width: 100%;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} </table> <br /> <!-- / CUSTOMER INFORMATION --> </td> <td style="width: 85%; text-align: right"> <table style="width: 100%; font-size: 8pt;"> <tr style="line-height:4px;"> <!--NOM COLONNE LIBELLE PRODUIT--> <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 40%">{l s='Product / Reference' pdf='true'}</td> <!--NOM COLONNE PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%"> {l s='Unit Price' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> <!--NOM COLONNE MONTANT/POURCENTAGE DE LA REMISE--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%">{l s='Discount' pdf='true'}</td> <!--NOM COLONNE PRIX UNITAIRE HT REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%">{l s='Unit Price' pdf='true'} <br />{l s='(Tax Excl.)' pdf='true'}</td> {/if} <!--NOM COLONNE PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique)--> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: {if !$tax_excluded_display}10%{else}10%{/if}"> <!--Penser à modifier dans le fichier /pdf/lang/fr.php afin d'indiquer ici le "Prix unitaire remisé" HT ou TTC suivant configuration--> {l s='Total' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> <!--NOM COLONNE QUANTITE COMMANDE--> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 5%">{l s='Qty' pdf='true'}</td> <!--NOM COLONNE PRIX TOTAL PAYE POUR LA LIGNE--> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: {if !$tax_excluded_display}15%{else}25%{/if}"> Total T.T.C. </td> </tr> <!-- PRODUCTS --> {foreach $order_details as $order_detail} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};"> <!--CONTENU COLONNE LIBELLE PRODUIT--> <td style="text-align: left; width: 40%">{$order_detail.product_name}</td> <!--CONTENU COLONNE PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="text-align: right; width: 10%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl+$order_detail.reduction_amount} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {/if} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl/(1-$order_detail.reduction_percent/100)} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl/(1-$order_detail.reduction_percent/100)} {/if} {else} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} {/if} </td> <!--CONTENU COLONNE MONTANT/POURCENTAGE DE LA REMISE--> <td style="text-align: right; width: 10%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} -{$order_detail.reduction_percent}% {else} -- {/if} </td> <!--CONTENU COLONNE PRIX UNITAIRE HT REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="text-align: right; width: 10%"> {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} </td> {/if} <!--CONTENU COLONNE PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique)--> <td style="width: 15%; text-align: right; width: {if !$tax_excluded_display}10%{else}10%{/if}"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} </td> <!--CONTENU COLONNE QUANTITE COMMANDE--> <td style="text-align: center; width: 5%">{$order_detail.product_quantity}</td> <!--CONTENU COLONNE PRIX TOTAL PAYE POUR LA LIGNE--> <td style="width: 15%; text-align: right; width: {if !$tax_excluded_display}15%{else}25%{/if}"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl*$order_detail.product_quantity} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl*$order_detail.product_quantity} {/if} </td> </tr> {foreach $order_detail.customizedDatas as $customizationPerAddress} {foreach $customizationPerAddress as $customizationId => $customization} <tr style="line-height:6px;background-color:{$bgcolor}; "> <td style="line-height:3px; text-align: left; width: 60%; vertical-align: top"> <blockquote> {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} {$customization_infos.name}: {$customization_infos.value} {if !$smarty.foreach.custo_foreach.last}<br /> {else} <div style="line-height:0.4pt"> </div> {/if} {/foreach} {/if} {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} {/if} </blockquote> </td> <td style="text-align: right; width: 15%"></td> <td style="text-align: center; width: 10%; vertical-align: top">({$customization.quantity})</td> <td style="width: 15%; text-align: right;"></td> </tr> {/foreach} {/foreach} {/foreach} <!-- END PRODUCTS --> <!-- CART RULES --> {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor}" text-align="left"> <td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td> <td> {if $tax_excluded_display} - {$cart_rule.value_tax_excl} {else} - {$cart_rule.value} {/if} </td> </tr> {/foreach} <!-- END CART RULES --> </table> <table style="width: 100%"> {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Excl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Incl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}</td> </tr> {else} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {/if} {if $order_invoice->total_discount_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Vouchers' pdf='true'}</td> <td style="width: 15%; text-align: right;">-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl + $shipping_discount_tax_incl)}</td> </tr> {/if} {if $order_invoice->total_wrapping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Wrapping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} {/if} </td> </tr> {/if} {if $order_invoice->total_shipping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} {/if} </td> </tr> {/if} {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Tax' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}</td> </tr> {/if} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td> </tr> </table> </td> </tr> </table> <!-- / PRODUCTS TAB --> <div style="line-height: 1pt"> </div> {$tax_tab} {if isset($order_invoice->note) && $order_invoice->note} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$order_invoice->note|nl2br}</td> </tr> </table> {/if} {if isset($HOOK_DISPLAY_PDF)} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$HOOK_DISPLAY_PDF}</td> </tr> </table> {/if} </div> 1 Link to comment Share on other sites More sharing options...
novicePresta Posted January 24, 2014 Author Share Posted January 24, 2014 (edited) Sincèrement merci Tech4n pour votre travail. Je vous mets en copie la facture de ce que j'avais besoin... Et le code avec le réglage des colonnes (pour que le temps que j'ai passé dessus soit profitable à d'autres ! Comme j'ai peu d'expérience dans le code, j'aide avec ce que je peux !). - J'ai mis en commentaires les endroits dont je n'avais pas besoin. Très cordialement CODE : {** 2007-2013 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-2013 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}<div style="font-size: 8pt; color: #444"><table> <tr><td> </td></tr></table><!-- ADDRESSES --><table style="width: 100%"> <tr> <td style="width: 16.5%"></td> <td style="width: 85%"> {if !empty($delivery_address)} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br /> {$delivery_address} </td> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br /> {$invoice_address} </td> </tr> </table> {else} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing & Delivery Address.' pdf='true'}</span><br /> {$invoice_address} </td> <td style="width: 50%"> </td> </tr> </table> {/if} </td> </tr></table><!-- / ADDRESSES --><div style="line-height: 1pt"> </div><!-- PRODUCTS TAB --><table style="width: 100%"> <tr> <td style="width: 17%; padding-right: 8px; text-align: right; vertical-align: top; font-size: 7pt;"> <!-- CUSTOMER INFORMATION --> <b>{l s='Order Number:' pdf='true'}</b><br /> {$order->getUniqReference()}<br /> <br /> <b>{l s='Order Date:' pdf='true'}</b><br /> {dateFormat date=$order->date_add full=0}<br /> <br /> <b>{l s='Payment Method:' pdf='true'}</b><br /> <table style="width: 100%;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} </table> <br /> <!-- / CUSTOMER INFORMATION --> </td> <td style="width: 83%; text-align: right"> <table style="width: 100%; font-size: 8pt;"> <tr style="line-height:4px;"><!--LIBELLE TABLEAU--><!--LIBELLE PRODUIT--> <td style="text-align: left; background-color: #868686; color: #FFF; padding-left: 8px; font-weight: bold; width: 40%">{l s='Product / Reference' pdf='true'}</td><!--PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="background-color: #868686; color: #FFF; text-align: right; font-weight: bold; width: 15%"> {l s='Unit Price' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td><!--MONTANT DE LA REMISE--> <td style="background-color: #868686; color: #FFF; text-align: right; font-weight: bold; width: 13%">{l s='Discount' pdf='true'}</td><!--PRIX UNITAIRE HT REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="background-color: #868686; color: #FFF; text-align: right; font-weight: bold; width: 15%">{l s='Unit Price' pdf='true'} <br />{l s='(Tax Excl.)' pdf='true'}</td> {/if}<!--PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique) <td style="background-color: #868686; color: #FFF; text-align: right; font-weight: bold; width: {if !$tax_excluded_display}11%{else}15%{/if}"><!--Penser à modifier dans le fichier /pdf/lang/fr.php afin d'indiquer ici le "Prix unitaire remisé" HT ou TTC suivant configuration--> <!--{l s='Total' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td>--><!--QUANTITE COMMANDE--> <td style="background-color: #868686; color: #FFF; text-align: center; font-weight: bold; width: 7%">{l s='Qty' pdf='true'}</td><!--PRIX TOTAL PAYE POUR LA LIGNE --> <td style="background-color: #868686; color: #FFF; text-align: center; font-weight: bold; width: {if !$tax_excluded_display}10%{else}18%{/if}"> Total (TTC) </td> </tr> <!-- PRODUCTS --> {foreach $order_details as $order_detail} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};"><!--CONTENU COLONNES--><!--CONTENU COLONNE LIBELLE PRODUIT--> <td style="text-align: left; width: 40%">{$order_detail.product_name}</td><!--40%--><!--CONTENU COLONNE PRIX UNITAIRE NON REMISE (TTC ou HT suivant configuration boutique)--> <td style="text-align: right; width: 15%"><!--10%--> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl+$order_detail.reduction_amount} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl+$order_detail.reduction_amount} {/if} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl/(1-$order_detail.reduction_percent/100)} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl/(1-$order_detail.reduction_percent/100)} {/if} {else} {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} {/if} </td><!--CONTENU COLONNE MONTANT DE LA REMISE--> <td style="text-align: right; width: 13%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} -{$order_detail.reduction_percent}% {else} -- {/if} </td><!--CONTENU COLONNE PRIX UNITAIRE HT REMISE (si affichage HT et TTC suivant configuration boutique)--> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="text-align: right; width: 15%"> {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} </td> {/if}<!--CONTENU COLONNE PRIX UNITAIRE REMISE (TTC ou HT suivant configuration boutique) <td style="width: 15%; text-align: right; width: {if !$tax_excluded_display}10%{else}10%{/if}"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} </td>--><!--QUANTITE COMMANDE--> <td style="text-align: center; width: 7%">{$order_detail.product_quantity}</td><!--PRIX TOTAL PAYE POUR LA LIGNE--> <td style="width: 10%;text-align:right; width: {if !$tax_excluded_display}10%{else}18%{/if}"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl*$order_detail.product_quantity} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl*$order_detail.product_quantity} {/if} </td> </tr> {foreach $order_detail.customizedDatas as $customizationPerAddress} {foreach $customizationPerAddress as $customizationId => $customization} <tr style="line-height:6px;background-color:{$bgcolor}; "> <td style="line-height:3px; text-align: left; width: 60%; vertical-align: middle"> <blockquote> {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} {$customization_infos.name}: {$customization_infos.value} {if !$smarty.foreach.custo_foreach.last}<br /> {else} {/if} {/foreach} {/if} {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} {/if} </blockquote> </td> <td style="text-align: right; width: 15%"></td> <td style="text-align: center; width: 10%; vertical-align: top">({$customization.quantity})</td> <td style="width: 15%; text-align: right;"></td> </tr> {/foreach} {/foreach} {/foreach} <!-- END PRODUCTS --> <!-- CART RULES --> {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor}" text-align="left"> <td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td> <td> {if $tax_excluded_display} - {$cart_rule.value_tax_excl} {else} - {$cart_rule.value} {/if} </td> </tr> {/foreach} <!-- END CART RULES --> </table> <table style="width: 100%"> {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Excl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total (Tax Incl.)' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}</td> </tr> {else} <tr style="line-height:5px;"> <td style="width: 85%; text-align: right; font-weight: bold">{l s='Product Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {/if} {if $order_invoice->total_discount_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Vouchers' pdf='true'}</td> <td style="width: 15%; text-align: right;">-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl + $shipping_discount_tax_incl)}</td> </tr> {/if} {if $order_invoice->total_wrapping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Wrapping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} {/if} </td> </tr> {/if} {if $order_invoice->total_shipping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td> <td style="width: 15%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} {/if} </td> </tr> {/if} {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Tax' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}</td> </tr> {/if} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td> <td style="width: 15%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td> </tr> </table> </td> </tr></table><!-- / PRODUCTS TAB --><!--DETAIL DES TAXES --><div style="line-height: 2pt"> </div>{$tax_tab}{if isset($order_invoice->note) && $order_invoice->note}<div style="line-height: 1pt"> </div><table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$order_invoice->note|nl2br}</td> </tr></table>{/if}{if isset($HOOK_DISPLAY_PDF)}<div style="line-height: 1pt"> </div><table style="width: 100%"> <tr> <td style="width: 15%"></td> <td style="width: 85%">{$HOOK_DISPLAY_PDF}</td> </tr></table>{/if}</div> Edited January 24, 2014 by novicePresta (see edit history) Link to comment Share on other sites More sharing options...
Le-cathare Posted January 25, 2014 Share Posted January 25, 2014 Bonjour, Sa ne fonctionne pas si on utilise le theme pour facture http://www.prestashop.com/forums/topic/202942-theme-template-de-facture-prestashop-15/ comment faire ? Link to comment Share on other sites More sharing options...
morphinux Posted January 25, 2014 Share Posted January 25, 2014 J'ai testé le code sur prestashop 1.5.6.1 dans invoice.tpl du répertoire PDF de mon thème mais malheureusement, la facture ne contient pas le tableau, seuls les entêtes apparaissent. Link to comment Share on other sites More sharing options...
novicePresta Posted January 25, 2014 Author Share Posted January 25, 2014 c'est dans le dossier web/pdf/invoice.tpl, je ne suis pas dans le thème Link to comment Share on other sites More sharing options...
AlainBo26 Posted February 2, 2014 Share Posted February 2, 2014 Bonjour, Avez-vous réglé le problème de la TVa arrondie à 10 cents dans le tableau de détail des taxes? Slts, Alain Link to comment Share on other sites More sharing options...
desbonsprix Posted May 25, 2014 Share Posted May 25, 2014 Mille Merci !!! Pour moi ça a fonctionné !!! Greg Link to comment Share on other sites More sharing options...
Wial68 Posted August 16, 2014 Share Posted August 16, 2014 Bonjour à tous et merci pour les aide que vous apportez sur ce forum J'ai copié votre code pour modifier les factures Pour moi ça marche assez bien, il reste le problème du détail des taxe qui ne correspond au montant dans la colonne "Total" Je n'ai pas de notion de codage pour trouver la solution tous seul Est ce quelqu'un a une solution à cette différence de TVA? crdlt Alain Link to comment Share on other sites More sharing options...
tuk66 Posted August 18, 2014 Share Posted August 18, 2014 Je pense qu'il ya toujours pas de solution réelle pour des montants erronés sur la facture. I think there is still no real fix for wrong amounts on the invoice. http://www.prestashop.com/forums/topic/166816-pdf-invoice-in-different-prestashop-versions-wrong-amounts-updated/ Link to comment Share on other sites More sharing options...
soniass Posted August 21, 2015 Share Posted August 21, 2015 Bonjour à tous, J'ai essayé le code proposé, ça ne marche pas, toujours Prix unitaire identique au prix remisé Pourriez-vous me récapituler la procédure exacte ? J'ai peut-être mal suivi la discussion... Merci d'avance Link to comment Share on other sites More sharing options...
soniass Posted August 21, 2015 Share Posted August 21, 2015 Bonjour à tous, J'ai essayé le code proposé, ça ne marche pas, toujours Prix unitaire identique au prix remisé Pourriez-vous me récapituler la procédure exacte ? J'ai peut-être mal suivi la discussion... Merci d'avance Ma version : PrestaShop™ 1.6.0.14 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now