saft

package
v0.216.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

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"
	ExtKeyProductType  cbc.Key = "pt-saft-product-type"
	ExtKeyPaymentMeans cbc.Key = "pt-saft-payment-means"

	// Document types extensions
	ExtKeyInvoiceType  cbc.Key = "pt-saft-invoice-type"
	ExtKeyWorkType     cbc.Key = "pt-saft-work-type"
	ExtKeyMovementType cbc.Key = "pt-saft-movement-type"
	ExtKeyPaymentType  cbc.Key = "pt-saft-payment-type"
)

SAF-T Extension Keys

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 (
	InvoiceTypeStandard       cbc.Code = "FT"
	InvoiceTypeSimplified     cbc.Code = "FS"
	InvoiceTypeInvoiceReceipt cbc.Code = "FR"
	InvoiceTypeDebitNote      cbc.Code = "ND"
	InvoiceTypeCreditNote     cbc.Code = "NC"

	MovementTypeDeliveryNote cbc.Code = "GR"
	MovementTypeWaybill      cbc.Code = "GT"
	MovementTypeFixedAssets  cbc.Code = "GA"
	MovementTypeConsignment  cbc.Code = "GC"
	MovementTypeReturn       cbc.Code = "GD"

	WorkTypeTableQueries      cbc.Code = "CM"
	WorkTypeConsignmentCredit cbc.Code = "CC"
	WorkTypeConsignmentInv    cbc.Code = "FC"
	WorkTypeWorksheets        cbc.Code = "FO"
	WorkTypePurchaseOrder     cbc.Code = "NE"
	WorkTypeOther             cbc.Code = "OU"
	WorkTypeBudgets           cbc.Code = "OR"
	WorkTypeProforma          cbc.Code = "PF"
	WorkTypeDocuments         cbc.Code = "DC"
	WorkTypePremium           cbc.Code = "RP"
	WorkTypeChargeback        cbc.Code = "RE"
	WorkTypeCoInsurers        cbc.Code = "CS"
	WorkTypeLeadCoInsurer     cbc.Code = "LD"
	WorkTypeReinsurance       cbc.Code = "RA"

	PaymentTypeCash  cbc.Code = "RC"
	PaymentTypeOther cbc.Code = "RG"
)

Document 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.

Jump to

Keyboard shortcuts

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