Table of Contents

General.DocumentAmountTypes Entity

Namespace: General

Represents the different types of additional amounts which are calculated for the documents. Entity: Gen_Document_Amount_Types

Default Visualization

Default Display Text Format:
{AmountTypeName:T}
Default Search Members:
AmountTypeCode; AmountTypeName
Code Data Member:
AmountTypeCode
Name Data Member:
AmountTypeName
Category: Settings
Show in UI: ShownByDefault

Aggregate

An aggregate is a cluster of domain objects that can be treated as a single unit.

Aggregate Tree

Attributes

Name Type Description
AddToCustomer boolean True means that the amount will be charged to the primary customer of the document. Required Default(true)
AddToLine boolean True means that the resulting amount will be added to the amount of each respective line. Required Default(true)
AllowedDirections AllowedDirections nullable Specifies condition for the sign of the allowed values for input percent or amount ​​that can be set in the documents. Default(0)
AmountInputAllowed boolean True when the user is allowed to input fixed amount for distribution. Required Default(false) Filter(eq)
AmountTypeCode string (16) A code that can be used to uniquely identify the additional amount. Can also be used for sorting purposes. Required Filter(multi eq;like) ORD
AmountTypeName MultilanguageString (128) The name of the amount type. Required Filter(like)
BaseOnLines boolean True means that the percentages will be applied over lines plus dependant amounts; false means only dependant amounts. Required Default(true)
DefaultPercent decimal (7, 6) nullable Default percent for amounts for which percent input is allowed; null otherwise.
Description string (254) nullable The description of this DocumentAmountType.
DisplayText string Uses the repository DisplayTextFormat to build the display text from the attributes and references of current object.
DistributeBy DistributeBy Specifies how the amount will be distributed among the document lines. Valid values are: ('AMOUNT','MEASUREMENT','PRODUCT DEFINITION','DEAL TYPE'). Required Default("AMOUNT") Filter(eq)
Id guid
IsActive boolean True when the amount type is active for new records; false - otherwise. Required Default(true) 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.
PercentInputAllowed boolean True when the user is allowed to input percent of total for distribution. Required Default(true) Filter(eq)
RoundScale int32 nullable The amounts should be rounded with the specified number of digits after the decimal point. null means to use the currency default.
UnitAmountInputAllowed boolean Specifies whether the user is allowed to input fixed unit amount for the calculation of the amount. Required Default(false) Filter(eq)

References

Name Type Description
DistributeByMeasurement
Category
MeasurementCategories (nullable) Specifies the measurement category to be used for distribution, when the Distribute_By = 'MEASUREMENT'. Filter(multi eq)

Child Collections

Name Type Description
Dependencies DocumentAmountTypeDependencies List of DocumentAmount<br />TypeDependency(General.DocumentAmount
TypeDependencies.md) child objects, based on the General.DocumentAmount<br />TypeDependency.DocumentAmountType(General.DocumentAmount
TypeDependencies.md#documentamounttype) back reference
Settings DocumentAmountTypeSettings List of DocumentAmount<br />TypeSetting(Finance.Intrastat.DocumentAmountTypeSettings.md) child objects, based on the Finance.Intrastat.DocumentAmountTypeSetting.DocumentAmountType(Finance.Intrastat.DocumentAmountTypeSettings.md#documentamounttype) back reference

Attribute Details

AddToCustomer

True means that the amount will be charged to the primary customer of the document. Required Default(true)

Type: boolean
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: True
Show in UI: ShownByDefault

AddToLine

True means that the resulting amount will be added to the amount of each respective line. Required Default(true)

Type: boolean
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: True
Show in UI: ShownByDefault

AllowedDirections

Specifies condition for the sign of the allowed values for input percent or amount ​​that can be set in the documents. Default(0)

Type: AllowedDirections nullable
Category: System
Allowed values for the AllowedDirections(General.DocumentAmountTypes.md#alloweddirections) data attribute
Allowed Values (General.DocumentAmountTypesRepository.AllowedDirections Enum Members)

Value Description
AllowAll AllowAll value. Stored as 0.
Database Value: 0
Model Value: 0
Domain API Value: 'AllowAll'
AllowOnlyPositive AllowOnlyPositive value. Stored as 1.
Database Value: 1
Model Value: 1
Domain API Value: 'AllowOnlyPositive'
AllowOnlyNegative AllowOnlyNegative value. Stored as (-1).
Database Value: -1
Model Value: -1
Domain API Value: 'AllowOnlyNegative'

Supported Filters: NotFilterable
Supports Order By: False
Default Value: 0
Show in UI: ShownByDefault

AmountInputAllowed

True when the user is allowed to input fixed amount for distribution. Required Default(false) Filter(eq)

Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault

AmountTypeCode

A code that can be used to uniquely identify the additional amount. Can also be used for sorting purposes. Required Filter(multi eq;like) ORD

Type: string (16)
Indexed: True
Category: System
Supported Filters: Equals, Like, EqualsIn
Supports Order By: True
Maximum Length: 16
Show in UI: ShownByDefault

Back-End Default Expression:
obj.IncMax( o => o.AmountTypeCode, null, "000")

AmountTypeName

The name of the amount type. Required Filter(like)

Type: MultilanguageString (128)
Indexed: True
Category: System
Supported Filters: Like
Supports Order By: False
Show in UI: ShownByDefault

BaseOnLines

True means that the percentages will be applied over lines plus dependant amounts; false means only dependant amounts. Required Default(true)

Type: boolean
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Default Value: True
Show in UI: ShownByDefault

DefaultPercent

Default percent for amounts for which percent input is allowed; null otherwise.

Type: decimal (7, 6) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: ShownByDefault

Front-End Recalc Expressions:
IIF( Not( obj.PercentInputAllowed), null, obj.DefaultPercent)

Description

The description of this DocumentAmountType.

Type: string (254) nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Maximum Length: 254
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

DistributeBy

Specifies how the amount will be distributed among the document lines. Valid values are: ('AMOUNT','MEASUREMENT','PRODUCT DEFINITION','DEAL TYPE'). Required Default("AMOUNT") Filter(eq)

Type: DistributeBy
Category: System
Allowed values for the DistributeBy(General.DocumentAmountTypes.md#distributeby) data attribute
Allowed Values (General.DocumentAmountTypesRepository.DistributeBy Enum Members)

Value Description
Amount Amount value. Stored as 'AMOUNT'.
Database Value: 'AMOUNT'
Model Value: 0
Domain API Value: 'Amount'
Measurement Measurement value. Stored as 'MEASUREMENT'.
Database Value: 'MEASUREMENT'
Model Value: 1
Domain API Value: 'Measurement'
ProductDefinition ProductDefinition value. Stored as 'PRODUCT DEFINITION'.
Database Value: 'PRODUCT DEFINITION'
Model Value: 2
Domain API Value: 'ProductDefinition'
DealType DealType value. Stored as 'DEAL TYPE'.
Database Value: 'DEAL TYPE'
Model Value: 3
Domain API Value: 'DealType'

Supported Filters: Equals
Supports Order By: False
Default Value: Amount
Show in UI: ShownByDefault

Id

Type: guid
Indexed: True
Category: System
Supported Filters: Equals, EqualsIn
Default Value: NewGuid
Show in UI: CannotBeShown

IsActive

True when the amount type is active for new records; false - otherwise. Required Default(true) Filter(eq)

Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: True
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

PercentInputAllowed

True when the user is allowed to input percent of total for distribution. Required Default(true) Filter(eq)

Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: True
Show in UI: ShownByDefault

RoundScale

The amounts should be rounded with the specified number of digits after the decimal point. null means to use the currency default.

Type: int32 nullable
Category: System
Supported Filters: NotFilterable
Supports Order By: False
Show in UI: ShownByDefault

UnitAmountInputAllowed

Specifies whether the user is allowed to input fixed unit amount for the calculation of the amount. Required Default(false) Filter(eq)

Type: boolean
Category: System
Supported Filters: Equals
Supports Order By: False
Default Value: False
Show in UI: ShownByDefault

Reference Details

DistributeByMeasurementCategory

Specifies the measurement category to be used for distribution, when the Distribute_By = 'MEASUREMENT'. Filter(multi eq)

Type: MeasurementCategories (nullable)
Category: System
Supported Filters: Equals, EqualsIn
Show in UI: ShownByDefault

Front-End Recalc Expressions:
IIF( ( Convert( obj.DistributeBy, Int32) != 1), null, obj.DistributeByMeasurementCategory)

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: string

  • search
    The search text - searches by value or description. Can contain wildcard character %.
    Type: string
    Optional: True
    Default Value: null

  • exactMatch
    If true the search text should be equal to the property value
    Type: boolean
    Optional: True
    Default Value: False

  • orderByDescription
    If true the result is ordered by Description instead of Value. Note that ordering is not always possible.
    Type: boolean
    Optional: True
    Default Value: False

  • top
    The top clause - default is 10
    Type: int32
    Optional: True
    Default Value: 10

  • skip
    The skip clause - default is 0
    Type: int32
    Optional: True
    Default Value: 0

CreateNotification

Creates a notification and sends a real time event to the user.
Return Type: void
Declaring Type: EntityObject
Domain API Request: POST

Parameters

  • user
    The user.
    Type: Users

  • notificationClass
    The notification class.
    Type: string

  • subject
    The subject.
    Type: string

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/General_DocumentAmountTypes?$top=10

Domain API Query Builder: https://demodb.my.erp.net/api/domain/querybuilder#General_DocumentAmountTypes?$top=10