Table of Contents

Class DocumentPositionItem

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

One position of one document. Document positions can have multiple types.

[Serializable]
public class DocumentPositionItem : DocumentPositionItemBase, IBusinessTransactionTypePosition, IVatPosition, ICloneable, IDiscountablePosition
Inheritance
ValidationBase<DocumentValidationError>
ValidationPropertyBase<DocumentValidationError>
DocumentPositionItem
Implements
Inherited Members
ValidationPropertyBase<DocumentValidationError>.Validate()
Extension Methods

Properties

BaseValue

Internal property not for external use.

[JsonIgnore]
public decimal BaseValue { get; }

Property Value

decimal

CostPrice

The cost price (per unit) for this item in this sale.

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

Property Value

decimal?

Remarks

If not available send null value.

Discounts

A list of all discounts for this position.

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Discount> Discounts { get; set; }

Property Value

List<Discount>

Remarks

At document validation this list will be sorted automatically by DiscountOrder. The DiscountOrder must start with 0 value and must have continuous order.

InHouse

True if the goods are consumed in house; otherwise false (takeaway).

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

Property Value

bool

ItemCaption

Represents the caption of the item.

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

Property Value

string

ItemDateOfEntry

The entry date for the item in the master data table.

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

Property Value

DateTimeOffset?

ItemGroupCaption

Represents the caption of the item group.

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

Property Value

string

ItemGroupId

Represents the key of the item group.

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

Property Value

string

ItemSerialNumber

Serial number for the item.

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

Property Value

string

ItemShortCaption

Represents a short caption for the item (e.g. used for printing purposes on receipt print).

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

Property Value

string

ItemType

The type of an item.

public override ItemType? ItemType { get; set; }

Property Value

ItemType?

SubItems

includes the sub items of an position if UseSubItemVatCalculation is true vat values have to be set otherwise the vat values from the position will be used and sub item vat values will be ignored

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<DocumentPositionSubItem> SubItems { get; set; }

Property Value

List<DocumentPositionSubItem>

Type

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

public override DocumentPositionType Type { get; }

Property Value

DocumentPositionType

UseSubItemVatCalculation

True if the vat calculation of the sub items is taken and the vat of the parent item position is ignored; otherwise false.

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

Property Value

bool

Remarks

Default is true. This flag only takes effect if property SubItems has at least one sub item.

Value

Internal property not for external use.

[JsonIgnore]
public decimal Value { get; }

Property Value

decimal

Methods

Clone()

Clones the position to a new object.

public object Clone()

Returns

object

A DocumentPositionItem object representing the copy of the actual position.

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 and returns a list of DocumentValidationError objects.

protected override List<DocumentValidationError> ValidateElement()

Returns

List<DocumentValidationError>

A list of DocumentValidationError objects.

Exceptions

NotImplementedException

Thrown if a certain DiscountType is not supported.