Table of Contents

Class DocumentPositionText

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

Represents a text position (or barcode position).

public class DocumentPositionText : DocumentPositionBase, ITextPosition
Inheritance
ValidationBase<DocumentValidationError>
ValidationPropertyBase<DocumentValidationError>
DocumentPositionText
Implements
Inherited Members
ValidationPropertyBase<DocumentValidationError>.Validate()

Properties

Barcode

The bar code. Please set BarcodeType to set the correct type.

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

Property Value

string

Remarks

Send bar code without check digit. Sending bar code without setting BarcodeType will not print a bar code.

BarcodeType

The type of the bar code if property Barcode is set.

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

Property Value

BarcodeType?

Graphic

Graphic as Base64 string to be printed (for some document types).

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

Property Value

string

Text

The text of the position.

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

Property Value

string

Type

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

public override DocumentPositionType Type { get; }

Property Value

DocumentPositionType

Methods

Revert()

Reverts the position (turns all values negative)

public override void Revert()

ToString()

Returns the string representation for this DocumentPositionText.

public override string ToString()

Returns

string

The string representation for this DocumentPositionText.

ValidateElement()

Validates the element and returns a list of DocumentValidationError objects.

protected override List<DocumentValidationError> ValidateElement()

Returns

List<DocumentValidationError>

A list of DocumentValidationError objects.

ValidateScale(uint)

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

public override 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.