Skip to content

Instantly share code, notes, and snippets.

@batok
Created October 5, 2010 22:11
Show Gist options
  • Save batok/612441 to your computer and use it in GitHub Desktop.
Save batok/612441 to your computer and use it in GitHub Desktop.
class Factura(Base):
__tablename__ = "facturas"
id = Column( Integer, primary_key = True )
folio = Column( Integer, unique = True )
fecha = Column( DateTime )
aprobacion = Column( Integer )
ano_aprobacion = Column( Integer )
certificado = Column(String(20))
cliente = Column( Integer , ForeignKey( "clientes.id"))
porcentaje_iva = Column( Numeric(6,3))
porcentaje_retencion_iva = Column( Numeric(6,3))
porcentaje_retencion_isr = Column( Numeric(6,3))
porcentaje_descuento = Column( Numeric(6,3))
forma_de_pago = Column( String(50))
generada = Column( Boolean, default = False) # sirve de bandera para saber si se genero la factura electronica o no
partidas = relation("PartidaFactura", backref="mi_factura")
porcentaje = synonym("porcentaje_iva")
folio_erp = Column(String(20), unique = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment