<?php
global $runnerTableSettings;
$runnerTableSettings['tb_peditens'] = array(
	'name' => 'tb_peditens',
	'shortName' => 'tb_peditens',
	'pagesByType' => array(
		'add' => array( 
			'add' 
		),
		'export' => array( 
			'export' 
		),
		'import' => array( 
			'import' 
		),
		'edit' => array( 
			'edit' 
		),
		'view' => array( 
			'view' 
		),
		'list' => array( 
			'list' 
		),
		'print' => array( 
			'print' 
		),
		'search' => array( 
			'search' 
		) 
	),
	'pageTypes' => array(
		'add' => 'add',
		'export' => 'export',
		'import' => 'import',
		'edit' => 'edit',
		'view' => 'view',
		'list' => 'list',
		'print' => 'print',
		'search' => 'search' 
	),
	'defaultPages' => array(
		'add' => 'add',
		'export' => 'export',
		'import' => 'import',
		'edit' => 'edit',
		'view' => 'view',
		'list' => 'list',
		'print' => 'print',
		'search' => 'search' 
	),
	'afterEditAction' => 0,
	'afterEditDetails' => 'tb_peditens',
	'afterAddAction' => 0,
	'afterAddDetail' => 'tb_peditens',
	'detailsBadgeColor' => '1e90ff',
	'sql' => 'SELECT
	itemID,
	pedID,
	pdtoID,
	componenteID,
	v_unit,
	entrega,
	incluir,
	t0,
	t1,
	t2,
	t3,
	t4,
	t5,
	(t0+
	t1+
	t2+
	t3+
	t4+
	t5) as Total,
	(t0+t1+t2+t3+t4+t5)*v_unit as Fatura,
	
	cota_a,
	cota_b,
	cota_c,
	cota_d,
	status_item,
	faturado,
	data_fatura
FROM
	tb_peditens',
	'keyFields' => array( 
		'itemID' 
	),
	'deviceHideFields' => array(
		'1' => array( 
			 
		),
		'5' => array( 
			 
		) 
	),
	'fields' => array(
		'itemID' => array(
			'name' => 'itemID',
			'goodName' => 'itemID',
			'strField' => 'itemID',
			'index' => 1,
			'type' => 3,
			'autoinc' => true,
			'sqlExpression' => 'itemID',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'pedID' => array(
			'name' => 'pedID',
			'goodName' => 'pedID',
			'strField' => 'pedID',
			'index' => 2,
			'type' => 3,
			'sqlExpression' => 'pedID',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens',
			'viewLinkTable' => 'tb_pedidos',
			'viewLinkLookup' => false 
		),
		'pdtoID' => array(
			'name' => 'pdtoID',
			'goodName' => 'pdtoID',
			'strField' => 'pdtoID',
			'index' => 3,
			'type' => 3,
			'sqlExpression' => 'pdtoID',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Lookup wizard',
					'required' => true,
					'lookupType' => 2,
					'lookupTable' => 'tb_produtos',
					'lookupTableConnection' => 'conn',
					'lookupLinkField' => 'pdtoiD',
					'lookupDisplayField' => 'referencia',
					'lookupOrderBy' => 'clienteID',
					'lookupControlType' => 2,
					'lookupListPage' => 'list',
					'lookupDependentFields' => array( 
						array(
							'masterField' => 'pedID',
							'lookupField' => 'clienteID' 
						) 
					) 
				) 
			),
			'tableName' => 'tb_peditens',
			'viewLinkTable' => 'tb_produtos',
			'viewLinkLookup' => true 
		),
		'componenteID' => array(
			'name' => 'componenteID',
			'goodName' => 'componenteID',
			'strField' => 'componenteID',
			'index' => 4,
			'sqlExpression' => 'componenteID',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Lookup wizard',
					'required' => true,
					'lookupType' => 2,
					'lookupTable' => 'tb_componentes',
					'lookupTableConnection' => 'conn',
					'lookupLinkField' => 'componenteID',
					'lookupDisplayField' => 'componente',
					'lookupOrderBy' => 'componente' 
				) 
			),
			'tableName' => 'tb_peditens',
			'viewLinkTable' => 'tb_componentes',
			'viewLinkLookup' => true 
		),
		'v_unit' => array(
			'name' => 'v_unit',
			'goodName' => 'v_unit',
			'strField' => 'v_unit',
			'index' => 5,
			'type' => 14,
			'sqlExpression' => 'v_unit',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Lookup wizard',
					'required' => true,
					'lookupType' => 2,
					'lookupTable' => 'tb_negociado',
					'lookupTableConnection' => 'conn',
					'lookupLinkField' => 'pv_negociado',
					'lookupDisplayField' => 'pv_negociado',
					'lookupOrderBy' => 'pdtoID',
					'lookupDependent' => true,
					'lookupDependentFields' => array( 
						array(
							'masterField' => 'pdtoID',
							'lookupField' => 'pdtoID' 
						) 
					) 
				) 
			),
			'tableName' => 'tb_peditens',
			'viewLinkTable' => 'tb_negociado',
			'viewLinkLookup' => true 
		),
		'entrega' => array(
			'name' => 'entrega',
			'goodName' => 'entrega',
			'strField' => 'entrega',
			'index' => 6,
			'type' => 7,
			'sqlExpression' => 'entrega',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Short Date' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Date',
					'required' => true,
					'defaultValue' => 'Now()',
					'dateEditType' => 11 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'incluir' => array(
			'name' => 'incluir',
			'goodName' => 'incluir',
			'strField' => 'incluir',
			'index' => 7,
			'type' => 3,
			'sqlExpression' => 'incluir',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Checkbox',
					'defaultValue' => '0' 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't0' => array(
			'name' => 't0',
			'goodName' => 't0',
			'strField' => 't0',
			'index' => 8,
			'type' => 14,
			'sqlExpression' => 't0',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't1' => array(
			'name' => 't1',
			'goodName' => 't1',
			'strField' => 't1',
			'index' => 9,
			'type' => 14,
			'sqlExpression' => 't1',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't2' => array(
			'name' => 't2',
			'goodName' => 't2',
			'strField' => 't2',
			'index' => 10,
			'type' => 14,
			'sqlExpression' => 't2',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't3' => array(
			'name' => 't3',
			'goodName' => 't3',
			'strField' => 't3',
			'index' => 11,
			'type' => 14,
			'sqlExpression' => 't3',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't4' => array(
			'name' => 't4',
			'goodName' => 't4',
			'strField' => 't4',
			'index' => 12,
			'type' => 14,
			'sqlExpression' => 't4',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		't5' => array(
			'name' => 't5',
			'goodName' => 't5',
			'strField' => 't5',
			'index' => 13,
			'type' => 14,
			'sqlExpression' => 't5',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'cota_a' => array(
			'name' => 'cota_a',
			'goodName' => 'cota_a',
			'strField' => 'cota_a',
			'index' => 16,
			'type' => 14,
			'sqlExpression' => 'cota_a',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'cota_b' => array(
			'name' => 'cota_b',
			'goodName' => 'cota_b',
			'strField' => 'cota_b',
			'index' => 17,
			'type' => 14,
			'sqlExpression' => 'cota_b',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'cota_c' => array(
			'name' => 'cota_c',
			'goodName' => 'cota_c',
			'strField' => 'cota_c',
			'index' => 18,
			'type' => 14,
			'sqlExpression' => 'cota_c',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'cota_d' => array(
			'name' => 'cota_d',
			'goodName' => 'cota_d',
			'strField' => 'cota_d',
			'index' => 19,
			'type' => 14,
			'sqlExpression' => 'cota_d',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'status_item' => array(
			'name' => 'status_item',
			'goodName' => 'status_item',
			'strField' => 'status_item',
			'index' => 20,
			'sqlExpression' => 'status_item',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Lookup wizard',
					'required' => true,
					'lookupType' => 0,
					'lookupValues' => array( 
						'Programado',
						'Processo',
						'Expedicao',
						'Cancelado',
						'Aguardando' 
					) 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'faturado' => array(
			'name' => 'faturado',
			'goodName' => 'faturado',
			'strField' => 'faturado',
			'index' => 21,
			'type' => 3,
			'sqlExpression' => 'faturado',
			'viewFormats' => array(
				'view' => array(
					 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Checkbox',
					'defaultValue' => '0' 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'data_fatura' => array(
			'name' => 'data_fatura',
			'goodName' => 'data_fatura',
			'strField' => 'data_fatura',
			'index' => 22,
			'type' => 7,
			'sqlExpression' => 'data_fatura',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Short Date' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					'format' => 'Date',
					'defaultValue' => 'Now()',
					'dateEditType' => 11 
				) 
			),
			'tableName' => 'tb_peditens' 
		),
		'Total' => array(
			'name' => 'Total',
			'goodName' => 'Total',
			'strField' => 'Total',
			'index' => 14,
			'type' => 14,
			'sqlExpression' => '(t0+
	t1+
	t2+
	t3+
	t4+
	t5)',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Number',
					'numberFractionalDigits' => 1 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => '' 
		),
		'Fatura' => array(
			'name' => 'Fatura',
			'goodName' => 'Fatura',
			'strField' => 'Fatura',
			'index' => 15,
			'type' => 14,
			'sqlExpression' => '(t0+t1+t2+t3+t4+t5)*v_unit',
			'viewFormats' => array(
				'view' => array(
					'format' => 'Currency' 
				) 
			),
			'editFormats' => array(
				'edit' => array(
					 
				) 
			),
			'tableName' => '' 
		) 
	),
	'masterTables' => array( 
		array(
			'table' => 'tb_pedidos',
			'detailsKeys' => array( 
				'pedID' 
			),
			'masterKeys' => array( 
				'pedID' 
			) 
		) 
	),
	'query' => array(
		'sql' => 'SELECT
	itemID,
	pedID,
	pdtoID,
	componenteID,
	v_unit,
	entrega,
	incluir,
	t0,
	t1,
	t2,
	t3,
	t4,
	t5,
	(t0+
	t1+
	t2+
	t3+
	t4+
	t5) as Total,
	(t0+t1+t2+t3+t4+t5)*v_unit as Fatura,
	
	cota_a,
	cota_b,
	cota_c,
	cota_d,
	status_item,
	faturado,
	data_fatura
FROM
	tb_peditens',
		'parsed' => true,
		'type' => 'SQLQuery',
		'fieldList' => array( 
			array(
				'sql' => 'itemID',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'itemID' 
				),
				'encrypted' => false,
				'columnName' => 'itemID' 
			),
			array(
				'sql' => 'pedID',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'pedID' 
				),
				'encrypted' => false,
				'columnName' => 'pedID' 
			),
			array(
				'sql' => 'pdtoID',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'pdtoID' 
				),
				'encrypted' => false,
				'columnName' => 'pdtoID' 
			),
			array(
				'sql' => 'componenteID',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'componenteID' 
				),
				'encrypted' => false,
				'columnName' => 'componenteID' 
			),
			array(
				'sql' => 'v_unit',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'v_unit' 
				),
				'encrypted' => false,
				'columnName' => 'v_unit' 
			),
			array(
				'sql' => 'entrega',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'entrega' 
				),
				'encrypted' => false,
				'columnName' => 'entrega' 
			),
			array(
				'sql' => 'incluir',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'incluir' 
				),
				'encrypted' => false,
				'columnName' => 'incluir' 
			),
			array(
				'sql' => 't0',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't0' 
				),
				'encrypted' => false,
				'columnName' => 't0' 
			),
			array(
				'sql' => 't1',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't1' 
				),
				'encrypted' => false,
				'columnName' => 't1' 
			),
			array(
				'sql' => 't2',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't2' 
				),
				'encrypted' => false,
				'columnName' => 't2' 
			),
			array(
				'sql' => 't3',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't3' 
				),
				'encrypted' => false,
				'columnName' => 't3' 
			),
			array(
				'sql' => 't4',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't4' 
				),
				'encrypted' => false,
				'columnName' => 't4' 
			),
			array(
				'sql' => 't5',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 't5' 
				),
				'encrypted' => false,
				'columnName' => 't5' 
			),
			array(
				'sql' => '(t0+
	t1+
	t2+
	t3+
	t4+
	t5)',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => 'Total',
				'expression' => array(
					'sql' => '(t0+
	t1+
	t2+
	t3+
	t4+
	t5)',
					'parsed' => true,
					'type' => 'NonParsedEntity' 
				),
				'encrypted' => false,
				'columnName' => 'Total' 
			),
			array(
				'sql' => '(t0+t1+t2+t3+t4+t5)*v_unit',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => 'Fatura',
				'expression' => array(
					'sql' => '(t0+t1+t2+t3+t4+t5)*v_unit',
					'parsed' => true,
					'type' => 'NonParsedEntity' 
				),
				'encrypted' => false,
				'columnName' => 'Fatura' 
			),
			array(
				'sql' => 'cota_a',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'cota_a' 
				),
				'encrypted' => false,
				'columnName' => 'cota_a' 
			),
			array(
				'sql' => 'cota_b',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'cota_b' 
				),
				'encrypted' => false,
				'columnName' => 'cota_b' 
			),
			array(
				'sql' => 'cota_c',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'cota_c' 
				),
				'encrypted' => false,
				'columnName' => 'cota_c' 
			),
			array(
				'sql' => 'cota_d',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'cota_d' 
				),
				'encrypted' => false,
				'columnName' => 'cota_d' 
			),
			array(
				'sql' => 'status_item',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'status_item' 
				),
				'encrypted' => false,
				'columnName' => 'status_item' 
			),
			array(
				'sql' => 'faturado',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'faturado' 
				),
				'encrypted' => false,
				'columnName' => 'faturado' 
			),
			array(
				'sql' => 'data_fatura',
				'parsed' => true,
				'type' => 'FieldListItem',
				'alias' => '',
				'expression' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'SQLField',
					'table' => 'tb_peditens',
					'name' => 'data_fatura' 
				),
				'encrypted' => false,
				'columnName' => 'data_fatura' 
			) 
		),
		'fromList' => array( 
			array(
				'sql' => 'tb_peditens',
				'parsed' => true,
				'type' => 'FromListItem',
				'table' => array(
					'sql' => 'tb_peditens',
					'parsed' => true,
					'type' => 'SQLTable',
					'columns' => array( 
						'itemID',
						'pedID',
						'pdtoID',
						'componenteID',
						'v_unit',
						'entrega',
						'incluir',
						't0',
						't1',
						't2',
						't3',
						't4',
						't5',
						'cota_a',
						'cota_b',
						'cota_c',
						'cota_d',
						'status_item',
						'faturado',
						'data_fatura' 
					),
					'name' => 'tb_peditens' 
				),
				'joinOn' => array(
					'sql' => '',
					'parsed' => false,
					'type' => 'LogicalExpression',
					'contained' => array( 
						 
					),
					'unionType' => 0,
					'column' => null 
				),
				'joinList' => array(
					'sql' => '',
					'parsed' => true,
					'type' => 'JoinOn',
					'field1' => array( 
						 
					),
					'field2' => array( 
						 
					) 
				),
				'link' => 0 
			) 
		),
		'where' => array(
			'sql' => '',
			'parsed' => false,
			'type' => 'LogicalExpression',
			'contained' => array( 
				 
			),
			'unionType' => 0,
			'column' => null 
		),
		'groupBy' => array( 
			 
		),
		'having' => array(
			'sql' => '',
			'parsed' => false,
			'type' => 'LogicalExpression',
			'contained' => array( 
				 
			),
			'unionType' => 0,
			'column' => null 
		),
		'orderBy' => array( 
			 
		),
		'colsIndex' => array( 
			array(
				'fieldIndex' => 0,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 1,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 2,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 3,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 4,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 5,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 6,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 7,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 8,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 9,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 10,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 11,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 12,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 13,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 14,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 15,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 16,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 17,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 18,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 19,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 20,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			),
			array(
				'fieldIndex' => 21,
				'orderByIndex' => -1,
				'groupByIndex' => -1,
				'whereIndex' => -1,
				'havingIndex' => -1 
			) 
		),
		'headSql' => 'SELECT',
		'fieldListSql' => 'itemID,
	pedID,
	pdtoID,
	componenteID,
	v_unit,
	entrega,
	incluir,
	t0,
	t1,
	t2,
	t3,
	t4,
	t5,
	(t0+
	t1+
	t2+
	t3+
	t4+
	t5) as Total,
	(t0+t1+t2+t3+t4+t5)*v_unit as Fatura,
	
	cota_a,
	cota_b,
	cota_c,
	cota_d,
	status_item,
	faturado,
	data_fatura',
		'fromListSql' => 'FROM
	tb_peditens',
		'orderBySql' => '',
		'tailSql' => '' 
	),
	'originalTable' => 'tb_peditens',
	'originalPagesByType' => array(
		'add' => array( 
			'add' 
		),
		'export' => array( 
			'export' 
		),
		'import' => array( 
			'import' 
		),
		'edit' => array( 
			'edit' 
		),
		'view' => array( 
			'view' 
		),
		'list' => array( 
			'list' 
		),
		'print' => array( 
			'print' 
		),
		'search' => array( 
			'search' 
		) 
	),
	'originalPageTypes' => array(
		'add' => 'add',
		'export' => 'export',
		'import' => 'import',
		'edit' => 'edit',
		'view' => 'view',
		'list' => 'list',
		'print' => 'print',
		'search' => 'search' 
	),
	'originalDefaultPages' => array(
		'add' => 'add',
		'export' => 'export',
		'import' => 'import',
		'edit' => 'edit',
		'view' => 'view',
		'list' => 'list',
		'print' => 'print',
		'search' => 'search' 
	),
	'searchSettings' => array(
		'caseSensitiveSearch' => false,
		'searchableFields' => array( 
			'itemID',
			'pedID',
			'pdtoID',
			'componenteID',
			'v_unit',
			'entrega',
			'incluir',
			't0',
			't1',
			't2',
			't3',
			't4',
			't5',
			'cota_a',
			'cota_b',
			'cota_c',
			'cota_d',
			'status_item',
			'faturado',
			'data_fatura',
			'Total',
			'Fatura' 
		),
		'searchSuggest' => true,
		'highlightSearchResults' => true,
		'hideDataUntilSearch' => false,
		'hideFilterUntilSearch' => false,
		'googleLikeSearchFields' => array( 
			'itemID',
			'pedID',
			'pdtoID',
			'componenteID',
			'v_unit',
			'entrega',
			'incluir',
			't0',
			't1',
			't2',
			't3',
			't4',
			't5',
			'cota_a',
			'cota_b',
			'cota_c',
			'cota_d',
			'status_item',
			'faturado',
			'data_fatura',
			'Total',
			'Fatura' 
		) 
	),
	'connId' => 'conn',
	'clickActions' => array(
		'row' => array(
			'action' => 'noaction' 
		),
		'fields' => array(
			 
		) 
	),
	'geoCoding' => array(
		'enabled' => false,
		'latField' => '',
		'lonField' => '',
		'addressFields' => array( 
			 
		) 
	),
	'whereTabs' => array( 
		 
	),
	'labels' => array(
		 
	),
	'chartSettings' => array(
		 
	),
	'dataSourceOperations' => array(
		 
	),
	'calendarSettings' => array(
		'categoryColors' => array( 
			 
		) 
	),
	'ganttSettings' => array(
		'categoryColors' => array( 
			 
		) 
	) 
);

global $runnerTableLabels;
if( mlang_getcurrentlang() === 'English' ) {
	$runnerTableLabels['tb_peditens'] = array(
	'tableCaption' => 'Tb Peditens',
	'fieldLabels' => array(
		'itemID' => 'Item ID',
		'pedID' => 'Ped ID',
		'pdtoID' => 'Produto:',
		'componenteID' => 'Componente:',
		'v_unit' => 'R$ Unit.',
		'entrega' => 'Entrega',
		'incluir' => 'Incluir',
		't0' => 'T0',
		't1' => 'T1',
		't2' => 'T2',
		't3' => 'T3',
		't4' => 'T4',
		't5' => 'T5',
		'cota_a' => 'Cota A',
		'cota_b' => 'Cota B',
		'cota_c' => 'Cota C',
		'cota_d' => 'Cota D',
		'status_item' => 'Status Item',
		'faturado' => 'Faturado',
		'data_fatura' => 'Data Fatura',
		'Total' => 'Total (Prs)',
		'Fatura' => 'Fatura R$' 
	),
	'fieldTooltips' => array(
		'itemID' => '',
		'pedID' => '',
		'pdtoID' => '',
		'componenteID' => '',
		'v_unit' => '',
		'entrega' => '',
		'incluir' => '',
		't0' => '',
		't1' => '',
		't2' => '',
		't3' => '',
		't4' => '',
		't5' => '',
		'cota_a' => '',
		'cota_b' => '',
		'cota_c' => '',
		'cota_d' => '',
		'status_item' => '',
		'faturado' => '',
		'data_fatura' => '',
		'Total' => '',
		'Fatura' => '' 
	),
	'fieldPlaceholders' => array(
		'itemID' => '',
		'pedID' => '',
		'pdtoID' => '',
		'componenteID' => '',
		'v_unit' => '',
		'entrega' => '',
		'incluir' => '',
		't0' => '',
		't1' => '',
		't2' => '',
		't3' => '',
		't4' => '',
		't5' => '',
		'cota_a' => '',
		'cota_b' => '',
		'cota_c' => '',
		'cota_d' => '',
		'status_item' => '',
		'faturado' => '',
		'data_fatura' => '',
		'Total' => '',
		'Fatura' => '' 
	),
	'pageTitles' => array(
		'view' => 'Itens do pedido [{%itemID}]' 
	) 
);
}
?>