Show / Hide Table of Contents

Class QuoteLineInfo

One line in a QuoteAlternative. QuoteLines are mainly information copied from the Products provider. Products information is sometimes edited by the user before being included in the quote , so most information is duplicated from Product rather than referenced directly.

Inheritance
Object
ProductDataInfo
QuoteLineInfo
Inherited Members
ProductDataInfo.GetFieldRight(String)
ProductDataInfo.HasFieldRight(String)
ProductDataInfo.HasFieldRight(String, Char)
ProductDataInfo.IsFieldWritable(String)
ProductDataInfo.SetRight(String, String)
ProductDataInfo.ERPProductKey
ProductDataInfo.Name
ProductDataInfo.Description
ProductDataInfo.Code
ProductDataInfo.QuantityUnit
ProductDataInfo.PriceUnit
ProductDataInfo.IsSubscription
ProductDataInfo.SubscriptionUnit
ProductDataInfo.ItemNumber
ProductDataInfo.Url
ProductDataInfo.ProductCategoryKey
ProductDataInfo.ProductFamilyKey
ProductDataInfo.ProductTypeKey
ProductDataInfo.Supplier
ProductDataInfo.SupplierCode
ProductDataInfo.Thumbnail
ProductDataInfo.VATInfo
ProductDataInfo.VAT
ProductDataInfo.UnitCost
ProductDataInfo.UnitMinimumPrice
ProductDataInfo.UnitListPrice
ProductDataInfo.ExtraInfo
ProductDataInfo.RawExtraInfo
ProductDataInfo.Rights
ProductDataInfo.Rule
ProductDataInfo.ExtraField1
ProductDataInfo.ExtraField2
ProductDataInfo.ExtraField3
ProductDataInfo.ExtraField4
ProductDataInfo.ExtraField5
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public class QuoteLineInfo : ProductDataInfo, ICalculationTarget

Constructors

QuoteLineInfo()

Declaration
public QuoteLineInfo()

Properties

DeliveredQuantity

How many units have been delivered - updated by ERP system.

Declaration
public double DeliveredQuantity { get; set; }
Property Value
Type Description
Double

DiscountAmount

The discount for the line, in whatever currency the sale is in. Both ‘DiscountPercent’ and ‘DiscountAmount’ shall be filled out, but the UserValueOverride field must be set to the field the user actually changed last. If this field is filled out by the user, it overrides any discount suggested by the connector. If the user has not filled this in, the system will copy the ERP discount amount to this field.

Declaration
public double DiscountAmount { get; set; }
Property Value
Type Description
Double

DiscountPercent

The discount for the line, in percent. Both ‘DiscountPercent’ and ‘DiscountAmount’ shall be filled out, but the UserValueOverride field must be set to the field the user actually changed last. If this field is filled out by the user, it overrides any discount suggested by the connector. If the user has not filled this in, the system will copy the ERP discount amount to this field. The Percentage is given in percent form, i.e. ‘12%’ is represented as ‘12’.

Declaration
public double DiscountPercent { get; set; }
Property Value
Type Description
Double

EarningAmount

The earning, in money

Declaration
public double EarningAmount { get; set; }
Property Value
Type Description
Double

EarningPercent

The earning, in percent

Declaration
public double EarningPercent { get; set; }
Property Value
Type Description
Double

ERPDiscountAmount

The discount the system calculates based on customer /amount / whatever. Can be overrided by the salesman in the field DiscountPercent' or 'DiscountAmount'. Both fields ERPDiscountPercent and ERPDiscountAmountwill be filled out. The Percentage is given in percent form, i.e. ‘12%’ is represented as ‘12’.

Declaration
public double ERPDiscountAmount { get; set; }
Property Value
Type Description
Double

ERPDiscountPercent

The discount the system calculates based on customer / quantity / whatever. Can be overrided by the salesman in the field 'DiscountPercent' or 'DiscountAmount'. Both fields ERPDiscountPercent and ERPDiscountAmountwill be filled out. The Percentage is given in percent form, i.e. ‘12%’ is represented as ‘12’.

Declaration
public double ERPDiscountPercent { get; set; }
Property Value
Type Description
Double

ERPQuoteLineKey

The foreign key to the quoteline in ERP system (if it has such a representation).

Declaration
public string ERPQuoteLineKey { get; set; }
Property Value
Type Description
String

Quantity

How many units; this is a decimal field since you might want to offer fractional units (2.5kg, or 0.5PC)

Declaration
public double Quantity { get; set; }
Property Value
Type Description
Double

QuoteAlternativeId

The alternative this line is part of, the conceptual Parent in CRM database.

Declaration
public int QuoteAlternativeId { get; set; }
Property Value
Type Description
Int32

QuoteLineId

Primary key in the CRM system

Declaration
public int QuoteLineId { get; set; }
Property Value
Type Description
Int32

Rank

QuoteLines can be re-ordered, so we must track the ordering.

Declaration
public int Rank { get; set; }
Property Value
Type Description
Int32

Reason

If QuoteStatus is not OK, then this field contains a localized explanation that the user can be shown.

Declaration
public string Reason { get; set; }
Property Value
Type Description
String

Status

If there was a problem with for instance calculation, this field is set to warning or error. Typically shown as an icon. QuoteStatus is an enum with statuses: OK, OKWithInfo, Warning, Error.

Declaration
public QuoteStatusInfo Status { get; set; }
Property Value
Type Description
QuoteStatusInfo

SubscriptionQuantity

If IsSubscription, then this field specifies the number of SubscriptionUnit offered

Declaration
public double SubscriptionQuantity { get; set; }
Property Value
Type Description
Double

SubscriptionStart

If IsSubscription, then this field specifies the start date of the subscription offered

Declaration
public DateTime SubscriptionStart { get; set; }
Property Value
Type Description
DateTime

SubTotal

(UnitListPrice * Quantity) Calculated by the ERPconnector

Declaration
public double SubTotal { get; set; }
Property Value
Type Description
Double

TotalPrice

TotalPrice = SubTotal - DiscountAmount or TotalPrice = (UnitCost * Quantity) + EarningAmount , according to what the user changed last.

Declaration
public double TotalPrice { get; set; }
Property Value
Type Description
Double

TotalPriceWithAlternativeDiscount

Created to help calculation of for instance VAT TotalPriceWithAlternativeDiscount = TotalPrice * (1 - Alternative.DiscountPercent)

Declaration
public double TotalPriceWithAlternativeDiscount { get; set; }
Property Value
Type Description
Double
Examples

So, if the TotalPrice of the QuoteLine is 200 and the Alternative.DiscountPercent 0.1 (= 10%) then the TotalPriceWithAlternativeDiscount = 200 * ( 1 - 0.1 ) = 180

UserValueOverride

Has the pre-calculated (from ERP) price information been overridden, and how. If the user has filled out the discountpercentage field, then the UserValueOverride field is set to OverridePercent. (The DiscountAmount, EarningPercent, EarningAmount and TotalPrice fields are calculated based on the DiscountPercent.)

Declaration
public ValueOverrideInfo UserValueOverride { get; set; }
Property Value
Type Description
ValueOverrideInfo

Methods

AddStatus(QuoteStatusInfo, String)

Increases the status if necesarry, but doesn't decrease the status Adds new line for the reason if needed.

Declaration
public void AddStatus(QuoteStatusInfo status, string reason)
Parameters
Type Name Description
QuoteStatusInfo status

new status

String reason

why the new status

ClearStatus()

Setting the status to ok and clearing the Reason field.

Declaration
public void ClearStatus()

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
QuoteExtensions.InsertExtraInfoField(QuoteLineInfo, String, ExtraDataFieldTypeInfo, String)
QuoteExtensions.GetStringFromExtraInfoField(QuoteLineInfo, String, ExtraDataFieldTypeInfo)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top