Class NextDueDate
Standard implementation of the plugin that calculates next due date for sales
Implements
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SoDataBase.dll
Syntax
[NextDueDatePlugin("nextduedate", -1073741824)]
public class NextDueDate : NextDateBase, INextDueDatePlugin, IPlugin
Constructors
NextDueDate()
Standard implementation of the plugin that calculates next due date for sales
Declaration
public NextDueDate()
Fields
ProviderName
Standard implementation of the plugin that calculates next due date for sales
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)
Standard implementation of the plugin that calculates next due date for sales
Declaration
protected override FieldInfo GetOrderbyField(AppointmentTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
AppointmentTableInfo | tableInfo |
Returns
Type | Description |
---|---|
FieldInfo |