Table of Contents

Class TaxRetentionVO

Namespace
PHCBusinessLayer
Assembly
PHCBusinessLayer.dll

Detail Taxes

[AttTable("TaxRetention", 20240111)]
[AttTableOrderBy(OrderFields = "taxretention.dataini,taxretention.codretention,taxretention.descricao,\r\n                              case when taxretention.mathtype=1 then taxretention.percentagevalue else taxretention.fixedvalue end", COrderType = "D,A,A,A")]
[AttTableFlags(new TableFlags[] { TableFlags.MasterEntity, TableFlags.TableForJorge, TableFlags.CanUpdFromSourceBD, TableFlags.RequiresAdminAccess })]
[AttTableVOInfo(typeof(TaxRetentionAttInfo))]
[AttTableMaintenance(typeof(TaxRetentionMaintenance))]
public class TaxRetentionVO : BusinessVO, IBaseSerialization, ICloneVO, ICloneable, IChange, IParent, IGenericVO
Inheritance
TaxRetentionVO

Properties

TaxesVO

[AttExternalCollection(typeof(TaxesVO), new string[] { "[Taxes].[taxesstamp]", "[TaxRetention].[taxesstamp]" })]
public TaxesVO TaxesVO { get; }

Property Value

TaxesVO

applytypename

Apply Type name

[AttLenght(30)]
[AttLocale(typeof(TaxRetentionAttInfo), new string[] { "[TaxRetention].[applytype]" })]
public string applytypename { get; set; }

Property Value

string

codstamp

With the dataini field it forms a unique key

[AttLenght(25)]
[AttForeignKey(CanDuplicate = true, ForeignType = typeof(TaxRetentionVO), HiddenField = false)]
[AttIndex]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
public string codstamp { get; set; }

Property Value

string

codtaxes

Tax type code, it's TaxesTypes.Item codigo

[AttLenght(20)]
[AttForeignKey(CanDuplicate = true, ForeignType = typeof(TaxesVO), HiddenField = false)]
[AttIndex]
[AttList(Hidden = true)]
[AttDocType(typeof(TaxesVO))]
[AttLogInfo(0)]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
[AttEntityAvailable(typeof(TaxesVO))]
public string codtaxes { get; set; }

Property Value

string

dataini

Date

[AttLogInfo(1)]
[AttList]
[AttMandatory]
public DateTime dataini { get; set; }

Property Value

DateTime

descricao

Tax description (PT Remunerações auferidas ao abrigo de acordos de cooperação)

[AttLenght(300)]
[AttLogInfo(3)]
[AttList]
[AttMandatory]
[AttIndex]
public string descricao { get; set; }

Property Value

string

Remarks

This field is used to fill tag "2.4.1 - ProductCode" of table "2.4 - Product" of the SAFT file which has a maximum of 30 characters, so it is necessary that in PT locations there is a business rule that validates that the first 60 characters are unique in the database, but only for taxes other than withholding or stamp duty (IS)

fixedvalue

Fixed value when mathtype = TaxMathTypes.Value

[AttLenght(19, 6)]
[AttMinValue(0)]
[AttFieldType(AttFieldType.InputTypes.currency)]
[AttList]
public decimal fixedvalue { get; set; }

Property Value

decimal

inativo

Inactive ?

[AttList(Inactive = true)]
public bool inativo { get; set; }

Property Value

bool

isReadOnly

Exclusive use of PHC

[AttList(Inactive = true)]
[AttPhcOwner(new string[] { "inativo" })]
public bool isReadOnly { get; set; }

Property Value

bool

labelField

Title used for selection in lists

[AttLenght(100)]
[AttVirtualField(typeof(TaxRetentionAttInfo))]
[AttLabelField(new string[] { "[TaxRetention].[codtaxes]", "[TaxRetention].[descricao]" })]
public string labelField { get; set; }

Property Value

string

Remarks

Observe the default sorting defined in the VO via metadata, and put the get of this property to return a string compatible with the order of the fields indicated in the sort

mathtypename

Calculation Type name

[AttLenght(20)]
[AttLocale(typeof(TaxRetentionAttInfo), new string[] { "[TaxRetention].[mathtype]" })]
public string mathtypename { get; set; }

Property Value

string

ndoctaxes

Is a conversion to numeric of codigo field.

[AttLenght(18)]
[AttHidden]
[AttVirtualField(typeof(TaxRetentionAttInfo))]
[AttDocType(typeof(TaxesVO))]
public decimal ndoctaxes { get; set; }

Property Value

decimal

Remarks

its only use to build TaxRetention routes across the series.

normativo

Legal normative

public string normativo { get; set; }

Property Value

string

percentagevalue

Percentage value when mathtype = TaxMathTypes.Percentage

[AttLenght(7, 4)]
[AttMinValue(0)]
[AttMaxValue(100)]
[AttFieldType(AttFieldType.InputTypes.percentage)]
[AttList]
public decimal percentagevalue { get; set; }

Property Value

decimal

safttaxtype

Saft tax type

[AttVirtualField]
[AttHidden]
public string safttaxtype { get; set; }

Property Value

string

taxesstamp

ForeignKey to TaxesVO

[AttLenght(25)]
[AttForeignKey(CanDuplicate = true, ForeignType = typeof(TaxesVO), HiddenField = false)]
[AttIndex]
[AttEntityAvailable(typeof(TaxesVO))]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
public string taxesstamp { get; set; }

Property Value

string

taxretentionstamp

Unique ID

[AttLenght(25)]
public string taxretentionstamp { get; set; }

Property Value

string

taxtype

Tax type

[AttVirtualField]
[AttHidden]
public TaxTypes taxtype { get; set; }

Property Value

TaxTypes

taxvalue

Tax value

[AttLenght(19, 6)]
[AttVirtualField(typeof(TaxRetentionAttInfo))]
public decimal taxvalue { get; set; }

Property Value

decimal

Methods

GetSeriesName()

public override string GetSeriesName()

Returns

string

GetSeriesValue()

public override decimal GetSeriesValue()

Returns

decimal

Explicit Interface Implementations

applytype

Apply Type

[AttLenght(2)]
[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
TaxApplyTypes applytype { get; set; }

Returns

TaxApplyTypes

codretention

Tax code description (IS = 1, 1.1 ...)

[AttLenght(30)]
[AttLogInfo(2)]
[AttMandatory]
[AttList]
string codretention { get; set; }

Returns

string

mathtype

Calculation Type

[AttLenght(2)]
[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
TaxMathTypes mathtype { get; set; }

Returns

TaxMathTypes

vatsubject

Vat subject or not, when Apply Type = TaxApplyTypes.Base

bool vatsubject { get; set; }

Returns

bool