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
Caption_EN
The caption for this tax item in english.
public string Caption_EN { get; set; }
Property Value
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
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
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
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
VatPercent
The percentage for this item.
[Required]
public decimal VatPercent { get; set; }
Property Value
VatPercent2
The second percentage for this item.
public decimal? VatPercent2 { get; set; }
Property Value
VatPercents
The percentage for this item.
[Obsolete("use VatPercent instead!")]
public List<decimal> VatPercents { get; }
Property Value
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
vatPercent1decimalThe percentage for calculation.
netValuedecimalThe net value for calculation.
vatPercent2decimal?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
vatPercent1decimalThe percentage for calculation.
taxValuedecimalThe tax value of the first percentage for calculation.
vatPercent2decimal?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
vatPercent1decimalThe percentage for calculation.
taxValue2decimalThe tax value of the secound percentage for calculation.
vatPercent2decimal?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
vatPercent1decimalThe percentage for calculation.
grossValuedecimalThe gross value for calculation.
vatPercent2decimal?The percentage for calculation. optional
Returns
- decimal
The calculated net value.
GetNetValueFromTaxValue(decimal, decimal)
public static decimal GetNetValueFromTaxValue(decimal vatPercent, decimal taxValue)
Parameters
Returns
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
vatPercent1decimalThe percentage for calculation.
grossValuedecimalThe gross value for calculation.
vatPercent2decimal?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
vatPercent1decimalThe percentage for calculation.
grossValuedecimalThe gross value for calculation.
vatPercent2decimal?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
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.