Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Display Mode
          • Input Type
          • Jaspe Reports Viewer
          • Output format
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Aggregation
            • Calculation
            • Column
            • Method
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Set
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • CSSPosition
          • DRAGNDROP
          • ELEMENT_TYPES
          • JSBounds
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogBuilder
          • JSLogger
          • JSPoint
          • JSUpload
          • JSWindow
          • LOGGINGLEVEL
          • NGCONSTANTS
          • Renderable
          • UICONSTANTS
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSChecks
          • JSCombobox
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSHeader
          • JSInsetList
          • JSLabel
          • JSLayoutContainer
          • JSList
          • JSMedia
          • JSMethod
          • JSPart
          • JSPassword
          • JSPortal
          • JSRadios
          • JSRelation
          • JSRelationItem
          • JSResponsiveLayoutContainer
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSText
          • JSTextArea
          • JSTitle
          • JSValueList
          • JSVariable
          • JSWebComponent
        • Database Manager
          • JSBaseFoundset
          • JSBaseRecord
          • JSBaseSQLFoundset
          • JSBaseSqlRecord
          • JSColumn
          • JSDataSet
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Default Loading Indicator
          • Error Bean
          • Form Component Container
          • Form Container
          • List Form Component
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • DataNotifyBroadcaster
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HTTP_STATUS
          • HttpClient
          • HttpClientConfig
          • JSFileUpload
          • OptionsRequest
          • PatchRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • PDFFormsPlugin
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Solution CSS picker
        • New Stylesheet wizard
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.06
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2025.03
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • Overview
  • Methods
  • Features
  • Constants Summarized
  • Methods Summarized
  • Constants Detailed
  • NUMBER_UNLIMITED
  • PERIOD_ANNUALY
  • PERIOD_BI_ANNUALLY
  • PERIOD_BI_MONTHLY
  • PERIOD_DAILY
  • PERIOD_FOUR_MONTHLY
  • PERIOD_FOUR_WEEKLY
  • PERIOD_MONTHLY
  • PERIOD_NONE
  • PERIOD_QUARTERLY
  • PERIOD_TWO_MONTHLY
  • PERIOD_TWO_WEEKLY
  • PERIOD_WEEKLY
  • STARTDAY_NORMAL
  • Methods Detailed
  • addCompoundPeriodChange(newPeriod, date)
  • addLoan(amount, date)
  • addLoan(amount, firstDate, lastDate, period)
  • addLoan(amount, firstDate, lastDate, period, number)
  • addLoan(amount, firstDate, lastDate, period, number, startday)
  • addPayment(amount, date)
  • addPayment(amount, firstDate, lastDate, period)
  • addPayment(amount, firstDate, lastDate, period, number)
  • addPayment(amount, firstDate, lastDate, period, number, startday)
  • addRateChange(newRate, date)
  • calculateAmortizationSchedule()
  • getAmortizationSchedule()
  • getError()
  • getEvents()
  • getRestBalance()
  • getUnknown()
  • isValidPeriod(period)
  • roundMoney(amount)
  • solveForUnknown()
  • sortEvents()

Was this helpful?

  1. Reference
  2. Extensions
  3. Server Plugins
  4. amortization

AmortizationCalculation

Overview

This module details an amortization calculation system that defines constants for various periodic intervals and events, as well as methods for managing loans, payments, rate changes, and schedule calculations. ## Constants

The module includes constants representing various time periods, such as annual, bi-annual, monthly, and weekly intervals, as well as unique identifiers like NUMBER_UNLIMITED for unlimited occurrences and STARTDAY_NORMAL for consistent start-day tracking. These constants simplify configuring amortization schedules with precise periodicity and event behaviors.

Methods

Key methods facilitate:

  • Loan and Payment Management: Functions like addLoan and addPayment support different configurations, including start and end dates, periodic intervals, and repetitions.

  • Rate Changes and Period Adjustments: addRateChange and addCompoundPeriodChange enable dynamic updates to interest rates and compounding periods.

  • Amortization Schedule Handling: Methods like calculateAmortizationSchedule and getAmortizationSchedule compute and retrieve detailed schedules, while getRestBalance and solveForUnknown provide insights into financial balances and unknown variables.

Features

  • Utilities like isValidPeriod and roundMoney ensure input validity and precision.

  • Event management and sorting (sortEvents, getEvents) organize financial activities over time.

This module streamlines the creation and management of customized amortization schedules with precision and adaptability.

Constants Summarized

Type
Name
Summary

The numeric constant used to identify an unlimited number of repeated events.

The numeric constant used to identify an annual period.

The numeric constant used to identify a bi-annual period (twice every year).

The numeric constant used to identify a bi-monthly period (twice every month).

The numeric constant used to identify a daily period.

The numeric constant used to identify a four-monthly period (once every four months).

The numeric constant used to identify a four-weekly period (once every four weeks).

The numeric constant used to identify a monthly period.

The numeric constant used to identify that there is no period.

The numeric constant used to identify a quarterly period (once every three months).

The numeric constant used to identify a two-monthly period (once every two months).

The numeric constant used to identify a two-weekly period (once every two weeks).

The numeric constant used to identify a weekly period.

The numeric constant used to identify that the same start day should be used as the day of the month of the starting date of the event.

Methods Summarized

Type
Name
Summary

Adds a compound period change.

Adds a loan.

Adds a loan.

Adds a loan.

Adds a loan.

Adds a payment.

Adds a payment.

Adds a payment.

Adds a payment.

Sets a new interest rate.

Calculates the amortization schedule.

Gets the amortization schedule as a JSDataSet.

Returns the error that remains when solving for the unknown.

Returns all the amortization events - such as rate changes, loan events, payment events, compounding period changes.

Gets the rest balance after the amortization schedule.

Returns the solveForUnknown value.

Returns true if the period is valid, or false if the period is not valid.

Rounds a number up to the nearest cents.

Returns true if successful or false if the call failed.

void

Sorts the amortization events ascending by date.

Constants Detailed

NUMBER_UNLIMITED

The numeric constant used to identify an unlimited number of repeated events.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_ANNUALY

The numeric constant used to identify an annual period.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_BI_ANNUALLY

The numeric constant used to identify a bi-annual period (twice every year).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_BI_MONTHLY

The numeric constant used to identify a bi-monthly period (twice every month). TODO: this period is not supported yet.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_DAILY

The numeric constant used to identify a daily period.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_FOUR_MONTHLY

The numeric constant used to identify a four-monthly period (once every four months).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_FOUR_WEEKLY

The numeric constant used to identify a four-weekly period (once every four weeks).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_MONTHLY

The numeric constant used to identify a monthly period.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_NONE

The numeric constant used to identify that there is no period.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_QUARTERLY

The numeric constant used to identify a quarterly period (once every three months).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_TWO_MONTHLY

The numeric constant used to identify a two-monthly period (once every two months).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_TWO_WEEKLY

The numeric constant used to identify a two-weekly period (once every two weeks).

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

PERIOD_WEEKLY

The numeric constant used to identify a weekly period.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

STARTDAY_NORMAL

The numeric constant used to identify that the same start day should be used as the day of the month of the starting date of the event.

Sample

var c = plugins.amortization.newCalculation();
c.addPayment(500, new Date(2005, 1, 28), null,
			plugins.amortization.AmortizationCalculation.PERIOD_DAILY, 5,
			plugins.amortization.AmortizationCalculation.STARTDAY_NORMAL);

var c2 = plugins.amortization.newCalculation();
c2.addPayment(300, new Date(2006, 11, 24), new Date(2006, 12, 24),
			plugins.amortization.AmortizationCalculation.PERIOD_BI_MONTHLY,
			plugins.amortization.AmortizationCalculation.NUMBER_UNLIMITED, 30);

Methods Detailed

addCompoundPeriodChange(newPeriod, date)

Adds a compound period change.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addLoan(amount, date)

Adds a loan.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addLoan(amount, firstDate, lastDate, period)

Adds a loan.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addLoan(amount, firstDate, lastDate, period, number)

Adds a loan.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addLoan(amount, firstDate, lastDate, period, number, startday)

Adds a loan.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addPayment(amount, date)

Adds a payment.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addPayment(amount, firstDate, lastDate, period)

Adds a payment.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addPayment(amount, firstDate, lastDate, period, number)

Adds a payment.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addPayment(amount, firstDate, lastDate, period, number, startday)

Adds a payment.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

addRateChange(newRate, date)

Sets a new interest rate.

Parameters

Sample

var c = plugins.amortization.newCalculation();
c.addRateChange(r, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
c.addPayment(500, new Date(2005, 1, 28), null, 12, 5, 31);

calculateAmortizationSchedule()

Calculates the amortization schedule.

Sample

plugins.amortization.calculateAmortizationSchedule();

getAmortizationSchedule()

Gets the amortization schedule as a JSDataSet.

Sample

plugins.amortization.getAmortizationSchedule();

getError()

Returns the error that remains when solving for the unknown. Please note that the error should be less or equal to 1E-8 - otherwise, the solveForUnknown value is incorrect.

Sample

var c = plugins.amortization.newCalculation();
// sets the rate to -1 for unknown.
c.addRateChange(-1, new Date(2005, 0, 1));
c.addCompoundPeriodChange(12, new Date(2005, 0, 1));
c.addLoan(2000, new Date(2005, 0, 1));
var lastDate = null;
var period = 12;
var number_count = 5;
var startday = 31;
c.addPayment(500, new Date(2005, 1, 28), lastDate, period,number_count, startday);
// solves for the interest rate.
c.solveForUnknown();
// gets the interest rate and the error in the calculation.
// which should be small (otherwise the calculation did
// not converge for some reason.
var r = c.getUnknown();
var e = c.getError();

getEvents()

Returns all the amortization events - such as rate changes, loan events, payment events, compounding period changes.

Sample

plugins.amortization.getEvents();

getRestBalance()

Gets the rest balance after the amortization schedule.

Sample

var rb = plugins.amortization.getRestBalance();

getUnknown()

Returns the solveForUnknown value.

Sample

plugins.amortization.getUnknown();

isValidPeriod(period)

Returns true if the period is valid, or false if the period is not valid.

Parameters

Sample

var v_period = plugins.amortization.isValidPeriod(12);

roundMoney(amount)

Rounds a number up to the nearest cents.

Parameters

Sample

//rounds the number up to 34.35
var rm = plugins.amortization.roundMoney(34.349384);

solveForUnknown()

Returns true if successful or false if the call failed.

Sample

plugins.amortization.solveForUnknown();

sortEvents()

Sorts the amortization events ascending by date.

Returns: void

Sample

plugins.amortization.sortEvents();

PreviousamortizationNextPolynomial

Last updated 5 months ago

Was this helpful?

Type

Type

Type

Type

Type

Type

Type

Type

Type

Type

Type

Type

Type

Type

newPeriod ;

date ;

Returns: the total number of pages printed during the meta print job.

amount ;

date ;

Returns: true if the loan event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

Returns: true if the loan event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

number ;

Returns: true if the loan event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

number ;

startday ;

Returns: true if the loan event was added successfully, false otherwise.

amount ;

date ;

Returns: true if the payment event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

Returns: true if the payment event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

number ;

Returns: true if the payment event was added successfully, false otherwise.

amount ;

firstDate ;

lastDate ;

period ;

number ;

startday ;

Returns: true if the payment event was added successfully, false otherwise.

newRate ;

date ;

Returns: true if the rate change was added successfully, false otherwise.

Returns: true if the amortization schedule was calculated successfully, false otherwise.

Returns: the amortization schedule as a JSDataSet.

Returns: the error value resulting from solving for the unknown.

Returns: all amortization events such as rate changes, loans, payments, and compounding period changes as a JSDataSet.

Returns: the remaining balance after the amortization schedule.

Returns: the value of the unknown parameter solved during amortization.

period ;

Returns: true if the specified period is valid, false otherwise.

amount ;

Returns: the amount rounded to the nearest cent.

Returns: true if the unknown value was successfully solved, false otherwise.

Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Date
Boolean
Number
Date
Boolean
Number
Date
Date
Number
Boolean
Number
Date
Date
Number
Number
Boolean
Number
Date
Date
Number
Number
Number
Boolean
Number
Date
Boolean
Number
Date
Date
Number
Boolean
Number
Date
Date
Number
Number
Boolean
Number
Date
Date
Number
Number
Number
Boolean
Number
Date
Boolean
Boolean
JSDataSet
Number
JSDataSet
Number
Number
Number
Boolean
Number
Number
Boolean
Number
NUMBER_UNLIMITED
Number
PERIOD_ANNUALY
Number
PERIOD_BI_ANNUALLY
Number
PERIOD_BI_MONTHLY
Number
PERIOD_DAILY
Number
PERIOD_FOUR_MONTHLY
Number
PERIOD_FOUR_WEEKLY
Number
PERIOD_MONTHLY
Number
PERIOD_NONE
Number
PERIOD_QUARTERLY
Number
PERIOD_TWO_MONTHLY
Number
PERIOD_TWO_WEEKLY
Number
PERIOD_WEEKLY
Number
STARTDAY_NORMAL
Boolean
addCompoundPeriodChange(newPeriod, date)
Boolean
addLoan(amount, date)
Boolean
addLoan(amount, firstDate, lastDate, period)
Boolean
addLoan(amount, firstDate, lastDate, period, number)
Boolean
addLoan(amount, firstDate, lastDate, period, number, startday)
Boolean
addPayment(amount, date)
Boolean
addPayment(amount, firstDate, lastDate, period)
Boolean
addPayment(amount, firstDate, lastDate, period, number)
Boolean
addPayment(amount, firstDate, lastDate, period, number, startday)
Boolean
addRateChange(newRate, date)
Boolean
calculateAmortizationSchedule()
JSDataSet
getAmortizationSchedule()
Number
getError()
JSDataSet
getEvents()
Number
getRestBalance()
Number
getUnknown()
Boolean
isValidPeriod(period)
Number
roundMoney(amount)
Boolean
solveForUnknown()
sortEvents()