/*
   * @cfg {String} ddSortCol
   * if grid is sorted by this column drag/drop sorting of records is enabled
   */

/*
   * config
   */

/*
   * public
   */

/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014-2019 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2021 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2022 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2022-2025 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2024 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2024-2025 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2025 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2020 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 @author
 * Alexander Stintzing <a.stintzing@metaways.de> @copyright Copyright (c) 2013
 * Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 *
 * @package     Ext
 * @subpackage  ux
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @copyright   Copyright (c) 2021 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 *
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2007-2025 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014-2019 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2021 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 @author
 * Alexander Stintzing <a.stintzing@metaways.de> @copyright Copyright (c) 2013
 * Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @author      Cornelius Weiss <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2009-2021 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2007-2010 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schüle <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2007-2013 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schüle <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2009-2014 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * Sales combo box and store
 *
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013-2023 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * Sales combo box and store
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2012 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * Sales combo box and store
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014-2015 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/*
 * Tine 2.0
 * Sales combo box and store
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <kontakt@michaelspahn.de>
 * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 */

/* USERABORT */

/* ["default"] */

/* ["default"].locals */

/* asset import */

/* binding */

/* default */

/* default.locals */

/* harmony default export */

/* harmony export */

/* harmony import */

/* import() */

/* import() | Tinebase/js/cytoscape */

/* istanbul ignore if  */

/* istanbul ignore next  */

/* needed for isFormField cycle */

/* pkg: Sales FAT Client (css/Sales-FAT.css)*/

/* pkg: Sales FAT Client (js/Sales-FAT.js)*/

/*#__PURE__*/

/**
             * Creates a new pop up dialog/window (acc. configuration)
             *
             * @returns {null}
             * TODO can we put this in the Tine.Tinebase.dialog.Dialog?
             */

/**
       * encode
       */

/**
     * check if a renderer is explicitly registered
     *
     * @param {String} appName
     * @param {String} modelName
     * @return {Boolean}
     */

/**
     * check if a renderer is explicitly registered
     *
     * @param {String} phpModelName
     * @return {Boolean}
     */

/**
     * register accountable
     *
     * @param {String} appName
     * @param {String} modelName
     */

/**
     * register renderer
     *
     * @param {String} phpModelName
     * @param {Function} func
     */

/**
     * return all accountables as array
     *
     * @return {Array}
     */

/**
     * return renderer
     *
     * @param {String} phpModelName
     * @return {Function}
     */

/**
     * returns number rounded to given number of fractionDigits or input if it's not a Number
     *
     * NOTE: the default is our internal precision which might be subject to change
     *
     * @param number
     * @param fractionDigits
     * @returns {*}
     */

/**
   *
   * @param {Tine.Sales.Model.Contract}
   *            record
   */

/**
   *
   * @param {} store
   * @param {} record
   * @param {} operation
   */

/**
   * 
   * @param {} date
   * @param {} contractId
   */

/**
   * 
   * @type {Array}
   */

/**
   * 
   */

/**
   * @cfg {Bool} showClosed
   */

/**
   * @cfg {Sales.Document_Abstract} required
   * */

/**
   * @param config
   *
   * maskMsg: 'Please Wait...',
   * documentType: '', // one of Offer|Order|Delivery|Invoice
   *
   */

/**
   * @param {String} value
   * @return {Ext.form.Field} this
   */

/**
   * @private
   */

/**
   * @property showClosedBtn
   * @type Ext.Button
   */

/**
   * @return Ext.grid.ColumnModel
   */

/**
   * @see: Tine.widgets.dialog.EditDialog.onRecordLoad
   */

/**
   * @todo make it const
   *
   * @type array
   */

/**
   * @todo: make this generally available (here its more general: Tine.HumanResources.EmployeeGridPanel)
   * 
   * returns additional toobar items
   * 
   * @return {Array} of Ext.Action
   */

/**
   * Calculate Tax and Tax percent from Gross and Net
   */

/**
   * Close store Window
   */

/**
   * Fill address with contact data, if not set already
   * 
   * @param {} combo
   * @param {} record
   * @param {} index
   */

/**
   * TODO let accountable define its presentation
   * TODO add qtip?
   *
   * @param value
   * @returns {string}
   */

/**
   * accountables do not have a quantity
   *
   * @param record
   * @returns {boolean}
   *
   * TODO this should be refactored...
   */

/**
   * add custom items to context menu
   * 
   * @return {Array}
   */

/**
   * add on click event after render
   */

/**
   * adds record from selection widget to store
   *
   * @param {Object} recordData
   */

/**
   * append showClosed value
   */

/**
   * apply showClosed value
   */

/**
   * arguments for the last getApplicableBoilerplates call
   */

/**
   * autoset
   *
   * @type combo
   */

/**
   * autoset
   * 
   * @type combo
   */

/**
   * calculates price gross by price net and tax
   */

/**
   * calculates total prices by price gross, additional price gross, discount
   */

/**
   * called on clicking the OK button
   */

/**
   * called on multiple edit
   *
   * @return {Boolean}
   */

/**
   * called on multiple edit
   * @return {Boolean}
   */

/**
   * cancel collapse if ctx menu or record selection is shown
   *
   * @return Boolean
   */

/**
   * close window
   */

/**
   * containerProperty (all contracts in one container) exists, so overwrite creating selector here
   */

/**
   * create the buttons
   */

/**
   * creates a store containing all positions
   */

/**
   * creates the special editors
   * @param {} o
   */

/**
   * creates the view
   * 
   * @return {Object}
   */

/**
   * duplicate(s) found exception handler
   * 
   * @todo: make this globally, smoothly the virtual fields (modelconfig) don't fit anywhere
   * 
   * @param {Object} exception
   */

/**
   * edit attributes: open modal window with key/value grid
   */

/**
   * executed after record got updated from proxy
   *
   * @private
   */

/**
   * executed after record got updated from proxy
   * 
   * @private
   */

/**
   * executed after record got updated from proxy
   */

/**
   * executed when record gets updated from form
   */

/**
   * extra validation for the number field, calls parent
   * @return {Boolean}
   */

/**
   * get action for setting relation accountables
   *
   * @param modelName
   * @returns {{iconCls: string, requiredGrant: string, text, itemId: string, allowMultiple: boolean,
    * scope: Tine.Sales.ContractEditDialog, handler: handler, actionUpdater: actionUpdater}}
   *
   * TODO move to separate file
   * TODO add tests
   */

/**
   * get form values
   *
   * @return {Array}
   */

/**
   * get items
   *
   * @return {Array}
   */

/**
   * get text from record defined by value (id or something else)
   *
   * @param {String|Object} value
   * @return {String}
   */

/**
   * holds all accountables needed
   * 
   * @type {Array}
   */

/**
   * holds positions from the edit dialog records positions property
   * 
   * @type array
   */

/**
   * holds the id of the invoice
   * 
   * @type string
   */

/**
   * holds the php model name of the accountable
   * 
   * @type string
   */

/**
   * how should the number be validated text/integer possible
   * @type {String} validateNumber
   */

/**
   * if true, number will be readOnly and will be generated automatically
   * @type {Boolean} autoGenerateNumber
   */

/**
   * init
   */

/**
   * init component
   */

/**
   * init default template
   * 
   * @todo: generalize this
   */

/**
   * init selection widget
   */

/**
   * init single contact template (this.tpl)
   */

/**
   * initializes the actions
   */

/**
   * initializes the component
   */

/**
   * inits this cmp
   * @private
   */

/**
   * invoice position panels - only visible in "auto" invoices
   *
   * @type Object
   */

/**
   * is called on after edit to set related records
   * @param {} o
   */

/**
   * is called on render, creates keymap
   * @param {} ct
   * @param {} position
   */

/**
   * is called on reversal invoice action
   * 
   * @param {Ext.Action} action
   * @param {Object} event
   */

/**
   * is called when the component is rendered
   * @param {} ct
   * @param {} position
   */

/**
   * is form valid?
   * 
   * @return {Boolean}
   */

/**
   * is selection visible ?
   * - overwrite this when extending to make sure that the selection widget is no longer visible on collapse
   *
   * @return {Boolean}
   */

/**
   * just update the contract grid panel, no persisten
   * 
   * @type String
   */

/**
   * load data from prod agg record into grid store
   */

/**
   * loads the address to the plaintext field
   */

/**
   * loads the existing ProductAggregates into the store
   */

/**
   * loads the full-featured record, if a contract gets selected
   *
   * @param {Tine.widgets.relation.PickerCombo}
   *            combo
   * @param {Tine.Sales.Model.Contract}
   *            record
   * @param {Number}
   *            index
   */

/**
   * new entry event -> add new record to store
   * @see Tine.widgets.grid.QuickaddGridPanel
   * @param {Object} recordData
   * @return {Boolean}
   */

/**
   * populates this.items with the form items
   */

/**
   * put data from grid into prod agg record
   */

/**
   * record select
   *
   * @param {String} field
   * @param {Object} recordData
   */

/**
   * renders the billing point
   *
   * @param {String} value
   * @return {String}
   */

/**
   * renders the cost center
   * @param {Object} value
   * @param {Object} row
   * @param {Tine.Tinebase.data.Record} record
   *
   * return {String}
   */

/**
   * returns canonical path part
   * @returns {string}
   */

/**
   * returns column model
   *
   * @return Ext.grid.ColumnModel
   * @private
   */

/**
   * returns dialog
   *
   * NOTE: when this method gets called, all initalisation is done.
   *
   * @return {Object}
   * @private
   */

/**
   * returns dialog
   * 
   * NOTE: when this method gets called, all initalisation is done.
   * 
   * @return {Object}
   * @private
   */

/**
   * returns dialog
   * 
   * NOTE: when this method gets called, all initalisation is done.
   */

/**
   * the calling application
   * 
   * @type Tine.Tinebase.Application
   */

/**
   * the calling editDialog
   * Tine.Sales.ContractEditDialog
   */

/**
   * the export handler
   */

/**
   * updates the title of the tab by adding the number of containing records in braces
   *
   * @param {Number} count
   */

/**
   * will be called in Edit Dialog Mode
   */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.AddressEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>Address Compose Dialog</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.AddressEditDialog
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractContactInternalFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractProductFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Philipp Schüle <p.schuele@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.CustomerDetailsPanel
 * @extends     Tine.widgets.grid.DetailsPanel
 * 
 * <p>Customer details Panel</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.CustomerDetailsPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.CustomerEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>Customer Compose Dialog</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.CustomerEditDialog
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.CustomerFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ExceptionHandler
 * 
 * <p>Exception Handler for Sales</p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.InvoiceDetailsPanel
 * @extends     Tine.widgets.grid.DetailsPanel
 * 
 * <p>Invoice details Panel</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.InvoiceDetailsPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.OrderConfirmationFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ProductAggregateGridPanel
 * @extends     Tine.widgets.grid.PickerGridPanel
 *
 * <p>Product aggregate grid panel</p>
 * <p></p>
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 *
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ProductAggregateGridPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ProductAggregateGridPanel
 * @extends     Tine.widgets.grid.PickerGridPanel
 * 
 * <p>Product aggregate grid panel</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ProductAggregateGridPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.PurchaseInvoiceDetailsPanel
 * @extends     Tine.widgets.grid.DetailsPanel
 * 
 * <p>Invoice details Panel</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.PurchaseInvoiceDetailsPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.SupplierDetailsPanel
 * @extends     Tine.widgets.grid.DetailsPanel
 * 
 * <p>Supplier details Panel</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.SupplierDetailsPanel
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.SupplierEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>Supplier Compose Dialog</p>
 * <p></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.SupplierEditDialog
 */

/**
 * @namespace   Tine.Sales
 * @class       Tine.Sales.SupplierFilterModel
 * @extends     Tine.widgets.grid.ForeignRecordFilter
 * 
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 */

/**
 * @namespace Tine.Sales
 * @class Tine.Sales.InvoiceEditDialog
 * @extends Tine.widgets.dialog.EditDialog
 *
 * <p>
 * Invoice Compose Dialog
 * </p>
 * <p>
 * </p>
 *
 * @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author Alexander Stintzing <a.stintzing@metaways.de>
 *
 * @param {Object}
 *            config
 * @constructor Create a new Tine.Sales.InvoiceEditDialog
 */

/**
 * @namespace Tine.Sales
 * @class Tine.Sales.PurchaseInvoiceEditDialog
 * @extends Tine.widgets.dialog.EditDialog
 * 
 * <p>
 * Invoice Compose Dialog
 * </p>
 * <p>
 * </p>
 * 
 * @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param {Object}
 *            config
 * @constructor Create a new Tine.Sales.PurchaseInvoiceEditDialog
 */

/**
 * @param {Object}
 * 
 * @return {Ext.ux.Window}
 */

/**
 * Address selection combo box
 *
 * @namespace   Tine.Sales
 * @class       Tine.Sales.AddressSearchCombo
 * @extends     Ext.form.ComboBox
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013 Metaways Infosystems GmbH (http://www.metaways.de)
 *
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.AddressSearchCombo
 */

/**
 * Billing Date Dialog
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.BillingDateDialog
 * @extends     Ext.FormPanel
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @constructor
 * @param {Object} config The configuration options.
 */

/**
 * Contract edit dialog
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>Contract Edit Dialog</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2007-2014 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ContractGridPanel
 */

/**
 * Contract grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Contract Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schuele <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2007-2013 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ContractGridPanel
 */

/**
 * Contract selection combo box
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ContractSearchCombo
 * @extends     Ext.form.ComboBox
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2012 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ContractSearchCombo
 */

/**
 * Contract selection combo box
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.InvoiceSearchCombo
 * @extends     Ext.form.ComboBox
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <kontakt@michaelspahn.de>
 * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.InvoiceSearchCombo
 */

/**
 * Contract selection combo box
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.OfferSearchCombo
 * @extends     Ext.form.ComboBox
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <kontakt@michaelspahn.de>
 * @copyright   Copyright (c) 2915 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.OfferSearchCombo
 */

/**
 * Copy Address Dialog
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.CopyAddressDialog
 * @extends     Ext.FormPanel
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @constructor
 * @param {Object} config The configuration options.
 */

/**
 * Customer grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.CustomerGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Customer Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>    
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.CustomerGridPanel
 */

/**
 * Invoice grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.InvoiceGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Invoice Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>    
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.InvoiceGridPanel
 */

/**
 * Invoice grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.PurchaseInvoiceGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Invoice Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>    
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.PurchaseInvoiceGridPanel
 */

/**
 * InvoicePosition grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.InvoicePositionGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>InvoicePosition Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>    
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.InvoicePositionGridPanel
 */

/**
 * InvoicePosition panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.InvoicePositionPanel
 * @extends     Ext.Panel
 * 
 * <p>InvoicePosition Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.InvoiceGridPanel
 */

/**
 * Offer edit dialog
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.OfferEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>Offer Edit Dialog</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013-2014 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.OfferGridPanel
 */

/**
 * OrderConfirmation edit dialog
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.OrderConfirmationEditDialog
 * @extends     Tine.widgets.dialog.EditDialog
 * 
 * <p>OrderConfirmation Edit Dialog</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2013-2014 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.OrderConfirmationGridPanel
 */

/**
 * OrderConfirmation selection combo box
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.OrderConfirmationSearchCombo
 * @extends     Ext.form.ComboBox
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Michael Spahn <kontakt@michaelspahn.de>
 * @copyright   Copyright (c) 2015 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.OrderConfirmationSearchCombo
 */

/**
 * Product grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.ProductGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Product Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.ProductGridPanel
 */

/**
 * Supplier grid panel
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.SupplierGridPanel
 * @extends     Tine.widgets.grid.GridPanel
 * 
 * <p>Supplier Grid Panel</p>
 * <p><pre>
 * </pre></p>
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>    
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.SupplierGridPanel
 */

/**
 * Supplier selection combo box
 * 
 * @namespace   Tine.Sales
 * @class       Tine.Sales.SupplierSearchCombo
 * @extends     Ext.form.ComboBox
 * 
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014-2015 Metaways Infosystems GmbH (http://www.metaways.de)
 * 
 * @param       {Object} config
 * @constructor
 * Create a new Tine.Sales.SupplierSearchCombo
 */

/**
 * Tine 2.0
 *
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Cornelius Weiß <c.weiss@metaways.de>
 * @copyright   Copyright (c) 2024 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/**
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Alexander Stintzing <a.stintzing@metaways.de>
 * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/**
 * Tine 2.0
 * 
 * @package     Sales
 * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
 * @author      Philipp Schüle <p.schuele@metaways.de>
 * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
 */

/**
 * address renderer, not a default renderer
 *
 * @author      Philipp Schuele <p.schuele@metaways.de>
 *
 * @constructor
 * Constructs mainscreen of the Sales application
 */

/**
 * allows all accountables to register (needed for accountable combo box)
 */

/**
 * create paper slip of given document
 * @param config
 *  maskEl
 *  record
 *  recordClass
 *  editDialog
 *
 * @returns {Promise<void>}
 */

/**
 * opens the Copy Address Dialog and adds the rendered address
 *
 * @param {Tine.Tinebase.data.Record} record
 * @param {String} companyName
 */

/**
 * register special renderer for invoice address_id
 */

/**
 * register special renderer for the invoice position
 */

/**
 * renders the model of the invoice position
 *
 * @param {String} value
 * @param {Object} row
 * @param {Tine.Tinebase.data.Record} rec
 * @return {String}
 */

/**
 * renders the quantity of the invoice position
 */

/**
 * renders the unit of the invoice position
 *
 * @param {String} value
 * @param {Object} row
 * @param {Tine.Tinebase.data.Record} rec
 * @return {String}
 */

/**
 * renders the unit of the invoice position
 * @param {} value
 * @param {} row
 * @param {} rec
 * @return {}
 */

/** @param {Tine.Tinebase.data.Record} record
 * @param {String} companyName
 *
 * @return {String}
 */

/***/

/*, fields.category*/

/*fields.contract_id, */

/*new Tine.Tinebase.widgets.keyfield.ComboBox({
                app: 'Sales',
                keyFieldName: 'invoiceCleared',
                fieldLabel: this.app.i18n._('Cleared'),
                name: 'cleared',
                allowBlank: false,
                columnWidth: 1/3
            })*/

/*{
                xtype: 'extuxclearabledatefield',
                name: 'overdue_at',
                fieldLabel: this.app.i18n._('Overdue date'),
                columnWidth: 1/4
                //emptyText: (this.record.get('is_auto') == 1) ? this.app.i18n._('automatically set...') : ''
            }*/

//

//       are there for the same contentType/extension

//       in all documents debitor should match precursor receipient?

//       in orders debitor of 'delivery', 'billing' should match receipient?

//       so it does not work to define it here

//       those docs must not be processed individually

//       unbooked documents are not included -> inform user about this?

//     - and ask user if document status should be set to dispatched after the mail is sent (yes/no)

//     - ask for documents to include

//     - ask user which email address to use

//     - create dispatch-history-record

//     - open email-compose

//     - optionally set document dispatched

//     - optionally set manual tasks "COMPLETED"

//     action.baseAction.setDisabled(!enabled) // WTF?

//     action.setDisabled(!enabled)

//     let enabled = records.length === 1 // no batch processing yet, needs a robust concept!

//   - else inform user that he does an additional dispatch without respecting dispatch configs (ok/cancel)

//   - if manual task are open, ask user if he wants to complete on of those tasks (multi options, allowMultiple)

//   - when all records are set to "COMPLETED" server sets the document to dispatched

//   - when the user sets a history-record to "COMPLETED" we ask the user for "notes/records" and store them in the same record

// #endif

// #if process.env.NODE_ENV !== 'unittest'

// 'accountables' -> [{"model":"WebAccounting_Model_ProxmoxVM","id":"12345abcde"}]

// 'background-fit': 'contain',

// 'background-opacity': 0,

// 'border-opacity': 0,

// 'border-width': 3,

// 'label': 'data(type)',

// 'overlay-padding': '10',

// 'text-margin-x': '-100px',

// (NOTE: as long as we don't support automatic uploads type 'upload' also acts as manual type)

// + tags.length * 18;

// -> might have to do with autounselectify opton :-)

// -> start with document

// -> use only if not last!

// @TODO add filter for product_id

// @TODO applySorting is wrong here as we e.g. can append

// @TODO check if debitor is right?

// @TODO don't show other options if cmp.startRecord is set?

// @TODO exclude existing fields?

// @TODO have modelconfig type for this fields!

// @TODO open document debitor once dispatch config gets denormalized

// @TODO product_id picker nur sales produkte die noch aktiv

// @TODO sorting

// @TODO this should be done by modelConfig!

// @TODO where to start unfold_type? do we need to remember?

// @TODO where to store shortcut?

// @TODO worth an own file?

// @TODO: have all docs into one followUp vs. each doc gets an individual followUp

// @TODO: maybe we should define default booked state somehow? e.g. offer should be accepted (not only send) or let the user select?

// @see https://github.com/ericmorand/twing/issues/332

// CONCATENATED MODULE: ../../Sales/js/Document/AbstractAction.js

// CONCATENATED MODULE: ../../Sales/js/Document/AbstractEditDialog.js

// CONCATENATED MODULE: ../../Sales/js/Document/BoilerplatePanel.js

// CONCATENATED MODULE: ../../Sales/js/Document/BookDocumentAction.js

// CONCATENATED MODULE: ../../Sales/js/Document/CopyDocumentAction.js

// CONCATENATED MODULE: ../../Sales/js/Document/CreatePaperSlipAction.js

// CONCATENATED MODULE: ../../Sales/js/Document/DeliveryEditDialog.js

// CONCATENATED MODULE: ../../Sales/js/Document/DispatchDocumentAction.js

// CONCATENATED MODULE: ../../Sales/js/Document/InvoiceEditDialog.js

// CONCATENATED MODULE: ../../Sales/js/Document/OfferEditDialog.js

// CONCATENATED MODULE: ../../Sales/js/Document/OrderEditDialog.js

// CONCATENATED MODULE: ../../Sales/js/Document/TrackAction.js

// CONCATENATED MODULE: ../../Sales/js/Model/Document/AbstractMixin.js

// CONCATENATED MODULE: ../../Sales/js/Model/Document/DispatchHistory.js

// CONCATENATED MODULE: ../../Sales/js/Model/DocumentPosition/Delivery.js

// CONCATENATED MODULE: ../../Sales/js/Model/DocumentPosition/Invoice.js

// CONCATENATED MODULE: ../../Sales/js/Model/DocumentPosition/Offer.js

// CONCATENATED MODULE: ../../Sales/js/Model/DocumentPosition/Order.js

// CONCATENATED MODULE: ../../Sales/js/Sales.js

// CONCATENATED MODULE: ./ux/form/FieldTriggerPlugin.js

// CONCATENATED MODULE: ./ux/grid/DDSortPlugin.js

// ESM COMPAT FLAG

// EXPORTS

// EXTERNAL MODULE: ../../Sales/js/Document/CreateFollowUpAction.js

// EXTERNAL MODULE: ../../Sales/js/Document/PaymentMeansField.js

// EXTERNAL MODULE: ../../Sales/js/Document/SendToDatevAction.js

// EXTERNAL MODULE: ../../Sales/js/Document/TrackDialog.js

// EXTERNAL MODULE: ../../Sales/js/DocumentPosition/AbstractEditDialog.js

// EXTERNAL MODULE: ../../Sales/js/DocumentPosition/customerColumn.js

// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js

// EXTERNAL MODULE: ./twingEnv.es6.js + 1 modules

// EXTERNAL MODULE: ./ux/form/FieldTriggerPlugin.js + 1 modules

// EXTERNAL MODULE: ./widgets/form/EvaluationDimensionForm.js

// Exports

// Ext.ux.ItemRegistry.registerItem('Tinebase-MainContextMenu', this.setAccountableAction, 100);

// FIXME how can this happen??

// For old IE

// If url is already wrapped in quotes, remove them

// Module

// NOTE: action updater is not executed in action but in component of the action

// NOTE: contract_id waits for contract rewrite

// NOTE: customer selection logic is here because customer is no select combo in old invoices module

// NOTE: in case record is already loaded

// NOTE: need to create record to do conversions (string -> int) here!

// NOTE: sorting of subproductmapping sorts inside subpositions only (atm)

// NOTE: the selection might contain other documents which are part of the shared followup

// NOTE: twing needs data in same window context

// NOTE: we need to rely on cmp.record here see DispatchHistoryGridPanel::action_completeByMail

// NOTE: xRechnung limits payment means see "PAYMENT INSTRUCTIONS" BG-16 in EN 16931

// NOTE: xml should be quicklooked with an ace by default. we need a mechanism to switch views if multiple registrations

// Note: subprductMapping / subproducts are not resolved in search -> fetch it

// Sales_Exception_AlterOCNumberForbidden

// Sales_Exception_DeletePreviousInvoice

// Sales_Exception_DeleteUsedBillingAddress

// Sales_Exception_DuplicateNumber

// Sales_Exception_InvoiceAlreadyClearedDelete

// Sales_Exception_InvoiceAlreadyClearedEdit

// Sales_Exception_UnknownCurrencyCode

// See https://drafts.csswg.org/css-values-3/#urls

// Should url be wrapped?

// Special case to return head of iframe instead of iframe itself

// TODO OR: allow multiple records to be selected!

// TODO add migration to new documents

// TODO add translation?

// TODO define additional models / get from registry

// TODO pass this.app.i18n

// TODO prevent multiselect and change of records without defined attributes

// TODO prevent selection of multiple records (no action updater?)

// TODO should be fetched from MC

// This will throw an exception if access to iframe is blocked

// [fields.description],

// action.setDisabled(!enabled) // this is the component itsef

// actionUpdater(action, grants, records, isFilterSelect, filteredContainers) {

// actions depend on manage_products right

// activities and tags

// add boilerplate panel/management

// add sorted positions

// align: 'stretch',

// allow 'ad-hoc' shared followups? -> no :-)

// allowMultiple: false,

// also for manual dispatching the server creates the necessary documents and sets the document to MANUAL_DISPATCH state

// always copy/clone record because it can't exist in 2 different stores

// always get postal (debitor gets added in beforeloadrecords)

// append remaining groups

// ask before replace locally changed!

// autoScroll: true,

// check if date is set and ask if user want's to change it to today

// check if document is 'shared' -> getMatchingSharedOrderDocumentTransition

// check service period contains all positions

// checks and applies if grid is grouped

// console.error(tracData);

// const startPos = 30

// const target = Ext.EventObject.getTarget();

// copy product properties to position

// create paperslip/edocument if nessesary

// ctrl + return

// custom sort for product_id

// data: this.dispatchHistoryRecords,

// default category

// defer this, otherwise renderers won't have been registered, yet.

// deprecated documents

// directed: true,

// disable fields unless product is chosen

// dispatching is done by the server based on dispatch configs. (Sales_Frontend_Json->dispatchDocument)

// dispatching manually via email:

// docuemnt or position based?

// don't modify

// due to cross-origin restrictions

// e.g. on lang change

// editDialog

// enableNoGroups: false,

// field is somewhere in dialog, but has no definition... we keep it

// for a single dispatch we notify user directly about his manual task(s)

// for batch processing user can follow these steps and set the history-records to "COMPLETED"

// for each manual config, the server creates a dispatch-history-record stating the instructions

// for some reason cy internal selection model does not work :-(

// forceFit: true,

// from -> to

// generalized keybord map for edit dlgs

// get from debitor

// groupField: 'grouping',

// grouping might get lost when grp record is removed/reinserted on update

// handle booked state

// handle customer changes

// handle eval_dim division subfilter

// have postal addr in each debitor

// height: 300,

// if grid will be grouped, make it bigger

// import './Document/AttachedDocument/ManageAttachmentAction';

// import './Document/AttachedDocument/ShowDispatchHistory';

// import a list of modules into the list

// init all columns

// init templates

// inline edit

// interrupt process flow until dialog is rendered

// interrupt process flow until we got the positions from the editdialog set

// is_payed

// istanbul ignore if

// istanbul ignore next

// kill grid autoSave

// legacy invoice

// let qtipText = JSON.stringify(value);

// let result = '<div ext:qtip="' + qtipText + '">' + attributes + '</div>';

// link into product agg json attributes like this:

// make sure changes are saved even if booking fails

// make sure discount calculations run

// manage type relevant fields

// manual position

// maskEl: this.maskEl,

// maybe we should create a common ancestor for ConfigGrid and json attributes grid

// mode: 'local',

// more logic in Tine.Sales.AddressSearchCombo

// needed by DispatchHistoryGridPanel::action_completeByMail

// new dispatchHistoryRecord which we created via mail fileLocation

// new documents

// not needed anymore

// ok discount is already applied -> lower sales_tax_by_rate by discount rate

// order/offer recipients

// pack: 'start',

// place debitor reference in each addr

// prepeare rendered sums registry

// preserve space for triggers

// private

// product combo is first item

// product does not bill an accountable -> return qty

// quickadd

// reconfigure position grids to have a customer column

// reformat sales_tax_by_rate

// register additional action for genericpickergridpanel

// remove unused fields

// rendered sums registry for the invoiceposition grid panel

// return false will the generic exceptionhandler handle the caught exception

// return the list of modules as css string

// revere a mix of reversals and non reversals is not allowed

// reversals are allowed for booked, non fully reversed documents only

// sales_tax & sales_tax_by_rate

// selected boilerplates -> shown in dialog

// set description to contract title if empty

// shall we ignore sorting of own group?

// show/hide tabstripe

// skip defaults

// some adjustments

// special/advanced lists

// status handling

// sync record on these events

// this is called either from the edit dialog or from the grid, so we have different record types

// this will start preparing the gridpanels for the invoice positions

// this.recordsName = recordClass.getRecordsName()

// unfold subproducts

// users might want to dispatch manually via mail. we support this with a separate action (single record only)

// we need to fetch record first, as dispatchHistory is dependent and we don't have the

// width: 400,

// {modelName: 'Invoice', requiredRight: 'manage_invoices', singularContainerMode: true},

// {modelName: 'OrderConfirmation', requiredRight: 'manage_orderconfirmations', singularContainerMode: true},

// },

//allowBlank: false,

//private

//readOnly: true,

//this.pickerConfig = {emptyText: this.app.i18n._('without customer'), allowBlank: true};

//this.record.get('positions')
