Documentation
¶
Overview ¶
Package mx provides the Mexican tax regime.
Index ¶
Constants ¶
View Source
const ( TaxIdentityTypePerson cbc.Key = "person" TaxIdentityTypeCompany cbc.Key = "company" )
Tax Identity Type
View Source
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
View Source
const (
TaxIdentityCodeForeign cbc.Code = "XEXX010101000"
)
Constants used to specific tax identity codes.
View Source
const (
TaxRateExempt cbc.Key = "exempt"
)
Tax rates specific to Mexico.
Variables ¶
View Source
var ( TaxIdentityRegexpPerson = regexp.MustCompile(TaxIdentityPatternPerson) TaxIdentityRegexpCompany = regexp.MustCompile(TaxIdentityPatternCompany) )
Tax Identity Regexp
Functions ¶
func Calculate ¶
func Calculate(doc interface{}) error
Calculate performs regime specific calculations.
func DetermineTaxCodeType ¶
DetermineTaxCodeType determines the type of tax code or provides an empty key if it looks invalid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.