Documentation
¶
Overview ¶
Package saft provides the SAF-T addon for Portuguese invoices.
Index ¶
Constants ¶
View Source
const ( ExtKeyExemption cbc.Key = "pt-saft-exemption" ExtKeyTaxRate cbc.Key = "pt-saft-tax-rate" ExtKeyInvoiceType cbc.Key = "pt-saft-invoice-type" ExtKeyProductType cbc.Key = "pt-saft-product-type" ExtKeyPaymentType cbc.Key = "pt-saft-payment-type" ExtKeyPaymentMeans cbc.Key = "pt-saft-payment-means" )
SAF-T Extension Keys
View Source
const ( InvoiceTypeStandard cbc.Code = "FT" InvoiceTypeSimplified cbc.Code = "FS" InvoiceTypeInvoiceReceipt cbc.Code = "FR" InvoiceTypeDebitNote cbc.Code = "ND" InvoiceTypeCreditNote cbc.Code = "NC" )
Invoice types
View Source
const ( PaymentTypeCash cbc.Code = "RC" PaymentTypeOther cbc.Code = "RG" )
Payment types
View Source
const ( TaxRateReduced cbc.Code = "RED" TaxRateIntermediate cbc.Code = "INT" TaxRateNormal cbc.Code = "NOR" TaxRateExempt cbc.Code = "ISE" TaxRateOther cbc.Code = "OUT" )
Tax rates
View Source
const ( ProductTypeGoods cbc.Code = "P" ProductTypeService cbc.Code = "S" ProductTypeOther cbc.Code = "O" ProductTypeExcise cbc.Code = "E" ProductTypeFee cbc.Code = "I" )
Product Types
View Source
const (
TagVATCash cbc.Key = "vat-cash"
)
Add-on custom tags
View Source
const ( // V1 for SAF-T (PT) versions 1.x V1 cbc.Key = "pt-saft-v1" )
Variables ¶
This section is empty.
Functions ¶
func PaymentMeansExtensions ¶ added in v0.210.0
func PaymentMeansExtensions() tax.Extensions
PaymentMeansExtensions returns the mapping of payment means to their extension values used by SAF-T PT.
func TaxRateExtensions ¶
func TaxRateExtensions() tax.Extensions
TaxRateExtensions returns the mapping of tax rates defined in PT to their extension values used by SAF-T.
Use this to lookup a tax rate key for a SAF-T tax rate code:
saft.TaxRateExtensions().Lookup("RED") // returns tax.RateReduced
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.