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
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
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
DeletedPosition
deleted position
public bool DeletedPosition { get; set; }
Property Value
DocumentLevel
The validation level for this element.
protected override DocumentLevel DocumentLevel { get; }
Property Value
ExternalIdentifier
Possibility for one or more external identifier for the calling software. Not necessary for fiscalisation.
public List<string> ExternalIdentifier { get; set; }
Property Value
FiscalAdditionalFields
[JsonIgnore]
public ReadOnlyDictionary<string, object> FiscalAdditionalFields { get; }
Property Value
FiscalAdditionalFieldsInternal
[JsonProperty("FiscalAdditionalFields", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, object> FiscalAdditionalFieldsInternal { get; set; }
Property Value
PositionNumber
The number of the position in the position sequence.
public int PositionNumber { get; set; }
Property Value
PositionReference
Referene to another document position.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public DocumentPositionReference PositionReference { get; set; }
Property Value
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
Type
The type of the position. For possible types see DocumentPositionType.
public abstract DocumentPositionType Type { get; }
Property Value
User
The user for this position (if other user than in document).
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User User { get; set; }
Property Value
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
scaleuintThe 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.