Estornos / Notas de Crédito
[% IF refunds.keys.size > 0 -%]
----------------------------------------
      [% i18n("ESTORNOS / NOTAS DE CRÉDITO") %]
----------------------------------------
[% FOREACH date IN refunds.by_date.keys.sort.reverse -%]
[% date | format("%-17s") %] [% refunds.by_date.$date.total | format("%.2f") | format("%7s") %]
----------------------------------------
[% FOREACH fo_doc_num IN refunds.by_date.$date.docs.keys.sort.reverse -%]
[% fo_doc_num | format("%-17s") %] [% refunds.by_date.$date.docs.$fo_doc_num.total | format("%.2f") | format("%7s") %] [% refunds.by_date.$date.docs.$fo_doc_num.customer_nif | format("%14s") %]
  [% refunds.by_date.$date.docs.$fo_doc_num.clerk.chars(10) | format("%10s") %]|[% refunds.by_date.$date.docs.$fo_doc_num.doc_original_fo_doc_number %][% IF refunds.by_date.$date.docs.$fo_doc_num.clerk != refunds.by_date.$date.docs.$fo_doc_num.doc_original_clerk %]|[% refunds.by_date.$date.docs.$fo_doc_num.doc_original_clerk.chars(10) | format("%10s") %][% END %][% IF refunds.by_date.$date.docs.$fo_doc_num.clerk_who_refunded %]|[% refunds.by_date.$date.docs.$fo_doc_num.clerk_who_refunded %][% END %]
[% FOREACH vat IN refunds.by_date.$date.docs.$fo_doc_num.vats.keys.sort -%]
  [% vat | format("%.2f") %]%           [% refunds.by_date.$date.docs.$fo_doc_num.vats.$vat.total | format("%.2f") | format("%7s") %]
[% END -%]
[% END -%]

[% IF refunds.by_date.$date.families.keys.size > 0 -%]
[% FOREACH fam IN refunds.by_date.$date.families.keys.sort -%]
[% fam.chars(33)%][% refunds.by_date.$date.families.$fam.total | format("%.2f") | format("%7s") %]
[% FOREACH sfam IN refunds.by_date.$date.families.$fam.subfamilies.keys.sort -%]
  [% sfam.chars(31) %][% refunds.by_date.$date.families.$fam.subfamilies.$sfam.total | format("%.2f") | format("%7s") %]
[% END -%]
[% END -%]
[% END -%]

[% i18n("TOTAL") | format("%-20s") %] [% refunds.by_date.$date.total | format("%.2f") | format("%19s") %]

[% END -%]
[% END -%]
