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.
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public class QuoteLineInfo : ProductDataInfo
Constructors
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.
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 |
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 |
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 |
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 |
---|---|
int |
QuoteLineId
Primary key in the CRM system
Declaration
public int QuoteLineId { get; set; }
Property Value
Type | Description |
---|---|
int |
Rank
QuoteLines can be re-ordered, so we must track the ordering.
Declaration
public int Rank { get; set; }
Property Value
Type | Description |
---|---|
int |
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 |
SubTotal
(UnitListPrice * Quantity) Calculated by the ERPconnector
Declaration
public double SubTotal { get; set; }
Property Value
Type | Description |
---|---|
double |
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 |
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()