Clarification de la facture, avec HT, TTC, remise, FDP...

This commit is contained in:
2020-11-04 17:33:19 +01:00
parent a1e577732b
commit 6d640923e0
3 changed files with 55 additions and 22 deletions

View File

@@ -1,4 +1,11 @@
<?php <?php
return [ return [
'pdf.default2020' => [
'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',
],
]; ];

View File

@@ -1,6 +1,7 @@
<?php <?php
return [ return array(
'Combination ref : ' => 'Réf. combinaison : ',
'Customer Number' => 'Numéro de client', 'Customer Number' => 'Numéro de client',
'DELIVERY' => 'LIVRAISON', 'DELIVERY' => 'LIVRAISON',
'Delivery address' => 'Adresse de livraison', 'Delivery address' => 'Adresse de livraison',
@@ -14,20 +15,20 @@ return [
'Payment module' => 'Module de paiement', 'Payment module' => 'Module de paiement',
'Phone: ' => 'Tél.: ', 'Phone: ' => 'Tél.: ',
'Postage' => 'Frais de livraison', 'Postage' => 'Frais de livraison',
'Postage without tax' => 'Frais de livraison HT',
'Product' => 'Produit', 'Product' => 'Produit',
'Product ref : ' => 'Réf. produit : ',
'Quantity' => 'Quantité', 'Quantity' => 'Quantité',
'Ref' => 'Réf.', 'Ref' => 'Réf.',
'Tax' => 'Taxe', 'Tax' => 'Taxe',
'Total taxes' => 'Total taxes',
'Taxed total' => 'Total TTC', 'Taxed total' => 'Total TTC',
'Total' => 'Total', 'Total' => 'Total',
'Total with tax' => 'Sous-total matériel TTC', 'Total products with tax' => 'Total products with tax',
'Total without tax' => 'Sous-total matériel HT', '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 taxed price' => 'Prix unitaire TTC',
'Unit. price' => 'Prix unitaire', 'Unit. price' => 'Prix unitaire',
'delivery.imprint' => 'delivery.imprint',
'invoice.imprint' => 'invoice.imprint',
'page' => 'page', 'page' => 'page',
'product' => 'Produit', 'product' => 'Produit',
]; );

View File

@@ -237,6 +237,9 @@
<td><h4 class="align-center">{intl l="Quantity"}</h4></td> <td><h4 class="align-center">{intl l="Quantity"}</h4></td>
<td style="background:#f6993c"><h4 style="color:white;" class="align-center">{intl l="Taxed total"}</h4></td> <td style="background:#f6993c"><h4 style="color:white;" class="align-center">{intl l="Taxed total"}</h4></td>
</tr> </tr>
{$totalItemsPriceWtTaxes = 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}
{assign "realPrice" $PROMO_PRICE} {assign "realPrice" $PROMO_PRICE}
@@ -250,6 +253,8 @@
{assign "realTotalPrice" $TOTAL_TAXED_PRICE} {assign "realTotalPrice" $TOTAL_TAXED_PRICE}
{/if} {/if}
{$totalItemsPriceWtTaxes = $totalItemsPriceWtTaxes + ($realPrice * $QUANTITY)}
{$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY} {$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY}
<tr class="table-2"> <tr class="table-2">
@@ -311,19 +316,11 @@
<table class="table-3"> <table class="table-3">
<col style="width: 50%; padding: 1mm;"> <col style="width: 50%; padding: 1mm;">
<col style="width: 50%; padding: 1mm;"> <col style="width: 50%; padding: 1mm;">
{if $DISCOUNT} <!-- Total matériel HT -->
<tr> <tr>
<td class="table-3-1"><p>{intl l="Discount"}</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=$DISCOUNT currency_id=$CURRENCY}</p></td> <td class="table-3-1 align-right"><p>{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}</p></td>
</tr> <!-- <td class="table-3-1 align-right"><p>{format_money number={$TOTAL_AMOUNT - $POSTAGE_UNTAXED} currency_id=$CURRENCY}</p></td>-->
{/if}
<tr>
<td class="table-3-1"><p>{intl l="Total without tax"}</p></td>
<td class="table-3-1 align-right"><p>{format_money number={$TOTAL_AMOUNT - $POSTAGE_UNTAXED} currency_id=$CURRENCY}</p></td>
</tr>
<tr>
<td class="table-3-1"><p>{intl l="Postage"}</p></td>
<td class="table-3-1 align-right"><p>{format_money number=$POSTAGE currency_id=$CURRENCY}</p></td>
</tr> </tr>
{strip} {strip}
{capture name="tax"} {capture name="tax"}
@@ -348,6 +345,14 @@
{/if} {/if}
{/capture} {/capture}
{/strip} {/strip}
<!-- Sous-total HT -->
<tr>
<td class="table-3-1"><p>{intl l="Total without tax"}</p></td>
<td class="table-3-1 align-right"><p>{format_money number={$totalItemsPriceWtTaxes} currency_id=$CURRENCY}</p></td>
</tr>
<!-- Total taxes -->
{if $smarty.capture.tax ne ""} {if $smarty.capture.tax ne ""}
<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>
@@ -355,10 +360,30 @@
</tr> </tr>
{$smarty.capture.tax nofilter} {$smarty.capture.tax nofilter}
{/if} {/if}
<!-- Total TTC -->
<tr>
<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={$totalItemsPriceWtTaxes + $TOTAL_TAX} currency_id=$CURRENCY}</p></td>
</tr>
<!-- Frais de livraison TTC -->
<tr>
<td class="table-3-1"><p>{intl l="Postage"}</p></td>
<td class="table-3-1 align-right"><p>{format_money number=$POSTAGE currency_id=$CURRENCY}</p></td>
</tr>
<!-- Total 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 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={$totalItemsPriceWtTaxes + $TOTAL_TAX + $POSTAGE} currency_id=$CURRENCY}</p></td>
</tr> </tr>
<!-- Remise -->
{if $DISCOUNT}
<tr>
<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>
</tr>
{/if}
<!-- Total -->
<tr> <tr>
<td class="table-3-1" style="background:#f6993c;"><h3 style="color:white;">{intl l="Total"}</h3></td> <td class="table-3-1" style="background:#f6993c;"><h3 style="color:white;">{intl l="Total"}</h3></td>
<td class="table-3-1 align-right" style="background:#f6993c;"><h3 style="color:white;">{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$CURRENCY}</h3></td> <td class="table-3-1 align-right" style="background:#f6993c;"><h3 style="color:white;">{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$CURRENCY}</h3></td>