<?php

// SUPPLIER INVOICE ROWS REPORT ///////////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['columnsList']['supplierInvoiceRows'] = [

	'currentRowIndex' =>						['type' => 'numeric',   'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",     'cat' => "supplierInvoice"],
	'inv_id'	=>								['type' => 'numeric', 	'dbCol' => "BIGINT(15) UNSIGNED NOT NULL DEFAULT '0'", 	'cat' => "supplierInvoice"],
	'inv_number' =>              				['type' => 'string',    'dbCol' => "VARCHAR(30) NOT NULL DEFAULT ''",  			'cat' => "supplierInvoice"],
	'inv_series' =>              				['type' => 'string',    'dbCol' => "VARCHAR(30) NULL DEFAULT NULL", 			'cat' => "supplierInvoice"],
	'inv_date'	=>								['type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL", 					'cat' => "supplierInvoice"],
	'inv_dateYM' =>              				['type' => 'yearMonth', 'dbCol' => "DATE NULL DEFAULT NULL",         			'cat' => "supplierInvoice"],
	'inv_dateY' =>                				['type' => 'year',      'dbCol' => "DATE NULL DEFAULT NULL",                    'cat' => "supplierInvoice"],
	'inv_dueDate'	=>							['type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL", 					'cat' => "supplierInvoice"],
	'inv_dueDateYM' =>            				['type' => 'yearMonth', 'dbCol' => "DATE NULL DEFAULT NULL",      			   	'cat' => "supplierInvoice"],
	'inv_dueDateY' =>            			 	['type' => 'year',      'dbCol' => "DATE NULL DEFAULT NULL",      			   	'cat' => "supplierInvoice"],
	'inv_dueDays' =>           				   	['type' => 'numeric',   'dbCol' => "SMALLINT(5) NULL DEFAULT '0'",              'cat' => "supplierInvoice"],
	'inv_duePassedDays' =>			        	['type' => 'numeric',   'dbCol' => "MEDIUMINT(5) NOT NULL DEFAULT '0'",         'cat' => "supplierInvoice"],
	'inv_fulfillmentDate' =>     			   	['type' => 'date',      'dbCol' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
	'inv_estPayDate' =>        					['type' => 'date',      'dbCol' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
	'inv_lastPaymentDate' =>      			    ['type' => 'date',      'dbCol' => "DATE NULL DEFAULT NULL",      			    'cat' => "supplierInvoice"],
	'inv_lastPaymentDocTypeCode' => 			['type' => 'string',	'dbCol' => "VARCHAR(25) NOT NULL DEFAULT ''",			'cat' => "supplierInvoice"],
	'inv_lastPaymentDocTypeName' => 			['type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",			'cat' => "supplierInvoice"],
	'inv_lastPaymentDocId' => 					['type' => 'numeric',	'dbCol' => "BIGINT(15) UNSIGNED NOT NULL",				'cat' => "supplierInvoice"],
	'inv_statusOpCode'	=>						['type' => 'string', 	'dbCol' => "ENUM('notConfirmed', 'confirmed') NOT NULL DEFAULT 'notConfirmed'", 	'cat' => "supplierInvoice"],
	'inv_statusOpName'	=>						['type' => 'string', 	'dbCol' => "VARCHAR(15) NOT NULL DEFAULT ''", 			'cat' => "supplierInvoice"],
	'inv_statusFinCode'	=>						['type' => 'string', 	'dbCol' => "ENUM('n', 'p', 't', 'o') NOT NULL DEFAULT 'n'", 	'cat' => "supplierInvoice"],
	'inv_statusFinName'	=>						['type' => 'string', 	'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''", 			'cat' => "supplierInvoice"],
	'inv_formOfPaymentCode' =>      			['type' => 'string',    'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",           'cat' => "supplierInvoice"],
	'inv_formOfPaymentName' =>   			    ['type' => 'string',    'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",           'cat' => "supplierInvoice"],
	'inv_remarks' =>              				['type' => 'string',    'dbCol' => "TEXT NOT NULL",                             'cat' => "supplierInvoice"],
	'inv_processedRemarks' =>     				['type' => 'string',    'dbCol' => "TEXT NOT NULL",                             'cat' => "supplierInvoice", 'disabled' => true, 'content' => 'remarks'],
	'inv_comments' =>            				['type' => 'string',    'dbCol' => "TEXT NOT NULL",                             'cat' => "supplierInvoice"],
	'inv_addTime' =>        					['type' => 'datetime',  'dbCol' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
	'inv_blockTime' =>      					['type' => 'datetime', 	'dbCol' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
	'inv_lastUpdateTime' => 					['type' => 'datetime', 	'dbCol' => "DATETIME NULL DEFAULT NULL",              	'cat' => "supplierInvoice"],
	'inv_updatesCount' =>   					['type' => 'numeric',  	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'", 'cat' => "supplierInvoice"],

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

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

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

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

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

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

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


// DATABASE FORCED COLUMNS ////////////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['addForcedColumns']['supplierInvoiceRows'] = [
	'invRow_id'
];


// DATABASE COLUMNS DEPENDENCIES //////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['columnsDependencies']['supplierInvoiceRows'] = [

	'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'],
];


// TABLE PRIMARY KEY (can be more columns, separated by comma) ////////////////////////////////////
$CFG['reportsManagement']['adminReport']['tablePrimaryKey']['supplierInvoiceRows'] = '`invRow_id`';
