Valor entregue por metodo pagamento
[% IF sales_media.medias.keys.size > 0 -%]
----------------------------------------
 [% i18n("VALOR ENTREGUE POR METODO PAGAMENTO") %]
----------------------------------------
[% total = 0 -%]
[% voids_v = 0 -%]
[% FOREACH media IN sales_media.medias.keys.sort -%]
[% IF media != "REFUNDS" -%]
[% media | format("%-32s") %] [% sales_media.medias.$media | format("%.2f") | format("%7s") %]
[% END -%]
[% total = total + sales_media.medias.$media -%]
[% IF sales_media.medias.$media >= 0 -%]
[% ELSE -%]
[% voids_v = voids_v + sales_media.medias.$media -%]
[% END -%]
[% END -%]
[% IF sales_media.total_doc - sales_by_station_product.total > 0 -%]
[% total = total - (sales_media.total_doc - sales_by_station_product.total) -%]
[% END -%]
-------
[% i18n("TOTAL") | format("%-32s") %] [% sales_media.total | format("%.2f") | format("%7s") %]
[% IF voids_v != 0 -%]

[% i18n("ESTORNOS / DEVOLUCOES") | format("%-32s") %] [% sales_media.total_voids * -1 | format("%.2f") | format("%7s") %]
[% END -%]

[% IF sales_media.stations.keys.size > 1 -%]
[% FOREACH station IN sales_media.stations.keys.sort -%]
[% total = 0 -%]
[% voids_v = 0 -%]
========
[% i18n("POSTO") %] [% station %]
========
[% FOREACH media IN sales_media.stations.$station.medias.keys.sort -%]
[% IF media != "REFUNDS" -%]
[% media | format("%-32s") %] [% sales_media.stations.$station.medias.$media | format("%.2f") | format("%7s") %]
[% END -%]
[% total = total + sales_media.stations.$station.medias.$media -%]
[% IF sales_media.stations.$station.medias.$media >= 0 -%]
[% ELSE -%]
[% voids_v = voids_v + sales_media.stations.$station.medias.$media -%]
[% END -%]
[% END -%]
[% IF sales_media.stations.$station.total_doc - sales_by_station.stations.$station.total > 0 -%]
[% total = total - (sales_media.stations.$station.total_doc - sales_by_station.stations.$station.total) -%]
[% END -%]
-------
[% i18n("TOTAL") | format("%-32s") %] [% sales_media.stations.$station.total | format("%.2f") | format("%7s") %]
[% IF voids_v != 0 -%]

[% i18n("ESTORNOS / DEVOLUCOES") | format("%-32s") %] [% sales_media.stations.$station.total_voids * -1 | format("%.2f") | format("%7s") %]
[% END -%]

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