Crm.Pos.Sales Entity
Namespace: Crm.Pos
Stores header-level information for individual retail transactions processed through the Point-of-Sale (POS) system. Each record represents a single sale event, typically associated with a shop, POS terminal, operator, and one or more payment methods. It is optimized for high-volume, anonymous sales, such as those in retail stores, restaurants, and service centers. It supports lifecycle tracking (open, closed, voided), date-based aggregation, and operator accountability. Entity: Pos_Sales (Introduced in version 25.1.3.46)
Default Visualization
Default Display Text Format:
{DocumentNumber}
Default Search Members:
DocumentNumber
Code Data Member:
DocumentNumber
Category: Documents
Show in UI: ShownByDefault
Track Changes
Min level: 0 - Do not track changes
Max level: 4 - Track object attribute and blob changes
Aggregate
An aggregate is a cluster of domain objects that can be treated as a single unit.
Aggregate Tree
Attributes
Name | Type | Description |
---|---|---|
ClosedAt | datetime nullable | When the sale was finalized (paid, voided, or completed). Filter(eq;ge;le) |
DisplayText | string | Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object. |
DocumentNumber | string (16) | Receipt document number. Required Filter(eq;like) |
Id | guid | |
IsVoided | boolean | Marked true if sale is canceled/voided. Required Default(false) Filter(eq) |
ObjectVersion | int32 | The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking. |
OpenedAt | datetime | Time of the opening of the POS sale. Required Default(Now) Filter(eq;ge;le) |
OriginalSaleNumber | string (16) nullable | Original sale document number. Might be specified when this sale refunds/returns another POS sale. Especially useful when the original document is not in the system. Filter(eq;like) |
SaleDate | date | Represents the business date of the sale (used for aggregations, reporting, accounting). Typically aligns with date when it was closed, not necessarily when it was opened. Required Default(Now) Filter(eq;ge;le) |
SaleKind | SaleKind | Kind of POS sale event. Typically it is "Normal sale". Required Default("SAL") Filter(eq) |
SaleStage | SaleStage | General stage of the sale. Finalized sales must have matching amounts between header and detail lines. Required Default("NEW") Filter(eq) |
TotalAmount | Amount (14, 2) | Total net amount in the sale currency (positive for normal sale, negative for returns/refunds). Currency: SaleCurrency Required Filter(eq) Introduced in version 25.1.3.47 |
TotalAmountBase | Amount (14, 2) | Total net amount in base currency (positive for normal sale, negative for returns/refunds). Currency: Location.EnterpriseCompany.BaseCurrency Required Filter(eq;ge;le) |
TotalAmountReporting | Amount (14, 2) nullable | Total net amount in reporting currency (if applicable). Currency: Location.EnterpriseCompany.ReportingCurrency Filter(eq;ge;le) |
VoidedAt | datetime nullable | Date and time when the document was voided. Filter(eq;ge;le) |
References
Name | Type | Description |
---|---|---|
ClosedBy | Operators (nullable) | The operator who finalized or closed the sale (may differ from opener). Filter(multi eq) |
Customer | Customers (nullable) | Set for known customers (e.g. loyalty program), otherwise null. Filter(multi eq) |
Location | Locations | Link to location where the sale occurred. Required Filter(multi eq) |
OpenedBy | Operators | The operator who created the sale. Required Filter(multi eq) |
Operator | Operators | Primary operator, responsible for the POS sale (used for reports, commissions, etc.). Typically and by default it is set to the OpenedBy operator. Required Filter(multi eq) |
OriginalSale | Sales (nullable) | Might be specified when this sale refunds/returns another POS sale (and the original POS sale is in the system). Filter(multi eq) |
PaymentType | PaymentTypes (nullable) | Set when there is single payment type (method) for the whole sale. null when there are multiple payments. Filter(multi eq) |
SaleCurrency | Currencies | Reference to the currency in which this POS sale is recorded. Required Filter(multi eq) Introduced in version 25.1.3.47 |
Terminal | Terminals | Link to specific POS workspace terminal used. Required Filter(multi eq) |
VoidedBy | Operators (nullable) | The operator who voided the document. Filter(multi eq) |
Child Collections
Name | Type | Description |
---|---|---|
Lines | SaleLines | List of SaleLine (Crm.Pos.SaleLines.md) child objects, based on the Crm.Pos.SaleLine.PosSale (Crm.Pos.SaleLines.md#possale) back reference |
Payments | SalePayments | List of SalePayment (Crm.Pos.SalePayments.md) child objects, based on the Crm.Pos.SalePayment.PosSale (Crm.Pos.SalePayments.md#possale) back reference |
Attribute Details
ClosedAt
When the sale was finalized (paid, voided, or completed). Filter(eq;ge;le)
Type: datetime nullable
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault
DisplayText
Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.
Type: string
Category: Calculated Attributes
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault
DocumentNumber
Receipt document number. Required
Filter(eq;like)
Type: string (16)
Category: System
Supported Filters: Equals, Like
Supports Order By: False
Maximum Length: 16
Show in UI: ShownByDefault
Id
Type: guid
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Default Value: NewGuid
Show in UI: CannotBeShown
IsVoided
Marked true if sale is canceled/voided. Required
Default(false)
Filter(eq)
Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault
ObjectVersion
The latest version of the extensible data object for the aggregate root for the time the object is loaded from the database. Can be used for optimistic locking.
Type: int32
Category: Extensible Data Object
Supported Filters: NotFilterable
Supports Order By: ****
Show in UI: HiddenByDefault
OpenedAt
Time of the opening of the POS sale. Required
Default(Now)
Filter(eq;ge;le)
Type: datetime
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Default Value: CurrentDateTime
Show in UI: ShownByDefault
OriginalSaleNumber
Original sale document number. Might be specified when this sale refunds/returns another POS sale. Especially useful when the original document is not in the system. Filter(eq;like)
Type: string (16) nullable
Category: System
Supported Filters: Equals, Like
Supports Order By: False
Maximum Length: 16
Show in UI: ShownByDefault
SaleDate
Represents the business date of the sale (used for aggregations, reporting, accounting). Typically aligns with date when it was closed, not necessarily when it was opened. Required
Default(Now)
Filter(eq;ge;le)
Type: date
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Default Value: CurrentDateTime
Show in UI: ShownByDefault
SaleKind
Kind of POS sale event. Typically it is "Normal sale". Required
Default("SAL")
Filter(eq)
Type: SaleKind
Category: System
Allowed values for the SaleKind
(Crm.Pos.Sales.md#salekind) data attribute
Allowed Values (Crm.Pos.SalesRepository.SaleKind Enum Members)
Value | Description |
---|---|
NormalSale | Normal sale. Stored as 'SAL'. Database Value: 'SAL' Model Value: 0 Domain API Value: 'NormalSale' |
ReturnOrrefund | Return/refund. Stored as 'RET'. Database Value: 'RET' Model Value: 1 Domain API Value: 'ReturnOrrefund' |
Mixed | Mixed. Stored as 'MIX'. Database Value: 'MIX' Model Value: 2 Domain API Value: 'Mixed' |
Supported Filters: Equals
Supports Order By: False
Default Value: NormalSale
Show in UI: ShownByDefault
SaleStage
General stage of the sale. Finalized sales must have matching amounts between header and detail lines. Required
Default("NEW")
Filter(eq)
Type: SaleStage
Category: System
Allowed values for the SaleStage
(Crm.Pos.Sales.md#salestage) data attribute
Allowed Values (Crm.Pos.SalesRepository.SaleStage Enum Members)
Value | Description |
---|---|
New | New. Stored as 'NEW'. Database Value: 'NEW' Model Value: 0 Domain API Value: 'New' |
Finalized | Finalized. Stored as 'FIN'. Database Value: 'FIN' Model Value: 1 Domain API Value: 'Finalized' |
Supported Filters: Equals
Supports Order By: False
Default Value: New
Show in UI: ShownByDefault
TotalAmount
Total net amount in the sale currency (positive for normal sale, negative for returns/refunds). Currency: SaleCurrency
Required
Filter(eq)
Introduced in version 25.1.3.47
Type: Amount (14, 2)
Category: System
Supported Filters: Equals
Supports Order By: False
Show in UI: ShownByDefault
TotalAmountBase
Total net amount in base currency (positive for normal sale, negative for returns/refunds). Currency: Location.EnterpriseCompany.BaseCurrency
Required
Filter(eq;ge;le)
Type: Amount (14, 2)
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault
TotalAmountReporting
Total net amount in reporting currency (if applicable). Currency: Location.EnterpriseCompany.ReportingCurrency
Filter(eq;ge;le)
Type: Amount (14, 2) nullable
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault
VoidedAt
Date and time when the document was voided. Filter(eq;ge;le)
Type: datetime nullable
Category: System
Supported Filters: Equals, GreaterThanOrLessThan
Supports Order By: False
Show in UI: ShownByDefault
Reference Details
ClosedBy
The operator who finalized or closed the sale (may differ from opener). Filter(multi eq)
Type: Operators (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Customer
Set for known customers (e.g. loyalty program), otherwise null. Filter(multi eq)
Type: Customers (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Location
Link to location where the sale occurred. Required
Filter(multi eq)
Type: Locations
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
OpenedBy
The operator who created the sale. Required
Filter(multi eq)
Type: Operators
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Operator
Primary operator, responsible for the POS sale (used for reports, commissions, etc.). Typically and by default it is set to the OpenedBy operator. Required
Filter(multi eq)
Type: Operators
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
OriginalSale
Might be specified when this sale refunds/returns another POS sale (and the original POS sale is in the system). Filter(multi eq)
Type: Sales (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
PaymentType
Set when there is single payment type (method) for the whole sale. null when there are multiple payments. Filter(multi eq)
Type: PaymentTypes (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
SaleCurrency
Reference to the currency in which this POS sale is recorded. Required
Filter(multi eq)
Introduced in version 25.1.3.47
Type: Currencies
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
Back-End Default Expression:
obj.Location.EnterpriseCompany.BaseCurrency
Terminal
Link to specific POS workspace terminal used. Required
Filter(multi eq)
Type: Terminals
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
VoidedBy
The operator who voided the document. Filter(multi eq)
Type: Operators (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault
API Methods
Methods that can be invoked in public APIs.
GetAllowedCustomPropertyValues
Gets the allowed values for the specified custom property for this entity object. If supported the result is ordered by property value. Some property value sources do not support ordering - in that case the result is not ordered.
Return Type: Collection Of CustomPropertyValue
Declaring Type: EntityObject
Domain API Request: GET
Parameters
customPropertyCode
The code of the custom property
Type: stringsearch
The search text - searches by value or description. Can contain wildcard character %.
Type: string
Optional: True
Default Value: nullexactMatch
If true the search text should be equal to the property value
Type: boolean
Optional: True
Default Value: FalseorderByDescription
If true the result is ordered by Description instead of Value. Note that ordering is not always possible.
Type: boolean
Optional: True
Default Value: Falsetop
The top clause - default is 10
Type: int32
Optional: True
Default Value: 10skip
The skip clause - default is 0
Type: int32
Optional: True
Default Value: 0
CreateNotification
Create a notification immediately in a separate transaction, and send a real-time event to the user.
Return Type: void
Declaring Type: EntityObject
Domain API Request: POST
Parameters
user
The user.
Type: UsersnotificationClass
The notification class.
Type: stringsubject
The notification subject.
Type: stringpriority
The notification priority.
Type: Systems.Core.NotificationsRepository.Priority
Allowed values for thePriority
(Systems.Core.Notifications.md#priority) data attribute
Allowed Values (Systems.Core.NotificationsRepository.Priority Enum Members)Value Description Background Background value. Stored as 1.
Model Value: 1
Domain API Value: 'Background'Low Low value. Stored as 2.
Model Value: 2
Domain API Value: 'Low'Normal Normal value. Stored as 3.
Model Value: 3
Domain API Value: 'Normal'High High value. Stored as 4.
Model Value: 4
Domain API Value: 'High'Urgent Urgent value. Stored as 5.
Model Value: 5
Domain API Value: 'Urgent'Optional: True
Default Value: Normal
CreateCopy
Duplicates the object and its child objects belonging to the same aggregate. The duplicated objects are not saved to the data source but remain in the same transaction as the original object.
Return Type: EntityObject
Declaring Type: EntityObject
Domain API Request: POST
Business Rules
None
Front-End Business Rules
None
API
Domain API Query: https://demodb.my.erp.net/api/domain/odata/Crm_Pos_Sales?$top=10
Domain API Query Builder: https://demodb.my.erp.net/api/domain/querybuilder#Crm_Pos_Sales?$top=10