Class Instrument
Assembly: LemonEdge.API.Entities.FinancialServices.Auto.dll
Syntax
[DataContract]
public class Instrument : BaseEntityWithPermissions, IInstrument, IInstrumentBase, IBaseEntityWithPermissions, IBaseObject, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ICloneableAsync<IInstrument>
Constructors
Instrument()
Declaration
Properties
AllowUnmapped
This indicates that this Instrument itself does not need to be automatically mapped to an Allocation Path within
the Entity Set. This could be because al the Transactions are being booked with the Allocations already specified,
or a Path already selected, or that they are to be excluded from calculations or consolidated reporting.
Declaration
[Required]
public bool AllowUnmapped { get; set; }
Property Value
CSERoundingDecimalPlaces
Any CSE rounding applied throughout this instrument has this number of decimal places.
Declaration
[PropertyValidation("true", "MyItem.CSERoundingDecimalPlaces >= 0 && MyItem.CSERoundingDecimalPlaces <= 12", "CSERoundingDecimalPlaces must have a number of decimal places to round to between 0 and 12 inclusive.")]
public short CSERoundingDecimalPlaces { get; set; }
Property Value
CurrencyID
Links to IUser. Any Transaction operating against this instrument will use this Currency as the
Local Currency of the Transaction itself. This currency will be translated into the Functional and Reporting
currencies as entered.
Declaration
[RequiredNoDefaultIDValidation]
[PropertyValidation("Item.HasTrackedPropertyChanged(nameof(LemonEdge.API.Entities.FinancialServices.Products.IInstrument.CurrencyID)) && MyData.HasChange(Item) && MyData.GetChange(Item) != LemonEdge.API.Core.Data.EntityOperation.Insert", "(await Data.ExecuteQuery(Data.GetItems<LemonEdge.API.Entities.FinancialServices.Accounting.IGLPosting>().Where(nameof(LemonEdge.API.Entities.FinancialServices.Accounting.IGLPosting.InstrumentID), LemonEdge.Utils.Database.SQLOperator.Equals, Item.ID))).Count() == 0", "You can not change the currency of an instrument if it has existing gl postings against it. You have to delete those first.")]
public Guid CurrencyID { get; set; }
Property Value
CurrencyID_Label
Declaration
public string CurrencyID_Label { get; set; }
Property Value
CurrencyID_Label_Silent
Declaration
[NotMapped]
public string CurrencyID_Label_Silent { get; set; }
Property Value
InheritingObjectTypeID
Any object that inherits this interface holds part of a record, the common base part
This holds the type of record which holds the rest
The IDs of both the inheriting and base objects always are the same
Declaration
[RequiredNoDefaultIDValidation]
[Unique(MergeWithAnyOtherUniqueProperties = true)]
public Guid InheritingObjectTypeID { get; set; }
Property Value
Name
The unique name of this instrument.
Part of the key for this instrument
Declaration
[Unique(MergeWithAnyOtherUniqueProperties = true)]
[Required]
[StringLength(500)]
public string Name { get; set; }
Property Value
OwningEntityID
Links to IObjectEntity. This is the legal Entity within the Entity Set that owns this financial
Instrument. It is this Entity that any Transactions against this instrument will be booked to.
Declaration
[Unique(MergeWithAnyOtherUniqueProperties = true)]
[RequiredNoDefaultIDValidation]
public Guid OwningEntityID { get; set; }
Property Value
OwningEntityID_Label
Declaration
public string OwningEntityID_Label { get; set; }
Property Value
OwningEntityID_Label_Silent
Declaration
[NotMapped]
public string OwningEntityID_Label_Silent { get; set; }
Property Value
UnitRoundingDecimalPlaces
Any unit rounding applied throughout this instrument has this number of decimal places.
Declaration
[PropertyValidation("true", "MyItem.UnitRoundingDecimalPlaces >= 0 && MyItem.UnitRoundingDecimalPlaces <= 12", "UnitRoundingDecimalPlaces must have a number of decimal places to round to between 0 and 12 inclusive.")]
public short UnitRoundingDecimalPlaces { get; set; }
Property Value
Unitized
Indicates this instrument can have transactions that are specifically only for unitized or non-unitized instruments
Declaration
[Required]
public bool Unitized { get; set; }
Property Value
Methods
CopyFromEntity(IBaseEntity)
Declaration
protected override void CopyFromEntity(IBaseEntity src)
Parameters
Overrides
CopyFromSource(IInstrument)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(IInstrument source)
Parameters
Type |
Name |
Description |
IInstrument |
source |
The source object to copy all values from.
|
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods