You are browsing documentation for version 5.0 of OroCommerce, OroCRM, and OroPlatform, maintained until August 2024 and supported until March 2026. See version 5.1 (the latest LTS version) of the Oro documentation for information on latest features.

See our Release Process documentation for more information on the currently supported and upcoming releases.

Multi Currency Cell Content Editor

Column configuration samples:

      enable: true
    # <grid configuration> goes here
      # Sample 1. Mapped by number frontend type
        frontend_type: <multi-currency>
      # Sample 2. Full configuration
            view: orocurrency/js/app/views/editor/multi-currency-editor-view
              placeholder: '<placeholder>'
              css_class_name: '<class-name>'
            NotBlank: ~
          original_field: '<original_field>'
          value_field: '<value_field>'
          currency_field: '<currency_field>'

Options in YML

Column Option Name Description
inline_editing.editor.view_options.placeholder Optional. Placeholder translation key for an empty element
inline_editing.editor.view_options.placeholder_raw Optional. Raw placeholder value
inline_editing.editor.view_options.css_class_name Optional. Additional css class name for editor view DOM element
inline_editing.validation_rules Optional. Validation rules. See JS Validation topic for more information
multicurrency_config.original_field Field that contains combined currency value, like EUR100.0000
multicurrency_config.value_field Field that contains amount of currency value
multicurrency_config.currency_field Field that contains code of currency (e.g., EUR)

Constructor Parameters

Extends: TextEditorView

Param Type Description
options Object Options container
options.model Object Current row model
options.fieldName string Field name to edit in model
options.placeholder string Placeholder translation key for an empty element
options.placeholder_raw string Raw placeholder value. It overrides placeholder translation key
options.validationRules Object Validation rules. See JS Validation topic for more information
options.choices Object Array of codes of available currencies
  • MultiCurrencyEditorView ⇐ TextEditorView
    • .parseRawValue(value) ⇒ Object
    • .getValue()] ⇒ String
    • .getCurrencyData()](#module_MultiCurrencyEditorView#getCurrencyData) ⇒ Array

multiCurrencyEditorView.parseRawValue(value) ⇒ Object

Convert string presentation of value to object with ‘currency’ and ‘amount’ fields

Kind: instance method of MultiCurrencyEditorView

Param Type Description
value String in format currency_code+amount

multiCurrencyEditorView.getValue() ⇒ String

Collects values from DOM elements and converts them to string format like EUR100.0000

Kind: instance method of MultiCurrencyEditorView

multiCurrencyEditorView.getCurrencyData() ⇒ Array

Prepares array of objects that presents select options in dropdown

Kind: instance method of MultiCurrencyEditorView