{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *} {default_translation_domain domain='pdf.default'} {literal} {/literal} {hook name="invoice.header" order=$order_id} {hook name="invoice.footer-top" order=$order_id}
{hook name="invoice.imprint" order=$order_id} {elsehook rel="invoice.imprint"} {config key="store_name"} {$addresses="{config key="store_address1"} {config key="store_address2"} {config key="store_address3"}"} {$city="{config key="store_zipcode"} {config key="store_city"}"} {if $addresses != " "}- {$addresses}{/if} {if $city != " " }- {$city}{/if} {if {config key="store_country"} } {loop type="country" visible="*" name="address.country.title" id={config key="store_country"}} - {$TITLE}{/loop} {/if} {if {config key="store_business_id"} } - {config key="store_business_id"} {/if}
{if {config key="store_phone"} } {intl l="Phone: "}{config key="store_phone"} {/if} {if {config key="store_email"} } {intl l="Email: "}{config key="store_email"} {/if} {/elsehook}
{intl l="page"} [[page_cu]]/[[page_nb]]
{$taxes = []} {loop name="order.invoice" type="order" id=$order_id customer="*"} {$currency = $CURRENCY}

{intl l="INVOICE"} {config key="store_name"}

{hookblock name="invoice.information" order=$order_id fields="title,value"} {forhook rel="invoice.information"} {/forhook} {/hookblock}

{intl l="Invoice date"} : {format_date date=$INVOICE_DATE output="date"}

{intl l="Invoice REF"} : FA{$REF|substr:3}

{intl l="Customer Number"} : {loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}{$REF}{/loop}

{$title} : {$value}

{hook name="invoice.after-information" order=$order_id}

{intl l="Delivery address"}

{ifhook rel="invoice.delivery-address"} {* delivery module can customize the delivery address *} {hook name="invoice.delivery-address" module={$DELIVERY_MODULE} order=$order_id} {/ifhook} {elsehook rel="invoice.delivery-address"} {format_address order_address=$DELIVERY_ADDRESS locale=$locale} {/elsehook}

{intl l="Invoice address"}

{format_address order_address=$INVOICE_ADDRESS locale=$locale}
{hook name="invoice.after-addresses" order=$order_id} {loop type="order_product" name="order-products" order=$ID} {if $WAS_IN_PROMO == 1} {assign "realPrice" $PROMO_PRICE} {assign "realTax" $PROMO_PRICE_TAX} {assign "realTaxedPrice" $TAXED_PROMO_PRICE} {assign "realTotalPrice" $PROMO_PRICE*$QUANTITY} {else} {assign "realPrice" $PRICE} {assign "realTax" $PRICE_TAX} {assign "realTaxedPrice" $TAXED_PRICE} {assign "realTotalPrice" $PRICE*$QUANTITY} {/if} {$taxes[{$TAX_RULE_TITLE}][] = floatval($realTax) * $QUANTITY} {hook name="invoice.order-product" order={$order_id} order_product={$ID}} {/loop}

{intl l="Product"}

{intl l="Unit. price"}

{intl l="Quantity"}

{intl l="Total without tax"}

{$TITLE}
{intl l="Product ref : "}{$REF}
{intl l="Combination ref : "}{$PRODUCT_SALE_ELEMENTS_REF}

{hook name="invoice.product-list" order_product=$ID order=$order_id}

{format_money number=$realPrice currency_id=$currency}

{$QUANTITY}

{format_money number=$realTotalPrice currency_id=$currency}

{hook name="invoice.after-products" order=$order_id}

{intl l="Payment module"}

{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}

{hook name="invoice.after-payment-module" order=$order_id module_id=$PAYMENT_MODULE}

{intl l="Delivery module"}

{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}

{hook name="invoice.after-delivery-module" order=$order_id module_id=$DELIVERY_MODULE}
{assign "discountTax" 0} {assign "tva" 0.20} {loop type="order_address" name="invoice_address" id=$INVOICE_ADDRESS} {if $COUNTRY == 20 && $INVOICE_DATE > date_create('2020-07-07')} {assign "tva" 0.21} {/if} {/loop} {if $DISCOUNT > 0} {assign "discountTax" {$DISCOUNT*$tva}} {/if} {assign "untaxedCart" {$TOTAL_ITEMS_AMOUNT}} {assign "untaxedPostage" {$POSTAGE/(1+$tva)}} {assign "postageTax" {$untaxedPostage*$tva}} {assign "untaxedTotalWithUntaxedPostage" {$untaxedCart+$untaxedPostage}} {* Totaux des frais de livraison : HT / TVA / TTC *} {* Totaux panier + livraison : HT / TVA / TTC *} {if $hideTax|default:null} {else} {if $DISCOUNT > 0} {/if} {/if}

{intl l="Total without tax"}

{format_money number=$untaxedCart currency_id=$currency}

{intl l="Postage without tax"}

{format_money number=$untaxedPostage currency_id=$currency}

{intl l="Total"}

{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$currency}

{intl l="Total without tax"}

{format_money number=$untaxedTotalWithUntaxedPostage currency_id=$currency}

{intl l="Total tax amount"}

{format_money number={$TOTAL_ITEMS_TAX + $postageTax} currency_id=$currency}

{intl l="Taxed total"}

{format_money number=$TOTAL_TAXED_AMOUNT+$DISCOUNT currency_id=$currency}

{intl l="Discount with tax"}

{format_money number=$DISCOUNT currency_id=$currency}

{intl l="Total"}

{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$currency}

{hook name="invoice.after-summary" order=$order_id} {/loop}