[15/07/2024] On modifie la facture pour affichage de tous les montants HT, puis des taxes, puis des TTC.
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'Our brands' => 'Nos marques',
|
||||||
|
);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return array(
|
||||||
'+ View All' => '+ Tout voir',
|
'+ View All' => '+ Tout voir',
|
||||||
'Latest' => 'Top des ventes',
|
'Latest' => 'Top des ventes - Laurent',
|
||||||
];
|
);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ return array(
|
|||||||
'Delivery address' => 'Adresse de livraison',
|
'Delivery address' => 'Adresse de livraison',
|
||||||
'Delivery module' => 'Module de livraison',
|
'Delivery module' => 'Module de livraison',
|
||||||
'Discount' => 'Remise',
|
'Discount' => 'Remise',
|
||||||
|
'Discount without tax' => 'Remise HT',
|
||||||
'Email: ' => 'Email :',
|
'Email: ' => 'Email :',
|
||||||
'INVOICE' => 'FACTURE',
|
'INVOICE' => 'FACTURE',
|
||||||
'Invoice REF' => 'Numéro de facture',
|
'Invoice REF' => 'Numéro de facture',
|
||||||
@@ -16,13 +17,16 @@ return array(
|
|||||||
'Phone: ' => 'Tél.: ',
|
'Phone: ' => 'Tél.: ',
|
||||||
'Postage' => 'Frais de livraison',
|
'Postage' => 'Frais de livraison',
|
||||||
'Postage TTC' => 'Frais de livraison TTC',
|
'Postage TTC' => 'Frais de livraison TTC',
|
||||||
|
'Postage without tax' => 'Frais de livraison HT',
|
||||||
'Product' => 'Produit',
|
'Product' => 'Produit',
|
||||||
'Product ref : ' => 'Réf. produit : ',
|
'Product ref : ' => 'Réf. produit : ',
|
||||||
|
'Products' => 'Matériel',
|
||||||
'Quantity' => 'Quantité',
|
'Quantity' => 'Quantité',
|
||||||
'Ref' => 'Réf.',
|
'Ref' => 'Réf.',
|
||||||
'Tax' => 'Taxe',
|
'Tax' => 'Taxe',
|
||||||
'Taxed total' => 'Total TTC',
|
'Taxed total' => 'Total TTC',
|
||||||
'Total' => 'Total',
|
'Total' => 'Total',
|
||||||
|
'Total products with tax' => 'Total matériel TTC',
|
||||||
'Total products without tax' => 'Total matériel HT',
|
'Total products without tax' => 'Total matériel HT',
|
||||||
'Total taxes' => 'Total taxes',
|
'Total taxes' => 'Total taxes',
|
||||||
'Total to pay' => 'Total à payer',
|
'Total to pay' => 'Total à payer',
|
||||||
|
|||||||
@@ -252,6 +252,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{$totalItemsPriceWtTaxes = 0}
|
{$totalItemsPriceWtTaxes = 0}
|
||||||
|
{$totalItemsPriceWithTaxes = 0}
|
||||||
|
{$totalItemsTax = 0}
|
||||||
|
|
||||||
{loop type="order_product" name="order-products" order=$ID}
|
{loop type="order_product" name="order-products" order=$ID}
|
||||||
{if $WAS_IN_PROMO == 1}
|
{if $WAS_IN_PROMO == 1}
|
||||||
@@ -267,6 +269,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{$totalItemsPriceWtTaxes = $totalItemsPriceWtTaxes + ($realPrice * $QUANTITY)}
|
{$totalItemsPriceWtTaxes = $totalItemsPriceWtTaxes + ($realPrice * $QUANTITY)}
|
||||||
|
{$totalItemsPriceWithTaxes = $totalItemsPriceWithTaxes + ($realTaxedPrice * $QUANTITY)}
|
||||||
|
|
||||||
{$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY}
|
{$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY}
|
||||||
|
|
||||||
@@ -297,6 +300,10 @@
|
|||||||
|
|
||||||
{hook name="invoice.after-products" order=$order_id}
|
{hook name="invoice.after-products" order=$order_id}
|
||||||
|
|
||||||
|
<!-- Calcul du taux de TVA, pour la remise et pour les TVA //-->
|
||||||
|
{assign var="taux_tva" value={($totalItemsPriceWithTaxes / $totalItemsPriceWtTaxes) - 1}}
|
||||||
|
{assign var="discount_without_tax" value="{$DISCOUNT / (1 + $taux_tva)}"}
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" style="padding-top: 5mm;">
|
<table cellspacing="0" cellpadding="0" style="padding-top: 5mm;">
|
||||||
<col style="width: 60%; padding: 1mm;" />
|
<col style="width: 60%; padding: 1mm;" />
|
||||||
<col style="width: 40%; padding: 1mm;" />
|
<col style="width: 40%; padding: 1mm;" />
|
||||||
@@ -316,14 +323,12 @@
|
|||||||
|
|
||||||
{hook name="invoice.after-payment-module" order=$order_id module_id=$PAYMENT_MODULE}
|
{hook name="invoice.after-payment-module" order=$order_id module_id=$PAYMENT_MODULE}
|
||||||
|
|
||||||
|
|
||||||
<h3>{intl l="Delivery module"}</h3>
|
<h3>{intl l="Delivery module"}</h3>
|
||||||
<p>
|
<p>
|
||||||
<span>{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}</span>
|
<span>{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{hook name="invoice.after-delivery-module" order=$order_id module_id=$DELIVERY_MODULE}
|
{hook name="invoice.after-delivery-module" order=$order_id module_id=$DELIVERY_MODULE}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table class="table-3">
|
<table class="table-3">
|
||||||
@@ -334,8 +339,26 @@
|
|||||||
<td class="table-3-1"><p>{intl l="Total products without tax"}</p></td>
|
<td class="table-3-1"><p>{intl l="Total products without tax"}</p></td>
|
||||||
<td class="table-3-1 align-right"><p>{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}</p></td>
|
<td class="table-3-1 align-right"><p>{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{if $DISCOUNT != 0}
|
||||||
|
<tr>
|
||||||
|
<td class="table-3-1"><p>{intl l="Discount without tax"}</p></td>
|
||||||
|
<td class="table-3-1 align-right"><p>-{format_money number={$discount_without_tax} currency_id=$CURRENCY}</p></td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
<tr>
|
||||||
|
<td class="table-3-1"><p>{intl l="Postage without tax"}</p></td>
|
||||||
|
<td class="table-3-1 align-right"><p>{format_money number={$POSTAGE_UNTAXED} currency_id=$CURRENCY}</p></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{assign var="tax_on_products" value={($totalItemsPriceWtTaxes - $discount_without_tax) * $taux_tva}}
|
||||||
|
{assign var="total_tax" value={$tax_on_products + $POSTAGE_TAX}}
|
||||||
|
|
||||||
<!-- Séparateur //-->
|
<!-- Séparateur //-->
|
||||||
<tr><td colspan="2" class="table-3-1"></td></tr>
|
<tr><td colspan="2" class="table-3-1"></td></tr>
|
||||||
|
<!-- Détail des taxes -->
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="table-3-1 section">Détail des taxes</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
{strip}
|
{strip}
|
||||||
{capture name="tax"}
|
{capture name="tax"}
|
||||||
@@ -344,14 +367,19 @@
|
|||||||
{foreach $prices as $price}
|
{foreach $prices as $price}
|
||||||
{$_price_taxe_= $_price_taxe_ + $price}
|
{$_price_taxe_= $_price_taxe_ + $price}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
{if $DISCOUNT != 0}
|
||||||
|
{$_price_taxe_ = $_price_taxe_ - $DISCOUNT}
|
||||||
|
{/if}
|
||||||
<!-- TheCoreDev le 03/05/2020 : on affiche la taxe, même si nulle -->
|
<!-- TheCoreDev le 03/05/2020 : on affiche la taxe, même si nulle -->
|
||||||
<!-- {if $_price_taxe_ != 0}-->
|
<!-- {if $_price_taxe_ != 0}-->
|
||||||
|
<!-- TVA applicable //-->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-2"><p>{$name}</p></td>
|
<td class="table-3-2"><p>{intl l="Products"}<br>{$name}</p></td>
|
||||||
<td class="table-3-2 align-right"><p>{format_money number=$_price_taxe_ currency_id=$CURRENCY}</p></td>
|
<td class="table-3-2 align-right"><p>{format_money number=$tax_on_products currency_id=$CURRENCY}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
<!-- TVA sur frais de port //-->
|
||||||
{if $POSTAGE_TAX != 0}
|
{if $POSTAGE_TAX != 0}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-2"><p>{intl l="Postage"}<br>{$POSTAGE_TAX_RULE_TITLE}</p></td>
|
<td class="table-3-2"><p>{intl l="Postage"}<br>{$POSTAGE_TAX_RULE_TITLE}</p></td>
|
||||||
@@ -361,15 +389,12 @@
|
|||||||
{/capture}
|
{/capture}
|
||||||
{/strip}
|
{/strip}
|
||||||
|
|
||||||
<!-- Détail des taxes -->
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="table-3-1 section">Détail des taxes</td>
|
|
||||||
</tr>
|
|
||||||
<!-- Total taxes -->
|
<!-- Total taxes -->
|
||||||
{if $smarty.capture.tax ne ""}
|
{if $smarty.capture.tax ne ""}
|
||||||
|
{assign var="total_taxes" value=$TOTAL_TAX}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-1"><p>{intl l="Total taxes"}</p></td>
|
<td class="table-3-1"><p>{intl l="Total taxes"}</p></td>
|
||||||
<td class="table-3-1 align-right"><p>{format_money number=$TOTAL_TAX currency_id=$CURRENCY}</p></td>
|
<td class="table-3-1 align-right"><p>{format_money number=$total_tax currency_id=$CURRENCY}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
{$smarty.capture.tax nofilter}
|
{$smarty.capture.tax nofilter}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -377,25 +402,26 @@
|
|||||||
<!-- Séparateur //-->
|
<!-- Séparateur //-->
|
||||||
<tr><td colspan="2" class="table-3-1"></td></tr>
|
<tr><td colspan="2" class="table-3-1"></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="table-3-1 section">Montants TTC</td>
|
||||||
|
</tr>
|
||||||
<!-- Total produits TTC -->
|
<!-- Total produits TTC -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-1" ><p>{intl l="Total with tax"}</p></td>
|
<td class="table-3-1" ><p>{intl l="Total products with tax"}</p></td>
|
||||||
<td class="table-3-1 align-right"><p>{format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE currency_id=$CURRENCY}</p></td>
|
<td class="table-3-1 align-right"><p>{format_money number=$totalItemsPriceWithTaxes currency_id=$CURRENCY}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- Frais de livraison TTC -->
|
|
||||||
<tr>
|
|
||||||
<td class="table-3-1"><p>{intl l="Postage TTC"}</p></td>
|
|
||||||
<td class="table-3-1 align-right"><p>{format_money number=$POSTAGE currency_id=$CURRENCY}</p></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Remise -->
|
<!-- Remise -->
|
||||||
{if $DISCOUNT}
|
{if $DISCOUNT != 0}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-1"><p>{intl l="Discount"}</p></td>
|
<td class="table-3-1"><p>{intl l="Discount"}</p></td>
|
||||||
<td class="table-3-1 align-right"><p>-{format_money number=$DISCOUNT currency_id=$CURRENCY}</p></td>
|
<td class="table-3-1 align-right"><p>-{format_money number=$DISCOUNT currency_id=$CURRENCY}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
|
<!-- Frais de livraison TTC -->
|
||||||
|
<tr>
|
||||||
|
<td class="table-3-1"><p>{intl l="Postage TTC"}</p></td>
|
||||||
|
<td class="table-3-1 align-right"><p>{format_money number=$POSTAGE currency_id=$CURRENCY}</p></td>
|
||||||
|
</tr>
|
||||||
<!-- Total -->
|
<!-- Total -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table-3-1" style="background:#f6993c;"><h3 style="color:white;">{intl l="Total to pay"}</h3></td>
|
<td class="table-3-1" style="background:#f6993c;"><h3 style="color:white;">{intl l="Total to pay"}</h3></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user