This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This project is about printing receipts from eletronic fiscal documents related to SAT-CF-e which is a system for autorization and transmission of fiscal documents, developed by Finance Secretary of state of São Paulo, Brazil. This entire project, variables, methods and class names, as well as documentation, are written in brazilian portuguese.

Refer to the oficial web site for more information (in brazilian portuguese only).

Emissão de extratos do CF-e-SAT diretamente a partir dos documentos eletrônicos que representam o CF-e de venda e/ou de cancelamento, na forma de arquivos em formato XML.

Esta implementação é baseada na emissão dos extratos para mini-impressoras, normalmente térmicas (mas não limitado à elas), através da abstração PyESCPOS para o sistema de comandos de impressão ESC/POS® e derivações.

Para comunicar-se com equipamentos SAT veja o Projeto SATCFe.

Extratos do CF-e de Venda

Para emissão do extrato para um CF-e de venda, você irá precisar do XML do CF-e, e uma mini-impressora ESC/POS® (veja as implementações disponíveis no projeto PyESCPOS):

from escpos.serial import SerialSettings
from escpos.impl.daruma import DR700
from satextrato import ExtratoCFeVenda

# mini-impressora Daruma (DR700) conectada à porta serial COM1
conn = SerialSettings.as_from('COM1:9600,8,1,N').get_connection()
impressora = DR700(conn)
impressora.init()

# abre o arquivo do CF-e e emite o extrato
with open(r'C:\CFe545090.xml', 'r') as fp:
    extrato = ExtratoCFeVenda(fp, impressora)
    extrato.imprimir()

Extratos do CF-e de Cancelamento

Para emitir um extrato do CF-e de cancelamento, além do do CF-e de cancelamento, você também irá precisar do do CF-e de venda que fora cancelado. Seguindo a mesma linha do exemplo anterior:

with open('CFe_1.xml', 'r') as fvenda, open('CFeCanc_1.xml', 'r') as fcanc:
    extrato = ExtratoCFeCancelamento(fvenda, fcanc, impressora)
    extrato.imprimir()

Executando Testes

Para executar os testes de emissão dos extratos em mini-impressoras conectadas à portas seriais, ou em impressoras USB a partir de virtualizadores de portas seriais:

$ python setup.py test -a \
        "--escpos-impl=escpos.impl.daruma.DR700 "\
        "--escpos-if=serial "\
        "--serial-port=/dev/ttyS7"
Release History

Release History

0.0.9

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
satextrato-0.0.9.tar.gz (19.6 kB) Copy SHA256 Checksum SHA256 Source Aug 19, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting