Total em Caixa
----------------------------------------
           [% i18n("TOTAL EM CAIXA") %]
----------------------------------------
[% IF finantial_info.dont_show -%]
[% i18n("NÃO SE PODEM USAR DATAS DIFERENTES") -%]

[% ELSE -%]
[% i18n("CLIENTES ATENDIDOS") | format("%-30s") %][% finantial_info.total_docs*1 | format("%.0f") | format("%10s") %]

[% i18n("APURO (sem recibos)") | format("%-30s") %][% finantial_info.type.sales.total*1 - finantial_info.type.receipts.total*1 | format("%.2f") | format("%10s") %]
[% total = 0 -%]
[% voids_v = 0 -%]
[% FOREACH media IN sales_media.medias.keys.sort -%]
[% IF media != "REFUNDS" -%]
  [% media | format("%-30s") %] [% sales_media.medias.$media - receipts_by_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) -%]
[% IF (sales_media.total_doc - sales_by_station_product.total) >= 1 -%]
  [% i18n("TROCOS") | format("%-31s") %][% (sales_media.total_doc - sales_by_station_product.total) * -1 | format("%.2f") | format("%7s") %]
[% END -%]
[% END -%]

[% i18n("RECIBOS") | format("%-30s") %][% finantial_info.type.receipts.total*1 | format("%.2f") | format("%10s") %]
[% FOREACH media IN receipts_by_media.medias.keys.sort -%]
  [% media | format("%-30s") %] [% receipts_by_media.medias.$media | format("%.2f") | format("%7s") %]
[% END -%]

[% i18n("ENTRADAS") | format("%-30s") %][% finantial_info.cashier_ops.INS.total*1 | format("%.2f") | format("%10s") %]
[% FOREACH rec IN finantial_info.cashier_ops.INS.ops -%]
  [% rec.hour %] [% rec.clerk.chars(5) %] [% rec.justification.chars(18) %] [% rec.amount | format("%.2f") | format("%7s") %]
[% END -%]

[% i18n("SAIDAS") | format("%-30s") %][% finantial_info.cashier_ops.OUTS.total*1 | format("%.2f") | format("%10s") %]
[% FOREACH rec IN finantial_info.cashier_ops.OUTS.ops -%]
  [% rec.hour %] [% rec.clerk.chars(5) %] [% rec.justification.chars(18) %] [% rec.amount | format("%.2f") | format("%7s") %]
[% END -%]
[% IF kept_in_source.total > 0 -%]
[% i18n("RETENÇÕES").chars(30) %][%  kept_in_source.total*1 | format("%.2f") | format("%10s") %]

[% i18n("TOTAL") | format("%-30s") %][% finantial_info.balance*1 - kept_in_source.total*1 | format("%.2f") | format("%10s") %]
[% ELSE -%]

[% i18n("TOTAL") | format("%-30s") %][% finantial_info.balance*1 | format("%.2f") | format("%10s") %]
[% END -%]
[% END -%]
