<?php

// IMPORTED ORDERS REPORT /////////////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['columnsList']['importedServices'] = [
		'currentRowIndex'					=> [ 'type' => 'numeric',   'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",         'cat' => "impOrderGeneral"],
		'impOrd_id' 						=> [ 'type' => 'numeric',	'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",			'cat' => "impOrderGeneral"],
		'impOrd_idOrderExtSys'				=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],
		'impOrd_idSystem'					=> [ 'type'	=> 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impOrderGeneral"],
		'impOrd_systemName'					=> [ 'type'	=> 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],
		'impOrd_date'						=> [ 'type'	=> 'date',		'dbCol' => "DATE NULL DEFAULT NULL",						'cat' => "impOrderGeneral"],
		'impOrd_idCorporateOwner' 			=> [ 'type'	=> 'numeric',	'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",			'cat' => "impOrderGeneral"],
		'impOrd_corporateOwnerAlias'		=> [ 'type'	=> 'string',	'dbCol' => "VARCHAR(170) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],
		'impOrd_corporateOwnerNameOriginal' => [ 'type'	=> 'string',	'dbCol' => "VARCHAR(170) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],
		'impOrd_idCustomerOwner' 			=> [ 'type'	=> 'numeric',	'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",			'cat' => "impOrderGeneral"],
		'impOrd_customerOwnerName'		 	=> [ 'type'	=> 'string',	'dbCol' => "VARCHAR(201) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],
		'impOrd_customerOwnerNameOriginal' 	=> [ 'type'	=> 'string',	'dbCol' => "VARCHAR(201) NOT NULL DEFAULT ''",				'cat' => "impOrderGeneral"],

		'impServ_id' 						=> [ 'type' => 'numeric',	'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",										'cat' => "impServGeneral"],
		'impServ_idServiceExtSys' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_idServiceTina' 			=> [ 'type' => 'numeric',	'dbCol' => "BIGINT(15) UNSIGNED NOT NULL DEFAULT '0'",									'cat' => "impServGeneral"],
		'impServ_processStatusCode' 		=> [ 'type' => 'string',	'dbCol' => "ENUM('new', 'processed', 'blocked') NOT NULL",								'cat' => "impServGeneral"],
		'impServ_processStatusName'			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_systemStatusCode' 			=> [ 'type' => 'string',	'dbCol' => "ENUM('request', 'confirmed', 'deleted', 'cancelled', 'refunded') NOT NULL",	'cat' => "impServGeneral"],
		'impServ_systemStatusName' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_cancelDate' 				=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",													'cat' => "impServGeneral"],
		'impServ_idImportedServiceReissued' => [ 'type' => 'numeric',	'dbCol' => "INT(10) UNSIGNED NOT NULL DEFAULT '0'",										'cat' => "impServGeneral"],
		'impServ_serviceCode'				=> [ 'type' => 'string',	'dbCol' => "CHAR(2) NOT NULL DEFAULT ''",												'cat' => "impServGeneral"],
		'impServ_serviceName' 				=> [ 'type' => 'string',	'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_pax' 						=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",									'cat' => "impServGeneral"],
		'impServ_startDate'					=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",													'cat' => "impServGeneral"],
		'impServ_endDate' 					=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",													'cat' => "impServGeneral"],
		'impServ_firstPassengerName' 		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(201) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_passengersAssociated'		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(500) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_ticketsDate' 				=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",													'cat' => "impServGeneral"],
		'impServ_firstTicketNumber' 		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_addTime' 					=> [ 'type' => 'datetime',  'dbCol' => "DATETIME NULL DEFAULT NULL",                								'cat' => "impServGeneral"],
		'impServ_processTime' 				=> [ 'type' => 'datetime',  'dbCol' => "DATETIME NULL DEFAULT NULL",												'cat' => "impServGeneral"],
		'impServ_blockTime'					=> [ 'type' => 'datetime',  'dbCol' => "DATETIME NULL DEFAULT NULL",												'cat' => "impServGeneral"],
		'impServ_blockedComments' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(200) NOT NULL DEFAULT ''",											'cat' => "impServGeneral"],
		'impServ_remarks'					=> [ 'type' => 'string',    'dbCol' => "TEXT NOT NULL",																'cat' => "impServGeneral"],
		'impServ_processedRemarks'			=> [ 'type' => 'string',    'dbCol' => "TEXT NOT NULL",																'cat' => "impServGeneral", 'disabled' => true, 'content' => 'remarks'],

		'impServ_destinationCountryCode'		=> [ 'type' => 'string',	'dbCol' => "CHAR(3) NOT NULL DEFAULT ''",					'cat' => "impServDestination"],
		'impServ_destinationCountryName'		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impServDestination"],
		'impServ_destinationCityId'				=> [ 'type' => 'numeric',	'dbCol' => "MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'",	'cat' => "impServDestination"],
		'impServ_destinationCityName'			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impServDestination"],

		'impOff_offerTotalValue' 					=> [ 'type' => 'price',		'dbCol' => "DECIMAL(16,3) NOT NULL DEFAULT '0'"	,			'cat' => "impOffGeneral"],
		'impOff_offerTotalCurrency'					=> [ 'type' => 'string',	'dbCol' => "VARCHAR(3) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],
		'impOff_idSupplier' 						=> [ 'type' => 'numeric',	'dbCol' => "MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'",	'cat' => "impOffGeneral"],
		'impOff_supplierAlias'						=> [ 'type' => 'string',	'dbCol' => "VARCHAR(100) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],
		'impOff_offerExternalSystemReservationId'	=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],
		'impOff_offerExternalSystemReservationDate'	=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",						'cat' => "impOffGeneral"],
		'impOff_offerConfirmationNumber' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],
		'impOff_offerOptionDate' 					=> [ 'type' => 'date',		'dbCol' => "DATE NULL DEFAULT NULL",						'cat' => "impOffGeneral"],
		'impOff_offerFormOfPaymentCode' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(10) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],
		'impOff_offerFormOfPaymentName' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(20) NOT NULL DEFAULT ''",				'cat' => "impOffGeneral"],

		'impServ_idBookUser'			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_bookUserName'			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(101) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idBookUserSystem'		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idBookOffice'			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_bookOfficeName'		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(100) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idBookOfficeSystem'	=> [ 'type' => 'string',	'dbCol' => "VARCHAR(30) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idIssueUser' 			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_issueUserName'			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(101) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idIssueUserSystem' 	=> [ 'type' => 'string',	'dbCol' => "VARCHAR(50) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idIssueOffice'			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_issueOfficeName'		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(100) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idIssueOfficeSystem'	=> [ 'type' => 'string',	'dbCol' => "VARCHAR(30) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idRespUser' 			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_respUserName' 			=> [ 'type' => 'string',	'dbCol' => "VARCHAR(101) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idRespOffice' 			=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_respOfficeName' 		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(100) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idProcessUser' 		=> [ 'type' => 'numeric',	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_processUserName' 		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(101) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],
		'impServ_idBlockUser' 			=> [ 'type' => 'numeric', 	'dbCol' => "SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'",		'cat' => "impServUserDetails"],
		'impServ_blockUserName' 		=> [ 'type' => 'string',	'dbCol' => "VARCHAR(101) NOT NULL DEFAULT ''",				'cat' => "impServUserDetails"],

];

// DATABASE FORCED COLUMNS ////////////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['addForcedColumns']['importedServices'] = ['impServ_id'];

// DATABASE COLUMNS DEPENDENCIES //////////////////////////////////////////////////////////////////
$CFG['reportsManagement']['adminReport']['columnsDependencies']['importedServices'] = [
		'impOrd_systemName' 				=> ['impOrd_idSystem'],
		'impOrd_corporateOwnerAlias' 		=> ['impOrd_idCorporateOwner'],
		'impOrd_customerOwnerName' 			=> ['impOrd_idCustomerOwner'],
		'impServ_processStatusName' 		=> ['impServ_processStatusCode'],
		'impServ_systemStatusName' 			=> ['impServ_systemStatusCode'],
		'impServ_serviceName' 				=> ['impServ_serviceCode'],
		'impServ_destinationCountryName' 	=> ['impServ_destinationCountryCode'],
		'impServ_destinationCityName' 		=> ['impServ_destinationCityId'],
		'impOff_supplierAlias' 				=> ['impOff_idSupplier'],
		'impOff_offerFormOfPaymentName'	 	=> ['impOff_offerFormOfPaymentCode'],
		'impServ_bookUserName' 				=> ['impServ_idBookUser'],
		'impServ_bookOfficeName' 			=> ['impServ_idBookOffice'],
		'impServ_issueUserName' 			=> ['impServ_idIssueUser'],
		'impServ_issueOfficeName' 			=> ['impServ_idIssueOffice'],
		'impServ_processUserName' 			=> ['impServ_idProcessUser'],
		'impServ_blockUserName' 			=> ['impServ_idBlockUser'],
		'impServ_respUserName'				=> ['impServ_idRespUser'],
		'impServ_respOfficeName'			=> ['impServ_idRespOffice'],
];

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