Documentation

crm.invoice.recurring.fields

crm.invoice.recurring.fields()

The method returns list of setting fields for recurring invoices template with description.

Parameters

No parameters.

Fields

Field DescriptionTypeNote
ID Record ID in the setting table of recurring invoiceintegerRead Only
INVOICE_ID Invoice template IDintegerUnmodifiable
ACTIVE Active status flag. Values: Y/Nchar
NEXT_EXECUTION Date when the next new invoice is created from a template. Calculated by the system based on specified parameters. If the value is empty, new invoices are not createddateRead Only.
LAST_EXECUTION Date when the last new invoice is created from a templatedateRead Only
COUNTER_REPEAT Number of invoices created from a templateintegerRead Only
START_DATE Start date when the next new invoice is created. If value is empty, calculated starting from the current datŠ°.date
SEND_BILL Specifies sending invoice to email, associated with the payer. Values: Y/Nchar
EMAIL_ID ID of the field containing payer's email integer
IS_LIMIT Specifies limits for creating new invoices. Values: N - no limits, D - specifies limit by date, T - specifies limit by the number of new invoiceschar
LIMIT_REPEAT Maximum number of invoices that can be created from this templateintegerConsidered if IS_LIMIT equals T
LIMIT_DATE Date when invoices can be created from this templatedateConsidered if IS_LIMIT equals D
PARAMS Set of parameters for calculation - recurring_params:
  • PERIOD - recurring period:
    • day
    • week
    • month
    • year
  • TYPE - type of recurring for month and year:
    • if PERIOD equals month
      • 1 - calculation by the day sequential number in a month
      • 2 - calculation by numbers of week days in a month
    • if PERIOD equals year
      • 1 - calculation by the day sequential number in a specified month
      • 2 - calculation by numbers of week days in a specified month
  • INTERVAL - offset when calculating
  • IS_WORKING_ONLY - only work days are considered (Y/N)
  • WEEKDAY - full week day name (according to the PHP formatting of the date() method)
  • NUM_DAY_IN_MONTH - sequential number of date in a month (PERIOD equals month or year)
  • NUM_WEEKDAY_IN_MONTH - number week day in a month (PERIOD equals month or year)
  • FIELD_YEARLY_INTERVAL_MONTH_NAME - number of week day in a month (PERIOD equals month or year)
  • DATE_PAY_BEFORE_OFFSET_TYPE - offset value for calculation of payment date. Calculation is performed when new invoice is created from a template:
    • day
    • week
    • month
    • year
  • DATE_PAY_BEFORE_OFFSET_VALUE - offset value for calculation of payment date. Calculation is performed when a new invoice is created from a template

Example:

   BX24.callMethod(
       "crm.invoice.recurring.fields",
       {},
       function(result)
       {
           if(result.error())
               console.error(result.error());
           else
               console.dir(result.data());
       }
   );


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2021, «Bitrix Inc.», 2021