Table of Contents

Class DocumentPositionBase

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

Base class for all positions.

[JsonConverter(typeof(DocumentJsonConverter))]
[Serializable]
public abstract class DocumentPositionBase : DocumentValidationBase
Inheritance
ValidationBase<DocumentValidationError>
ValidationPropertyBase<DocumentValidationError>
DocumentPositionBase
Derived
Inherited Members
ValidationPropertyBase<DocumentValidationError>.Validate()
ValidationBase<DocumentValidationError>.ValidateElement()

Properties

AdditionalFields

Additional position fields.

public Dictionary<string, string> AdditionalFields { get; set; }

Property Value

Dictionary<string, string>

Remarks

The key is not case sensitive.

CancellationPosition

True if this position cancels a position of another document; otherwise false.

[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public bool CancellationPosition { get; set; }

Property Value

bool

Remarks

Please ensure to set PositionReference with type Cancellation if setting this property to true.

CreateDate

The create date of the position if available.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DateTime? CreateDate { get; set; }

Property Value

DateTime?

DeletedPosition

deleted position

public bool DeletedPosition { get; set; }

Property Value

bool

DocumentLevel

The validation level for this element.

protected override DocumentLevel DocumentLevel { get; }

Property Value

DocumentLevel

ExternalIdentifier

Possibility for one or more external identifier for the calling software. Not necessary for fiscalisation.

public List<string> ExternalIdentifier { get; set; }

Property Value

List<string>

FiscalAdditionalFields

[JsonIgnore]
public ReadOnlyDictionary<string, object> FiscalAdditionalFields { get; }

Property Value

ReadOnlyDictionary<string, object>

FiscalAdditionalFieldsInternal

[JsonProperty("FiscalAdditionalFields", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, object> FiscalAdditionalFieldsInternal { get; set; }

Property Value

Dictionary<string, object>

PositionNumber

The number of the position in the position sequence.

public int PositionNumber { get; set; }

Property Value

int

PositionReference

Referene to another document position.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DocumentPositionReference PositionReference { get; set; }

Property Value

DocumentPositionReference

Remarks

Must be set if the NetValue/GrossValue of the position is negative value.

SalesPerson

The salesperson for this position (if other salesperson than in document).

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User SalesPerson { get; set; }

Property Value

User

Type

The type of the position. For possible types see DocumentPositionType.

public abstract DocumentPositionType Type { get; }

Property Value

DocumentPositionType

User

The user for this position (if other user than in document).

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User User { get; set; }

Property Value

User

Methods

Revert()

Reverts the position (turns all values negative)

public abstract void Revert()

ToString()

Returns the string representation for this DocumentPositionBase.

public override string ToString()

Returns

string

The string representation for this DocumentPositionBase.

ValidateScale(uint)

Returns whether the scale of all amounts of the position is smaller or equal the given scale.

public abstract bool ValidateScale(uint scale)

Parameters

scale uint

The maximum scale for all amounts of the position.

Returns

bool

True if the scale of all amounts is smaller or equal the given scale; otherwise false.