<?php

namespace App\Reports\Sources\SupplierInvoiceRows;

class ColumnsManager extends \App\Reports\Sources\ColumnsManagerAbstract
{

	/**
	 * The definition of report source columns.
	 * @var array
	 */
	protected array $columnsCfg = [
		'currentRowIndex' =>						['type' => 'numeric',   'dbDef' => "INT UNSIGNED NOT NULL DEFAULT '0'",			'cat' => "supplierInvoice"],
		'inv_id'	=>								['type' => 'numeric', 	'dbDef' => "BIGINT UNSIGNED NOT NULL DEFAULT '0'", 		'cat' => "supplierInvoice"],
		'inv_number' =>              				['type' => 'string',    'dbDef' => "VARCHAR(30) NOT NULL DEFAULT ''",  			'cat' => "supplierInvoice"],
		'inv_series' =>              				['type' => 'string',    'dbDef' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "supplierInvoice"],
		'inv_date'	=>								['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "supplierInvoice"],
		'inv_dateYM' =>              				['type' => 'yearMonth', 'dbDef' => "DATE NULL DEFAULT NULL",         			'cat' => "supplierInvoice"],
		'inv_dateY' =>                				['type' => 'year',      'dbDef' => "YEAR NULL DEFAULT NULL",                    'cat' => "supplierInvoice"],
		'inv_dueDate'	=>							['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "supplierInvoice"],
		'inv_dueDateYM' =>            				['type' => 'yearMonth', 'dbDef' => "DATE NULL DEFAULT NULL",      			   	'cat' => "supplierInvoice"],
		'inv_dueDateY' =>            			 	['type' => 'year',      'dbDef' => "YEAR NULL DEFAULT NULL",      			   	'cat' => "supplierInvoice"],
		'inv_dueDays' =>           				   	['type' => 'numeric',   'dbDef' => "SMALLINT NULL DEFAULT '0'",                 'cat' => "supplierInvoice"],
		'inv_duePassedDays' =>			        	['type' => 'numeric',   'dbDef' => "MEDIUMINT NOT NULL DEFAULT '0'",            'cat' => "supplierInvoice"],
		'inv_fulfillmentDate' =>     			   	['type' => 'date',      'dbDef' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
		'inv_estPayDate' =>        					['type' => 'date',      'dbDef' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
		'inv_lastPaymentDate' =>      			    ['type' => 'date',      'dbDef' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
		'inv_lastPaymentDocTypeCode' => 			['type' => 'string',	'dbDef' => "VARCHAR(25) NOT NULL DEFAULT ''",			'cat' => "supplierInvoice"],
		'inv_lastPaymentDocTypeName' => 			['type' => 'string',	'dbDef' => "VARCHAR(50) NOT NULL DEFAULT ''",			'cat' => "supplierInvoice"],
		'inv_lastPaymentDocId' => 					['type' => 'numeric',	'dbDef' => "BIGINT UNSIGNED NOT NULL",					'cat' => "supplierInvoice"],
		'inv_statusOpCode'	=>						['type' => 'string', 	'dbDef' => "ENUM('notConfirmed', 'confirmed') NOT NULL DEFAULT 'notConfirmed'", 	'cat' => "supplierInvoice"],
		'inv_statusOpName'	=>						['type' => 'string', 	'dbDef' => "VARCHAR(15) NOT NULL DEFAULT ''", 			'cat' => "supplierInvoice"],
		'inv_statusFinCode'	=>						['type' => 'string', 	'dbDef' => "ENUM('n', 'p', 't', 'o') NOT NULL DEFAULT 'n'", 	'cat' => "supplierInvoice"],
		'inv_statusFinName'	=>						['type' => 'string', 	'dbDef' => "VARCHAR(20) NOT NULL DEFAULT ''", 			'cat' => "supplierInvoice"],
		'inv_formOfPaymentCode' =>      			['type' => 'string',    'dbDef' => "VARCHAR(20) NOT NULL DEFAULT ''",           'cat' => "supplierInvoice"],
		'inv_formOfPaymentName' =>   			    ['type' => 'string',    'dbDef' => "VARCHAR(20) NOT NULL DEFAULT ''",           'cat' => "supplierInvoice"],
		'inv_remarks' =>              				['type' => 'string',    'dbDef' => "TEXT NOT NULL",                             'cat' => "supplierInvoice"],
		'inv_processedRemarks' =>     				['type' => 'string',    'dbDef' => "TEXT NOT NULL",                             'cat' => "supplierInvoice", 'disabled' => true, 'content' => 'remarks'],
		'inv_comments' =>            				['type' => 'string',    'dbDef' => "TEXT NOT NULL",                             'cat' => "supplierInvoice"],
		'inv_addTime' =>        					['type' => 'datetime',  'dbDef' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
		'inv_blockTime' =>      					['type' => 'datetime', 	'dbDef' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
		'inv_lastUpdateTime' => 					['type' => 'datetime', 	'dbDef' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
		'inv_updatesCount' =>   					['type' => 'numeric',  	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "supplierInvoice"],

		'inv_respUserId'	=>						['type' => 'numeric',	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "invoiceUserDetails"],
		'inv_respUserName' =>      			     	['type' => 'string',  	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",          'cat' => "invoiceUserDetails"],
		'inv_respOfficeId'	=>						['type' => 'numeric',	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "invoiceUserDetails"],
		'inv_respOfficeName' =>     				['type' => 'string',  	'dbDef' => "VARCHAR(150) NOT NULL DEFAULT ''",          'cat' => "invoiceUserDetails"],
		'inv_respDepartmentId' =>   				['type' => 'numeric',   'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "invoiceUserDetails"],
		'inv_respDepartmentName' => 		 		['type' => 'string',    'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",          'cat' => "invoiceUserDetails"],
		'inv_addUserId'	=>							['type' => 'numeric',	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "invoiceUserDetails"],
		'inv_addUserName' =>      			     	['type' => 'string',  	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",          'cat' => "invoiceUserDetails"],
		'inv_blockUserId' =>     		 	 		['type' => 'numeric', 	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "invoiceUserDetails"],
		'inv_blockUserName' =>   			 		['type' => 'string',  	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",          'cat' => "invoiceUserDetails"],

		'supp_id'	=>								['type' => 'numeric', 	'dbDef' => "MEDIUMINT UNSIGNED NULL DEFAULT NULL", 	    'cat' => "supplier"],
		'supp_alias'	=>							['type' => 'string', 	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''", 			'cat' => "supplier"],
		'supp_fullName'	=>							['type' => 'string', 	'dbDef' => "VARCHAR(190) NOT NULL DEFAULT ''", 			'cat' => "supplier"],
		'supp_trustId'	=>							['type' => 'numeric', 	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",    'cat' => "supplier"],
		'supp_trustName'	=>					 	['type' => 'string', 	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",     		'cat' => "supplier"],
		'supp_duplicated'	=>						['type' => 'boolean', 	'dbDef' => "TINYINT UNSIGNED NOT NULL DEFAULT '0'",     'cat' => "supplier"],
		'supp_originalId'	=> 						['type' => 'numeric', 	'dbDef' => "MEDIUMINT UNSIGNED NOT NULL DEFAULT '0'",   'cat' => "supplier"],
		'supp_bankAccountId'	=> 					['type' => 'numeric',	'dbDef' => "INT UNSIGNED NOT NULL DEFAULT '0'",		    'cat' => "supplier"],
		'supp_bankAccountNumber' => 				['type' => 'string',	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",			'cat' => "supplier"],
		'supp_bankAccountBankId' => 				['type' => 'numeric',	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",	'cat' => "supplier"],
		'supp_bankAccountBankName' => 				['type' => 'string',	'dbDef' => "VARCHAR(150) NOT NULL DEFAULT ''",			'cat' => "supplier"],
		'supp_bankAccountBankOfficeId' => 			['type' => 'numeric',	'dbDef' => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",	'cat' => "supplier"],
		'supp_bankAccountBankOfficeName' =>			['type' => 'string',	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",			'cat' => "supplier"],

		'invRow_id'	=>								['type' => 'numeric',	'dbDef' => "BIGINT UNSIGNED NOT NULL DEFAULT '0'", 	    'cat' => "general"],
		'invRow_serviceCode'	=>					['type' => 'string',	'dbDef' => "CHAR(2) NOT NULL DEFAULT ''", 				'cat' => "general"],
		'invRow_serviceName'	=>					['type' => 'string',	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''", 			'cat' => "general"],
		'invRow_description'	=>					['type' => 'string',	'dbDef' => "VARCHAR(500) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_typeCode'	=>						['type' => 'string',	'dbDef' => "VARCHAR(15) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_typeName'	=>						['type' => 'string',	'dbDef' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_externalReservationId'	=>			['type' => 'string',	'dbDef' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_externalReservationDate'	=>		['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "general"],
		'invRow_confirmationNumber'	=>				['type' => 'string',	'dbDef' => "VARCHAR(50) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_checkIn'	=>						['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "general"],
	    'invRow_checkOut'	=>						['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "general"],
	    'invRow_contractNumber'	=>					['type' => 'string', 	'dbDef' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_ticketNo'	=>						['type' => 'string', 	'dbDef' => "VARCHAR(50) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_countryCode'	=>					['type' => 'string', 	'dbDef' => "CHAR(2) NULL DEFAULT NULL", 				'cat' => "general"],
		'invRow_countryName'	=>					['type' => 'string', 	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",     		'cat' => "general"],
		'invRow_cityId'	=>							['type' => 'numeric', 	'dbDef' => "MEDIUMINT UNSIGNED NULL DEFAULT NULL", 	    'cat' => "general"],
		'invRow_cityName' =>      			     	['type' => 'string',  	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",          'cat' => "general"],
		'invRow_orderCode'	=>						['type' => 'string', 	'dbDef' => "VARCHAR(50) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_orderNumber'	=>					['type' => 'string', 	'dbDef' => "VARCHAR(100) NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_supplierProductId'	=>				['type' => 'numeric',	'dbDef' => "MEDIUMINT UNSIGNED NULL DEFAULT NULL",      'cat' => "general"],
		'invRow_supplierProductName'	=>			['type' => 'string',	'dbDef' => "VARCHAR(250) NOT NULL DEFAULT ''", 			'cat' => "general"],
		'invRow_supplierChainCode'	=>				['type' => 'string',	'dbDef' => "VARCHAR(50) NOT NULL DEFAULT ''", 			'cat' => "general"],
		'invRow_passengerId'	=>					['type' => 'numeric',	'dbDef' => "INT UNSIGNED NULL DEFAULT NULL", 			'cat' => "general"],
		'invRow_passengerName'	=>					['type' => 'string',	'dbDef' => "VARCHAR(201) NULL DEFAULT NULL", 			'cat' => "general"],

		'invRow_measureUnit'	=>					[ 'type' => 'string', 	'dbDef' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "values"],
		'invRow_quantity' =>            			[ 'type' => 'price',  	'dbDef' => "DECIMAL(8,2) NOT NULL DEFAULT '0.00'",    	'cat' => "values"],
		'inv_currency' =>             		 		[ 'type' => 'string', 	'dbDef' => "VARCHAR(3) NOT NULL DEFAULT ''", 			'cat' => "values"],
		'inv_defCurrencyExchRate' => 				[ 'type' => 'price',  	'dbDef' => "DECIMAL(15,8) NOT NULL DEFAULT '0'",    	'cat' => "values"],
		'inv_workCurrencyExchRate' => 				[ 'type' => 'price',  	'dbDef' => "DECIMAL(15,8) NOT NULL DEFAULT '0'",    	'cat' => "values"],
		'invRow_unitValue' =>            			[ 'type' => 'price',  	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.000'",   	'cat' => "values"],
		'invRow_value'	=>							[ 'type' => 'price',  	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.00'",		'cat' => "values", 'subtotals' => "inv_currency"],
		'invRow_vat'	=> 							[ 'type' => 'price', 	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.00'",		'cat' => "values", 'subtotals' => "inv_currency"],
		'invRow_total'	=> 							[ 'type' => 'price', 	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.00'",		'cat' => "values", 'subtotals' => "inv_currency"],
		'invRow_valueDefCurr'	=> 					[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_vatDefCurr'	=> 						[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_totalDefCurr'	=> 					[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_valueWorkCurr'	=> 					[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_vatWorkCurr'	=>					[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_totalWorkCurr'	=> 					[ 'type' => 'price',	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0'",		'cat' => "values", 'subtotals' => true],
		'invRow_vatPercent'	=> 						[ 'type' => 'percent',	'dbDef' => "DECIMAL(5,4) NOT NULL DEFAULT '0'",			'cat' => "values"],
		'invRow_vatText'	=> 						[ 'type' => 'string', 	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",			'cat' => "values"],
		'invRow_payedPercent'	=>					[ 'type' => 'percent', 	'dbDef' => "DECIMAL(7,6) NOT NULL DEFAULT '0'",    		'cat' => "values"],
		'invRow_payedValue'	=>						[ 'type' => 'price',  	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.00'",    	'cat' => "values"],
		'invRow_notPayedValue'	=>					[ 'type' => 'price',  	'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT '0.00'",    	'cat' => "values"],

		'serv_id'	=>								['type' => 'numeric',	'dbDef' => "BIGINT UNSIGNED NULL DEFAULT NULL", 		'cat' => "service"],
	 	'serv_startDate' => 						['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL",					'cat' => "service"],
	 	'serv_endDate' 	=> 							['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL",					'cat' => "service"],
	 	'serv_statusOpCode' => 						['type' => 'string',	'dbDef' => "CHAR(2) NOT NULL DEFAULT ''",				'cat' => "service"],
	 	'serv_statusOpName' => 						['type' => 'string',	'dbDef' => "VARCHAR(10) NOT NULL DEFAULT ''",			'cat' => "service"],
	 	'serv_statusFinCode' => 					['type' => 'string',	'dbDef' => "CHAR(2) NOT NULL DEFAULT ''",				'cat' => "service"],
	 	'serv_statusFinName' => 					['type' => 'string',	'dbDef' => "VARCHAR(10) NOT NULL DEFAULT ''",			'cat' => "service"],
	 	'serv_remarks' 	=> 							['type' => 'string',	'dbDef' => "TEXT NOT NULL",								'cat' => "service"],
	 	'serv_processedRemarks' => 					['type' => 'string',	'dbDef' => "TEXT NOT NULL",								'cat' => "service", 'disabled' => true, 'content' => 'remarks'],
		'off_netCompanyDefCurr' =>					['type' => 'price',		'dbDef' => "DECIMAL(16,3) NOT NULL DEFAULT 0",			'cat' => "service"],

		'order_id'	=>								['type' => 'numeric',	'dbDef' => "BIGINT UNSIGNED NULL DEFAULT NULL", 		'cat' => "order"],
		'order_idConverted' => 						['type' => 'string',	'dbDef' => "VARCHAR(8) NOT NULL DEFAULT ''",			'cat' => "order"],
		'order_number' => 							['type' => 'string',	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",			'cat' => "order"],
		'order_code' 	=> 							['type' => 'string',	'dbDef' => "VARCHAR(50) NOT NULL DEFAULT ''",			'cat' => "order"],
		'order_date'	=>							['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "order"],
		'order_startDate'	=>						['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "order"],
		'order_endDate'	=>							['type' => 'date',		'dbDef' => "DATE NULL DEFAULT NULL", 					'cat' => "order"],
		'order_miceProjectId' => 					['type' => 'numeric',	'dbDef' => "INT NOT NULL DEFAULT '0'",					'cat' => "order"],
		'order_miceProjectName' => 					['type' => 'string',	'dbDef' => "VARCHAR(250) NOT NULL DEFAULT ''",			'cat' => "order"],

		'bal_id'	=>								['type' => 'numeric',	'dbDef' => "BIGINT UNSIGNED NOT NULL DEFAULT '0'", 		'cat' => "balDetails"],
		'bal_number' => 							['type' => 'string',  	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",  		'cat' => "balDetails"],
		'bal_date' 	=> 								['type' => 'date',      'dbDef' => "DATE NULL DEFAULT NULL",			 		'cat' => "balDetails"],
		'bal_code' 	=> 								['type' => 'string',  	'dbDef' => "VARCHAR(50) NOT NULL DEFAULT ''",    		'cat' => "balDetails"],
		'bal_name' 	=> 								['type' => 'string',   	'dbDef' => "VARCHAR(250) NOT NULL DEFAULT ''",   		'cat' => "balDetails"],
		'bal_typeCode' 	=> 							['type' => 'string',   	'dbDef' => "VARCHAR(10) NOT NULL DEFAULT ''",    		'cat' => "balDetails"],
		'bal_typeName' 	=> 							['type' => 'string',   	'dbDef' => "VARCHAR(25) NOT NULL DEFAULT ''",    		'cat' => "balDetails"],
		'bal_statusCode'	=> 						['type' => 'string',   	'dbDef' => "VARCHAR(10) NOT NULL DEFAULT ''",    		'cat' => "balDetails"],
		'bal_statusName' 	=> 						['type' => 'string', 	'dbDef' => "VARCHAR(25) NOT NULL DEFAULT ''",    		'cat' => "balDetails"],
		'bal_comments'	=> 							['type' => 'string',	'dbDef' => "TEXT NOT NULL",						 		'cat' => "balDetails"],
		'bal_respUserId' => 						['type' => 'numeric',  	'dbDef' => "SMALLINT NOT NULL DEFAULT '0'",   			'cat' => "balDetails"],
		'bal_respUserName' 	=> 						['type' => 'string',   	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",   		'cat' => "balDetails"],
		'bal_respOfficeId' => 						['type' => 'numeric',  	'dbDef' => "SMALLINT NOT NULL DEFAULT '0'",   			'cat' => "balDetails"],
		'bal_respOfficeName' => 					['type' => 'string',   	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''",   		'cat' => "balDetails"],
		'bal_addUserId' => 							['type' => 'numeric',  	'dbDef' => "SMALLINT NOT NULL DEFAULT '0'",   			'cat' => "balDetails"],
		'bal_addUserName' => 						['type' => 'string',   	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",   		'cat' => "balDetails"],
		'bal_confirmed' =>              			['type' => 'boolean',   'dbDef' => "TINYINT UNSIGNED NOT NULL DEFAULT '0'", 	'cat' => "balDetails"],
		'bal_confDateTime' 	=> 						['type' => 'datetime',  'dbDef' => "DATE NULL DEFAULT NULL",			 		'cat' => "balDetails"],
		'bal_confUserId' => 						['type' => 'numeric',  	'dbDef' => "SMALLINT NOT NULL DEFAULT '0'",   			'cat' => "balDetails"],
		'bal_confUserName' 	=> 						['type' => 'string',   	'dbDef' => "VARCHAR(101) NOT NULL DEFAULT ''",   		'cat' => "balDetails"],
	];

	/**
	 * The primary key column.
	 * @var string
	 */
	protected string $primaryKeyColumn = 'invRow_id';

	/**
	 * The columns that are forced into the report.
	 * @var array
	 */
	protected array $forcedColumns = [];

	/**
	 * The columns dependencies list.
	 * @var array
	 */
	protected array $columnsDependencies = [
		'inv_statusOpName'	=>					['inv_statusOpCode'],
		'inv_statusFinName'	=>					['inv_statusFinCode'],
		'inv_formOfPaymentName'	=>				['inv_formOfPaymentCode'],
		'inv_respUserName'	=>					['inv_respUserId'],
		'inv_respDepartmentName'	=>			['inv_respDepartmentId'],
		'inv_respOfficeName'	=>				['inv_respOfficeId'],
		'inv_addUserName'	=>					['inv_addUserId'],
		'inv_blockUserName'	=>					['inv_blockUserId'],
		'inv_lastPaymentDocTypeName' => 		['inv_lastPaymentDocTypeCode'],

		'supp_id'	=>							['inv_id'],
		'supp_alias'	=>						['supp_id'],
		'supp_fullName'	=>						['supp_id'],
		'supp_trustId'	=>						['supp_id'],
		'supp_trustName'	=>					['supp_trustId'],
		'supp_duplicated'	=> 					['supp_id'],
		'supp_originalId'	=> 					['supp_id'],
		'supp_bankAccountNumber' => 			['supp_originalId', 'supp_bankAccountId'],
		'supp_bankAccountBankId' => 			['supp_originalId', 'supp_bankAccountId'],
		'supp_bankAccountBankName' => 			['supp_originalId', 'supp_bankAccountId'],
		'supp_bankAccountBankOfficeId' => 		['supp_originalId', 'supp_bankAccountId'],
		'supp_bankAccountBankOfficeName' => 	['supp_originalId', 'supp_bankAccountId'],

		'invRow_typeName'	=>					['invRow_typeCode'],
		'invRow_serviceName'	=>				['invRow_serviceCode'],
		'invRow_countryName'	=>				['invRow_countryCode'],
		'invRow_cityName'	=>					['invRow_cityId'],
		'invRow_passengerName' => 				['invRow_passengerId'],
		'invRow_supplierProductName' =>			['invRow_supplierProductId'],
		'invRow_supplierChainCode' =>			['invRow_supplierProductId'],
		'invRow_payedValue' =>					['invRow_total', 'invRow_payedPercent'],
		'invRow_notPayedValue' =>				['invRow_total', 'invRow_payedPercent'],

		'serv_statusOpName'	=>					['serv_statusOpCode'],
		'serv_statusFinName'	=>				['serv_statusFinCode'],
		'off_netCompanyDefCurr' =>				['serv_id'],

		'order_idConverted'	=>					['order_id'],
		'order_number'	=>						['order_id'],
		'order_code'	=>						['order_id'],
		'order_date'	=>						['order_id'],
		'order_startDate'	=>					['order_id'],
		'order_endDate'	=>						['order_id'],
		'order_miceProjectId'	=>				['order_id'],
		'order_miceProjectName'	=>				['order_miceProjectId'],

		'bal_number'	=> 						['bal_id'],
		'bal_date'	=> 							['bal_id'],
		'bal_code'	=> 							['bal_id'],
		'bal_name'	=> 							['bal_id'],
		'bal_typeCode'	=> 						['bal_id'],
		'bal_typeName'	=>						['bal_typeCode'],
		'bal_statusCode'	=> 					['bal_id'],
		'bal_statusName'	=>					['bal_statusCode'],
		'bal_comments'	=> 						['bal_id'],
		'bal_respUserId'	=> 					['bal_id'],
		'bal_respUserName'	=>					['bal_respUserId'],
		'bal_respOfficeId'	=> 					['bal_id'],
		'bal_respOfficeName'	=> 				['bal_respOfficeId'],
		'bal_addUserId'	=>						['bal_id'],
		'bal_addUserName'	=>					['bal_addUserId'],
		'bal_confirmed'	=>						['bal_id'],
		'bal_confDateTime'	=>					['bal_id'],
		'bal_confUserId'	=>					['bal_id'],
		'bal_confUserName'	=>					['bal_confUserId'],
	];

}
