<?php
/*
 * Balance per VAT and service type
 */
$CFG['DTM']['specialObjectsDefinitions']['BalancedVats'] = [
	# 'maxInstances'=>1,
	'forceBlock'=>true,	// force this element to be rendered as a block element. FOP seems to have a problem with rendering inline absolute tables...
	'image'=>'',		// force this element to be rendered as a block element. FOP seems to have a problem with rendering inline absolute tables...

	'fieldset_border'=>[ 			// fieldset code
		'hidden'=>false,			// hide the content of this div by default(can be toggle by the user if "displayFieldset" is true)
		'displayFieldset'=>true,	// display the fieldset( the border and the toggle button)
		'attributes'=>[		 		// fields
			'borderStyle'=>			['type'=>'lineStyle',	'default'=>'none'],
			'borderColor'=>			['type'=>'color',	'default'=>'#000000'],
			'borderThickness'=>		['type'=>'selector','list'=>['0.1'=>'0.10',	'0.25'=>'0.25',	'0.5'=>'0.50',	'0.75'=>'0.75',	'1'=>'1.00',	'1.5'=>'1.50',	'2'=>'2.00',	'4'=>'4.00'],'default'=>'1'],
			'separator001'=>		['type'=>'separator'],
			'borderVisibility'=>	['type'=>'4borders',	'default'=>'top|bottom|left|right'],
		],
	],

	'fieldset_sortColumns' => [ // fieldset code
		'hidden' => true,			// hide the content of this div by default(can be toggle by the user if "displayFieldset" is true)
		'displayFieldset' => true,	// display the fieldset( the border and the toggle button)
		'attributes' => [ // fields
			'sort' => [
				'type'=>'sortable2',
				'list' => [
					'serviceTypePerVat'=>'serviceTypePerVat',
					'valueInDefCurrency'=>'valueInDefCurrency',
					'vatAmountInDefCurrency'=>'vatAmountInDefCurrency',
					'totalValueInDefCurrency'=>'totalValueInDefCurrency',
				],
				'extra' => [
					'type'=>'checkbox',
					'name'=>'visibleColumns', // the attribute name to use
					'default'=>'serviceTypePerVat|valueInDefCurrency|vatAmountInDefCurrency|totalValueInDefCurrency',
				],
				'style'=>'multiline'
			],
		],
	],

	'fieldset_header'=> [ // fieldset code
		'hidden'=>true,			// hide the content of this div by default(can be toggle by the user if "displayFieldset" is true)
		'displayFieldset'=>true,	// display the fieldset( the border and the toggle button)
		'attributes'=> [ // fields
			'headerFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'headerTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'headerFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'headerTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'headerBackgroundColor'=> ['type'=>'color', 'default'=>""],
		],
	],

	'fieldset_columns'=> [ // fieldset code
		'hidden'=>true,			// hide the content of this div by default(can be toggle by the user if "displayFieldset" is true)
		'displayFieldset'=>true,	// display the fieldset( the border and the toggle button)
		'attributes'=> [ // fields
			'separator01'=>				['type'=>'separator','text'=>'serviceTypePerVat'],
			'column_serviceTypePerVatFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_serviceTypePerVatTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_serviceTypePerVatFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_serviceTypePerVatTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_serviceTypePerVatBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_serviceTypePerVatWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_serviceTypePerVatText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedVats']['columns_names']['serviceTypePerVat']],
			//'column_serviceTypePerVatValue'=>		array(	'type'=>'text',	'default'=>''),
			'column_serviceTypePerVatAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_serviceTypePerVatVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],
			//'column_serviceTypePerVatBorders'=> 	array('type'=>'selector','list'=>array(
			//	'none' => 	$_LANG['DTM']['controls']['specialObjects']['InvoiceVatDetails']['columns_names']['column_serviceTypePerVatBorders']['none'],
			//	'inherit'=> $_LANG['DTM']['controls']['specialObjects']['InvoiceVatDetails']['columns_names']['column_serviceTypePerVatBorders']['inherit']),'default'=>'inherit'),

			'separator1'=>				['type'=>'separator','text'=>'valueInDefCurrency'],
			'column_valueInDefCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_valueInDefCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_valueInDefCurrencyFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_valueInDefCurrencyTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_valueInDefCurrencyBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_valueInDefCurrencyWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_valueInDefCurrencyText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedVats']['columns_names']['valueInDefCurrency']],
			'column_valueInDefCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_valueInDefCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator2'=>				['type'=>'separator','text'=>'vatAmountInDefCurrency'],
			'column_vatAmountInDefCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_vatAmountInDefCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_vatAmountInDefCurrencyFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_vatAmountInDefCurrencyTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_vatAmountInDefCurrencyBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_vatAmountInDefCurrencyWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_vatAmountInDefCurrencyText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedVats']['columns_names']['vatAmountInDefCurrency']],
			'column_vatAmountInDefCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_vatAmountInDefCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator21'=>				['type'=>'separator','text'=>'totalValueInDefCurrency'],
			'column_totalValueInDefCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_totalValueInDefCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_totalValueInDefCurrencyFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_totalValueInDefCurrencyTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_totalValueInDefCurrencyBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_totalValueInDefCurrencyWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_totalValueInDefCurrencyText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedVats']['columns_names']['totalValueInDefCurrency']],
			'column_totalValueInDefCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_totalValueInDefCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],
		],
	],

];
