Table of Contents

Class Vat

Namespace
RetailForce.Fiscalisation.Model
Assembly
RetailForce.Fiscalisation.Model.dll

Represents the value added tax for document and document positions.

[Serializable]
public class Vat : ICloneable
Inheritance
Vat
Implements
Inherited Members

Properties

Caption

The caption for this tax item in country specific language.

public string Caption { get; set; }

Property Value

string

Caption_EN

The caption for this tax item in english.

public string Caption_EN { get; set; }

Property Value

string

SkipVatPercentageValidation

if true the percentage validation for this vat entry will be skipped default value is false

[Required]
public bool SkipVatPercentageValidation { get; set; }

Property Value

bool

ValidFrom

defines the start date from when the vat object is valid default value is RetailForce.Fiscalisation.Constants.CommonConstants.MinDate

[Required]
public DateTimeOffset ValidFrom { get; set; }

Property Value

DateTimeOffset

Remarks

only the date part without timezone will be used for validation, change to type date currently not possible due to backwards compatibility

ValidTo

defines the end date from when the vat object is valid, including the end date default value is RetailForce.Fiscalisation.Constants.CommonConstants.MaxDate

[Required]
public DateTimeOffset ValidTo { get; set; }

Property Value

DateTimeOffset

Remarks

only the date part without timezone will be used for validation, change to type date currently not possible due to backwards compatibility

VatIdentification

The vat identification number.

[Required]
public int VatIdentification { get; set; }

Property Value

int

VatPercent

The percentage for this item.

[Required]
public decimal VatPercent { get; set; }

Property Value

decimal

VatPercent2

The second percentage for this item.

public decimal? VatPercent2 { get; set; }

Property Value

decimal?

VatPercents

The percentage for this item.

[Obsolete("use VatPercent instead!")]
public List<decimal> VatPercents { get; }

Property Value

List<decimal>

Methods

Clone()

Clones the current object.

public object Clone()

Returns

object

A copy of this object.

GetGrossValue(decimal, decimal, decimal?)

Returns the gross value out of the given net value.

public static decimal GetGrossValue(decimal vatPercent1, decimal netValue, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

netValue decimal

The net value for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated gross value.

GetGrossValueFromTaxValue(decimal, decimal, decimal?)

Returns the gross value out of the given values.

public static decimal GetGrossValueFromTaxValue(decimal vatPercent1, decimal taxValue, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

taxValue decimal

The tax value of the first percentage for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated gross value.

GetGrossValueFromTaxValue2(decimal, decimal, decimal?)

Returns the gross value out of the given values.

public static decimal GetGrossValueFromTaxValue2(decimal vatPercent1, decimal taxValue2, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

taxValue2 decimal

The tax value of the secound percentage for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated gross value.

GetNetValue(decimal, decimal, decimal?)

Returns the net value out of the given gross value.

public static decimal GetNetValue(decimal vatPercent1, decimal grossValue, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

grossValue decimal

The gross value for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated net value.

GetNetValueFromTaxValue(decimal, decimal)

public static decimal GetNetValueFromTaxValue(decimal vatPercent, decimal taxValue)

Parameters

vatPercent decimal
taxValue decimal

Returns

decimal

GetTaxValue2FromGrossValue(decimal, decimal, decimal?)

Returns the tax value 2 out of the given values.

public static decimal GetTaxValue2FromGrossValue(decimal vatPercent1, decimal grossValue, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

grossValue decimal

The gross value for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated tax value.

GetTaxValueFromGrossValue(decimal, decimal, decimal?)

Returns the tax value 1 out of the given values.

public static decimal GetTaxValueFromGrossValue(decimal vatPercent1, decimal grossValue, decimal? vatPercent2)

Parameters

vatPercent1 decimal

The percentage for calculation.

grossValue decimal

The gross value for calculation.

vatPercent2 decimal?

The percentage for calculation. optional

Returns

decimal

The calculated tax value.

GetTaxValueFromNetValue(decimal, decimal)

Returns the tax value out of the given values.

public static decimal GetTaxValueFromNetValue(decimal vatPercent, decimal netValue)

Parameters

vatPercent decimal

The percentage for calculation.

netValue decimal

The net value for calculation.

Returns

decimal

The calculated tax value.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.