Documentation
¶
Overview ¶
Package sat provides specifications from the Mexican SAT (Servicio de Administración Tributaria) tax authority.
Index ¶
Constants ¶
const ( StampSignature cbc.Key = "sat-sig" // Signature - Sello Digital del SAT (optional) StampSerial cbc.Key = "sat-serial" // Cert Serial - Número de Certificado SAT StampTimestamp cbc.Key = "sat-timestamp" // Timestamp - Fecha y hora de certificación del SAT StampUUID cbc.Key = "sat-uuid" // Folio Fiscal StampURL cbc.Key = "sat-url" // URL QR Code StampProviderRFC cbc.Key = "sat-provider-rfc" // Provider RFC - RFC del Proveedor de Certificación StampChain cbc.Key = "sat-chain" // Cadena original del complemento de certificación digital del SAT )
Official SAT codes to include in stamps.
const ( KeyFormaPago cbc.Key = "sat-forma-pago" // for mapping to c_FormaPago’s codes KeyTipoRelacion cbc.Key = "sat-tipo-relacion" // for mapping to c_TipoRelacion’s codes KeyImpuesto cbc.Key = "sat-impuesto" // for mapping to c_Impuesto’s codes )
Custom keys used typically in meta or codes information.
const ( TaxCategoryRVAT cbc.Code = "RVAT" // IVA (Retenido) TaxCategoryIEPS cbc.Code = "IEPS" // Impuesto Especial sobre Producción y Servicios TaxCategoryRIEPS cbc.Code = "RIEPS" // Impuesto Especial sobre Producción y Servicios (Retenido) TaxCategoryISR cbc.Code = "ISR" // Impuesto Sobre la Renta )
Local tax categories
const ( TaxIdentityCodeGeneric cbc.Code = "XAXX010101000" TaxIdentityCodeForeign cbc.Code = "XEXX010101000" )
Constants used to specific tax identity codes.
const ( TaxIdentityTypePerson cbc.Key = "person" TaxIdentityTypeCompany cbc.Key = "company" )
Tax Identity Type
const ( TaxIdentityPatternPerson = `^([A-ZÑ&]{4})([0-9]{6})([A-Z0-9]{3})$` TaxIdentityPatternCompany = `^([A-ZÑ&]{3})([0-9]{6})([A-Z0-9]{3})$` )
Tax Identity Patterns
const (
TaxRateExempt cbc.Key = "exempt"
)
Local tax rates
Variables ¶
var ( TaxIdentityRegexpPerson = regexp.MustCompile(TaxIdentityPatternPerson) TaxIdentityRegexpCompany = regexp.MustCompile(TaxIdentityPatternCompany) )
Tax Identity Regexp
Functions ¶
func CorrectionDefinitions ¶
func CorrectionDefinitions() []*tax.CorrectionDefinition
CorrectionDefinitions provides the array of correction definitions that apply to SAT
func DetermineTaxCodeType ¶
DetermineTaxCodeType determines the type of tax code or provides an empty key if it looks invalid.
func TaxCategories ¶
func TaxCategories() []*tax.CategoryDef
TaxCategories returns the list of tax categories used in Mexico.
func ValidateTaxCode ¶
func ValidateTaxCode(value interface{}) error
ValidateTaxCode validates a tax code according to the rules defined by the Mexican SAT.
func ValidateTaxIdentity ¶
ValidateTaxIdentity validates a tax identity for SAT.
Types ¶
This section is empty.