We have upgraded our support system to serve you better.
For Support, please go to our Momentive Support Hub located here.

Skip to main content

DuesCalculationMethod

 

DuesCalculationMethod

Initial Build 2006.01 or earlier
Module Membership
Current Setting Type Text Box

Use this system option to describe the .Net assembly containing a custom dues calculation method.

Example: extension|Avectra.netForum.Extension|CalculateDues|FacadeClass:oFacadeObject

There are four values, separated by the pipe symbol:

  1. Assembly
  2. Namespace
  3. Method name - must be public and must return a string which, ultimately, will evaluate to a decimal, or, in the case of an error, a string.
  4. List of any parameters in the format Type:Variable;Type2:Variable2 etc. Most commonly, you will pass in the active FacadeClass, as shown above

The default for this option is empty.

Code Sample

System Option Value:

AVComponent|AV.CustomDuesCalculation|GetDues|FacadeClass:oFacadeObject

C# Code Example: AVComponent.DLL

namespace AV
{
    public class CustomDuesCalculation
    {
        public CustomDuesCalculation()
        {
        }
 
        public static string GetDues(FacadeClass oF)
        {
            string szRetVal = "DEFAULT";
            string szCustKey = oF.GetValue("mbr_cst_key").ToString();
            string szPakageKey = oF.GetValue("mbr_pak_prd_key").ToString();
 
            //The SP will return a price from your own business logic
            string szSql = "client_av_dues_calculation @pak_prd_key='" + @szPakageKey + "', @cst_key='" + @szCustKey + "'";
 
            DataSetClass oDs = DataUtils.GetDataSetClass(szSql);
            if (oDs != null && oDs.Tables[0].Rows.Count == 1)
            {
                //the returned price will be set to the ivd_price on the invoice detail on the shopping cart
                 return oDs.GetValueByName("prc_price").ToString();
            }
 
            //If noting return, DEFAULT will be returned
            return szRetVal;
        }
    }
}
 

Current Setting

The current setting for DuesCalculationMethod is used as follows:

Values: This system option can be set to four values, separated by the pipe symbol, that describe the .Net assembly containing a custom dues calculation method. For details, see above.

Default Value: empty

Fields 

This system option includes the following fields:

Description: This field gives the description of the system option, including its use and default value.

Important! Do not modify the following fields after the system option is first created. Changing these fields after they have been used can invalidate existing data.

Category: This field sets the category (usually the module) where the system option is used.

Type: The Type field determines the display type of the Current setting field (check box, drop-down list, or text box).

Values: The values field indicates the allowed values for the Current setting field.

Availability

Each system option includes the following availability settings:

Entity Level Option?: Select this check box to make this system option available on an entity level.

Visible To External Systems?: Select this check box to make this system option available in xWeb.

Was this article helpful?
0 out of 0 found this helpful