Descontos por Família / Produto / Percentagem
[% IF discounts_family.families.keys.size > 0 -%]
----------------------------------------
          [% i18n("DESCONTOS POR FAMILIA") %]
----------------------------------------
[% FOREACH fam_name IN discounts_family.families.keys.sort -%]
[% fam_name.chars(24) %] [% discounts_family.families.$fam_name.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.families.$fam_name.total | format("%.2f") | format("%7s") %]
[% END -%]

[% i18n("Total") | format("%-24s") %] [% discounts_family.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.total | format("%.2f") | format("%7s") %]

----------------------------------------
          [% i18n("DESCONTOS POR PRODUTO") %]
----------------------------------------
[% FOREACH prod_name IN discounts_family.products.keys.sort -%]
[% prod_name.chars(24) %] [% discounts_family.products.$prod_name.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.products.$prod_name.total | format("%.2f") | format("%7s") %]
[% END -%]

[% i18n("Total") | format("%-24s") %] [% discounts_family.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.total | format("%.2f") | format("%7s") %]

----------------------------------------
        [% i18n("DESCONTOS POR PERCENTAGEM") %]
----------------------------------------
[% FOREACH percent IN discounts_family.percentages.keys.nsort -%]
[% percent | format("%.2f") | format("%6s") %][% i18n("%").chars(14) %][% discounts_family.percentages.$percent.count | format("%4s") %] [% discounts_family.percentages.$percent.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.percentages.$percent.total | format("%.2f") | format("%7s") %]
[% END -%]

[% i18n("Total") | format("%-16s") %] [% discounts_family.total_qttys | format("%7s") %] [% discounts_family.total_wo_vat | format("%.2f") | format("%7s") %] [% discounts_family.total | format("%.2f") | format("%7s") %]
[% END -%]
