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

@@ -237,6 +237,9 @@
<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>
</tr>
{$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}
<tr class="table-2">
@@ -311,19 +316,11 @@
<table class="table-3">
<col style="width: 50%; padding: 1mm;">
<col style="width: 50%; padding: 1mm;">
{if $DISCOUNT}
<!-- Total matériel HT -->
<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}
<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>
<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={$TOTAL_AMOUNT - $POSTAGE_UNTAXED} currency_id=$CURRENCY}</p></td>-->
</tr>
{strip}
{capture name="tax"}
@@ -348,6 +345,14 @@
{/if}
{/capture}
{/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 ""}
<tr>
<td class="table-3-1"><p>{intl l="Total taxes"}</p></td>
@@ -355,10 +360,30 @@
</tr>
{$smarty.capture.tax nofilter}
{/if}
<!-- Total TTC -->
<tr>
<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" ><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>
<td class="table-3-1" ><p>{intl l="Total with tax"}</p></td>
<td class="table-3-1 align-right"><p>{format_money number={$totalItemsPriceWtTaxes + $TOTAL_TAX + $POSTAGE} currency_id=$CURRENCY}</p></td>
</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>
<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>