Giter Club home page Giter Club logo

cfdi's Introduction

Hi there 👋

Se habla español.

cfdi's People

Contributors

apux avatar unrob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfdi's Issues

La propiedad subTotal es incorrecta cuando se lee XML donde el subTotal difiere de los conceptos

Al leer un XML, en mi caso de la CFE, este tiene un valor de subtotal y total que difiere de la suma de los importes calculados de los conceptos, me imagino por los subsidios que aplican, etc. creo que la manera correcta, al menos al leer el CFDI de un XML, es que siempre se respete la lectura de los valores de subTotal y Total.

Aqui el XML de prueba (modificado por privacidad):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cfdi:Comprobante xmlns:cfdi="http://www.sat.gob.mx/cfd/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" LugarExpedicion="Av. Guerrero y 16,No 800,,Colonia Centro,Madera,Madera,Chihuahua,Mexico,CP 31940" certificado="MIIEmDCCA4CgAwIBAgIUMDAwMDEwMDAwMDAzMDA0NzAwNTkwDQYJKoZIhvcNAQEFBQAwggGKMTgwNgYDVQQDDC9BLkMuIGRlbCBTZXJ2aWNpbyBkZSBBZG1pbmlzdHJhY2nDs24gVHJpYnV0YXJpYTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMR8wHQYJKoZIhvcNAQkBFhBhY29kc0BzYXQuZ29iLm14MSYwJAYDVQQJDB1Bdi4gSGlkYWxnbyA3NywgQ29sLiBHdWVycmVybzEOMAwGA1UEEQwFMDYzMDAxCzAJBgNVBAYTAk1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+cLM5zja/qsJ8hu5YBEpkW8hrvNJOuKdpy6UBmZpFHdhPF2K8rBvF4ZJuI1+sJDGLQHlbAeJvxCgrHw==" fecha="2014-02-19T15:17:52" folio="000001234567" formaDePago="Pago en una solo exhibicion" metodoDePago="No Identificado" noCertificado="00001000000300470059" sello="XXX" serie="CB" subTotal="86.45" tipoDeComprobante="ingreso" total="87" version="3.2" xsi:schemaLocation="http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv32.xsd">
  <cfdi:Emisor nombre="Comision Federal de Electricidad" rfc="CFE370814QI0">
           <cfdi:DomicilioFiscal calle="Av. Paseo de la Reforma" codigoPostal="06600" colonia="Juarez" estado="D.F." municipio="Mexico D.F." noExterior="164" pais="Mexico"/>
           <cfdi:RegimenFiscal Regimen="TITULO III DEL REGIMEN DE LAS PERSONAS MORALES CON FINES NO LUCRATIVOS"/>
     </cfdi:Emisor>
  <cfdi:Receptor nombre="PEPE PECAS" rfc="AAA010101AAA">
           <cfdi:Domicilio calle="DIRECCR" estado="NOMESTR" municipio="NOMPOBR" pais="Mexico"/>
     </cfdi:Receptor>
  <cfdi:Conceptos>
           <cfdi:Concepto cantidad="163" descripcion="ENERGIA" importe="86.45" unidad="NoAplica" valorUnitario="86.45"/>
     </cfdi:Conceptos>
  <cfdi:Impuestos>
          <cfdi:Traslados>
                   <cfdi:Traslado importe="0" impuesto="IVA" tasa="16"/>
               </cfdi:Traslados>
    </cfdi:Impuestos>
  <cfdi:Complemento>
        <tfd:TimbreFiscalDigital FechaTimbrado="2014-02-19T16:19:15" UUID="AAAA" noCertificadoSAT="00001000000300494998" selloCFD="XXX" selloSAT="QQQ" version="1.0" xsi:schemaLocation="http://www.sat.gob.mx/TimbreFiscalDigital http://www.sat.gob.mx/TimbreFiscalDigital/TimbreFiscalDigital.xsd" xmlns:tfd="http://www.sat.gob.mx/TimbreFiscalDigital"/>
  </cfdi:Complemento>
</cfdi:Comprobante>

Dudas sobre la addenda

¡Hola! Muy buenos días.

Estoy muy al tanto de esta gema, me parece muy interesante... Sin embargo, tengo una duda con respecto a la addenda... ¿Exactamente, qué es lo que contiene :data ? Por lo que veo es como la lista de artículos, pero te agradecería si me pudieras profundizar más en detalles...

Por cierto, para los archivos .cer y .key, deben estar previamente almacenados en el servidor para poder hacer uso del sellado y certificación?

Gracias de antemano, espero me puedas resolver :)

La propiedad Total asume que todos los conceptos manejan la misma tasa

Usando un poco más la gema me tope con que la propiedad Total se calcula de forma dinámica de la siguiente manera:

def total
   @total = self.subTotal + (self.subTotal*@opciones[:tasa])
end

Creo que esto es incorrecto ya que asume que todo el CFDI tiene una sola tasa, ejemplo 16% de IVA, etc. cuando en realidad cada concepto puede manejar diferentes tasas, por ejemplo ciertos conceptos pueden manejar IVA al 16%, otros al 0%, otros IEPS e incluso impuestos locales como el ISH de los hoteles, etc.

Creo que hay que cambiar un poco la lógica para tomar esto en cuenta.

Saludos!

Marca error con app_path

Hola que tal estoy queriendo hacerl funcionar esta gema en mi aplicacion echa en Rails 4.x.x pero al levantar el server me da el siguiente error

bin/rails:6: warning: already initialized constant APP_PATH

espero me puedan ayudar gracias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.