Browse Source

Adding licence headers

tags/0.1.5
Danimar Ribeiro 9 years ago
parent
commit
892571cc32
  1. 1155
      LICENSE.txt
  2. 9
      pytrustnfe/ChaveNFe.py
  3. 11
      pytrustnfe/Strings.py
  4. 3
      pytrustnfe/__init__.py
  5. 3
      pytrustnfe/nfse/__init__.py
  6. 4
      pytrustnfe/nfse/paulistana/__init__.py
  7. 26
      pytrustnfe/pdf/Danfe.py
  8. 8
      pytrustnfe/pdf/__init__.py
  9. 4
      pytrustnfe/xml/filters.py

1155
LICENSE.txt
File diff suppressed because it is too large
View File

9
pytrustnfe/ChaveNFe.py

@ -1,9 +1,6 @@
# coding=utf-8
'''
Created on 23/06/2015
@author: danimar
'''
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
class ChaveNFe(object):

11
pytrustnfe/Strings.py

@ -1,9 +1,7 @@
#coding=utf-8
'''
Created on Jun 17, 2015
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@author: danimar
'''
CONSULTA_CADASTRO_COMPLETA = '<?xml version="1.0" encoding="utf-8"?>'\
'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">'\
@ -19,7 +17,7 @@ CONSULTA_CADASTRO_COMPLETA = '<?xml version="1.0" encoding="utf-8"?>'\
'</ConsCad></nfeDadosMsg>'\
'</soap:Body>'\
'</soap:Envelope>'
RETORNO_CONSULTA = '<?xml version="1.0" encoding="utf-8"?>'\
'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'\
'<soap:Header><nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/CadConsultaCadastro2">'\
@ -38,4 +36,3 @@ RETORNO_CONSULTA = '<?xml version="1.0" encoding="utf-8"?>'\
'<xBairro>CONJUNTO HABITACIONAL FRANCISCO DE CILLO (INOCOOP)</xBairro><cMun>3545803</cMun>'\
'<xMun>SANTA BARBARA D''OESTE</xMun><CEP>13457162</CEP></ender></infCad></infCons>'\
'</retConsCad></consultaCadastro2Result></soap:Body></soap:Envelope>'

3
pytrustnfe/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

3
pytrustnfe/nfse/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

4
pytrustnfe/nfse/paulistana/__init__.py

@ -1,3 +1,7 @@
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import os
import logging
import suds

26
pytrustnfe/pdf/Danfe.py

@ -1,9 +1,7 @@
# coding=utf-8
'''
Created on 01/07/2015
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@author: danimar
'''
from pytrustnfe.xml.DynamicXml import DynamicXml
from reportlab.platypus.tables import Table
from reportlab.pdfgen.canvas import Canvas
@ -45,27 +43,27 @@ class Danfe(object):
linhas = [20,30]
table = Table(data, style=estilo, colWidths=colunas, rowHeights=linhas)
return table
def _field(self, label, value):
estilo = ParagraphStyle('default')
return Paragraph('<font size="8">' + label + '</font>' + '<br />' + value, estilo)
def _segundo_cabecalho(self):
data = [
[self._field('Natureza da operação', 'Venda de produção do estabelecimento'), '',
self._field('Protocolo de autorização de uso', '12345678956665487')],
[self._field('Inscrição estadual', '156466487897'),
self._field('Inscrição estadual substituto tributário', '1456465456'),
[self._field('Inscrição estadual', '156466487897'),
self._field('Inscrição estadual substituto tributário', '1456465456'),
self._field('CNPJ', '87.224.633/0001-61'), ]
]
estilo = [('SPAN', (0, 0), (1, 0)),
estilo = [('SPAN', (0, 0), (1, 0)),
('FONTSIZE', (0, 0), (1, 1), 7.0),
('GRID', (0, 0), (2, 1), 0.5, colors.black)]
colunas = [6 * inch, 7 * inch, 7 * inch]
colunas = [6 * inch, 7 * inch, 7 * inch]
table = Table(data, style=estilo, colWidths=colunas)
return table
def gerar(self):
doc = SimpleDocTemplate(
'/home/danimar/projetos/pdfs/danfe.pdf',
@ -73,7 +71,7 @@ class Danfe(object):
topMargin=0.5 * inch, bottomMargin=0.5 * inch)
elementos = []
elementos.append(self._header())
elementos.append(self._segundo_cabecalho())

8
pytrustnfe/pdf/__init__.py

@ -1,5 +1,3 @@
'''
Created on 01/07/2015
@author: danimar
'''
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

4
pytrustnfe/xml/filters.py

@ -1,4 +1,6 @@
# coding=utf-8
# -*- coding: utf-8 -*-
# © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from decimal import Decimal
from datetime import datetime

Loading…
Cancel
Save