Show / Hide Table of Contents

Class NextDueDate

Standard implementation of the plugin that calculates next due date for sales

Inheritance
Object
NextDateBase
NextDueDate
Implements
INextDueDatePlugin
Inherited Members
NextDateBase.GetQuery(AppointmentTableInfo, FieldInfo)
NextDateBase.GetNextDate(AppointmentTableInfo, FieldInfo, Restriction)
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM
Assembly: SoDataBase.dll
Syntax
[NextDueDatePlugin("nextduedate", -1073741824)]
public class NextDueDate : NextDateBase, INextDueDatePlugin, IPlugin

Constructors

NextDueDate()

Declaration
public NextDueDate()

Fields

ProviderName

Declaration
public const string ProviderName = "nextduedate"
Field Value
Type Description
String

Methods

BatchUpdateNextDueDate(ProgressEstimateCallback, ProgressStepCallback)

Update the Next Due Date date/appointmentId of all Sales; callable in unauthenticated mode

Declaration
public void BatchUpdateNextDueDate(ProgressEstimateCallback estimateCB, ProgressStepCallback stepCB)
Parameters
Type Name Description
ProgressEstimateCallback estimateCB

Callback for setting the estimated total of the progress bar

ProgressStepCallback stepCB

Callback for stepping the progress bar

Remarks

This method uses the RawConnection mode of the SuperOffice.Data.ConnectionFactory so that it can be called during a database upgrade, when system users are unknown.

It looks at all relevant appointment records to set the next due date of each sale.

CalculateNextDueDate(Int32)

Calculates the next due date for a given sale. This method takes into account the status of the sale.

Declaration
public NextDateInfo CalculateNextDueDate(int saleId)
Parameters
Type Name Description
Int32 saleId

Identifies the sale for which you want to calculate the next due date

Returns
Type Description
NextDateInfo

The DateTime representing the next due date for the supplied sale identifier

Remarks

If a sale is stalled, the next due date will be the re-open date. If the sale is done, the next due date will be the sale date. The same is the case when no valid appointments can be found for a given sale.

GetNextDueAppointmentDate(Int32)

Gets the active date from the first appointment associated with the specified sale. This method does not take into account the status of the sale.

Declaration
public NextDateInfo GetNextDueAppointmentDate(int saleId)
Parameters
Type Name Description
Int32 saleId

Identifies the sale for which you want to calculate the next due date

Returns
Type Description
NextDateInfo

The DateTime representing the next due date for the supplied sale identifier

Remarks

We loop through all the appointments for a sale and find the first one that has not been completed and is not a child appointment.

GetOrderbyField(AppointmentTableInfo)

Declaration
protected override FieldInfo GetOrderbyField(AppointmentTableInfo tableInfo)
Parameters
Type Name Description
AppointmentTableInfo tableInfo
Returns
Type Description
FieldInfo
Overrides
NextDateBase.GetOrderbyField(AppointmentTableInfo)

Implements

INextDueDatePlugin

Extension Methods

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