Class QuoteAlternativeInfo
Quote Version is made up of one or more Alternatives. One of 1..n possible alternatives in a Quote Version. The reason we have alternatives is that a quote can say to a customer, “we can solve you problem in two (or more) different ways, with different technology and sideeffects (and price)”. An Alternative may have discounts on the total amount. The Alternative tracks whether the user on the order level entered the Discount %, the Discount amount, the Earning%, Earning amount or the TotalPrice fields so that the discount and earning and total can be re-calculated correctly when Quote Lines are added or changed.
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public class QuoteAlternativeInfo
Constructors
QuoteAlternativeInfo()
Quote Version is made up of one or more Alternatives. One of 1..n possible alternatives in a Quote Version. The reason we have alternatives is that a quote can say to a customer, “we can solve you problem in two (or more) different ways, with different technology and sideeffects (and price)”. An Alternative may have discounts on the total amount. The Alternative tracks whether the user on the order level entered the Discount %, the Discount amount, the Earning%, Earning amount or the TotalPrice fields so that the discount and earning and total can be re-calculated correctly when Quote Lines are added or changed.
Declaration
public QuoteAlternativeInfo()
Properties
Description
The tool-tip to use in the user interface (on the tab, for instance).
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
DiscountAmount
The discount the salesman specifies, in whatever currency the sale is in. Both the two ‘DiscountPercent’ and ‘DiscountAmount’ shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount amount value into this field.
Declaration
public double DiscountAmount { get; set; }
Property Value
Type | Description |
---|---|
double |
DiscountPercent
The discount the salesman specifies, in percent. Both the two ‘DiscountPercent’ and ‘DiscountAmount’ shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount % value into 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 the two ‘ERPDiscountPercent’ and ‘ERPDiscountAmount’ shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent
Declaration
public double ERPDiscountAmount { get; set; }
Property Value
Type | Description |
---|---|
double |
ERPDiscountPercent
The discount the system calculates based on customer /amount / whatever. Can be overrided by the salesman in the field ‘discountPercent’ or ‘discountAmount’. Both the two ‘ERPDiscountPercent’ and ‘ERPDiscountAmount’ shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent.
Declaration
public double ERPDiscountPercent { get; set; }
Property Value
Type | Description |
---|---|
double |
ERPQuoteAlternativeKey
Key that identifies this alternative in the ERP system, if it exists there.
Declaration
public string ERPQuoteAlternativeKey { get; set; }
Property Value
Type | Description |
---|---|
string |
EarningAmount
Earning on this alternative, as an absolute amount (in money).
Declaration
public double EarningAmount { get; set; }
Property Value
Type | Description |
---|---|
double |
EarningPercent
The earning on this alternative, in percent of total. The Percentage is given in percent form, i.e. ‘12%’ is represented as ‘12’.
Declaration
public double EarningPercent { get; set; }
Property Value
Type | Description |
---|---|
double |
ExtraField1
This a simple field for adding information that the Connector can provide , and that the quote document need to display.
Declaration
public string ExtraField1 { get; set; }
Property Value
Type | Description |
---|---|
string |
ExtraField2
This a simple field for adding information that the Connector can provide , and that the quote document need to display.
Declaration
public string ExtraField2 { get; set; }
Property Value
Type | Description |
---|---|
string |
ExtraField3
This a simple field for adding information that the Connector can provide , and that the quote document need to display.
Declaration
public string ExtraField3 { get; set; }
Property Value
Type | Description |
---|---|
string |
ExtraField4
This a simple field for adding information that the Connector can provide , and that the quote document need to display.
Declaration
public string ExtraField4 { get; set; }
Property Value
Type | Description |
---|---|
string |
ExtraField5
This a simple field for adding information that the Connector can provide , and that the quote document need to display.
Declaration
public string ExtraField5 { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Name of Alternative. Shown in tab in user interface.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
QuoteAlternativeId
Primary key to the Alternative in the CRM system.
Declaration
public int QuoteAlternativeId { get; set; }
Property Value
Type | Description |
---|---|
int |
QuoteVersionId
Foreign key to quote version.
Declaration
public int QuoteVersionId { get; set; }
Property Value
Type | Description |
---|---|
int |
Reason
If there was a problem, this field contains a localized explanation of the problem and possible steps to fix it 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.
Declaration
public QuoteStatusInfo Status { get; set; }
Property Value
Type | Description |
---|---|
QuoteStatusInfo |
SubTotal
The sum of the quotelines totalPrice (and not the sum of their subtotal!!).
Think of it as sum before discount.
Declaration
public double SubTotal { get; set; }
Property Value
Type | Description |
---|---|
double |
TotalPrice
Sum of the QuoteLines.TotalPrice - Discount or QuoteLines.TotalCost + Earning based on what, if anything, the user has entered last. Shall be calculated by the connector.
Declaration
public double TotalPrice { get; set; }
Property Value
Type | Description |
---|---|
double |
UserValueOverride
Has the pre-calculated (from ERP) price information been overridden, and how.
Declaration
public ValueOverrideInfo UserValueOverride { get; set; }
Property Value
Type | Description |
---|---|
ValueOverrideInfo |
Examples
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 then calculated based on the discountPercent.)
VAT
Tax/VAT if available from ERP system; not used in any business logic. This is just to help out the layout of the quote in a document, but SuperOffice will not try to calculate this value. May or may not be filled out.
Declaration
public double VAT { get; set; }
Property Value
Type | Description |
---|---|
double |
VATInfo
Extra info about VAT that the connector might insert. This is just to help out the layout of the quote in a document. In this field we store VAT info that needs to be printed out on the quote, like “Inc VAT” or “12% VAT”.
May or may not be filled out.
Declaration
public string VATInfo { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
AddStatus(QuoteLineInfo, QuoteStatusInfo, string)
Increases the status if necesarry, but doesn't decrease the status. (Error > Warning > Ok) Appends quoteline reason to alternative with quoteline name prefixed. Adds newlines to alternative reason if needed.
Declaration
public void AddStatus(QuoteLineInfo ql, QuoteStatusInfo status, string reason)
Parameters
Type | Name | Description |
---|---|---|
QuoteLineInfo | ql | QuoteLine |
QuoteStatusInfo | status | new status |
string | reason | new reason to be appended |
AddStatus(QuoteStatusInfo, string)
Increases the status if necesarry, but doesn't decrease the status. (Error > Warning > Ok) Appends quoteline reason to alternative with quoteline name prefixed. Adds newlines to alternative reason if needed.
Declaration
public void AddStatus(QuoteStatusInfo status, string reason)
Parameters
Type | Name | Description |
---|---|---|
QuoteStatusInfo | status | new status |
string | reason | new reason to be appended |
ClearStatus()
Setting the status to ok and clearing the Reason field.
Declaration
public void ClearStatus()