{*************************************************************************************/ /* This file is part of the Thelia package. */ /* */ /* Copyright (c) OpenStudio */ /* email : dev@thelia.net */ /* web : http://www.thelia.net */ /* */ /* For the full copyright and license information, please view the LICENSE.txt */ /* file that was distributed with this source code. */ /*************************************************************************************} {* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *} {default_translation_domain domain='pdf.default2020'} {literal} {/literal} {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_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]]
{hook name="invoice.footer-bottom" order="{$order_id}"}
{$taxes = []} {loop name="order.invoice" type="order" id=$order_id customer="*"} {loop name="currency.order" type="currency" id=$CURRENCY} {assign "orderCurrency" $SYMBOL} {/loop} {hookblock name="invoice.information" order="{$order_id}" fields="title,value"} {forhook rel="invoice.information"} {/forhook} {/hookblock}

{intl l="INVOICE"}

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

{intl l="Invoice REF"} : {$INVOICE_REF}

{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="{order attr="delivery_module"}" order="{$order_id}"} {/ifhook} {elsehook rel="invoice.delivery-address"}

{loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS} {$COMPANY}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG} {/loop} {$FIRSTNAME} {$LASTNAME}
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}
{$ZIPCODE} {$CITY}
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop} {/loop}

{/elsehook}

{intl l="Invoice address"}

{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS} {$COMPANY}
{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG} {/loop} {$FIRSTNAME} {$LASTNAME}
{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}
{$ZIPCODE} {$CITY}
{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop} {/loop}

{hook name="invoice.after-addresses" order="{$order_id}"} {$totalArticlesHtSansRemise = 0} {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} {else} {assign "realPrice" $PRICE} {assign "realTax" $PRICE_TAX} {assign "realTaxedPrice" $TAXED_PRICE} {/if} {$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY} {$totalArticlesHtSansRemise = $totalArticlesHtSansRemise + $realPrice * $QUANTITY} {/loop}

{intl l="Product"}

{intl l="Unit. price"}

{intl l="Tax"}

{intl l="Unit taxed price"}

{intl l="Quantity"}

{intl l="Taxed total"}

{$TITLE}

{ifloop rel="combinations"} {loop type="order_product_attribute_combination" name="combinations" order_product=$ID} {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}
{/loop} {/ifloop}

{format_money number=$realPrice symbol=$orderCurrency}

{format_money number=$realTax symbol=$orderCurrency}

{format_money number=$realTaxedPrice symbol=$orderCurrency}

{$QUANTITY}

{format_money number={$realTaxedPrice * $QUANTITY} symbol=$orderCurrency}

{hook name="invoice.after-products" order="{$order_id}"} {if $POSTAGE_TAX_RULE_TITLE} {$taxes[$POSTAGE_TAX_RULE_TITLE][] = $POSTAGE_TAX} {/if}

{intl l="Payment module"}

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

{intl l="Delivery module"}

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

{strip} {capture name="tax"} {foreach $taxes as $name=>$prices} {assign var="_price_taxe_" value="0"} {foreach $prices as $price} {$_price_taxe_= $_price_taxe_ + $price} {/foreach} {if $_price_taxe_ != 0} {/if} {/foreach} {/capture} {/strip} {if $smarty.capture.tax ne ""} {$smarty.capture.tax nofilter} {/if} {if $DISCOUNT} {/if}

{intl l="Total without tax"}

{format_money number={$totalArticlesHtSansRemise} symbol=$orderCurrency}

{$name}

{format_money number=$_price_taxe_ symbol=$orderCurrency}

{intl l="Tax"}

{format_money number=$TOTAL_TAX symbol=$orderCurrency}

{intl l="Total with tax"}

{format_money number={$TOTAL_TAXED_AMOUNT + $DISCOUNT - $POSTAGE_UNTAXED} symbol=$orderCurrency}

{intl l="Discount"}

-{format_money number=$DISCOUNT symbol=$orderCurrency}

{intl l="Postage"}

{format_money number=$POSTAGE symbol=$orderCurrency}

{intl l="Total"}

{format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}

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