<?php
/*
 * Balanced invoices details
 */
$CFG['DTM']['specialObjectsDefinitions']['BalancedInvoices'] = [
	# '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' => [
					'incomeOrExpense'=>'incomeOrExpense',
					'serviceDetails'=>'serviceDetails',
					'invoiceNumber'=>'invoiceNumber',
					'invoiceDate'=>'invoiceDate',
					'partnerName'=>'partnerName',
					'valueInInvCurrency'=>'valueInInvCurrency',
					'invCurrency'=>'invCurrency',
					'valueInDefCurrency'=>'valueInDefCurrency',
				],
				'extra' => [
					'type'=>'checkbox',
					'name'=>'visibleColumns', // the attribute name to use
					'default'=>'incomeOrExpense|serviceDetails|invoiceNumber|invoiceDate|partnerName|valueInInvCurrency|invCurrency|valueInDefCurrency',
				],
				'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'=>'incomeOrExpense'],
			'column_incomeOrExpenseFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_incomeOrExpenseTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_incomeOrExpenseFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_incomeOrExpenseTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_incomeOrExpenseBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_incomeOrExpenseWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_incomeOrExpenseText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['incomeOrExpense']],
			//'column_incomeOrExpenseValue'=>		array(	'type'=>'text',	'default'=>''),
			'column_incomeOrExpenseAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_incomeOrExpenseVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],
			//'column_incomeOrExpenseBorders'=> 	array('type'=>'selector','list'=>array(
			//	'none' => 	$_LANG['DTM']['controls']['specialObjects']['InvoiceVatDetails']['columns_names']['column_incomeOrExpenseBorders']['none'],
			//	'inherit'=> $_LANG['DTM']['controls']['specialObjects']['InvoiceVatDetails']['columns_names']['column_incomeOrExpenseBorders']['inherit']),'default'=>'inherit'),

			'separator1'=>				['type'=>'separator','text'=>'serviceDetails'],
			'column_serviceDetailsFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_serviceDetailsTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_serviceDetailsFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_serviceDetailsTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_serviceDetailsBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_serviceDetailsWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_serviceDetailsText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['serviceDetails']],
			'column_serviceDetailsAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_serviceDetailsVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator2'=>				['type'=>'separator','text'=>'invoiceNumber'],
			'column_invoiceNumberFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_invoiceNumberTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_invoiceNumberFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_invoiceNumberTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_invoiceNumberBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_invoiceNumberWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_invoiceNumberText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['invoiceNumber']],
			'column_invoiceNumberAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_invoiceNumberVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator21'=>				['type'=>'separator','text'=>'invoiceDate'],
			'column_invoiceDateFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_invoiceDateTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_invoiceDateFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_invoiceDateTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_invoiceDateBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_invoiceDateWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_invoiceDateText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['invoiceDate']],
			'column_invoiceDateAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_invoiceDateVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator25'=>				['type'=>'separator','text'=>'partnerName'],
			'column_partnerNameFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_partnerNameTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_partnerNameFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_partnerNameTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_partnerNameBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_partnerNameWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_partnerNameText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['partnerName']],
			'column_partnerNameAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_partnerNameVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator3'=>				['type'=>'separator','text'=>'valueInInvCurrency'],
			'column_valueInInvCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_valueInInvCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_valueInInvCurrencyFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_valueInInvCurrencyTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_valueInInvCurrencyBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_valueInInvCurrencyWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_valueInInvCurrencyText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['valueInInvCurrency']],
			'column_valueInInvCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_valueInInvCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator4'=>					['type'=>'separator','text'=>'invCurrency'],
			'column_invCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_invCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>"bold"],
			'column_invCurrencyFontSize'=>	['type'=>'fontSize', 'default'=>"12"],
			'column_invCurrencyTextColor'=>	['type'=>'color', 'default'=>"#000000"],
			'column_invCurrencyBackgroundColor'=> ['type'=>'color', 'default'=>""],
			'column_invCurrencyWidth'=>		['type'=>'int',	'validations'=> ['min'=>1,'max'=>150],	'default'=>"20"],
			'column_invCurrencyText'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['columns_names']['invCurrency']],
			'column_invCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_invCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],

			'separator5'=>							['type'=>'separator','text'=>'valueInDefCurrency'],
			'column_valueInDefCurrencyFont'=>		['type'=>'fontFamily', 'default'=>"Times"],
			'column_valueInDefCurrencyTextStyle'=>	['type'=>'textStyle', 'default'=>""],
			'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']['BalancedInvoices']['columns_names']['valueInDefCurrency']],
			'column_valueInDefCurrencyAlignment'=>	['type'=>'alignment','default'=>"left"],
			'column_valueInDefCurrencyVerticalAlignment'=>	['type'=>'verticalAlignment','default'=>"top"],
		],
	],

	'fieldset_total'=> [ // 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
			'tableTotalRow'=>		['type'=>'text',	'default'=>$_LANG['DTM']['controls']['specialObjects']['BalancedInvoices']['tableTotalRowText']],
		],
	],

];

