Class DocumentPositionSubTotal
- Namespace
- RetailForce.Fiscalisation.Model.Document
- Assembly
- RetailForce.Fiscalisation.Model.dll
Subtotal position.
public class DocumentPositionSubTotal : DocumentPositionBase, IDiscountablePosition
- Inheritance
-
ValidationBase<DocumentValidationError>ValidationPropertyBase<DocumentValidationError>DocumentPositionSubTotal
- Implements
- Derived
- Inherited Members
-
ValidationPropertyBase<DocumentValidationError>.Validate()
Properties
BaseValue
The value of the position without discounts.
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public decimal BaseValue { get; set; }
Property Value
Caption
The caption for this position.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Caption { get; set; }
Property Value
Discounts
A list of all discounts for this position.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Discount> Discounts { get; set; }
Property Value
Remarks
At document validation this list will be sorted automatically by DiscountOrder. The DiscountOrder must start with 0 value and must have continuous order.
DocumentLevel
The validation level for this element.
protected override DocumentLevel DocumentLevel { get; }
Property Value
RoundingCount
Counts the amount of rounding positions.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int? RoundingCount { get; set; }
Property Value
- int?
Type
The type of the position. For possible types see DocumentPositionType.
public override DocumentPositionType Type { get; }
Property Value
Value
The value of the position including discounts.
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public decimal Value { get; set; }
Property Value
Methods
Revert()
Reverts the position (turns all values negative)
public override void Revert()
ToString()
Returns the string representation for this DocumentPositionItem.
public override string ToString()
Returns
- string
The string representation for this DocumentPositionItem.
ValidateElement()
Validates the element with element specific validation and returns a list of validation errors.
protected override List<DocumentValidationError> ValidateElement()
Returns
- List<DocumentValidationError>
A list of RetailForce.Common.Validation.ValidationError 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
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.