producers

package
v0.0.0-...-7a498d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadXML

func ReadXML(options map[string]interface{}) <-chan XmlRecord

func ReadXMLMissingCfd

func ReadXMLMissingCfd(options map[string]interface{}) <-chan XmlRecord

func SatValidation

func SatValidation(in <-chan XmlRecord) <-chan CfdiRecord

Types

type AddendaBuzonFiscalNode

type AddendaBuzonFiscalNode struct {
	XMLName xml.Name `xml:"AddendaBuzonFiscal"`
	CFD     CFDNode  `xml:"CFD"`
}

type CFDIAddenda

type CFDIAddenda struct {
	XMLName            xml.Name               `xml:"Addenda"`
	AddendaBuzonFiscal AddendaBuzonFiscalNode `xml:"AddendaBuzonFiscal"`
}

type CFDIComplemento

type CFDIComplemento struct {
	XMLName             xml.Name               `xml:"Complemento"`
	TimbreFiscalDigital TFDTimbreFiscalDigital `xml:"TimbreFiscalDigital"`
	Nomina              NominaNomina           `xml:"Nomina"`
}

type CFDIConcepto

type CFDIConcepto struct {
	XMLName          xml.Name `xml:"Concepto"`
	Descripcion      string   `xml:"descripcion,attr"`
	NoIdentificacion string   `xml:"noIdentificacion,attr"`
	Cantidad         string   `xml:"cantidad,attr"`
	Unidad           string   `xml:"unidad,attr"`
	ValorUnitario    string   `xml:"valorUnitario,attr"`
	Importe          string   `xml:"importe,attr"`
}

type CFDIEmisor

type CFDIEmisor struct {
	XMLName         xml.Name                  `xml:"Emisor"`
	RFC             string                    `xml:"rfc,attr"`
	Nombre          string                    `xml:"nombre,attr"`
	DomicilioFiscal EmisorDomicilioFiscalNode `xml:"DomicilioFiscal"`
}

type CFDIImpuestos

type CFDIImpuestos struct {
	XMLName   xml.Name      `xml:"Impuestos"`
	Total     string        `xml:"totalImpuestosTrasladados,attr"`
	Traslados CFDITraslados `xml:"Traslados"`
}

func (CFDIImpuestos) TotalTrasladados

func (imp CFDIImpuestos) TotalTrasladados() string

type CFDIReceptor

type CFDIReceptor struct {
	XMLName xml.Name `xml:"Receptor"`
	RFC     string   `xml:"rfc,attr"`
	Nombre  string   `xml:"nombre,attr"`
}

type CFDITraslado

type CFDITraslado struct {
	XMLName xml.Name `xml:"Traslado"`
	Importe string   `xml:"importe,attr"`
}

type CFDITraslados

type CFDITraslados struct {
	XMLName  xml.Name     `xml:"Traslados"`
	Traslado CFDITraslado `xml:"Traslado"`
}

type CFDNode

type CFDNode struct {
	XMLName xml.Name `xml:"CFD"`
	RefID   string   `xml:"refID,attr"`
}

type CfdiRecord

type CfdiRecord struct {
	Xml       XmlRecord
	Cfdi      CfdiType
	SatStatus string
}

type CfdiType

type CfdiType struct {
	XMLName         xml.Name        `xml:"Comprobante"`
	Tipo            string          `xml:"tipoDeComprobante,attr"`
	Version         string          `xml:"version,attr"`
	Serie           string          `xml:"serie,attr"`
	Folio           string          `xml:"folio,attr"`
	Fecha           string          `xml:"fecha,attr"`
	Moneda          string          `xml:"Moneda,attr"`
	TipoCambio      string          `xml:"TipoCambio,attr"`
	Total           string          `xml:"total,attr"`
	SubTotal        string          `xml:"subTotal,attr"`
	MetodoDePago    string          `xml:"metodoDePago,attr"`
	LugarExpedicion string          `xml:"LugarExpedicion,attr"`
	NoCertificado   string          `xml:"noCertificado,attr"`
	Emisor          CFDIEmisor      `xml:"Emisor"`
	Receptor        CFDIReceptor    `xml:"Receptor"`
	Conceptos       []CFDIConcepto  `xml:"Conceptos>Concepto"`
	Impuestos       CFDIImpuestos   `xml:"Impuestos"`
	Complemento     CFDIComplemento `xml:"Complemento"`
	Addenda         CFDIAddenda     `xml:"Addenda"`
}

func ParseXml

func ParseXml(doc []byte) CfdiType

func (CfdiType) NumeroDeFactura

func (d CfdiType) NumeroDeFactura() string

type EmisorDomicilioFiscalNode

type EmisorDomicilioFiscalNode struct {
	XMLName   xml.Name `xml:"DomicilioFiscal"`
	Municipio string   `xml:"municipio,attr"`
	Estado    string   `xml:"estado,attr"`
}

type NominaNomina

type NominaNomina struct {
	XMLName          xml.Name `xml:"Nomina"`
	FechaInicialPago string   `xml:"FechaInicialPago,attr"`
	FechaFinalPago   string   `xml:"FechaFinalPago,attr"`
}

type TFDTimbreFiscalDigital

type TFDTimbreFiscalDigital struct {
	XMLName           xml.Name `xml:"TimbreFiscalDigital"`
	NumeroCertificado string   `xml:"noCertificadoSAT,attr"`
	FechaTimbrado     string   `xml:"FechaTimbrado,attr"`
	UUID              string   `xml:"UUID,attr"`
}

func (TFDTimbreFiscalDigital) FechaTimbre

func (tfd TFDTimbreFiscalDigital) FechaTimbre() string

type XmlRecord

type XmlRecord struct {
	Uuid      string
	Xml       string
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL