menace Posted March 28, 2017 Share Posted March 28, 2017 Dobrý den, potřeboval bych sečíst dohromady stejné sazby daně v tabulce rozpisu DPH na faktuře. Když mám výrobky s 21% DPH a dopravu s 21% DPH, tak mi vyskakují v rozpisu DPH zvlášť. Chci ulehčit práci účetní. V invoice.tpl jsem si našel tento kód, ale nejsem schopný přijít na to, jak ty dvě proměnné sečíst: Díky za radu. <!-- TAX DETAILS --> <table style="width: 100%;"> <tr> <td style="width: 48%;"> {if $tax_exempt} {l s='Exempt of VAT according section 259B of the General Tax Code.' pdf='true'} {else if (count($shipping_tax_breakdown) + count($product_tax_breakdown) == 0)} {else} <table style="width: 100%;" > <tr style="line-height:6px;border-bottom:0px solid black;"> <td style="width: 2%;text-align: left;"></td> <td style="border-bottom:0px solid black;text-align: left; background-color: white; color: black; font-weight: bold; width: 25%">{l s='Tax Detail' pdf='true'}</td> <td style="border-bottom:0px solid black;text-align: center;background-color: white; color: black;font-weight: bold; width: 20%">{l s='Tax Rate' pdf='true'}</td> {if !$use_one_after_another_method} <td style="border-bottom:0px solid black;text-align: center; background-color: white; color: black; font-weight: bold; width: 28%">{l s='Total Tax Excl' pdf='true'}</td> {/if} <td style="border-bottom:0px solid black;text-align: center;background-color: white; color: black; font-weight: bold; width: 25%">{l s='Total Tax' pdf='true'}</td> </tr> <div style="line-height: 0.1pt"> </div> {if isset($product_tax_breakdown)} {foreach $product_tax_breakdown as $rate => $product_tax_infos} <tr style="line-height:6px;background-color:white;"> <td style="border-left:0px solid black;width: 2%;text-align: left;"></td> <td style="width: 28%;text-align: left;">{l s='Products' pdf='true'}</td> <td style="width: 20%; text-align: center;">{$rate|number_format:0} %</td> {if !$use_one_after_another_method} <td style="width: 25%; text-align: center;"> {if isset($is_order_slip) && $is_order_slip} {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_price_tax_excl} </td> {/if} <td style="width: 23%; text-align: center;">{if isset($is_order_slip) && $is_order_slip} {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_amount}</td> <td style="width: 2%;text-align: right;"></td> </tr> {/foreach} {/if} {if isset($shipping_tax_breakdown)} {foreach $shipping_tax_breakdown as $shipping_tax_infos} <tr style="line-height:6px;background-color:{cycle values='#FFF,#FFF'};"> <td style="border-left:0px solid black;width: 2%;text-align: left;"></td> <td style="width: 28%;text-align: left;">{l s='Shipping' pdf='true'}</td> <td style="width: 20%; text-align: center;">{$shipping_tax_infos.rate|number_format:0} %</td> {if !$use_one_after_another_method} <td style="width: 25%; text-align: center;">{if isset($is_order_slip) && $is_order_slip} {/if}{displayPrice currency=$order->id_currency price=$shipping_tax_infos.total_tax_excl}</td> {/if} <td style="width: 23%; text-align: center;">{if isset($is_order_slip) && $is_order_slip} {/if}{displayPrice currency=$order->id_currency price=$shipping_tax_infos.total_amount}</td> <td style="width: 2%;text-align: left;"></td> </tr> {/foreach} {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now