-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
0 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1 @@ | ||
from ..models import Signer, Certificate | ||
|
||
|
||
# class Issuer: | ||
# """ | ||
# Instancia generica de Emisor para usar en la creacion y sellado de comprobantes | ||
# """ | ||
# | ||
# def __init__(self, tax_system: str, signer: Signer | Certificate = None, legal_name: str = None, rfc: str = None, certificate_number: str = None): | ||
# """ | ||
# Issuer to issue and stamp CFDIs | ||
# | ||
# :param signer: Llave y Certificado del Emisor | ||
# :param legal_name: Legal Name (Razon Social) | ||
# :param tax_system: Atributo requerido para incorporar la clave del régimen del contribuyente emisor al que aplicará el efecto fiscal de este comprobante. | ||
# """ | ||
# self.signer = signer if isinstance(signer, Signer) else None | ||
# self.certificate = signer | ||
# self.rfc = rfc or signer.rfc | ||
# self.legal_name = legal_name or signer.legal_name | ||
# self.tax_system = tax_system | ||
# self.certificate_number = certificate_number or (signer.certificate_number if signer else "") | ||
|
||
|
||
class Signable256(dict): | ||
def sign(self, signer: Signer): | ||
self['NoCertificado'] = signer.certificate_number | ||
self['Certificado'] = signer.certificate_base64() | ||
self['Sello'] = signer.sign_sha256( | ||
self.cadena_original().encode() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters