Documentation
¶
Index ¶
- func DecimalString(value float64) string
- type CofinsAliq
- type CofinsGroup
- type CofinsNt
- type CofinsOutr
- type CofinsQtde
- type CofinsSt
- type Fuel
- type IbsCbs
- type Icms00
- type Icms02
- type Icms10
- type Icms15
- type Icms20
- type Icms30
- type Icms40
- type Icms51
- type Icms53
- type Icms60
- type Icms61
- type Icms70
- type Icms90
- type IcmsGroup
- type IcmsPart
- type IcmsSn101
- type IcmsSn102
- type IcmsSn201
- type IcmsSn202
- type IcmsSn500
- type IcmsSn900
- type IcmsSt
- type IcmsUfDest
- type Ipi
- type IpiNt
- type IpiTrib
- type IpiVariant
- type PisAliq
- type PisGroup
- type PisNt
- type PisOutr
- type PisQtde
- type PisSt
- type PresumedCredit
- type Product
- type Tax
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecimalString ¶ added in v0.21.0
DecimalString writes a price as the plain decimal the API takes, never in exponent form. The catalog's unit price goes through it too.
Types ¶
type CofinsAliq ¶
type CofinsAliq struct {
CST string `json:"cst"`
VBC string `json:"v_bc"`
PCofins string `json:"p_cofins"`
VCofins string `json:"v_cofins"`
}
CofinsAliq is COFINSAliq: COFINS taxed by rate.
func NewCofinsAliq ¶ added in v0.4.0
func NewCofinsAliq(cST, vBC, pCOFINS, vCOFINS string) CofinsAliq
NewCofinsAliq fills the fields the schema requires.
type CofinsGroup ¶
type CofinsGroup interface {
// contains filtered or unexported methods
}
CofinsGroup is any of the COFINS variants.
type CofinsNt ¶
type CofinsNt struct {
CST string `json:"cst"`
}
CofinsNt is COFINSNT: COFINS not taxed.
func NewCofinsNt ¶ added in v0.4.0
NewCofinsNt fills the fields the schema requires.
type CofinsOutr ¶
type CofinsOutr struct {
CST string `json:"cst"`
VBC *string `json:"v_bc,omitempty"`
PCofins *string `json:"p_cofins,omitempty"`
QBCProd *string `json:"q_bc_prod,omitempty"`
VAliqProd *string `json:"v_aliq_prod,omitempty"`
VCofins string `json:"v_cofins"`
}
CofinsOutr is COFINSOutr: COFINS taxed some other way.
func NewCofinsOutr ¶ added in v0.4.0
func NewCofinsOutr(cST, vCOFINS string) CofinsOutr
NewCofinsOutr fills the fields the schema requires.
type CofinsQtde ¶ added in v0.4.0
type CofinsQtde struct {
CST string `json:"cst"`
QBCProd string `json:"q_bc_prod"`
VAliqProd string `json:"v_aliq_prod"`
VCofins string `json:"v_cofins"`
}
CofinsQtde is COFINSQtde: COFINS taxed by quantity.
func NewCofinsQtde ¶ added in v0.4.0
func NewCofinsQtde(qBCProd, vAliqProd, vCOFINS string) CofinsQtde
NewCofinsQtde fills the fields the schema requires.
type CofinsSt ¶ added in v0.4.0
type CofinsSt struct {
VBC *string `json:"v_bc,omitempty"`
PCofins *string `json:"p_cofins,omitempty"`
QBCProd *string `json:"q_bc_prod,omitempty"`
VAliqProd *string `json:"v_aliq_prod,omitempty"`
VCofins string `json:"v_cofins"`
IndSomaCOFINSST *string `json:"ind_soma_cofins_st,omitempty"`
}
CofinsSt is COFINS withheld by substitution.
type Fuel ¶ added in v0.14.0
type Fuel struct {
AnpCode string
AnpDescription string
ConsumerState string
GlpPercent *float64
NaturalGasNationalPercent *float64
NaturalGasImportedPercent *float64
StartingValue *float64
Codif *string
TemperatureQuantity *float64
BiodieselPercent *float64
}
Fuel is the NF-e fuel group (comb), needed for a good on a fuel CFOP. AnpCode (cProdANP, 9 digits), AnpDescription (descANP) and ConsumerState (UFCons) are required; the others are sent only when set. It goes on the wire under the item's "fuel" key and never together with ExtraGroups["comb"].
type IbsCbs ¶ added in v0.9.0
type IbsCbs struct {
CST string
Classification string
Base *float64
// RateState (pIBSUF), RateCity (pIBSMun) and RateFederal (pCBS) are in
// percent and sent only when set, so 0 is a rate a pointer can say. An
// NF-e group carries all three; an NFS-e group carries none.
RateState *float64
RateCity *float64
RateFederal *float64
// OperationIndicator is the cIndOp, 6 digits. Sent only when set.
OperationIndicator *string
// ReductionIbs is the IBS pRedAliq (state and municipality), in percent:
// the cClassTrib's pRedIBS. Sent only when set.
ReductionIbs *float64
// ReductionCbs is the CBS pRedAliq, in percent: the cClassTrib's pRedCBS.
// Sent only when set.
ReductionCbs *float64
}
type Icms00 ¶
type Icms00 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC string `json:"mod_bc"`
VBC string `json:"v_bc"`
PICMS string `json:"p_icms"`
VICMS string `json:"v_icms"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
}
Icms00 is ICMS00: ICMS fully taxed.
type Icms02 ¶ added in v0.4.0
type Icms02 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
QBCMono *string `json:"q_bc_mono,omitempty"`
AdRemICMS string `json:"ad_rem_icms"`
VICMSMono string `json:"v_icms_mono"`
}
Icms02 is ICMS02: ICMS monofasico, taxed by unit.
type Icms10 ¶ added in v0.4.0
type Icms10 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC string `json:"mod_bc"`
VBC string `json:"v_bc"`
PICMS string `json:"p_icms"`
VICMS string `json:"v_icms"`
VBCFCP *string `json:"v_bc_fcp,omitempty"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
VICMSSTDeson *string `json:"v_icms_st_deson,omitempty"`
MotDesICMSST *string `json:"mot_des_icms_st,omitempty"`
}
Icms10 is ICMS10: ICMS taxed with substitution.
type Icms15 ¶ added in v0.4.0
type Icms15 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
QBCMono *string `json:"q_bc_mono,omitempty"`
AdRemICMS string `json:"ad_rem_icms"`
VICMSMono string `json:"v_icms_mono"`
QBCMonoReten *string `json:"q_bc_mono_reten,omitempty"`
AdRemICMSReten string `json:"ad_rem_icms_reten"`
VICMSMonoReten string `json:"v_icms_mono_reten"`
PRedAdRem *string `json:"p_red_ad_rem,omitempty"`
MotRedAdRem *string `json:"mot_red_ad_rem,omitempty"`
}
Icms15 is ICMS15: ICMS monofasico with retention.
type Icms20 ¶ added in v0.4.0
type Icms20 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC string `json:"mod_bc"`
PRedBC string `json:"p_red_bc"`
VBC string `json:"v_bc"`
PICMS string `json:"p_icms"`
VICMS string `json:"v_icms"`
VBCFCP *string `json:"v_bc_fcp,omitempty"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
}
Icms20 is ICMS20: ICMS with a reduced base.
type Icms30 ¶ added in v0.4.0
type Icms30 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
}
Icms30 is ICMS30: ICMS exempt with substitution.
type Icms40 ¶
type Icms40 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
}
Icms40 is ICMS40: ICMS exempt or not taxed.
type Icms51 ¶ added in v0.4.0
type Icms51 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC *string `json:"mod_bc,omitempty"`
PRedBC *string `json:"p_red_bc,omitempty"`
CBenefRBC *string `json:"c_benef_rbc,omitempty"`
VBC *string `json:"v_bc,omitempty"`
PICMS *string `json:"p_icms,omitempty"`
VICMSOp *string `json:"v_icms_op,omitempty"`
PDif *string `json:"p_dif,omitempty"`
VICMSDif *string `json:"v_icms_dif,omitempty"`
VICMS *string `json:"v_icms,omitempty"`
VBCFCP *string `json:"v_bc_fcp,omitempty"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
PFCPDif *string `json:"p_fcp_dif,omitempty"`
VFCPDif *string `json:"v_fcp_dif,omitempty"`
VFCPEfet *string `json:"v_fcp_efet,omitempty"`
}
Icms51 is ICMS51: ICMS deferred.
type Icms53 ¶ added in v0.4.0
type Icms53 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
QBCMono *string `json:"q_bc_mono,omitempty"`
AdRemICMS *string `json:"ad_rem_icms,omitempty"`
VICMSMonoOp *string `json:"v_icms_mono_op,omitempty"`
PDif *string `json:"p_dif,omitempty"`
VICMSMonoDif *string `json:"v_icms_mono_dif,omitempty"`
VICMSMono *string `json:"v_icms_mono,omitempty"`
QBCMonoDif *string `json:"q_bc_mono_dif,omitempty"`
AdRemICMSDif *string `json:"ad_rem_icms_dif,omitempty"`
}
Icms53 is ICMS53: ICMS monofasico deferred.
type Icms60 ¶
type Icms60 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
VBCSTRet *string `json:"v_bc_st_ret,omitempty"`
PST *string `json:"p_st,omitempty"`
VICMSSubstituto *string `json:"v_icms_substituto,omitempty"`
VICMSSTRet *string `json:"v_icms_st_ret,omitempty"`
VBCFCPSTRet *string `json:"v_bc_fcp_st_ret,omitempty"`
PFCPSTRet *string `json:"p_fcp_st_ret,omitempty"`
VFCPSTRet *string `json:"v_fcp_st_ret,omitempty"`
PRedBCEfet *string `json:"p_red_bc_efet,omitempty"`
VBCEfet *string `json:"v_bc_efet,omitempty"`
PICMSEfet *string `json:"p_icms_efet,omitempty"`
VICMSEfet *string `json:"v_icms_efet,omitempty"`
}
Icms60 is ICMS60: ICMS already charged by an earlier substitution.
type Icms61 ¶ added in v0.4.0
type Icms61 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
QBCMonoRet *string `json:"q_bc_mono_ret,omitempty"`
AdRemICMSRet string `json:"ad_rem_icms_ret"`
VICMSMonoRet string `json:"v_icms_mono_ret"`
}
Icms61 is ICMS61: ICMS monofasico already charged earlier.
type Icms70 ¶ added in v0.4.0
type Icms70 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC string `json:"mod_bc"`
PRedBC string `json:"p_red_bc"`
VBC string `json:"v_bc"`
PICMS string `json:"p_icms"`
VICMS string `json:"v_icms"`
VBCFCP *string `json:"v_bc_fcp,omitempty"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
VICMSSTDeson *string `json:"v_icms_st_deson,omitempty"`
MotDesICMSST *string `json:"mot_des_icms_st,omitempty"`
}
Icms70 is ICMS70: ICMS with a reduced base and substitution.
type Icms90 ¶ added in v0.4.0
type Icms90 struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC *string `json:"mod_bc,omitempty"`
VBC *string `json:"v_bc,omitempty"`
PRedBC *string `json:"p_red_bc,omitempty"`
CBenefRBC *string `json:"c_benef_rbc,omitempty"`
PICMS *string `json:"p_icms,omitempty"`
VICMSOp *string `json:"v_icms_op,omitempty"`
PDif *string `json:"p_dif,omitempty"`
VICMSDif *string `json:"v_icms_dif,omitempty"`
VICMS *string `json:"v_icms,omitempty"`
VBCFCP *string `json:"v_bc_fcp,omitempty"`
PFCP *string `json:"p_fcp,omitempty"`
VFCP *string `json:"v_fcp,omitempty"`
PFCPDif *string `json:"p_fcp_dif,omitempty"`
VFCPDif *string `json:"v_fcp_dif,omitempty"`
VFCPEfet *string `json:"v_fcp_efet,omitempty"`
ModBCST *string `json:"mod_bc_st,omitempty"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST *string `json:"v_bc_st,omitempty"`
PICMSST *string `json:"p_icms_st,omitempty"`
VICMSST *string `json:"v_icms_st,omitempty"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
VICMSSTDeson *string `json:"v_icms_st_deson,omitempty"`
MotDesICMSST *string `json:"mot_des_icms_st,omitempty"`
}
Icms90 is ICMS90: ICMS, other cases.
type IcmsGroup ¶
type IcmsGroup interface {
// contains filtered or unexported methods
}
IcmsGroup is any of the ICMS variants.
type IcmsPart ¶ added in v0.4.0
type IcmsPart struct {
Orig string `json:"orig"`
CST string `json:"cst"`
ModBC string `json:"mod_bc"`
VBC string `json:"v_bc"`
PRedBC *string `json:"p_red_bc,omitempty"`
PICMS string `json:"p_icms"`
VICMS string `json:"v_icms"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
PBCOp string `json:"p_bc_op"`
UFST string `json:"uf_st"`
VICMSDeson *string `json:"v_icms_deson,omitempty"`
MotDesICMS *string `json:"mot_des_icms,omitempty"`
IndDeduzDeson *string `json:"ind_deduz_deson,omitempty"`
}
IcmsPart is ICMSPart: ICMS split between the origin and destination states.
func NewIcmsPart ¶ added in v0.4.0
func NewIcmsPart(orig, cST, modBC, vBC, pICMS, vICMS, modBCST, vBCST, pICMSST, vICMSST, pBCOp, uFST string) IcmsPart
NewIcmsPart fills the fields the schema requires.
type IcmsSn101 ¶
type IcmsSn101 struct {
Orig string `json:"orig"`
CSOSN string `json:"csosn"`
PCredSN string `json:"p_cred_sn"`
VCredICMSSN string `json:"v_cred_icms_sn"`
}
IcmsSn101 is ICMSSN101: Simples Nacional ICMS with a credit.
func NewIcmsSn101 ¶
NewIcmsSn101 fills the fields the schema requires.
type IcmsSn102 ¶
IcmsSn102 is ICMSSN102: Simples Nacional ICMS without a credit.
func NewIcmsSn102 ¶ added in v0.4.0
NewIcmsSn102 fills the fields the schema requires.
type IcmsSn201 ¶ added in v0.4.0
type IcmsSn201 struct {
Orig string `json:"orig"`
CSOSN string `json:"csosn"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
PCredSN string `json:"p_cred_sn"`
VCredICMSSN string `json:"v_cred_icms_sn"`
}
IcmsSn201 is ICMSSN201: Simples Nacional ICMS with a credit and substitution.
func NewIcmsSn201 ¶ added in v0.4.0
NewIcmsSn201 fills the fields the schema requires.
type IcmsSn202 ¶ added in v0.4.0
type IcmsSn202 struct {
Orig string `json:"orig"`
CSOSN string `json:"csosn"`
ModBCST string `json:"mod_bc_st"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST string `json:"v_bc_st"`
PICMSST string `json:"p_icms_st"`
VICMSST string `json:"v_icms_st"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
}
IcmsSn202 is ICMSSN202: Simples Nacional ICMS without a credit, with substitution.
func NewIcmsSn202 ¶ added in v0.4.0
NewIcmsSn202 fills the fields the schema requires.
type IcmsSn500 ¶ added in v0.4.0
type IcmsSn500 struct {
Orig string `json:"orig"`
CSOSN string `json:"csosn"`
VBCSTRet *string `json:"v_bc_st_ret,omitempty"`
PST *string `json:"p_st,omitempty"`
VICMSSubstituto *string `json:"v_icms_substituto,omitempty"`
VICMSSTRet *string `json:"v_icms_st_ret,omitempty"`
VBCFCPSTRet *string `json:"v_bc_fcp_st_ret,omitempty"`
PFCPSTRet *string `json:"p_fcp_st_ret,omitempty"`
VFCPSTRet *string `json:"v_fcp_st_ret,omitempty"`
PRedBCEfet *string `json:"p_red_bc_efet,omitempty"`
VBCEfet *string `json:"v_bc_efet,omitempty"`
PICMSEfet *string `json:"p_icms_efet,omitempty"`
VICMSEfet *string `json:"v_icms_efet,omitempty"`
}
IcmsSn500 is ICMSSN500: Simples Nacional ICMS already charged by substitution.
func NewIcmsSn500 ¶ added in v0.4.0
NewIcmsSn500 fills the fields the schema requires.
type IcmsSn900 ¶ added in v0.1.1
type IcmsSn900 struct {
Orig *string `json:"orig,omitempty"`
CSOSN string `json:"csosn"`
ModBC *string `json:"mod_bc,omitempty"`
VBC *string `json:"v_bc,omitempty"`
PRedBC *string `json:"p_red_bc,omitempty"`
PICMS *string `json:"p_icms,omitempty"`
VICMS *string `json:"v_icms,omitempty"`
ModBCST *string `json:"mod_bc_st,omitempty"`
PMVAST *string `json:"p_mva_st,omitempty"`
PRedBCST *string `json:"p_red_bc_st,omitempty"`
VBCST *string `json:"v_bc_st,omitempty"`
PICMSST *string `json:"p_icms_st,omitempty"`
VICMSST *string `json:"v_icms_st,omitempty"`
VBCFCPST *string `json:"v_bc_fcp_st,omitempty"`
PFCPST *string `json:"p_fcp_st,omitempty"`
VFCPST *string `json:"v_fcp_st,omitempty"`
PCredSN *string `json:"p_cred_sn,omitempty"`
VCredICMSSN *string `json:"v_cred_icms_sn,omitempty"`
}
IcmsSn900 is ICMSSN900: Simples Nacional ICMS, other cases.
type IcmsSt ¶ added in v0.4.0
type IcmsSt struct {
Orig string `json:"orig"`
CST string `json:"cst"`
VBCSTRet string `json:"v_bc_st_ret"`
PST *string `json:"p_st,omitempty"`
VICMSSubstituto *string `json:"v_icms_substituto,omitempty"`
VICMSSTRet string `json:"v_icms_st_ret"`
VBCFCPSTRet *string `json:"v_bc_fcp_st_ret,omitempty"`
PFCPSTRet *string `json:"p_fcp_st_ret,omitempty"`
VFCPSTRet *string `json:"v_fcp_st_ret,omitempty"`
VBCSTDest string `json:"v_bc_st_dest"`
VICMSSTDest string `json:"v_icms_st_dest"`
PRedBCEfet *string `json:"p_red_bc_efet,omitempty"`
VBCEfet *string `json:"v_bc_efet,omitempty"`
PICMSEfet *string `json:"p_icms_efet,omitempty"`
VICMSEfet *string `json:"v_icms_efet,omitempty"`
}
IcmsSt is ICMSST: ICMS charged earlier, for the substituted taxpayer.
type IcmsUfDest ¶
type IcmsUfDest struct {
VBCUFDest string `json:"v_bc_uf_dest"`
VBCFCPUFDest *string `json:"v_bc_fcp_uf_dest,omitempty"`
PFCPUFDest *string `json:"p_fcp_uf_dest,omitempty"`
PICMSUFDest string `json:"p_icms_uf_dest"`
PICMSInter string `json:"p_icms_inter"`
PICMSInterPart string `json:"p_icms_inter_part"`
VFCPUFDest *string `json:"v_fcp_uf_dest,omitempty"`
VICMSUFDest string `json:"v_icms_uf_dest"`
VICMSUFRemet string `json:"v_icms_uf_remet"`
}
IcmsUfDest is the interstate ICMS share owed to the destination state.
type Ipi ¶
type Ipi struct {
CNPJProd *string `json:"cnpj_prod,omitempty"`
CSelo *string `json:"c_selo,omitempty"`
QSelo *string `json:"q_selo,omitempty"`
CEnq string `json:"c_enq"`
Trib IpiVariant `json:"-"`
}
Ipi is this item's IPI.
type IpiTrib ¶
type IpiTrib struct {
CST string `json:"cst"`
VBC *string `json:"v_bc,omitempty"`
PIPI *string `json:"p_ipi,omitempty"`
QUnid *string `json:"q_unid,omitempty"`
VUnid *string `json:"v_unid,omitempty"`
VIPI string `json:"v_ipi"`
}
IpiTrib is IPITrib: IPI taxed by rate or by quantity.
func NewIpiTrib ¶ added in v0.4.0
NewIpiTrib fills the fields the schema requires.
type IpiVariant ¶
type IpiVariant interface {
// contains filtered or unexported methods
}
IpiVariant is any of the IPI variants.
type PisAliq ¶
type PisAliq struct {
CST string `json:"cst"`
VBC string `json:"v_bc"`
PPIS string `json:"p_pis"`
VPIS string `json:"v_pis"`
}
PisAliq is PISAliq: PIS taxed by rate.
func NewPisAliq ¶ added in v0.4.0
NewPisAliq fills the fields the schema requires.
type PisGroup ¶
type PisGroup interface {
// contains filtered or unexported methods
}
PisGroup is any of the PIS variants.
type PisOutr ¶
type PisOutr struct {
CST string `json:"cst"`
VBC *string `json:"v_bc,omitempty"`
PPIS *string `json:"p_pis,omitempty"`
QBCProd *string `json:"q_bc_prod,omitempty"`
VAliqProd *string `json:"v_aliq_prod,omitempty"`
VPIS string `json:"v_pis"`
}
PisOutr is PISOutr: PIS taxed some other way.
func NewPisOutr ¶ added in v0.4.0
NewPisOutr fills the fields the schema requires.
type PisQtde ¶ added in v0.4.0
type PisQtde struct {
CST string `json:"cst"`
QBCProd string `json:"q_bc_prod"`
VAliqProd string `json:"v_aliq_prod"`
VPIS string `json:"v_pis"`
}
PisQtde is PISQtde: PIS taxed by quantity.
func NewPisQtde ¶ added in v0.4.0
NewPisQtde fills the fields the schema requires.
type PisSt ¶ added in v0.4.0
type PisSt struct {
VBC *string `json:"v_bc,omitempty"`
PPIS *string `json:"p_pis,omitempty"`
QBCProd *string `json:"q_bc_prod,omitempty"`
VAliqProd *string `json:"v_aliq_prod,omitempty"`
VPIS string `json:"v_pis"`
IndSomaPISST *string `json:"ind_soma_pis_st,omitempty"`
}
PisSt is PIS withheld by substitution.
type PresumedCredit ¶
type Product ¶
type Product struct {
// ItemID names a catalog item of the company (see stackin.Items). With
// it, Description is optional and the item fills whatever the line
// leaves out: Unit, Barcode, NCM, CFOP, CEST, Tax, ServiceCode,
// TaxRetained and, when neither Amount nor UnitPrice is set, the price.
// A field set here wins. Unit is then not defaulted to UN and
// TaxRetained is sent only when set (nil), so the item's values are not
// overridden by the SDK's own defaults.
ItemID string
Description string
Amount float64
UnitPrice *float64
Unit string
Quantity float64
Barcode *string
Freight *float64
Insurance *float64
Discount *float64
OtherExpenses *float64
UsedMovableAsset bool
PurchaseOrder *string
PurchaseOrderItem *string
NCM *string
CFOP *string
CEST *string
NVECodes []string
IndEscala *string
ManufacturerCNPJ *string
TaxBenefitCode *string
PresumedCredits []PresumedCredit
ExTipi *string
ImportContentControlNumber *string
RecopiNumber *string
ExtraGroups map[string]any
Tax *Tax
IbsCbs *IbsCbs
Fuel *Fuel
ServiceCode *string // LC 116/2003 item.subitem, nfse only
ServiceDiscount *float64 // unconditional discount, nfse only
// TaxRetained is a pointer so false can be sent on a line with an ItemID
// (turning off a retention the item has). nil is left to the item, or
// sent as false when there is no ItemID.
TaxRetained *bool // ISSQN retained by the tomador, nfse only
Observations *string // nfse only
}
type Tax ¶
type Tax struct {
VTotTrib *string
Icms IcmsGroup
IcmsUfDest *IcmsUfDest
Ipi *Ipi
Pis PisGroup
PisSt *PisSt
Cofins CofinsGroup
CofinsSt *CofinsSt
}
Tax is this item's taxes, already computed by the caller.