<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *                                   ATTENTION!
 * If you see this message in your browser (Internet Explorer, Mozilla Firefox, Google Chrome, etc.)
 * this means that PHP is not properly installed on your web server. Please refer to the PHP manual
 * for more details: http://php.net/manual/install.php 
 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 */

    include_once dirname(__FILE__) . '/components/startup.php';
    include_once dirname(__FILE__) . '/components/application.php';
    include_once dirname(__FILE__) . '/' . 'authorization.php';


    include_once dirname(__FILE__) . '/' . 'database_engine/mysql_engine.php';
    include_once dirname(__FILE__) . '/' . 'components/page/page_includes.php';

    function GetConnectionOptions()
    {
        $result = GetGlobalConnectionOptions();
        $result['client_encoding'] = 'utf8';
        GetApplication()->GetUserAuthentication()->applyIdentityToConnectionOptions($result);
        return $result;
    }

    
    
    
    
    // OnBeforePageExecute event handler
    
    
    
    class Notas_Finalizadas_itensPage extends DetailPage
    {
        protected function DoBeforeCreate()
        {
            $this->SetTitle('Itens');
            $this->SetMenuLabel('Itens');
            $this->SetHeader(GetPagesHeader());
            $this->SetFooter(GetPagesFooter());
    
            $this->dataset = new TableDataset(
                MyConnectionFactory::getInstance(),
                GetConnectionOptions(),
                '`itens`');
            $this->dataset->addFields(
                array(
                    new IntegerField('id_itens', true, true, true),
                    new StringField('chave'),
                    new StringField('numero_item'),
                    new StringField('codigo_produto'),
                    new StringField('codigo_barras_comercial'),
                    new StringField('descricao'),
                    new StringField('codigo_ncm'),
                    new StringField('cest'),
                    new StringField('codigo_ex_tipi'),
                    new StringField('cfop'),
                    new StringField('unidade_comercial'),
                    new StringField('quantidade_comercial'),
                    new StringField('valor_unitario_comercial'),
                    new StringField('valor_bruto'),
                    new StringField('codigo_barras_tributavel'),
                    new StringField('unidade_tributavel'),
                    new StringField('quantidade_tributavel'),
                    new StringField('valor_unitario_tributavel'),
                    new StringField('valor_frete'),
                    new StringField('valor_outras_despesas'),
                    new StringField('inclui_no_total'),
                    new StringField('pedido_compra'),
                    new StringField('numero_item_pedido_compra'),
                    new StringField('icms_origem'),
                    new StringField('icms_situacao_tributaria'),
                    new StringField('icms_modalidade_base_calculo'),
                    new StringField('icms_base_calculo'),
                    new StringField('icms_base_calculo_retido_st'),
                    new StringField('icms_reducao_base_calculo'),
                    new StringField('icms_aliquota'),
                    new StringField('icms_valor'),
                    new StringField('icms_valor_retido_st'),
                    new StringField('icms_valor_desonerado'),
                    new StringField('icms_valor_operacao'),
                    new StringField('icms_percentual_diferimento'),
                    new StringField('icms_valor_diferido'),
                    new StringField('icms_motivo_desoneracao'),
                    new StringField('icms_modalidade_base_calculo_st'),
                    new StringField('icms_margem_valor_adicionado_st'),
                    new StringField('icms_reducao_base_calculo_st'),
                    new StringField('icms_base_calculo_st'),
                    new StringField('icms_aliquota_st'),
                    new StringField('icms_valor_st'),
                    new StringField('ipi_situacao_tributaria'),
                    new StringField('ipi_base_calculo'),
                    new StringField('ipi_aliquota'),
                    new StringField('ipi_quantidade_total'),
                    new StringField('ipi_valor_por_unidade_tributavel'),
                    new StringField('ipi_valor'),
                    new StringField('ipi_classe_enquadramento'),
                    new StringField('ipi_cnpj_produtor'),
                    new StringField('ipi_codigo_selo_controle'),
                    new StringField('ipi_codigo_enquadramento_legal'),
                    new StringField('pis_situacao_tributaria'),
                    new StringField('pis_base_calculo'),
                    new StringField('pis_aliquota_porcentual'),
                    new StringField('pis_quantidade_vendida'),
                    new StringField('pis_aliquota_valor'),
                    new StringField('pis_valor'),
                    new StringField('pis_base_calculo_st'),
                    new StringField('pis_aliquota_porcentaul_st'),
                    new StringField('pis_quantidade_vendida_st'),
                    new StringField('pis_aliquota_valor_st'),
                    new StringField('pis_valor_st'),
                    new StringField('cofins_situacao_tributaria'),
                    new StringField('cofins_base_calculo'),
                    new StringField('cofins_aliquota_porcentual'),
                    new StringField('cofins_quantidade_vendida'),
                    new StringField('cofins_aliquota_valor'),
                    new StringField('cofins_valor'),
                    new StringField('cofins_base_calculo_st'),
                    new StringField('cofins_aliquota_porcentual_st'),
                    new StringField('cofins_quantidade_vendida_st'),
                    new StringField('cofins_aliquota_valor_st'),
                    new StringField('cofins_valor_st'),
                    new StringField('percentual_devolvido'),
                    new StringField('valor_ipi_devolvido')
                )
            );
        }
    
        protected function DoPrepare() {
    
        }
    
        protected function CreatePageNavigator()
        {
            $result = new CompositePageNavigator($this);
            
            $partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
            $partitionNavigator->SetRowsPerPage(20);
            $result->AddPageNavigator($partitionNavigator);
            
            return $result;
        }
    
        protected function CreateRssGenerator()
        {
            return null;
        }
    
        protected function setupCharts()
        {
    
        }
    
        protected function getFiltersColumns()
        {
            return array(
                new FilterColumn($this->dataset, 'id_itens', 'id_itens', 'Id Itens'),
                new FilterColumn($this->dataset, 'chave', 'chave', 'Chave'),
                new FilterColumn($this->dataset, 'numero_item', 'numero_item', 'Numero Item'),
                new FilterColumn($this->dataset, 'codigo_produto', 'codigo_produto', 'Codigo Produto'),
                new FilterColumn($this->dataset, 'codigo_barras_comercial', 'codigo_barras_comercial', 'Codigo Barras Comercial'),
                new FilterColumn($this->dataset, 'descricao', 'descricao', 'Descricao'),
                new FilterColumn($this->dataset, 'codigo_ncm', 'codigo_ncm', 'Codigo Ncm'),
                new FilterColumn($this->dataset, 'cest', 'cest', 'Cest'),
                new FilterColumn($this->dataset, 'codigo_ex_tipi', 'codigo_ex_tipi', 'Codigo Ex Tipi'),
                new FilterColumn($this->dataset, 'cfop', 'cfop', 'Cfop'),
                new FilterColumn($this->dataset, 'unidade_comercial', 'unidade_comercial', 'Unidade Comercial'),
                new FilterColumn($this->dataset, 'quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial'),
                new FilterColumn($this->dataset, 'valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial'),
                new FilterColumn($this->dataset, 'valor_bruto', 'valor_bruto', 'Valor Bruto'),
                new FilterColumn($this->dataset, 'codigo_barras_tributavel', 'codigo_barras_tributavel', 'Codigo Barras Tributavel'),
                new FilterColumn($this->dataset, 'unidade_tributavel', 'unidade_tributavel', 'Unidade Tributavel'),
                new FilterColumn($this->dataset, 'quantidade_tributavel', 'quantidade_tributavel', 'Quantidade Tributavel'),
                new FilterColumn($this->dataset, 'valor_unitario_tributavel', 'valor_unitario_tributavel', 'Valor Unitario Tributavel'),
                new FilterColumn($this->dataset, 'valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas'),
                new FilterColumn($this->dataset, 'inclui_no_total', 'inclui_no_total', 'Inclui No Total'),
                new FilterColumn($this->dataset, 'pedido_compra', 'pedido_compra', 'Pedido Compra'),
                new FilterColumn($this->dataset, 'numero_item_pedido_compra', 'numero_item_pedido_compra', 'Numero Item Pedido Compra'),
                new FilterColumn($this->dataset, 'icms_origem', 'icms_origem', 'Icms Origem'),
                new FilterColumn($this->dataset, 'icms_situacao_tributaria', 'icms_situacao_tributaria', 'Icms Situacao Tributaria'),
                new FilterColumn($this->dataset, 'icms_modalidade_base_calculo', 'icms_modalidade_base_calculo', 'Icms Modalidade Base Calculo'),
                new FilterColumn($this->dataset, 'icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo'),
                new FilterColumn($this->dataset, 'icms_base_calculo_retido_st', 'icms_base_calculo_retido_st', 'Icms Base Calculo Retido St'),
                new FilterColumn($this->dataset, 'icms_reducao_base_calculo', 'icms_reducao_base_calculo', 'Icms Reducao Base Calculo'),
                new FilterColumn($this->dataset, 'icms_aliquota', 'icms_aliquota', 'Icms Aliquota'),
                new FilterColumn($this->dataset, 'icms_valor', 'icms_valor', 'Icms Valor'),
                new FilterColumn($this->dataset, 'icms_valor_retido_st', 'icms_valor_retido_st', 'Icms Valor Retido St'),
                new FilterColumn($this->dataset, 'icms_valor_desonerado', 'icms_valor_desonerado', 'Icms Valor Desonerado'),
                new FilterColumn($this->dataset, 'icms_valor_operacao', 'icms_valor_operacao', 'Icms Valor Operacao'),
                new FilterColumn($this->dataset, 'icms_percentual_diferimento', 'icms_percentual_diferimento', 'Icms Percentual Diferimento'),
                new FilterColumn($this->dataset, 'icms_valor_diferido', 'icms_valor_diferido', 'Icms Valor Diferido'),
                new FilterColumn($this->dataset, 'icms_motivo_desoneracao', 'icms_motivo_desoneracao', 'Icms Motivo Desoneracao'),
                new FilterColumn($this->dataset, 'icms_modalidade_base_calculo_st', 'icms_modalidade_base_calculo_st', 'Icms Modalidade Base Calculo St'),
                new FilterColumn($this->dataset, 'icms_margem_valor_adicionado_st', 'icms_margem_valor_adicionado_st', 'Icms Margem Valor Adicionado St'),
                new FilterColumn($this->dataset, 'icms_reducao_base_calculo_st', 'icms_reducao_base_calculo_st', 'Icms Reducao Base Calculo St'),
                new FilterColumn($this->dataset, 'icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St'),
                new FilterColumn($this->dataset, 'icms_aliquota_st', 'icms_aliquota_st', 'Icms Aliquota St'),
                new FilterColumn($this->dataset, 'icms_valor_st', 'icms_valor_st', 'Icms Valor St'),
                new FilterColumn($this->dataset, 'ipi_situacao_tributaria', 'ipi_situacao_tributaria', 'Ipi Situacao Tributaria'),
                new FilterColumn($this->dataset, 'ipi_base_calculo', 'ipi_base_calculo', 'Ipi Base Calculo'),
                new FilterColumn($this->dataset, 'ipi_aliquota', 'ipi_aliquota', 'Ipi Aliquota'),
                new FilterColumn($this->dataset, 'ipi_quantidade_total', 'ipi_quantidade_total', 'Ipi Quantidade Total'),
                new FilterColumn($this->dataset, 'ipi_valor_por_unidade_tributavel', 'ipi_valor_por_unidade_tributavel', 'Ipi Valor Por Unidade Tributavel'),
                new FilterColumn($this->dataset, 'ipi_valor', 'ipi_valor', 'Ipi Valor'),
                new FilterColumn($this->dataset, 'ipi_classe_enquadramento', 'ipi_classe_enquadramento', 'Ipi Classe Enquadramento'),
                new FilterColumn($this->dataset, 'ipi_cnpj_produtor', 'ipi_cnpj_produtor', 'Ipi Cnpj Produtor'),
                new FilterColumn($this->dataset, 'ipi_codigo_selo_controle', 'ipi_codigo_selo_controle', 'Ipi Codigo Selo Controle'),
                new FilterColumn($this->dataset, 'ipi_codigo_enquadramento_legal', 'ipi_codigo_enquadramento_legal', 'Ipi Codigo Enquadramento Legal'),
                new FilterColumn($this->dataset, 'pis_situacao_tributaria', 'pis_situacao_tributaria', 'Pis Situacao Tributaria'),
                new FilterColumn($this->dataset, 'pis_base_calculo', 'pis_base_calculo', 'Pis Base Calculo'),
                new FilterColumn($this->dataset, 'pis_aliquota_porcentual', 'pis_aliquota_porcentual', 'Pis Aliquota Porcentual'),
                new FilterColumn($this->dataset, 'pis_quantidade_vendida', 'pis_quantidade_vendida', 'Pis Quantidade Vendida'),
                new FilterColumn($this->dataset, 'pis_aliquota_valor', 'pis_aliquota_valor', 'Pis Aliquota Valor'),
                new FilterColumn($this->dataset, 'pis_valor', 'pis_valor', 'Pis Valor'),
                new FilterColumn($this->dataset, 'pis_base_calculo_st', 'pis_base_calculo_st', 'Pis Base Calculo St'),
                new FilterColumn($this->dataset, 'pis_aliquota_porcentaul_st', 'pis_aliquota_porcentaul_st', 'Pis Aliquota Porcentaul St'),
                new FilterColumn($this->dataset, 'pis_quantidade_vendida_st', 'pis_quantidade_vendida_st', 'Pis Quantidade Vendida St'),
                new FilterColumn($this->dataset, 'pis_aliquota_valor_st', 'pis_aliquota_valor_st', 'Pis Aliquota Valor St'),
                new FilterColumn($this->dataset, 'pis_valor_st', 'pis_valor_st', 'Pis Valor St'),
                new FilterColumn($this->dataset, 'cofins_situacao_tributaria', 'cofins_situacao_tributaria', 'Cofins Situacao Tributaria'),
                new FilterColumn($this->dataset, 'cofins_base_calculo', 'cofins_base_calculo', 'Cofins Base Calculo'),
                new FilterColumn($this->dataset, 'cofins_aliquota_porcentual', 'cofins_aliquota_porcentual', 'Cofins Aliquota Porcentual'),
                new FilterColumn($this->dataset, 'cofins_quantidade_vendida', 'cofins_quantidade_vendida', 'Cofins Quantidade Vendida'),
                new FilterColumn($this->dataset, 'cofins_aliquota_valor', 'cofins_aliquota_valor', 'Cofins Aliquota Valor'),
                new FilterColumn($this->dataset, 'cofins_valor', 'cofins_valor', 'Cofins Valor'),
                new FilterColumn($this->dataset, 'cofins_base_calculo_st', 'cofins_base_calculo_st', 'Cofins Base Calculo St'),
                new FilterColumn($this->dataset, 'cofins_aliquota_porcentual_st', 'cofins_aliquota_porcentual_st', 'Cofins Aliquota Porcentual St'),
                new FilterColumn($this->dataset, 'cofins_quantidade_vendida_st', 'cofins_quantidade_vendida_st', 'Cofins Quantidade Vendida St'),
                new FilterColumn($this->dataset, 'cofins_aliquota_valor_st', 'cofins_aliquota_valor_st', 'Cofins Aliquota Valor St'),
                new FilterColumn($this->dataset, 'cofins_valor_st', 'cofins_valor_st', 'Cofins Valor St'),
                new FilterColumn($this->dataset, 'percentual_devolvido', 'percentual_devolvido', 'Percentual Devolvido'),
                new FilterColumn($this->dataset, 'valor_ipi_devolvido', 'valor_ipi_devolvido', 'Valor Ipi Devolvido'),
                new FilterColumn($this->dataset, 'valor_frete', 'valor_frete', 'Valor Frete')
            );
        }
    
        protected function setupQuickFilter(QuickFilter $quickFilter, FixedKeysArray $columns)
        {
    
        }
    
        protected function setupColumnFilter(ColumnFilter $columnFilter)
        {
    
        }
    
        protected function setupFilterBuilder(FilterBuilder $filterBuilder, FixedKeysArray $columns)
        {
    
        }
    
        protected function AddOperationsColumns(Grid $grid)
        {
            $actions = $grid->getActions();
            $actions->setCaption($this->GetLocalizerCaptions()->GetMessageString('Actions'));
            $actions->setPosition(ActionList::POSITION_LEFT);
            
            if ($this->GetSecurityInfo()->HasViewGrant())
            {
                $operation = new AjaxOperation(OPERATION_VIEW,
                    $this->GetLocalizerCaptions()->GetMessageString('View'),
                    $this->GetLocalizerCaptions()->GetMessageString('View'), $this->dataset,
                    $this->GetModalGridViewHandler(), $grid);
                $operation->setUseImage(true);
                $actions->addOperation($operation);
            }
        }
    
        protected function AddFieldColumns(Grid $grid, $withDetails = true)
        {
            //
            // View column for codigo_produto field
            //
            $column = new TextViewColumn('codigo_produto', 'codigo_produto', 'Codigo Produto', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('DetailGridNotas Finalizadas.itens_descricao_handler_list');
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for codigo_ncm field
            //
            $column = new TextViewColumn('codigo_ncm', 'codigo_ncm', 'Codigo Ncm', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for cfop field
            //
            $column = new TextViewColumn('cfop', 'cfop', 'Cfop', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for unidade_comercial field
            //
            $column = new TextViewColumn('unidade_comercial', 'unidade_comercial', 'Unidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for quantidade_comercial field
            //
            $column = new TextViewColumn('quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for valor_unitario_comercial field
            //
            $column = new TextViewColumn('valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
    
        protected function AddSingleRecordViewColumns(Grid $grid)
        {
            //
            // View column for id_itens field
            //
            $column = new NumberViewColumn('id_itens', 'id_itens', 'Id Itens', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_item field
            //
            $column = new TextViewColumn('numero_item', 'numero_item', 'Numero Item', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_produto field
            //
            $column = new TextViewColumn('codigo_produto', 'codigo_produto', 'Codigo Produto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_barras_comercial field
            //
            $column = new TextViewColumn('codigo_barras_comercial', 'codigo_barras_comercial', 'Codigo Barras Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('DetailGridNotas Finalizadas.itens_descricao_handler_view');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_ncm field
            //
            $column = new TextViewColumn('codigo_ncm', 'codigo_ncm', 'Codigo Ncm', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cest field
            //
            $column = new TextViewColumn('cest', 'cest', 'Cest', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_ex_tipi field
            //
            $column = new TextViewColumn('codigo_ex_tipi', 'codigo_ex_tipi', 'Codigo Ex Tipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cfop field
            //
            $column = new TextViewColumn('cfop', 'cfop', 'Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for unidade_comercial field
            //
            $column = new TextViewColumn('unidade_comercial', 'unidade_comercial', 'Unidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for quantidade_comercial field
            //
            $column = new TextViewColumn('quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_unitario_comercial field
            //
            $column = new TextViewColumn('valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_bruto field
            //
            $column = new TextViewColumn('valor_bruto', 'valor_bruto', 'Valor Bruto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_barras_tributavel field
            //
            $column = new TextViewColumn('codigo_barras_tributavel', 'codigo_barras_tributavel', 'Codigo Barras Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for unidade_tributavel field
            //
            $column = new TextViewColumn('unidade_tributavel', 'unidade_tributavel', 'Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for quantidade_tributavel field
            //
            $column = new TextViewColumn('quantidade_tributavel', 'quantidade_tributavel', 'Quantidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_unitario_tributavel field
            //
            $column = new TextViewColumn('valor_unitario_tributavel', 'valor_unitario_tributavel', 'Valor Unitario Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inclui_no_total field
            //
            $column = new TextViewColumn('inclui_no_total', 'inclui_no_total', 'Inclui No Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pedido_compra field
            //
            $column = new TextViewColumn('pedido_compra', 'pedido_compra', 'Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_item_pedido_compra field
            //
            $column = new TextViewColumn('numero_item_pedido_compra', 'numero_item_pedido_compra', 'Numero Item Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_origem field
            //
            $column = new TextViewColumn('icms_origem', 'icms_origem', 'Icms Origem', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_situacao_tributaria field
            //
            $column = new TextViewColumn('icms_situacao_tributaria', 'icms_situacao_tributaria', 'Icms Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo', 'icms_modalidade_base_calculo', 'Icms Modalidade Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_base_calculo_retido_st field
            //
            $column = new TextViewColumn('icms_base_calculo_retido_st', 'icms_base_calculo_retido_st', 'Icms Base Calculo Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_reducao_base_calculo field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo', 'icms_reducao_base_calculo', 'Icms Reducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_aliquota field
            //
            $column = new TextViewColumn('icms_aliquota', 'icms_aliquota', 'Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor field
            //
            $column = new TextViewColumn('icms_valor', 'icms_valor', 'Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_retido_st field
            //
            $column = new TextViewColumn('icms_valor_retido_st', 'icms_valor_retido_st', 'Icms Valor Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_desonerado field
            //
            $column = new TextViewColumn('icms_valor_desonerado', 'icms_valor_desonerado', 'Icms Valor Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_operacao field
            //
            $column = new TextViewColumn('icms_valor_operacao', 'icms_valor_operacao', 'Icms Valor Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_percentual_diferimento field
            //
            $column = new TextViewColumn('icms_percentual_diferimento', 'icms_percentual_diferimento', 'Icms Percentual Diferimento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_diferido field
            //
            $column = new TextViewColumn('icms_valor_diferido', 'icms_valor_diferido', 'Icms Valor Diferido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_motivo_desoneracao field
            //
            $column = new TextViewColumn('icms_motivo_desoneracao', 'icms_motivo_desoneracao', 'Icms Motivo Desoneracao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo_st field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo_st', 'icms_modalidade_base_calculo_st', 'Icms Modalidade Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_margem_valor_adicionado_st field
            //
            $column = new TextViewColumn('icms_margem_valor_adicionado_st', 'icms_margem_valor_adicionado_st', 'Icms Margem Valor Adicionado St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_reducao_base_calculo_st field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo_st', 'icms_reducao_base_calculo_st', 'Icms Reducao Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_aliquota_st field
            //
            $column = new TextViewColumn('icms_aliquota_st', 'icms_aliquota_st', 'Icms Aliquota St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_st field
            //
            $column = new TextViewColumn('icms_valor_st', 'icms_valor_st', 'Icms Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_situacao_tributaria field
            //
            $column = new TextViewColumn('ipi_situacao_tributaria', 'ipi_situacao_tributaria', 'Ipi Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_base_calculo field
            //
            $column = new TextViewColumn('ipi_base_calculo', 'ipi_base_calculo', 'Ipi Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_aliquota field
            //
            $column = new TextViewColumn('ipi_aliquota', 'ipi_aliquota', 'Ipi Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_quantidade_total field
            //
            $column = new TextViewColumn('ipi_quantidade_total', 'ipi_quantidade_total', 'Ipi Quantidade Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_valor_por_unidade_tributavel field
            //
            $column = new TextViewColumn('ipi_valor_por_unidade_tributavel', 'ipi_valor_por_unidade_tributavel', 'Ipi Valor Por Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_valor field
            //
            $column = new TextViewColumn('ipi_valor', 'ipi_valor', 'Ipi Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_classe_enquadramento field
            //
            $column = new TextViewColumn('ipi_classe_enquadramento', 'ipi_classe_enquadramento', 'Ipi Classe Enquadramento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_cnpj_produtor field
            //
            $column = new TextViewColumn('ipi_cnpj_produtor', 'ipi_cnpj_produtor', 'Ipi Cnpj Produtor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_codigo_selo_controle field
            //
            $column = new TextViewColumn('ipi_codigo_selo_controle', 'ipi_codigo_selo_controle', 'Ipi Codigo Selo Controle', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for ipi_codigo_enquadramento_legal field
            //
            $column = new TextViewColumn('ipi_codigo_enquadramento_legal', 'ipi_codigo_enquadramento_legal', 'Ipi Codigo Enquadramento Legal', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_situacao_tributaria field
            //
            $column = new TextViewColumn('pis_situacao_tributaria', 'pis_situacao_tributaria', 'Pis Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_base_calculo field
            //
            $column = new TextViewColumn('pis_base_calculo', 'pis_base_calculo', 'Pis Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_aliquota_porcentual field
            //
            $column = new TextViewColumn('pis_aliquota_porcentual', 'pis_aliquota_porcentual', 'Pis Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_quantidade_vendida field
            //
            $column = new TextViewColumn('pis_quantidade_vendida', 'pis_quantidade_vendida', 'Pis Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_aliquota_valor field
            //
            $column = new TextViewColumn('pis_aliquota_valor', 'pis_aliquota_valor', 'Pis Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_valor field
            //
            $column = new TextViewColumn('pis_valor', 'pis_valor', 'Pis Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_base_calculo_st field
            //
            $column = new TextViewColumn('pis_base_calculo_st', 'pis_base_calculo_st', 'Pis Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_aliquota_porcentaul_st field
            //
            $column = new TextViewColumn('pis_aliquota_porcentaul_st', 'pis_aliquota_porcentaul_st', 'Pis Aliquota Porcentaul St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_quantidade_vendida_st field
            //
            $column = new TextViewColumn('pis_quantidade_vendida_st', 'pis_quantidade_vendida_st', 'Pis Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_aliquota_valor_st field
            //
            $column = new TextViewColumn('pis_aliquota_valor_st', 'pis_aliquota_valor_st', 'Pis Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pis_valor_st field
            //
            $column = new TextViewColumn('pis_valor_st', 'pis_valor_st', 'Pis Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_situacao_tributaria field
            //
            $column = new TextViewColumn('cofins_situacao_tributaria', 'cofins_situacao_tributaria', 'Cofins Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_base_calculo field
            //
            $column = new TextViewColumn('cofins_base_calculo', 'cofins_base_calculo', 'Cofins Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual', 'cofins_aliquota_porcentual', 'Cofins Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_quantidade_vendida field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida', 'cofins_quantidade_vendida', 'Cofins Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_aliquota_valor field
            //
            $column = new TextViewColumn('cofins_aliquota_valor', 'cofins_aliquota_valor', 'Cofins Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_valor field
            //
            $column = new TextViewColumn('cofins_valor', 'cofins_valor', 'Cofins Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_base_calculo_st field
            //
            $column = new TextViewColumn('cofins_base_calculo_st', 'cofins_base_calculo_st', 'Cofins Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual_st field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual_st', 'cofins_aliquota_porcentual_st', 'Cofins Aliquota Porcentual St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_quantidade_vendida_st field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida_st', 'cofins_quantidade_vendida_st', 'Cofins Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_aliquota_valor_st field
            //
            $column = new TextViewColumn('cofins_aliquota_valor_st', 'cofins_aliquota_valor_st', 'Cofins Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cofins_valor_st field
            //
            $column = new TextViewColumn('cofins_valor_st', 'cofins_valor_st', 'Cofins Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for percentual_devolvido field
            //
            $column = new TextViewColumn('percentual_devolvido', 'percentual_devolvido', 'Percentual Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_ipi_devolvido field
            //
            $column = new TextViewColumn('valor_ipi_devolvido', 'valor_ipi_devolvido', 'Valor Ipi Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
        }
    
        protected function AddEditColumns(Grid $grid)
        {
            //
            // Edit column for chave field
            //
            $editor = new TextEdit('chave_edit');
            $editor->SetMaxLength(15);
            $editColumn = new CustomEditColumn('Chave', 'chave', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for numero_item field
            //
            $editor = new TextEdit('numero_item_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Numero Item', 'numero_item', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for codigo_produto field
            //
            $editor = new TextEdit('codigo_produto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Produto', 'codigo_produto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for codigo_barras_comercial field
            //
            $editor = new TextEdit('codigo_barras_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Barras Comercial', 'codigo_barras_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for descricao field
            //
            $editor = new TextAreaEdit('descricao_edit', 50, 8);
            $editColumn = new CustomEditColumn('Descricao', 'descricao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for codigo_ncm field
            //
            $editor = new TextEdit('codigo_ncm_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ncm', 'codigo_ncm', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cest field
            //
            $editor = new TextEdit('cest_edit');
            $editor->SetMaxLength(7);
            $editColumn = new CustomEditColumn('Cest', 'cest', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for codigo_ex_tipi field
            //
            $editor = new TextEdit('codigo_ex_tipi_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ex Tipi', 'codigo_ex_tipi', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cfop field
            //
            $editor = new TextEdit('cfop_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Cfop', 'cfop', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for unidade_comercial field
            //
            $editor = new TextEdit('unidade_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Comercial', 'unidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for quantidade_comercial field
            //
            $editor = new TextEdit('quantidade_comercial_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Comercial', 'quantidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_unitario_comercial field
            //
            $editor = new TextEdit('valor_unitario_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Comercial', 'valor_unitario_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_bruto field
            //
            $editor = new TextEdit('valor_bruto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Bruto', 'valor_bruto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for codigo_barras_tributavel field
            //
            $editor = new TextEdit('codigo_barras_tributavel_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Codigo Barras Tributavel', 'codigo_barras_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for unidade_tributavel field
            //
            $editor = new TextEdit('unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Tributavel', 'unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for quantidade_tributavel field
            //
            $editor = new TextEdit('quantidade_tributavel_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Tributavel', 'quantidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_unitario_tributavel field
            //
            $editor = new TextEdit('valor_unitario_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Tributavel', 'valor_unitario_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_outras_despesas field
            //
            $editor = new TextEdit('valor_outras_despesas_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Outras Despesas', 'valor_outras_despesas', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for inclui_no_total field
            //
            $editor = new TextEdit('inclui_no_total_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Inclui No Total', 'inclui_no_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pedido_compra field
            //
            $editor = new TextEdit('pedido_compra_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pedido Compra', 'pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for numero_item_pedido_compra field
            //
            $editor = new TextEdit('numero_item_pedido_compra_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Numero Item Pedido Compra', 'numero_item_pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_origem field
            //
            $editor = new TextEdit('icms_origem_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Origem', 'icms_origem', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_situacao_tributaria field
            //
            $editor = new TextEdit('icms_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Icms Situacao Tributaria', 'icms_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo', 'icms_modalidade_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo field
            //
            $editor = new TextEdit('icms_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo', 'icms_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_retido_st field
            //
            $editor = new TextEdit('icms_base_calculo_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo Retido St', 'icms_base_calculo_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo', 'icms_reducao_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_aliquota field
            //
            $editor = new TextEdit('icms_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota', 'icms_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor field
            //
            $editor = new TextEdit('icms_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor', 'icms_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_retido_st field
            //
            $editor = new TextEdit('icms_valor_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Retido St', 'icms_valor_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_desonerado field
            //
            $editor = new TextEdit('icms_valor_desonerado_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Desonerado', 'icms_valor_desonerado', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_operacao field
            //
            $editor = new TextEdit('icms_valor_operacao_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Operacao', 'icms_valor_operacao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_percentual_diferimento field
            //
            $editor = new TextEdit('icms_percentual_diferimento_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Percentual Diferimento', 'icms_percentual_diferimento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_diferido field
            //
            $editor = new TextEdit('icms_valor_diferido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Diferido', 'icms_valor_diferido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_motivo_desoneracao field
            //
            $editor = new TextEdit('icms_motivo_desoneracao_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Motivo Desoneracao', 'icms_motivo_desoneracao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo_st field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_st_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo St', 'icms_modalidade_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_margem_valor_adicionado_st field
            //
            $editor = new TextEdit('icms_margem_valor_adicionado_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Margem Valor Adicionado St', 'icms_margem_valor_adicionado_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo_st field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo St', 'icms_reducao_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_st field
            //
            $editor = new TextEdit('icms_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo St', 'icms_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_aliquota_st field
            //
            $editor = new TextEdit('icms_aliquota_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota St', 'icms_aliquota_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_st field
            //
            $editor = new TextEdit('icms_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor St', 'icms_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_situacao_tributaria field
            //
            $editor = new TextEdit('ipi_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Ipi Situacao Tributaria', 'ipi_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_base_calculo field
            //
            $editor = new TextEdit('ipi_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Base Calculo', 'ipi_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_aliquota field
            //
            $editor = new TextEdit('ipi_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Ipi Aliquota', 'ipi_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_quantidade_total field
            //
            $editor = new TextEdit('ipi_quantidade_total_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Ipi Quantidade Total', 'ipi_quantidade_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_valor_por_unidade_tributavel field
            //
            $editor = new TextEdit('ipi_valor_por_unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor Por Unidade Tributavel', 'ipi_valor_por_unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_valor field
            //
            $editor = new TextEdit('ipi_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor', 'ipi_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_classe_enquadramento field
            //
            $editor = new TextEdit('ipi_classe_enquadramento_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Classe Enquadramento', 'ipi_classe_enquadramento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_cnpj_produtor field
            //
            $editor = new TextEdit('ipi_cnpj_produtor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Cnpj Produtor', 'ipi_cnpj_produtor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_selo_controle field
            //
            $editor = new TextEdit('ipi_codigo_selo_controle_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Selo Controle', 'ipi_codigo_selo_controle', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_enquadramento_legal field
            //
            $editor = new TextEdit('ipi_codigo_enquadramento_legal_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Enquadramento Legal', 'ipi_codigo_enquadramento_legal', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_situacao_tributaria field
            //
            $editor = new TextEdit('pis_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Pis Situacao Tributaria', 'pis_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo field
            //
            $editor = new TextEdit('pis_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo', 'pis_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentual field
            //
            $editor = new TextEdit('pis_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentual', 'pis_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida field
            //
            $editor = new TextEdit('pis_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida', 'pis_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor field
            //
            $editor = new TextEdit('pis_aliquota_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor', 'pis_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_valor field
            //
            $editor = new TextEdit('pis_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor', 'pis_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo_st field
            //
            $editor = new TextEdit('pis_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo St', 'pis_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentaul_st field
            //
            $editor = new TextEdit('pis_aliquota_porcentaul_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentaul St', 'pis_aliquota_porcentaul_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida_st field
            //
            $editor = new TextEdit('pis_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida St', 'pis_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor_st field
            //
            $editor = new TextEdit('pis_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor St', 'pis_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for pis_valor_st field
            //
            $editor = new TextEdit('pis_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor St', 'pis_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_situacao_tributaria field
            //
            $editor = new TextEdit('cofins_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Cofins Situacao Tributaria', 'cofins_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo field
            //
            $editor = new TextEdit('cofins_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo', 'cofins_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual', 'cofins_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida', 'cofins_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor field
            //
            $editor = new TextEdit('cofins_aliquota_valor_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor', 'cofins_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_valor field
            //
            $editor = new TextEdit('cofins_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor', 'cofins_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo_st field
            //
            $editor = new TextEdit('cofins_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo St', 'cofins_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual_st field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual St', 'cofins_aliquota_porcentual_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida_st field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida St', 'cofins_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor_st field
            //
            $editor = new TextEdit('cofins_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor St', 'cofins_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for cofins_valor_st field
            //
            $editor = new TextEdit('cofins_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor St', 'cofins_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for percentual_devolvido field
            //
            $editor = new TextEdit('percentual_devolvido_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Percentual Devolvido', 'percentual_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_ipi_devolvido field
            //
            $editor = new TextEdit('valor_ipi_devolvido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Ipi Devolvido', 'valor_ipi_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
            
            //
            // Edit column for valor_frete field
            //
            $editor = new TextEdit('valor_frete_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Frete', 'valor_frete', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddEditColumn($editColumn);
        }
    
        protected function AddMultiEditColumns(Grid $grid)
        {
            //
            // Edit column for chave field
            //
            $editor = new TextEdit('chave_edit');
            $editor->SetMaxLength(15);
            $editColumn = new CustomEditColumn('Chave', 'chave', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for numero_item field
            //
            $editor = new TextEdit('numero_item_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Numero Item', 'numero_item', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for codigo_produto field
            //
            $editor = new TextEdit('codigo_produto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Produto', 'codigo_produto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for codigo_barras_comercial field
            //
            $editor = new TextEdit('codigo_barras_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Barras Comercial', 'codigo_barras_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for descricao field
            //
            $editor = new TextAreaEdit('descricao_edit', 50, 8);
            $editColumn = new CustomEditColumn('Descricao', 'descricao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for codigo_ncm field
            //
            $editor = new TextEdit('codigo_ncm_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ncm', 'codigo_ncm', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cest field
            //
            $editor = new TextEdit('cest_edit');
            $editor->SetMaxLength(7);
            $editColumn = new CustomEditColumn('Cest', 'cest', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for codigo_ex_tipi field
            //
            $editor = new TextEdit('codigo_ex_tipi_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ex Tipi', 'codigo_ex_tipi', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cfop field
            //
            $editor = new TextEdit('cfop_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Cfop', 'cfop', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for unidade_comercial field
            //
            $editor = new TextEdit('unidade_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Comercial', 'unidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for quantidade_comercial field
            //
            $editor = new TextEdit('quantidade_comercial_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Comercial', 'quantidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_unitario_comercial field
            //
            $editor = new TextEdit('valor_unitario_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Comercial', 'valor_unitario_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_bruto field
            //
            $editor = new TextEdit('valor_bruto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Bruto', 'valor_bruto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for codigo_barras_tributavel field
            //
            $editor = new TextEdit('codigo_barras_tributavel_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Codigo Barras Tributavel', 'codigo_barras_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for unidade_tributavel field
            //
            $editor = new TextEdit('unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Tributavel', 'unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for quantidade_tributavel field
            //
            $editor = new TextEdit('quantidade_tributavel_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Tributavel', 'quantidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_unitario_tributavel field
            //
            $editor = new TextEdit('valor_unitario_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Tributavel', 'valor_unitario_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_outras_despesas field
            //
            $editor = new TextEdit('valor_outras_despesas_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Outras Despesas', 'valor_outras_despesas', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for inclui_no_total field
            //
            $editor = new TextEdit('inclui_no_total_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Inclui No Total', 'inclui_no_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pedido_compra field
            //
            $editor = new TextEdit('pedido_compra_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pedido Compra', 'pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for numero_item_pedido_compra field
            //
            $editor = new TextEdit('numero_item_pedido_compra_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Numero Item Pedido Compra', 'numero_item_pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_origem field
            //
            $editor = new TextEdit('icms_origem_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Origem', 'icms_origem', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_situacao_tributaria field
            //
            $editor = new TextEdit('icms_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Icms Situacao Tributaria', 'icms_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo', 'icms_modalidade_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo field
            //
            $editor = new TextEdit('icms_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo', 'icms_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_retido_st field
            //
            $editor = new TextEdit('icms_base_calculo_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo Retido St', 'icms_base_calculo_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo', 'icms_reducao_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_aliquota field
            //
            $editor = new TextEdit('icms_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota', 'icms_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor field
            //
            $editor = new TextEdit('icms_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor', 'icms_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_retido_st field
            //
            $editor = new TextEdit('icms_valor_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Retido St', 'icms_valor_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_desonerado field
            //
            $editor = new TextEdit('icms_valor_desonerado_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Desonerado', 'icms_valor_desonerado', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_operacao field
            //
            $editor = new TextEdit('icms_valor_operacao_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Operacao', 'icms_valor_operacao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_percentual_diferimento field
            //
            $editor = new TextEdit('icms_percentual_diferimento_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Percentual Diferimento', 'icms_percentual_diferimento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_diferido field
            //
            $editor = new TextEdit('icms_valor_diferido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Diferido', 'icms_valor_diferido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_motivo_desoneracao field
            //
            $editor = new TextEdit('icms_motivo_desoneracao_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Motivo Desoneracao', 'icms_motivo_desoneracao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo_st field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_st_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo St', 'icms_modalidade_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_margem_valor_adicionado_st field
            //
            $editor = new TextEdit('icms_margem_valor_adicionado_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Margem Valor Adicionado St', 'icms_margem_valor_adicionado_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo_st field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo St', 'icms_reducao_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_st field
            //
            $editor = new TextEdit('icms_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo St', 'icms_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_aliquota_st field
            //
            $editor = new TextEdit('icms_aliquota_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota St', 'icms_aliquota_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for icms_valor_st field
            //
            $editor = new TextEdit('icms_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor St', 'icms_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_situacao_tributaria field
            //
            $editor = new TextEdit('ipi_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Ipi Situacao Tributaria', 'ipi_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_base_calculo field
            //
            $editor = new TextEdit('ipi_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Base Calculo', 'ipi_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_aliquota field
            //
            $editor = new TextEdit('ipi_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Ipi Aliquota', 'ipi_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_quantidade_total field
            //
            $editor = new TextEdit('ipi_quantidade_total_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Ipi Quantidade Total', 'ipi_quantidade_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_valor_por_unidade_tributavel field
            //
            $editor = new TextEdit('ipi_valor_por_unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor Por Unidade Tributavel', 'ipi_valor_por_unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_valor field
            //
            $editor = new TextEdit('ipi_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor', 'ipi_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_classe_enquadramento field
            //
            $editor = new TextEdit('ipi_classe_enquadramento_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Classe Enquadramento', 'ipi_classe_enquadramento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_cnpj_produtor field
            //
            $editor = new TextEdit('ipi_cnpj_produtor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Cnpj Produtor', 'ipi_cnpj_produtor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_selo_controle field
            //
            $editor = new TextEdit('ipi_codigo_selo_controle_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Selo Controle', 'ipi_codigo_selo_controle', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_enquadramento_legal field
            //
            $editor = new TextEdit('ipi_codigo_enquadramento_legal_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Enquadramento Legal', 'ipi_codigo_enquadramento_legal', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_situacao_tributaria field
            //
            $editor = new TextEdit('pis_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Pis Situacao Tributaria', 'pis_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo field
            //
            $editor = new TextEdit('pis_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo', 'pis_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentual field
            //
            $editor = new TextEdit('pis_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentual', 'pis_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida field
            //
            $editor = new TextEdit('pis_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida', 'pis_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor field
            //
            $editor = new TextEdit('pis_aliquota_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor', 'pis_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_valor field
            //
            $editor = new TextEdit('pis_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor', 'pis_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo_st field
            //
            $editor = new TextEdit('pis_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo St', 'pis_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentaul_st field
            //
            $editor = new TextEdit('pis_aliquota_porcentaul_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentaul St', 'pis_aliquota_porcentaul_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida_st field
            //
            $editor = new TextEdit('pis_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida St', 'pis_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor_st field
            //
            $editor = new TextEdit('pis_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor St', 'pis_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for pis_valor_st field
            //
            $editor = new TextEdit('pis_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor St', 'pis_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_situacao_tributaria field
            //
            $editor = new TextEdit('cofins_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Cofins Situacao Tributaria', 'cofins_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo field
            //
            $editor = new TextEdit('cofins_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo', 'cofins_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual', 'cofins_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida', 'cofins_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor field
            //
            $editor = new TextEdit('cofins_aliquota_valor_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor', 'cofins_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_valor field
            //
            $editor = new TextEdit('cofins_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor', 'cofins_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo_st field
            //
            $editor = new TextEdit('cofins_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo St', 'cofins_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual_st field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual St', 'cofins_aliquota_porcentual_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida_st field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida St', 'cofins_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor_st field
            //
            $editor = new TextEdit('cofins_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor St', 'cofins_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for cofins_valor_st field
            //
            $editor = new TextEdit('cofins_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor St', 'cofins_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for percentual_devolvido field
            //
            $editor = new TextEdit('percentual_devolvido_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Percentual Devolvido', 'percentual_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_ipi_devolvido field
            //
            $editor = new TextEdit('valor_ipi_devolvido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Ipi Devolvido', 'valor_ipi_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
            
            //
            // Edit column for valor_frete field
            //
            $editor = new TextEdit('valor_frete_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Frete', 'valor_frete', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddMultiEditColumn($editColumn);
        }
    
        protected function AddInsertColumns(Grid $grid)
        {
            //
            // Edit column for chave field
            //
            $editor = new TextEdit('chave_edit');
            $editor->SetMaxLength(15);
            $editColumn = new CustomEditColumn('Chave', 'chave', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for numero_item field
            //
            $editor = new TextEdit('numero_item_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Numero Item', 'numero_item', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for codigo_produto field
            //
            $editor = new TextEdit('codigo_produto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Produto', 'codigo_produto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for codigo_barras_comercial field
            //
            $editor = new TextEdit('codigo_barras_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Barras Comercial', 'codigo_barras_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for descricao field
            //
            $editor = new TextAreaEdit('descricao_edit', 50, 8);
            $editColumn = new CustomEditColumn('Descricao', 'descricao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for codigo_ncm field
            //
            $editor = new TextEdit('codigo_ncm_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ncm', 'codigo_ncm', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cest field
            //
            $editor = new TextEdit('cest_edit');
            $editor->SetMaxLength(7);
            $editColumn = new CustomEditColumn('Cest', 'cest', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for codigo_ex_tipi field
            //
            $editor = new TextEdit('codigo_ex_tipi_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Codigo Ex Tipi', 'codigo_ex_tipi', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cfop field
            //
            $editor = new TextEdit('cfop_edit');
            $editor->SetMaxLength(6);
            $editColumn = new CustomEditColumn('Cfop', 'cfop', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for unidade_comercial field
            //
            $editor = new TextEdit('unidade_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Comercial', 'unidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for quantidade_comercial field
            //
            $editor = new TextEdit('quantidade_comercial_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Comercial', 'quantidade_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_unitario_comercial field
            //
            $editor = new TextEdit('valor_unitario_comercial_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Comercial', 'valor_unitario_comercial', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_bruto field
            //
            $editor = new TextEdit('valor_bruto_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Bruto', 'valor_bruto', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for codigo_barras_tributavel field
            //
            $editor = new TextEdit('codigo_barras_tributavel_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Codigo Barras Tributavel', 'codigo_barras_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for unidade_tributavel field
            //
            $editor = new TextEdit('unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Unidade Tributavel', 'unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for quantidade_tributavel field
            //
            $editor = new TextEdit('quantidade_tributavel_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Quantidade Tributavel', 'quantidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_unitario_tributavel field
            //
            $editor = new TextEdit('valor_unitario_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Unitario Tributavel', 'valor_unitario_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_outras_despesas field
            //
            $editor = new TextEdit('valor_outras_despesas_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Outras Despesas', 'valor_outras_despesas', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for inclui_no_total field
            //
            $editor = new TextEdit('inclui_no_total_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Inclui No Total', 'inclui_no_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pedido_compra field
            //
            $editor = new TextEdit('pedido_compra_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pedido Compra', 'pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for numero_item_pedido_compra field
            //
            $editor = new TextEdit('numero_item_pedido_compra_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Numero Item Pedido Compra', 'numero_item_pedido_compra', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_origem field
            //
            $editor = new TextEdit('icms_origem_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Origem', 'icms_origem', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_situacao_tributaria field
            //
            $editor = new TextEdit('icms_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Icms Situacao Tributaria', 'icms_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo', 'icms_modalidade_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo field
            //
            $editor = new TextEdit('icms_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo', 'icms_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_retido_st field
            //
            $editor = new TextEdit('icms_base_calculo_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo Retido St', 'icms_base_calculo_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo', 'icms_reducao_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_aliquota field
            //
            $editor = new TextEdit('icms_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota', 'icms_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor field
            //
            $editor = new TextEdit('icms_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor', 'icms_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor_retido_st field
            //
            $editor = new TextEdit('icms_valor_retido_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Retido St', 'icms_valor_retido_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor_desonerado field
            //
            $editor = new TextEdit('icms_valor_desonerado_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Desonerado', 'icms_valor_desonerado', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor_operacao field
            //
            $editor = new TextEdit('icms_valor_operacao_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Operacao', 'icms_valor_operacao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_percentual_diferimento field
            //
            $editor = new TextEdit('icms_percentual_diferimento_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Percentual Diferimento', 'icms_percentual_diferimento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor_diferido field
            //
            $editor = new TextEdit('icms_valor_diferido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor Diferido', 'icms_valor_diferido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_motivo_desoneracao field
            //
            $editor = new TextEdit('icms_motivo_desoneracao_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Motivo Desoneracao', 'icms_motivo_desoneracao', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_modalidade_base_calculo_st field
            //
            $editor = new TextEdit('icms_modalidade_base_calculo_st_edit');
            $editor->SetMaxLength(1);
            $editColumn = new CustomEditColumn('Icms Modalidade Base Calculo St', 'icms_modalidade_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_margem_valor_adicionado_st field
            //
            $editor = new TextEdit('icms_margem_valor_adicionado_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Margem Valor Adicionado St', 'icms_margem_valor_adicionado_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_reducao_base_calculo_st field
            //
            $editor = new TextEdit('icms_reducao_base_calculo_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Reducao Base Calculo St', 'icms_reducao_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_base_calculo_st field
            //
            $editor = new TextEdit('icms_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Base Calculo St', 'icms_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_aliquota_st field
            //
            $editor = new TextEdit('icms_aliquota_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Icms Aliquota St', 'icms_aliquota_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for icms_valor_st field
            //
            $editor = new TextEdit('icms_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Icms Valor St', 'icms_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_situacao_tributaria field
            //
            $editor = new TextEdit('ipi_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Ipi Situacao Tributaria', 'ipi_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_base_calculo field
            //
            $editor = new TextEdit('ipi_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Base Calculo', 'ipi_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_aliquota field
            //
            $editor = new TextEdit('ipi_aliquota_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Ipi Aliquota', 'ipi_aliquota', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_quantidade_total field
            //
            $editor = new TextEdit('ipi_quantidade_total_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Ipi Quantidade Total', 'ipi_quantidade_total', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_valor_por_unidade_tributavel field
            //
            $editor = new TextEdit('ipi_valor_por_unidade_tributavel_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor Por Unidade Tributavel', 'ipi_valor_por_unidade_tributavel', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_valor field
            //
            $editor = new TextEdit('ipi_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Valor', 'ipi_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_classe_enquadramento field
            //
            $editor = new TextEdit('ipi_classe_enquadramento_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Classe Enquadramento', 'ipi_classe_enquadramento', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_cnpj_produtor field
            //
            $editor = new TextEdit('ipi_cnpj_produtor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Ipi Cnpj Produtor', 'ipi_cnpj_produtor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_selo_controle field
            //
            $editor = new TextEdit('ipi_codigo_selo_controle_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Selo Controle', 'ipi_codigo_selo_controle', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for ipi_codigo_enquadramento_legal field
            //
            $editor = new TextEdit('ipi_codigo_enquadramento_legal_edit');
            $editor->SetMaxLength(30);
            $editColumn = new CustomEditColumn('Ipi Codigo Enquadramento Legal', 'ipi_codigo_enquadramento_legal', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_situacao_tributaria field
            //
            $editor = new TextEdit('pis_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Pis Situacao Tributaria', 'pis_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo field
            //
            $editor = new TextEdit('pis_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo', 'pis_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentual field
            //
            $editor = new TextEdit('pis_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentual', 'pis_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida field
            //
            $editor = new TextEdit('pis_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida', 'pis_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor field
            //
            $editor = new TextEdit('pis_aliquota_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor', 'pis_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_valor field
            //
            $editor = new TextEdit('pis_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor', 'pis_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_base_calculo_st field
            //
            $editor = new TextEdit('pis_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Base Calculo St', 'pis_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_porcentaul_st field
            //
            $editor = new TextEdit('pis_aliquota_porcentaul_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Porcentaul St', 'pis_aliquota_porcentaul_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_quantidade_vendida_st field
            //
            $editor = new TextEdit('pis_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Pis Quantidade Vendida St', 'pis_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_aliquota_valor_st field
            //
            $editor = new TextEdit('pis_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Pis Aliquota Valor St', 'pis_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for pis_valor_st field
            //
            $editor = new TextEdit('pis_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Pis Valor St', 'pis_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_situacao_tributaria field
            //
            $editor = new TextEdit('cofins_situacao_tributaria_edit');
            $editor->SetMaxLength(3);
            $editColumn = new CustomEditColumn('Cofins Situacao Tributaria', 'cofins_situacao_tributaria', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo field
            //
            $editor = new TextEdit('cofins_base_calculo_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo', 'cofins_base_calculo', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual', 'cofins_aliquota_porcentual', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida', 'cofins_quantidade_vendida', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor field
            //
            $editor = new TextEdit('cofins_aliquota_valor_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor', 'cofins_aliquota_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_valor field
            //
            $editor = new TextEdit('cofins_valor_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor', 'cofins_valor', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_base_calculo_st field
            //
            $editor = new TextEdit('cofins_base_calculo_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Base Calculo St', 'cofins_base_calculo_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_porcentual_st field
            //
            $editor = new TextEdit('cofins_aliquota_porcentual_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Porcentual St', 'cofins_aliquota_porcentual_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_quantidade_vendida_st field
            //
            $editor = new TextEdit('cofins_quantidade_vendida_st_edit');
            $editor->SetMaxLength(12);
            $editColumn = new CustomEditColumn('Cofins Quantidade Vendida St', 'cofins_quantidade_vendida_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_aliquota_valor_st field
            //
            $editor = new TextEdit('cofins_aliquota_valor_st_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Cofins Aliquota Valor St', 'cofins_aliquota_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for cofins_valor_st field
            //
            $editor = new TextEdit('cofins_valor_st_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Cofins Valor St', 'cofins_valor_st', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for percentual_devolvido field
            //
            $editor = new TextEdit('percentual_devolvido_edit');
            $editor->SetMaxLength(10);
            $editColumn = new CustomEditColumn('Percentual Devolvido', 'percentual_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_ipi_devolvido field
            //
            $editor = new TextEdit('valor_ipi_devolvido_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Ipi Devolvido', 'valor_ipi_devolvido', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            
            //
            // Edit column for valor_frete field
            //
            $editor = new TextEdit('valor_frete_edit');
            $editor->SetMaxLength(20);
            $editColumn = new CustomEditColumn('Valor Frete', 'valor_frete', $editor, $this->dataset);
            $editColumn->SetAllowSetToNull(true);
            $this->ApplyCommonColumnEditProperties($editColumn);
            $grid->AddInsertColumn($editColumn);
            $grid->SetShowAddButton(false && $this->GetSecurityInfo()->HasAddGrant());
        }
    
        private function AddMultiUploadColumn(Grid $grid)
        {
    
        }
    
        protected function AddPrintColumns(Grid $grid)
        {
            //
            // View column for id_itens field
            //
            $column = new NumberViewColumn('id_itens', 'id_itens', 'Id Itens', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddPrintColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_item field
            //
            $column = new TextViewColumn('numero_item', 'numero_item', 'Numero Item', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_produto field
            //
            $column = new TextViewColumn('codigo_produto', 'codigo_produto', 'Codigo Produto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_barras_comercial field
            //
            $column = new TextViewColumn('codigo_barras_comercial', 'codigo_barras_comercial', 'Codigo Barras Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('DetailGridNotas Finalizadas.itens_descricao_handler_print');
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_ncm field
            //
            $column = new TextViewColumn('codigo_ncm', 'codigo_ncm', 'Codigo Ncm', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cest field
            //
            $column = new TextViewColumn('cest', 'cest', 'Cest', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_ex_tipi field
            //
            $column = new TextViewColumn('codigo_ex_tipi', 'codigo_ex_tipi', 'Codigo Ex Tipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cfop field
            //
            $column = new TextViewColumn('cfop', 'cfop', 'Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for unidade_comercial field
            //
            $column = new TextViewColumn('unidade_comercial', 'unidade_comercial', 'Unidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for quantidade_comercial field
            //
            $column = new TextViewColumn('quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_unitario_comercial field
            //
            $column = new TextViewColumn('valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_bruto field
            //
            $column = new TextViewColumn('valor_bruto', 'valor_bruto', 'Valor Bruto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_barras_tributavel field
            //
            $column = new TextViewColumn('codigo_barras_tributavel', 'codigo_barras_tributavel', 'Codigo Barras Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for unidade_tributavel field
            //
            $column = new TextViewColumn('unidade_tributavel', 'unidade_tributavel', 'Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for quantidade_tributavel field
            //
            $column = new TextViewColumn('quantidade_tributavel', 'quantidade_tributavel', 'Quantidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_unitario_tributavel field
            //
            $column = new TextViewColumn('valor_unitario_tributavel', 'valor_unitario_tributavel', 'Valor Unitario Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inclui_no_total field
            //
            $column = new TextViewColumn('inclui_no_total', 'inclui_no_total', 'Inclui No Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pedido_compra field
            //
            $column = new TextViewColumn('pedido_compra', 'pedido_compra', 'Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_item_pedido_compra field
            //
            $column = new TextViewColumn('numero_item_pedido_compra', 'numero_item_pedido_compra', 'Numero Item Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_origem field
            //
            $column = new TextViewColumn('icms_origem', 'icms_origem', 'Icms Origem', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_situacao_tributaria field
            //
            $column = new TextViewColumn('icms_situacao_tributaria', 'icms_situacao_tributaria', 'Icms Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo', 'icms_modalidade_base_calculo', 'Icms Modalidade Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_base_calculo_retido_st field
            //
            $column = new TextViewColumn('icms_base_calculo_retido_st', 'icms_base_calculo_retido_st', 'Icms Base Calculo Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_reducao_base_calculo field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo', 'icms_reducao_base_calculo', 'Icms Reducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_aliquota field
            //
            $column = new TextViewColumn('icms_aliquota', 'icms_aliquota', 'Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor field
            //
            $column = new TextViewColumn('icms_valor', 'icms_valor', 'Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_retido_st field
            //
            $column = new TextViewColumn('icms_valor_retido_st', 'icms_valor_retido_st', 'Icms Valor Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_desonerado field
            //
            $column = new TextViewColumn('icms_valor_desonerado', 'icms_valor_desonerado', 'Icms Valor Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_operacao field
            //
            $column = new TextViewColumn('icms_valor_operacao', 'icms_valor_operacao', 'Icms Valor Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_percentual_diferimento field
            //
            $column = new TextViewColumn('icms_percentual_diferimento', 'icms_percentual_diferimento', 'Icms Percentual Diferimento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_diferido field
            //
            $column = new TextViewColumn('icms_valor_diferido', 'icms_valor_diferido', 'Icms Valor Diferido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_motivo_desoneracao field
            //
            $column = new TextViewColumn('icms_motivo_desoneracao', 'icms_motivo_desoneracao', 'Icms Motivo Desoneracao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo_st field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo_st', 'icms_modalidade_base_calculo_st', 'Icms Modalidade Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_margem_valor_adicionado_st field
            //
            $column = new TextViewColumn('icms_margem_valor_adicionado_st', 'icms_margem_valor_adicionado_st', 'Icms Margem Valor Adicionado St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_reducao_base_calculo_st field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo_st', 'icms_reducao_base_calculo_st', 'Icms Reducao Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_aliquota_st field
            //
            $column = new TextViewColumn('icms_aliquota_st', 'icms_aliquota_st', 'Icms Aliquota St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_st field
            //
            $column = new TextViewColumn('icms_valor_st', 'icms_valor_st', 'Icms Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_situacao_tributaria field
            //
            $column = new TextViewColumn('ipi_situacao_tributaria', 'ipi_situacao_tributaria', 'Ipi Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_base_calculo field
            //
            $column = new TextViewColumn('ipi_base_calculo', 'ipi_base_calculo', 'Ipi Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_aliquota field
            //
            $column = new TextViewColumn('ipi_aliquota', 'ipi_aliquota', 'Ipi Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_quantidade_total field
            //
            $column = new TextViewColumn('ipi_quantidade_total', 'ipi_quantidade_total', 'Ipi Quantidade Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_valor_por_unidade_tributavel field
            //
            $column = new TextViewColumn('ipi_valor_por_unidade_tributavel', 'ipi_valor_por_unidade_tributavel', 'Ipi Valor Por Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_valor field
            //
            $column = new TextViewColumn('ipi_valor', 'ipi_valor', 'Ipi Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_classe_enquadramento field
            //
            $column = new TextViewColumn('ipi_classe_enquadramento', 'ipi_classe_enquadramento', 'Ipi Classe Enquadramento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_cnpj_produtor field
            //
            $column = new TextViewColumn('ipi_cnpj_produtor', 'ipi_cnpj_produtor', 'Ipi Cnpj Produtor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_codigo_selo_controle field
            //
            $column = new TextViewColumn('ipi_codigo_selo_controle', 'ipi_codigo_selo_controle', 'Ipi Codigo Selo Controle', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for ipi_codigo_enquadramento_legal field
            //
            $column = new TextViewColumn('ipi_codigo_enquadramento_legal', 'ipi_codigo_enquadramento_legal', 'Ipi Codigo Enquadramento Legal', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_situacao_tributaria field
            //
            $column = new TextViewColumn('pis_situacao_tributaria', 'pis_situacao_tributaria', 'Pis Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_base_calculo field
            //
            $column = new TextViewColumn('pis_base_calculo', 'pis_base_calculo', 'Pis Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_aliquota_porcentual field
            //
            $column = new TextViewColumn('pis_aliquota_porcentual', 'pis_aliquota_porcentual', 'Pis Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_quantidade_vendida field
            //
            $column = new TextViewColumn('pis_quantidade_vendida', 'pis_quantidade_vendida', 'Pis Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_aliquota_valor field
            //
            $column = new TextViewColumn('pis_aliquota_valor', 'pis_aliquota_valor', 'Pis Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_valor field
            //
            $column = new TextViewColumn('pis_valor', 'pis_valor', 'Pis Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_base_calculo_st field
            //
            $column = new TextViewColumn('pis_base_calculo_st', 'pis_base_calculo_st', 'Pis Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_aliquota_porcentaul_st field
            //
            $column = new TextViewColumn('pis_aliquota_porcentaul_st', 'pis_aliquota_porcentaul_st', 'Pis Aliquota Porcentaul St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_quantidade_vendida_st field
            //
            $column = new TextViewColumn('pis_quantidade_vendida_st', 'pis_quantidade_vendida_st', 'Pis Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_aliquota_valor_st field
            //
            $column = new TextViewColumn('pis_aliquota_valor_st', 'pis_aliquota_valor_st', 'Pis Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pis_valor_st field
            //
            $column = new TextViewColumn('pis_valor_st', 'pis_valor_st', 'Pis Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_situacao_tributaria field
            //
            $column = new TextViewColumn('cofins_situacao_tributaria', 'cofins_situacao_tributaria', 'Cofins Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_base_calculo field
            //
            $column = new TextViewColumn('cofins_base_calculo', 'cofins_base_calculo', 'Cofins Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual', 'cofins_aliquota_porcentual', 'Cofins Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_quantidade_vendida field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida', 'cofins_quantidade_vendida', 'Cofins Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_aliquota_valor field
            //
            $column = new TextViewColumn('cofins_aliquota_valor', 'cofins_aliquota_valor', 'Cofins Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_valor field
            //
            $column = new TextViewColumn('cofins_valor', 'cofins_valor', 'Cofins Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_base_calculo_st field
            //
            $column = new TextViewColumn('cofins_base_calculo_st', 'cofins_base_calculo_st', 'Cofins Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual_st field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual_st', 'cofins_aliquota_porcentual_st', 'Cofins Aliquota Porcentual St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_quantidade_vendida_st field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida_st', 'cofins_quantidade_vendida_st', 'Cofins Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_aliquota_valor_st field
            //
            $column = new TextViewColumn('cofins_aliquota_valor_st', 'cofins_aliquota_valor_st', 'Cofins Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cofins_valor_st field
            //
            $column = new TextViewColumn('cofins_valor_st', 'cofins_valor_st', 'Cofins Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for percentual_devolvido field
            //
            $column = new TextViewColumn('percentual_devolvido', 'percentual_devolvido', 'Percentual Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_ipi_devolvido field
            //
            $column = new TextViewColumn('valor_ipi_devolvido', 'valor_ipi_devolvido', 'Valor Ipi Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
        }
    
        protected function AddExportColumns(Grid $grid)
        {
            //
            // View column for id_itens field
            //
            $column = new NumberViewColumn('id_itens', 'id_itens', 'Id Itens', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddExportColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_item field
            //
            $column = new TextViewColumn('numero_item', 'numero_item', 'Numero Item', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_produto field
            //
            $column = new TextViewColumn('codigo_produto', 'codigo_produto', 'Codigo Produto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_barras_comercial field
            //
            $column = new TextViewColumn('codigo_barras_comercial', 'codigo_barras_comercial', 'Codigo Barras Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('DetailGridNotas Finalizadas.itens_descricao_handler_export');
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_ncm field
            //
            $column = new TextViewColumn('codigo_ncm', 'codigo_ncm', 'Codigo Ncm', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cest field
            //
            $column = new TextViewColumn('cest', 'cest', 'Cest', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_ex_tipi field
            //
            $column = new TextViewColumn('codigo_ex_tipi', 'codigo_ex_tipi', 'Codigo Ex Tipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cfop field
            //
            $column = new TextViewColumn('cfop', 'cfop', 'Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for unidade_comercial field
            //
            $column = new TextViewColumn('unidade_comercial', 'unidade_comercial', 'Unidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for quantidade_comercial field
            //
            $column = new TextViewColumn('quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_unitario_comercial field
            //
            $column = new TextViewColumn('valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_bruto field
            //
            $column = new TextViewColumn('valor_bruto', 'valor_bruto', 'Valor Bruto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_barras_tributavel field
            //
            $column = new TextViewColumn('codigo_barras_tributavel', 'codigo_barras_tributavel', 'Codigo Barras Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for unidade_tributavel field
            //
            $column = new TextViewColumn('unidade_tributavel', 'unidade_tributavel', 'Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for quantidade_tributavel field
            //
            $column = new TextViewColumn('quantidade_tributavel', 'quantidade_tributavel', 'Quantidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_unitario_tributavel field
            //
            $column = new TextViewColumn('valor_unitario_tributavel', 'valor_unitario_tributavel', 'Valor Unitario Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inclui_no_total field
            //
            $column = new TextViewColumn('inclui_no_total', 'inclui_no_total', 'Inclui No Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pedido_compra field
            //
            $column = new TextViewColumn('pedido_compra', 'pedido_compra', 'Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_item_pedido_compra field
            //
            $column = new TextViewColumn('numero_item_pedido_compra', 'numero_item_pedido_compra', 'Numero Item Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_origem field
            //
            $column = new TextViewColumn('icms_origem', 'icms_origem', 'Icms Origem', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_situacao_tributaria field
            //
            $column = new TextViewColumn('icms_situacao_tributaria', 'icms_situacao_tributaria', 'Icms Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo', 'icms_modalidade_base_calculo', 'Icms Modalidade Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_base_calculo_retido_st field
            //
            $column = new TextViewColumn('icms_base_calculo_retido_st', 'icms_base_calculo_retido_st', 'Icms Base Calculo Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_reducao_base_calculo field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo', 'icms_reducao_base_calculo', 'Icms Reducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_aliquota field
            //
            $column = new TextViewColumn('icms_aliquota', 'icms_aliquota', 'Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor field
            //
            $column = new TextViewColumn('icms_valor', 'icms_valor', 'Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_retido_st field
            //
            $column = new TextViewColumn('icms_valor_retido_st', 'icms_valor_retido_st', 'Icms Valor Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_desonerado field
            //
            $column = new TextViewColumn('icms_valor_desonerado', 'icms_valor_desonerado', 'Icms Valor Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_operacao field
            //
            $column = new TextViewColumn('icms_valor_operacao', 'icms_valor_operacao', 'Icms Valor Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_percentual_diferimento field
            //
            $column = new TextViewColumn('icms_percentual_diferimento', 'icms_percentual_diferimento', 'Icms Percentual Diferimento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_diferido field
            //
            $column = new TextViewColumn('icms_valor_diferido', 'icms_valor_diferido', 'Icms Valor Diferido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_motivo_desoneracao field
            //
            $column = new TextViewColumn('icms_motivo_desoneracao', 'icms_motivo_desoneracao', 'Icms Motivo Desoneracao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo_st field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo_st', 'icms_modalidade_base_calculo_st', 'Icms Modalidade Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_margem_valor_adicionado_st field
            //
            $column = new TextViewColumn('icms_margem_valor_adicionado_st', 'icms_margem_valor_adicionado_st', 'Icms Margem Valor Adicionado St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_reducao_base_calculo_st field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo_st', 'icms_reducao_base_calculo_st', 'Icms Reducao Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_aliquota_st field
            //
            $column = new TextViewColumn('icms_aliquota_st', 'icms_aliquota_st', 'Icms Aliquota St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_st field
            //
            $column = new TextViewColumn('icms_valor_st', 'icms_valor_st', 'Icms Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_situacao_tributaria field
            //
            $column = new TextViewColumn('ipi_situacao_tributaria', 'ipi_situacao_tributaria', 'Ipi Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_base_calculo field
            //
            $column = new TextViewColumn('ipi_base_calculo', 'ipi_base_calculo', 'Ipi Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_aliquota field
            //
            $column = new TextViewColumn('ipi_aliquota', 'ipi_aliquota', 'Ipi Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_quantidade_total field
            //
            $column = new TextViewColumn('ipi_quantidade_total', 'ipi_quantidade_total', 'Ipi Quantidade Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_valor_por_unidade_tributavel field
            //
            $column = new TextViewColumn('ipi_valor_por_unidade_tributavel', 'ipi_valor_por_unidade_tributavel', 'Ipi Valor Por Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_valor field
            //
            $column = new TextViewColumn('ipi_valor', 'ipi_valor', 'Ipi Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_classe_enquadramento field
            //
            $column = new TextViewColumn('ipi_classe_enquadramento', 'ipi_classe_enquadramento', 'Ipi Classe Enquadramento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_cnpj_produtor field
            //
            $column = new TextViewColumn('ipi_cnpj_produtor', 'ipi_cnpj_produtor', 'Ipi Cnpj Produtor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_codigo_selo_controle field
            //
            $column = new TextViewColumn('ipi_codigo_selo_controle', 'ipi_codigo_selo_controle', 'Ipi Codigo Selo Controle', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for ipi_codigo_enquadramento_legal field
            //
            $column = new TextViewColumn('ipi_codigo_enquadramento_legal', 'ipi_codigo_enquadramento_legal', 'Ipi Codigo Enquadramento Legal', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_situacao_tributaria field
            //
            $column = new TextViewColumn('pis_situacao_tributaria', 'pis_situacao_tributaria', 'Pis Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_base_calculo field
            //
            $column = new TextViewColumn('pis_base_calculo', 'pis_base_calculo', 'Pis Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_aliquota_porcentual field
            //
            $column = new TextViewColumn('pis_aliquota_porcentual', 'pis_aliquota_porcentual', 'Pis Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_quantidade_vendida field
            //
            $column = new TextViewColumn('pis_quantidade_vendida', 'pis_quantidade_vendida', 'Pis Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_aliquota_valor field
            //
            $column = new TextViewColumn('pis_aliquota_valor', 'pis_aliquota_valor', 'Pis Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_valor field
            //
            $column = new TextViewColumn('pis_valor', 'pis_valor', 'Pis Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_base_calculo_st field
            //
            $column = new TextViewColumn('pis_base_calculo_st', 'pis_base_calculo_st', 'Pis Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_aliquota_porcentaul_st field
            //
            $column = new TextViewColumn('pis_aliquota_porcentaul_st', 'pis_aliquota_porcentaul_st', 'Pis Aliquota Porcentaul St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_quantidade_vendida_st field
            //
            $column = new TextViewColumn('pis_quantidade_vendida_st', 'pis_quantidade_vendida_st', 'Pis Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_aliquota_valor_st field
            //
            $column = new TextViewColumn('pis_aliquota_valor_st', 'pis_aliquota_valor_st', 'Pis Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pis_valor_st field
            //
            $column = new TextViewColumn('pis_valor_st', 'pis_valor_st', 'Pis Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_situacao_tributaria field
            //
            $column = new TextViewColumn('cofins_situacao_tributaria', 'cofins_situacao_tributaria', 'Cofins Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_base_calculo field
            //
            $column = new TextViewColumn('cofins_base_calculo', 'cofins_base_calculo', 'Cofins Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual', 'cofins_aliquota_porcentual', 'Cofins Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_quantidade_vendida field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida', 'cofins_quantidade_vendida', 'Cofins Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_aliquota_valor field
            //
            $column = new TextViewColumn('cofins_aliquota_valor', 'cofins_aliquota_valor', 'Cofins Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_valor field
            //
            $column = new TextViewColumn('cofins_valor', 'cofins_valor', 'Cofins Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_base_calculo_st field
            //
            $column = new TextViewColumn('cofins_base_calculo_st', 'cofins_base_calculo_st', 'Cofins Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual_st field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual_st', 'cofins_aliquota_porcentual_st', 'Cofins Aliquota Porcentual St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_quantidade_vendida_st field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida_st', 'cofins_quantidade_vendida_st', 'Cofins Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_aliquota_valor_st field
            //
            $column = new TextViewColumn('cofins_aliquota_valor_st', 'cofins_aliquota_valor_st', 'Cofins Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cofins_valor_st field
            //
            $column = new TextViewColumn('cofins_valor_st', 'cofins_valor_st', 'Cofins Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for percentual_devolvido field
            //
            $column = new TextViewColumn('percentual_devolvido', 'percentual_devolvido', 'Percentual Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_ipi_devolvido field
            //
            $column = new TextViewColumn('valor_ipi_devolvido', 'valor_ipi_devolvido', 'Valor Ipi Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
        }
    
        private function AddCompareColumns(Grid $grid)
        {
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for numero_item field
            //
            $column = new TextViewColumn('numero_item', 'numero_item', 'Numero Item', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for codigo_produto field
            //
            $column = new TextViewColumn('codigo_produto', 'codigo_produto', 'Codigo Produto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for codigo_barras_comercial field
            //
            $column = new TextViewColumn('codigo_barras_comercial', 'codigo_barras_comercial', 'Codigo Barras Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetMaxLength(75);
            $column->SetFullTextWindowHandlerName('DetailGridNotas Finalizadas.itens_descricao_handler_compare');
            $grid->AddCompareColumn($column);
            
            //
            // View column for codigo_ncm field
            //
            $column = new TextViewColumn('codigo_ncm', 'codigo_ncm', 'Codigo Ncm', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cest field
            //
            $column = new TextViewColumn('cest', 'cest', 'Cest', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for codigo_ex_tipi field
            //
            $column = new TextViewColumn('codigo_ex_tipi', 'codigo_ex_tipi', 'Codigo Ex Tipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cfop field
            //
            $column = new TextViewColumn('cfop', 'cfop', 'Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for unidade_comercial field
            //
            $column = new TextViewColumn('unidade_comercial', 'unidade_comercial', 'Unidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for quantidade_comercial field
            //
            $column = new TextViewColumn('quantidade_comercial', 'quantidade_comercial', 'Quantidade Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_unitario_comercial field
            //
            $column = new TextViewColumn('valor_unitario_comercial', 'valor_unitario_comercial', 'Valor Unitario Comercial', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_bruto field
            //
            $column = new TextViewColumn('valor_bruto', 'valor_bruto', 'Valor Bruto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for codigo_barras_tributavel field
            //
            $column = new TextViewColumn('codigo_barras_tributavel', 'codigo_barras_tributavel', 'Codigo Barras Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for unidade_tributavel field
            //
            $column = new TextViewColumn('unidade_tributavel', 'unidade_tributavel', 'Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for quantidade_tributavel field
            //
            $column = new TextViewColumn('quantidade_tributavel', 'quantidade_tributavel', 'Quantidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_unitario_tributavel field
            //
            $column = new TextViewColumn('valor_unitario_tributavel', 'valor_unitario_tributavel', 'Valor Unitario Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for inclui_no_total field
            //
            $column = new TextViewColumn('inclui_no_total', 'inclui_no_total', 'Inclui No Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pedido_compra field
            //
            $column = new TextViewColumn('pedido_compra', 'pedido_compra', 'Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for numero_item_pedido_compra field
            //
            $column = new TextViewColumn('numero_item_pedido_compra', 'numero_item_pedido_compra', 'Numero Item Pedido Compra', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_origem field
            //
            $column = new TextViewColumn('icms_origem', 'icms_origem', 'Icms Origem', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_situacao_tributaria field
            //
            $column = new TextViewColumn('icms_situacao_tributaria', 'icms_situacao_tributaria', 'Icms Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo', 'icms_modalidade_base_calculo', 'Icms Modalidade Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_base_calculo_retido_st field
            //
            $column = new TextViewColumn('icms_base_calculo_retido_st', 'icms_base_calculo_retido_st', 'Icms Base Calculo Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_reducao_base_calculo field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo', 'icms_reducao_base_calculo', 'Icms Reducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_aliquota field
            //
            $column = new TextViewColumn('icms_aliquota', 'icms_aliquota', 'Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor field
            //
            $column = new TextViewColumn('icms_valor', 'icms_valor', 'Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor_retido_st field
            //
            $column = new TextViewColumn('icms_valor_retido_st', 'icms_valor_retido_st', 'Icms Valor Retido St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor_desonerado field
            //
            $column = new TextViewColumn('icms_valor_desonerado', 'icms_valor_desonerado', 'Icms Valor Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor_operacao field
            //
            $column = new TextViewColumn('icms_valor_operacao', 'icms_valor_operacao', 'Icms Valor Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_percentual_diferimento field
            //
            $column = new TextViewColumn('icms_percentual_diferimento', 'icms_percentual_diferimento', 'Icms Percentual Diferimento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor_diferido field
            //
            $column = new TextViewColumn('icms_valor_diferido', 'icms_valor_diferido', 'Icms Valor Diferido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_motivo_desoneracao field
            //
            $column = new TextViewColumn('icms_motivo_desoneracao', 'icms_motivo_desoneracao', 'Icms Motivo Desoneracao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_modalidade_base_calculo_st field
            //
            $column = new TextViewColumn('icms_modalidade_base_calculo_st', 'icms_modalidade_base_calculo_st', 'Icms Modalidade Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_margem_valor_adicionado_st field
            //
            $column = new TextViewColumn('icms_margem_valor_adicionado_st', 'icms_margem_valor_adicionado_st', 'Icms Margem Valor Adicionado St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_reducao_base_calculo_st field
            //
            $column = new TextViewColumn('icms_reducao_base_calculo_st', 'icms_reducao_base_calculo_st', 'Icms Reducao Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_aliquota_st field
            //
            $column = new TextViewColumn('icms_aliquota_st', 'icms_aliquota_st', 'Icms Aliquota St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for icms_valor_st field
            //
            $column = new TextViewColumn('icms_valor_st', 'icms_valor_st', 'Icms Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_situacao_tributaria field
            //
            $column = new TextViewColumn('ipi_situacao_tributaria', 'ipi_situacao_tributaria', 'Ipi Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_base_calculo field
            //
            $column = new TextViewColumn('ipi_base_calculo', 'ipi_base_calculo', 'Ipi Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_aliquota field
            //
            $column = new TextViewColumn('ipi_aliquota', 'ipi_aliquota', 'Ipi Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_quantidade_total field
            //
            $column = new TextViewColumn('ipi_quantidade_total', 'ipi_quantidade_total', 'Ipi Quantidade Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_valor_por_unidade_tributavel field
            //
            $column = new TextViewColumn('ipi_valor_por_unidade_tributavel', 'ipi_valor_por_unidade_tributavel', 'Ipi Valor Por Unidade Tributavel', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_valor field
            //
            $column = new TextViewColumn('ipi_valor', 'ipi_valor', 'Ipi Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_classe_enquadramento field
            //
            $column = new TextViewColumn('ipi_classe_enquadramento', 'ipi_classe_enquadramento', 'Ipi Classe Enquadramento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_cnpj_produtor field
            //
            $column = new TextViewColumn('ipi_cnpj_produtor', 'ipi_cnpj_produtor', 'Ipi Cnpj Produtor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_codigo_selo_controle field
            //
            $column = new TextViewColumn('ipi_codigo_selo_controle', 'ipi_codigo_selo_controle', 'Ipi Codigo Selo Controle', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for ipi_codigo_enquadramento_legal field
            //
            $column = new TextViewColumn('ipi_codigo_enquadramento_legal', 'ipi_codigo_enquadramento_legal', 'Ipi Codigo Enquadramento Legal', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_situacao_tributaria field
            //
            $column = new TextViewColumn('pis_situacao_tributaria', 'pis_situacao_tributaria', 'Pis Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_base_calculo field
            //
            $column = new TextViewColumn('pis_base_calculo', 'pis_base_calculo', 'Pis Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_aliquota_porcentual field
            //
            $column = new TextViewColumn('pis_aliquota_porcentual', 'pis_aliquota_porcentual', 'Pis Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_quantidade_vendida field
            //
            $column = new TextViewColumn('pis_quantidade_vendida', 'pis_quantidade_vendida', 'Pis Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_aliquota_valor field
            //
            $column = new TextViewColumn('pis_aliquota_valor', 'pis_aliquota_valor', 'Pis Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_valor field
            //
            $column = new TextViewColumn('pis_valor', 'pis_valor', 'Pis Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_base_calculo_st field
            //
            $column = new TextViewColumn('pis_base_calculo_st', 'pis_base_calculo_st', 'Pis Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_aliquota_porcentaul_st field
            //
            $column = new TextViewColumn('pis_aliquota_porcentaul_st', 'pis_aliquota_porcentaul_st', 'Pis Aliquota Porcentaul St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_quantidade_vendida_st field
            //
            $column = new TextViewColumn('pis_quantidade_vendida_st', 'pis_quantidade_vendida_st', 'Pis Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_aliquota_valor_st field
            //
            $column = new TextViewColumn('pis_aliquota_valor_st', 'pis_aliquota_valor_st', 'Pis Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for pis_valor_st field
            //
            $column = new TextViewColumn('pis_valor_st', 'pis_valor_st', 'Pis Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_situacao_tributaria field
            //
            $column = new TextViewColumn('cofins_situacao_tributaria', 'cofins_situacao_tributaria', 'Cofins Situacao Tributaria', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_base_calculo field
            //
            $column = new TextViewColumn('cofins_base_calculo', 'cofins_base_calculo', 'Cofins Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual', 'cofins_aliquota_porcentual', 'Cofins Aliquota Porcentual', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_quantidade_vendida field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida', 'cofins_quantidade_vendida', 'Cofins Quantidade Vendida', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_aliquota_valor field
            //
            $column = new TextViewColumn('cofins_aliquota_valor', 'cofins_aliquota_valor', 'Cofins Aliquota Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_valor field
            //
            $column = new TextViewColumn('cofins_valor', 'cofins_valor', 'Cofins Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_base_calculo_st field
            //
            $column = new TextViewColumn('cofins_base_calculo_st', 'cofins_base_calculo_st', 'Cofins Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_aliquota_porcentual_st field
            //
            $column = new TextViewColumn('cofins_aliquota_porcentual_st', 'cofins_aliquota_porcentual_st', 'Cofins Aliquota Porcentual St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_quantidade_vendida_st field
            //
            $column = new TextViewColumn('cofins_quantidade_vendida_st', 'cofins_quantidade_vendida_st', 'Cofins Quantidade Vendida St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_aliquota_valor_st field
            //
            $column = new TextViewColumn('cofins_aliquota_valor_st', 'cofins_aliquota_valor_st', 'Cofins Aliquota Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for cofins_valor_st field
            //
            $column = new TextViewColumn('cofins_valor_st', 'cofins_valor_st', 'Cofins Valor St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for percentual_devolvido field
            //
            $column = new TextViewColumn('percentual_devolvido', 'percentual_devolvido', 'Percentual Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_ipi_devolvido field
            //
            $column = new TextViewColumn('valor_ipi_devolvido', 'valor_ipi_devolvido', 'Valor Ipi Devolvido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddCompareColumn($column);
        }
    
        private function AddCompareHeaderColumns(Grid $grid)
        {
    
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        public function isFilterConditionRequired()
        {
            return false;
        }
    
        protected function ApplyCommonColumnEditProperties(CustomEditColumn $column)
        {
            $column->SetDisplaySetToNullCheckBox(false);
            $column->SetDisplaySetToDefaultCheckBox(false);
    		$column->SetVariableContainer($this->GetColumnVariableContainer());
        }
    
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
        public function GetEnableModalSingleRecordView() { return true; }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset);
            if ($this->GetSecurityInfo()->HasDeleteGrant())
               $result->SetAllowDeleteSelected(false);
            else
               $result->SetAllowDeleteSelected(false);   
            
            ApplyCommonPageSettings($this, $result);
            
            $result->SetUseImagesForActions(true);
            $result->SetUseFixedHeader(false);
            $result->SetShowLineNumbers(false);
            $result->SetViewMode(ViewMode::TABLE);
            $result->setEnableRuntimeCustomization(true);
            $result->setMultiEditAllowed($this->GetSecurityInfo()->HasEditGrant() && false);
            $result->setTableBordered(false);
            $result->setTableCondensed(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->AddOperationsColumns($result);
            $this->AddFieldColumns($result);
            $this->AddSingleRecordViewColumns($result);
            $this->AddEditColumns($result);
            $this->AddMultiEditColumns($result);
            $this->AddInsertColumns($result);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
            $this->AddMultiUploadColumn($result);
    
    
            $this->SetShowPageList(true);
            $this->SetShowTopPageNavigator(true);
            $this->SetShowBottomPageNavigator(true);
            $this->setPrintListAvailable(false);
            $this->setPrintListRecordAvailable(false);
            $this->setPrintOneRecordAvailable(false);
            $this->setAllowPrintSelectedRecords(true);
            $this->setExportListAvailable(array('pdf', 'excel', 'word'));
            $this->setExportSelectedRecordsAvailable(array('pdf', 'excel', 'word', 'xml', 'csv'));
            $this->setExportListRecordAvailable(array());
            $this->setExportOneRecordAvailable(array('pdf', 'excel', 'word'));
    
            return $result;
        }
     
        protected function setClientSideEvents(Grid $grid) {
    
        }
    
        protected function doRegisterHandlers() {
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'DetailGridNotas Finalizadas.itens_descricao_handler_list', $column);
            GetApplication()->RegisterHTTPHandler($handler);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'DetailGridNotas Finalizadas.itens_descricao_handler_print', $column);
            GetApplication()->RegisterHTTPHandler($handler);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'DetailGridNotas Finalizadas.itens_descricao_handler_compare', $column);
            GetApplication()->RegisterHTTPHandler($handler);
            
            //
            // View column for descricao field
            //
            $column = new TextViewColumn('descricao', 'descricao', 'Descricao', $this->dataset);
            $column->SetOrderable(true);
            $handler = new ShowTextBlobHandler($this->dataset, $this, 'DetailGridNotas Finalizadas.itens_descricao_handler_view', $column);
            GetApplication()->RegisterHTTPHandler($handler);
        }
       
        protected function doCustomRenderColumn($fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
    
        }
    
        protected function doCustomRenderPrintColumn($fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
    
        }
    
        protected function doCustomRenderExportColumn($exportType, $fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
    
        }
    
        protected function doCustomDrawRow($rowData, &$cellFontColor, &$cellFontSize, &$cellBgColor, &$cellItalicAttr, &$cellBoldAttr)
        {
    
        }
    
        protected function doExtendedCustomDrawRow($rowData, &$rowCellStyles, &$rowStyles, &$rowClasses, &$cellClasses)
        {
    
        }
    
        protected function doCustomRenderTotal($totalValue, $aggregate, $columnName, &$customText, &$handled)
        {
    
        }
    
        protected function doCustomDefaultValues(&$values, &$handled) 
        {
    
        }
    
        protected function doCustomCompareColumn($columnName, $valueA, $valueB, &$result)
        {
    
        }
    
        protected function doBeforeInsertRecord($page, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doBeforeUpdateRecord($page, $oldRowData, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doBeforeDeleteRecord($page, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterInsertRecord($page, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterUpdateRecord($page, $oldRowData, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterDeleteRecord($page, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doCustomHTMLHeader($page, &$customHtmlHeaderText)
        { 
    
        }
    
        protected function doGetCustomTemplate($type, $part, $mode, &$result, &$params)
        {
    
        }
    
        protected function doGetCustomExportOptions(Page $page, $exportType, $rowData, &$options)
        {
    
        }
    
        protected function doFileUpload($fieldName, $rowData, &$result, &$accept, $originalFileName, $originalFileExtension, $fileSize, $tempFileName)
        {
    
        }
    
        protected function doPrepareChart(Chart $chart)
        {
    
        }
    
        protected function doPrepareColumnFilter(ColumnFilter $columnFilter)
        {
    
        }
    
        protected function doPrepareFilterBuilder(FilterBuilder $filterBuilder, FixedKeysArray $columns)
        {
    
        }
    
        protected function doGetSelectionFilters(FixedKeysArray $columns, &$result)
        {
    
        }
    
        protected function doGetCustomFormLayout($mode, FixedKeysArray $columns, FormLayout $layout)
        {
    
        }
    
        protected function doGetCustomColumnGroup(FixedKeysArray $columns, ViewColumnGroup $columnGroup)
        {
    
        }
    
        protected function doPageLoaded()
        {
    
        }
    
        protected function doCalculateFields($rowData, $fieldName, &$value)
        {
    
        }
    
        protected function doGetCustomPagePermissions(Page $page, PermissionSet &$permissions, &$handled)
        {
    
        }
    
        protected function doGetCustomRecordPermissions(Page $page, &$usingCondition, $rowData, &$allowEdit, &$allowDelete, &$mergeWithDefault, &$handled)
        {
    
        }
    
    }
    
    // OnBeforePageExecute event handler
    
    
    
    class Notas_FinalizadasPage extends Page
    {
        protected function DoBeforeCreate()
        {
            $this->SetTitle('Notas Finalizadas');
            $this->SetMenuLabel('Notas Finalizadas');
            $this->SetHeader(GetPagesHeader());
            $this->SetFooter(GetPagesFooter());
    
            $selectQuery = 'select * from notas where st_nota=\'F\'';
            $insertQuery = array();
            $updateQuery = array();
            $deleteQuery = array();
            $this->dataset = new QueryDataset(
              MyConnectionFactory::getInstance(), 
              GetConnectionOptions(),
              $selectQuery, $insertQuery, $updateQuery, $deleteQuery, 'Notas Finalizadas');
            $this->dataset->addFields(
                array(
                    new IntegerField('id_notas', true, true, true),
                    new IntegerField('id_licencas'),
                    new StringField('chave'),
                    new IntegerField('sequencia'),
                    new StringField('tipo_nf'),
                    new DateTimeField('dt_inclusao'),
                    new DateTimeField('dt_concluido'),
                    new StringField('st_nota'),
                    new StringField('tx_obs'),
                    new StringField('nm_arquivo_retorno'),
                    new StringField('natureza_operacao'),
                    new StringField('forma_pagamento'),
                    new DateField('data_emissao'),
                    new DateTimeField('data_entrada_saida'),
                    new StringField('tipo_documento'),
                    new StringField('local_destino'),
                    new StringField('finalidade_emissao'),
                    new StringField('consumidor_final'),
                    new StringField('presenca_comprador'),
                    new StringField('colecao____________________notas_referenciadas'),
                    new StringField('colecao____________________pessoas_autorizadas'),
                    new StringField('cnpj_emitente'),
                    new StringField('nome_emitente'),
                    new StringField('nome_fantasia_emitente'),
                    new StringField('logradouro_emitente'),
                    new StringField('numero_emitente'),
                    new StringField('complemento_emitente'),
                    new StringField('bairro_emitente'),
                    new StringField('prestador_codigo_municipio'),
                    new StringField('municipio_emitente'),
                    new StringField('uf_emitente'),
                    new StringField('cep_emitente'),
                    new StringField('telefone_emitente'),
                    new StringField('inscricao_estadual_emitenete'),
                    new StringField('inscricao_estadual_st_emitente'),
                    new StringField('inscricao_municipal_emitente'),
                    new StringField('cnae_emitente'),
                    new StringField('regime_tributario_emitente'),
                    new StringField('cnpj_destinatario'),
                    new StringField('cpf_destinatario'),
                    new StringField('id_estrangeiro_destinatario'),
                    new StringField('nome_destinatario'),
                    new StringField('logradoura_destinatario'),
                    new StringField('numero_destinatario'),
                    new StringField('complemento_destinatario'),
                    new StringField('bairro_destinatario'),
                    new StringField('codigo_municipio_destinatario'),
                    new StringField('municipio_destinatario'),
                    new StringField('uf_destinatario'),
                    new StringField('cep_destinatario'),
                    new StringField('pais_destinatario'),
                    new StringField('telefone_destinatario'),
                    new StringField('indicador_inscricao_estadual_destinatario'),
                    new StringField('inscricao_estadual_destinatario'),
                    new StringField('inscricao_suframa_destinatario'),
                    new StringField('email_destinatario'),
                    new StringField('inscricao_municipal_destinatario'),
                    new StringField('cnpj_retirada'),
                    new StringField('cpf_retirada'),
                    new StringField('logradoura_retirada'),
                    new StringField('numero_retirada'),
                    new StringField('complemento_retirada'),
                    new StringField('bairro_retirada'),
                    new StringField('codigo_municipio_retirada'),
                    new StringField('municipio_retirada'),
                    new StringField('uf_retirada'),
                    new StringField('cnpj_entrega'),
                    new StringField('cpf_entrega'),
                    new StringField('logradouro_entrega'),
                    new StringField('numero_entrega'),
                    new StringField('complemento_entrega'),
                    new StringField('bairro_entrega'),
                    new StringField('codigo_municipio_entrega'),
                    new StringField('municipio_entrega'),
                    new StringField('uf_entrega'),
                    new StringField('colecao____________________itens'),
                    new StringField('icms_base_calculo'),
                    new StringField('icms_valor_total'),
                    new StringField('icms_valor_total_desonerado'),
                    new StringField('icms_base_calculo_st'),
                    new StringField('icms_valor_total_st'),
                    new StringField('valor_produtos'),
                    new StringField('valor_frete'),
                    new StringField('valor_seguro'),
                    new StringField('valor_desconto'),
                    new StringField('valor_total_ii'),
                    new StringField('valor_ipi'),
                    new StringField('valor_pis'),
                    new StringField('valor_cofins'),
                    new StringField('valor_outras_despesas'),
                    new StringField('valor_total'),
                    new StringField('valor_total_servicos'),
                    new StringField('base_issqn'),
                    new StringField('valor_pis_servico'),
                    new StringField('data_prestacao_servico'),
                    new StringField('valor_total_deducao_base_calculo'),
                    new StringField('valor_total_outras_retencoes'),
                    new StringField('valor_total_desconto_incondicionado'),
                    new StringField('valor_total_valor_condicionado'),
                    new StringField('valor_total_retencao_iss'),
                    new StringField('codigo_regime_especial_tributacao'),
                    new StringField('valor_retido_pis'),
                    new StringField('valor_retido_cofins'),
                    new StringField('valor_retido_csll'),
                    new StringField('base_calculo_irrf'),
                    new StringField('valor_retido_irrf'),
                    new StringField('prev_social_base_calculo'),
                    new StringField('prev_social_valor_retido'),
                    new StringField('modalidade_frete'),
                    new StringField('cnpj_transportador'),
                    new StringField('cpf_transportador'),
                    new StringField('nome_transportador'),
                    new StringField('inscricao_estadual_transportador'),
                    new StringField('endereco_transportador'),
                    new StringField('municipio_transportador'),
                    new StringField('uf_transportador'),
                    new StringField('transporte_icms_servico'),
                    new StringField('transporte_icms_base_servico'),
                    new StringField('transporte_icms_aliquota'),
                    new StringField('transporte_icms_valor'),
                    new StringField('transporte_icms_cfop'),
                    new StringField('transporte_icms_codigo_municipio'),
                    new StringField('veiculo_placa'),
                    new StringField('veiculo_uf'),
                    new StringField('veiculo_rntc'),
                    new StringField('veiculo_identificacao_vagao'),
                    new StringField('veiculo_identificacao_balsa'),
                    new StringField('colecao____________________volumes'),
                    new StringField('numero_fatura'),
                    new StringField('valor_original_fatura'),
                    new StringField('valor_desconto_fatura'),
                    new StringField('valor_liquido_fatura'),
                    new StringField('colecao____________________duplicatas'),
                    new StringField('informacoes_adicionais_contribuinte'),
                    new StringField('uf_local_embarque'),
                    new StringField('local_embarque'),
                    new StringField('local_despacho'),
                    new StringField('colecao____________________formas_pagamento'),
                    new StringField('operacao'),
                    new StringField('tx_cancelamento'),
                    new StringField('tx_correcao'),
                    new IntegerField('id_pedido'),
                    new IntegerField('numero_nf')
                )
            );
            $this->dataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), 'id_licencas=%CURRENT_USER_ID%'));
        }
    
        protected function DoPrepare() {
    
        }
    
        protected function CreatePageNavigator()
        {
            $result = new CompositePageNavigator($this);
            
            $partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
            $partitionNavigator->SetRowsPerPage(20);
            $result->AddPageNavigator($partitionNavigator);
            
            return $result;
        }
    
        protected function CreateRssGenerator()
        {
            return null;
        }
    
        protected function setupCharts()
        {
    
        }
    
        protected function getFiltersColumns()
        {
            return array(
                new FilterColumn($this->dataset, 'id_notas', 'id_notas', 'Id Notas'),
                new FilterColumn($this->dataset, 'id_licencas', 'id_licencas', 'Id Licencas'),
                new FilterColumn($this->dataset, 'chave', 'chave', 'Chave'),
                new FilterColumn($this->dataset, 'sequencia', 'sequencia', ''),
                new FilterColumn($this->dataset, 'tipo_nf', 'tipo_nf', ''),
                new FilterColumn($this->dataset, 'dt_inclusao', 'dt_inclusao', 'Dt Inclusao'),
                new FilterColumn($this->dataset, 'dt_concluido', 'dt_concluido', 'Dt Concluido'),
                new FilterColumn($this->dataset, 'st_nota', 'st_nota', 'Status da Nota'),
                new FilterColumn($this->dataset, 'tx_obs', 'tx_obs', 'Tx Obs'),
                new FilterColumn($this->dataset, 'nm_arquivo_retorno', 'nm_arquivo_retorno', 'Nm Arquivo Retorno'),
                new FilterColumn($this->dataset, 'natureza_operacao', 'natureza_operacao', 'Natureza Operacao'),
                new FilterColumn($this->dataset, 'forma_pagamento', 'forma_pagamento', 'Forma Pagamento'),
                new FilterColumn($this->dataset, 'data_emissao', 'data_emissao', 'Data Emissao'),
                new FilterColumn($this->dataset, 'data_entrada_saida', 'data_entrada_saida', 'Data Entrada Saida'),
                new FilterColumn($this->dataset, 'tipo_documento', 'tipo_documento', 'Tipo Documento'),
                new FilterColumn($this->dataset, 'local_destino', 'local_destino', 'Local Destino'),
                new FilterColumn($this->dataset, 'finalidade_emissao', 'finalidade_emissao', 'Finalidade Emissao'),
                new FilterColumn($this->dataset, 'consumidor_final', 'consumidor_final', 'Consumidor Final'),
                new FilterColumn($this->dataset, 'presenca_comprador', 'presenca_comprador', 'Presenca Comprador'),
                new FilterColumn($this->dataset, 'colecao____________________notas_referenciadas', 'colecao____________________notas_referenciadas', 'Colecao                    Notas Referenciadas'),
                new FilterColumn($this->dataset, 'colecao____________________pessoas_autorizadas', 'colecao____________________pessoas_autorizadas', 'Colecao                    Pessoas Autorizadas'),
                new FilterColumn($this->dataset, 'cnpj_emitente', 'cnpj_emitente', 'Cnpj Emitente'),
                new FilterColumn($this->dataset, 'nome_emitente', 'nome_emitente', 'Nome Emitente'),
                new FilterColumn($this->dataset, 'nome_fantasia_emitente', 'nome_fantasia_emitente', 'Nome Fantasia Emitente'),
                new FilterColumn($this->dataset, 'logradouro_emitente', 'logradouro_emitente', 'Logradouro Emitente'),
                new FilterColumn($this->dataset, 'numero_emitente', 'numero_emitente', 'Numero Emitente'),
                new FilterColumn($this->dataset, 'complemento_emitente', 'complemento_emitente', 'Complemento Emitente'),
                new FilterColumn($this->dataset, 'bairro_emitente', 'bairro_emitente', 'Bairro Emitente'),
                new FilterColumn($this->dataset, 'prestador_codigo_municipio', 'prestador_codigo_municipio', 'Prestador Codigo Municipio'),
                new FilterColumn($this->dataset, 'municipio_emitente', 'municipio_emitente', 'Municipio Emitente'),
                new FilterColumn($this->dataset, 'uf_emitente', 'uf_emitente', 'Uf Emitente'),
                new FilterColumn($this->dataset, 'cep_emitente', 'cep_emitente', 'Cep Emitente'),
                new FilterColumn($this->dataset, 'telefone_emitente', 'telefone_emitente', 'Telefone Emitente'),
                new FilterColumn($this->dataset, 'inscricao_estadual_emitenete', 'inscricao_estadual_emitenete', 'Inscricao Estadual Emitenete'),
                new FilterColumn($this->dataset, 'inscricao_estadual_st_emitente', 'inscricao_estadual_st_emitente', 'Inscricao Estadual St Emitente'),
                new FilterColumn($this->dataset, 'inscricao_municipal_emitente', 'inscricao_municipal_emitente', 'Inscricao Municipal Emitente'),
                new FilterColumn($this->dataset, 'cnae_emitente', 'cnae_emitente', 'Cnae Emitente'),
                new FilterColumn($this->dataset, 'regime_tributario_emitente', 'regime_tributario_emitente', 'Regime Tributario Emitente'),
                new FilterColumn($this->dataset, 'cnpj_destinatario', 'cnpj_destinatario', 'Cnpj Destinatario'),
                new FilterColumn($this->dataset, 'cpf_destinatario', 'cpf_destinatario', 'Cpf Destinatario'),
                new FilterColumn($this->dataset, 'id_estrangeiro_destinatario', 'id_estrangeiro_destinatario', 'Id Estrangeiro Destinatario'),
                new FilterColumn($this->dataset, 'nome_destinatario', 'nome_destinatario', 'Nome Destinatario'),
                new FilterColumn($this->dataset, 'logradoura_destinatario', 'logradoura_destinatario', 'Logradoura Destinatario'),
                new FilterColumn($this->dataset, 'numero_destinatario', 'numero_destinatario', 'Numero Destinatario'),
                new FilterColumn($this->dataset, 'complemento_destinatario', 'complemento_destinatario', 'Complemento Destinatario'),
                new FilterColumn($this->dataset, 'bairro_destinatario', 'bairro_destinatario', 'Bairro Destinatario'),
                new FilterColumn($this->dataset, 'codigo_municipio_destinatario', 'codigo_municipio_destinatario', 'Codigo Municipio Destinatario'),
                new FilterColumn($this->dataset, 'municipio_destinatario', 'municipio_destinatario', 'Municipio Destinatario'),
                new FilterColumn($this->dataset, 'uf_destinatario', 'uf_destinatario', 'Uf Destinatario'),
                new FilterColumn($this->dataset, 'cep_destinatario', 'cep_destinatario', 'Cep Destinatario'),
                new FilterColumn($this->dataset, 'pais_destinatario', 'pais_destinatario', 'Pais Destinatario'),
                new FilterColumn($this->dataset, 'telefone_destinatario', 'telefone_destinatario', 'Telefone Destinatario'),
                new FilterColumn($this->dataset, 'indicador_inscricao_estadual_destinatario', 'indicador_inscricao_estadual_destinatario', 'Indicador Inscricao Estadual Destinatario'),
                new FilterColumn($this->dataset, 'inscricao_estadual_destinatario', 'inscricao_estadual_destinatario', 'Inscricao Estadual Destinatario'),
                new FilterColumn($this->dataset, 'inscricao_suframa_destinatario', 'inscricao_suframa_destinatario', 'Inscricao Suframa Destinatario'),
                new FilterColumn($this->dataset, 'email_destinatario', 'email_destinatario', 'Email Destinatario'),
                new FilterColumn($this->dataset, 'inscricao_municipal_destinatario', 'inscricao_municipal_destinatario', 'Inscricao Municipal Destinatario'),
                new FilterColumn($this->dataset, 'cnpj_retirada', 'cnpj_retirada', 'Cnpj Retirada'),
                new FilterColumn($this->dataset, 'cpf_retirada', 'cpf_retirada', 'Cpf Retirada'),
                new FilterColumn($this->dataset, 'logradoura_retirada', 'logradoura_retirada', 'Logradoura Retirada'),
                new FilterColumn($this->dataset, 'numero_retirada', 'numero_retirada', 'Numero Retirada'),
                new FilterColumn($this->dataset, 'complemento_retirada', 'complemento_retirada', 'Complemento Retirada'),
                new FilterColumn($this->dataset, 'bairro_retirada', 'bairro_retirada', 'Bairro Retirada'),
                new FilterColumn($this->dataset, 'codigo_municipio_retirada', 'codigo_municipio_retirada', 'Codigo Municipio Retirada'),
                new FilterColumn($this->dataset, 'municipio_retirada', 'municipio_retirada', 'Municipio Retirada'),
                new FilterColumn($this->dataset, 'uf_retirada', 'uf_retirada', 'Uf Retirada'),
                new FilterColumn($this->dataset, 'cnpj_entrega', 'cnpj_entrega', 'Cnpj Entrega'),
                new FilterColumn($this->dataset, 'cpf_entrega', 'cpf_entrega', 'Cpf Entrega'),
                new FilterColumn($this->dataset, 'logradouro_entrega', 'logradouro_entrega', 'Logradouro Entrega'),
                new FilterColumn($this->dataset, 'numero_entrega', 'numero_entrega', 'Numero Entrega'),
                new FilterColumn($this->dataset, 'complemento_entrega', 'complemento_entrega', 'Complemento Entrega'),
                new FilterColumn($this->dataset, 'bairro_entrega', 'bairro_entrega', 'Bairro Entrega'),
                new FilterColumn($this->dataset, 'codigo_municipio_entrega', 'codigo_municipio_entrega', 'Codigo Municipio Entrega'),
                new FilterColumn($this->dataset, 'municipio_entrega', 'municipio_entrega', 'Municipio Entrega'),
                new FilterColumn($this->dataset, 'uf_entrega', 'uf_entrega', 'Uf Entrega'),
                new FilterColumn($this->dataset, 'colecao____________________itens', 'colecao____________________itens', 'Colecao                    Itens'),
                new FilterColumn($this->dataset, 'icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo'),
                new FilterColumn($this->dataset, 'icms_valor_total', 'icms_valor_total', 'Icms Valor Total'),
                new FilterColumn($this->dataset, 'icms_valor_total_desonerado', 'icms_valor_total_desonerado', 'Icms Valor Total Desonerado'),
                new FilterColumn($this->dataset, 'icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St'),
                new FilterColumn($this->dataset, 'icms_valor_total_st', 'icms_valor_total_st', 'Icms Valor Total St'),
                new FilterColumn($this->dataset, 'valor_produtos', 'valor_produtos', 'Valor Produtos'),
                new FilterColumn($this->dataset, 'valor_frete', 'valor_frete', 'Valor Frete'),
                new FilterColumn($this->dataset, 'valor_seguro', 'valor_seguro', 'Valor Seguro'),
                new FilterColumn($this->dataset, 'valor_desconto', 'valor_desconto', 'Valor Desconto'),
                new FilterColumn($this->dataset, 'valor_total_ii', 'valor_total_ii', 'Valor Total Ii'),
                new FilterColumn($this->dataset, 'valor_ipi', 'valor_ipi', 'Valor Ipi'),
                new FilterColumn($this->dataset, 'valor_pis', 'valor_pis', 'Valor Pis'),
                new FilterColumn($this->dataset, 'valor_cofins', 'valor_cofins', 'Valor Cofins'),
                new FilterColumn($this->dataset, 'valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas'),
                new FilterColumn($this->dataset, 'valor_total', 'valor_total', 'Valor Total'),
                new FilterColumn($this->dataset, 'valor_total_servicos', 'valor_total_servicos', 'Valor Total Servicos'),
                new FilterColumn($this->dataset, 'base_issqn', 'base_issqn', 'Base Issqn'),
                new FilterColumn($this->dataset, 'valor_pis_servico', 'valor_pis_servico', 'Valor Pis Servico'),
                new FilterColumn($this->dataset, 'data_prestacao_servico', 'data_prestacao_servico', 'Data Prestacao Servico'),
                new FilterColumn($this->dataset, 'valor_total_deducao_base_calculo', 'valor_total_deducao_base_calculo', 'Valor Total Deducao Base Calculo'),
                new FilterColumn($this->dataset, 'valor_total_outras_retencoes', 'valor_total_outras_retencoes', 'Valor Total Outras Retencoes'),
                new FilterColumn($this->dataset, 'valor_total_desconto_incondicionado', 'valor_total_desconto_incondicionado', 'Valor Total Desconto Incondicionado'),
                new FilterColumn($this->dataset, 'valor_total_valor_condicionado', 'valor_total_valor_condicionado', 'Valor Total Valor Condicionado'),
                new FilterColumn($this->dataset, 'valor_total_retencao_iss', 'valor_total_retencao_iss', 'Valor Total Retencao Iss'),
                new FilterColumn($this->dataset, 'codigo_regime_especial_tributacao', 'codigo_regime_especial_tributacao', 'Codigo Regime Especial Tributacao'),
                new FilterColumn($this->dataset, 'valor_retido_pis', 'valor_retido_pis', 'Valor Retido Pis'),
                new FilterColumn($this->dataset, 'valor_retido_cofins', 'valor_retido_cofins', 'Valor Retido Cofins'),
                new FilterColumn($this->dataset, 'valor_retido_csll', 'valor_retido_csll', 'Valor Retido Csll'),
                new FilterColumn($this->dataset, 'base_calculo_irrf', 'base_calculo_irrf', 'Base Calculo Irrf'),
                new FilterColumn($this->dataset, 'valor_retido_irrf', 'valor_retido_irrf', 'Valor Retido Irrf'),
                new FilterColumn($this->dataset, 'prev_social_base_calculo', 'prev_social_base_calculo', 'Prev Social Base Calculo'),
                new FilterColumn($this->dataset, 'prev_social_valor_retido', 'prev_social_valor_retido', 'Prev Social Valor Retido'),
                new FilterColumn($this->dataset, 'modalidade_frete', 'modalidade_frete', 'Modalidade Frete'),
                new FilterColumn($this->dataset, 'cnpj_transportador', 'cnpj_transportador', 'Cnpj Transportador'),
                new FilterColumn($this->dataset, 'cpf_transportador', 'cpf_transportador', 'Cpf Transportador'),
                new FilterColumn($this->dataset, 'nome_transportador', 'nome_transportador', 'Nome Transportador'),
                new FilterColumn($this->dataset, 'inscricao_estadual_transportador', 'inscricao_estadual_transportador', 'Inscricao Estadual Transportador'),
                new FilterColumn($this->dataset, 'endereco_transportador', 'endereco_transportador', 'Endereco Transportador'),
                new FilterColumn($this->dataset, 'municipio_transportador', 'municipio_transportador', 'Municipio Transportador'),
                new FilterColumn($this->dataset, 'uf_transportador', 'uf_transportador', 'Uf Transportador'),
                new FilterColumn($this->dataset, 'transporte_icms_servico', 'transporte_icms_servico', 'Transporte Icms Servico'),
                new FilterColumn($this->dataset, 'transporte_icms_base_servico', 'transporte_icms_base_servico', 'Transporte Icms Base Servico'),
                new FilterColumn($this->dataset, 'transporte_icms_aliquota', 'transporte_icms_aliquota', 'Transporte Icms Aliquota'),
                new FilterColumn($this->dataset, 'transporte_icms_valor', 'transporte_icms_valor', 'Transporte Icms Valor'),
                new FilterColumn($this->dataset, 'transporte_icms_cfop', 'transporte_icms_cfop', 'Transporte Icms Cfop'),
                new FilterColumn($this->dataset, 'transporte_icms_codigo_municipio', 'transporte_icms_codigo_municipio', 'Transporte Icms Codigo Municipio'),
                new FilterColumn($this->dataset, 'veiculo_placa', 'veiculo_placa', 'Veiculo Placa'),
                new FilterColumn($this->dataset, 'veiculo_uf', 'veiculo_uf', 'Veiculo Uf'),
                new FilterColumn($this->dataset, 'veiculo_rntc', 'veiculo_rntc', 'Veiculo Rntc'),
                new FilterColumn($this->dataset, 'veiculo_identificacao_vagao', 'veiculo_identificacao_vagao', 'Veiculo Identificacao Vagao'),
                new FilterColumn($this->dataset, 'veiculo_identificacao_balsa', 'veiculo_identificacao_balsa', 'Veiculo Identificacao Balsa'),
                new FilterColumn($this->dataset, 'colecao____________________volumes', 'colecao____________________volumes', 'Colecao                    Volumes'),
                new FilterColumn($this->dataset, 'numero_fatura', 'numero_fatura', 'Numero Fatura'),
                new FilterColumn($this->dataset, 'valor_original_fatura', 'valor_original_fatura', 'Valor Original Fatura'),
                new FilterColumn($this->dataset, 'valor_desconto_fatura', 'valor_desconto_fatura', 'Valor Desconto Fatura'),
                new FilterColumn($this->dataset, 'valor_liquido_fatura', 'valor_liquido_fatura', 'Valor Liquido Fatura'),
                new FilterColumn($this->dataset, 'colecao____________________duplicatas', 'colecao____________________duplicatas', 'Colecao                    Duplicatas'),
                new FilterColumn($this->dataset, 'informacoes_adicionais_contribuinte', 'informacoes_adicionais_contribuinte', 'Informacoes Adicionais Contribuinte'),
                new FilterColumn($this->dataset, 'uf_local_embarque', 'uf_local_embarque', 'Uf Local Embarque'),
                new FilterColumn($this->dataset, 'local_embarque', 'local_embarque', 'Local Embarque'),
                new FilterColumn($this->dataset, 'local_despacho', 'local_despacho', 'Local Despacho'),
                new FilterColumn($this->dataset, 'colecao____________________formas_pagamento', 'colecao____________________formas_pagamento', 'Colecao                    Formas Pagamento'),
                new FilterColumn($this->dataset, 'operacao', 'operacao', 'Operacao'),
                new FilterColumn($this->dataset, 'tx_cancelamento', 'tx_cancelamento', 'Tx Cancelamento'),
                new FilterColumn($this->dataset, 'tx_correcao', 'tx_correcao', 'Tx Correcao'),
                new FilterColumn($this->dataset, 'id_pedido', 'id_pedido', 'Id Pedido'),
                new FilterColumn($this->dataset, 'numero_nf', 'numero_nf', 'Numero Nf')
            );
        }
    
        protected function setupQuickFilter(QuickFilter $quickFilter, FixedKeysArray $columns)
        {
            $quickFilter
                ->addColumn($columns['id_notas'])
                ->addColumn($columns['chave'])
                ->addColumn($columns['dt_inclusao'])
                ->addColumn($columns['data_emissao'])
                ->addColumn($columns['cnpj_destinatario'])
                ->addColumn($columns['cpf_destinatario'])
                ->addColumn($columns['nome_destinatario'])
                ->addColumn($columns['municipio_destinatario'])
                ->addColumn($columns['uf_destinatario'])
                ->addColumn($columns['cep_destinatario'])
                ->addColumn($columns['id_pedido'])
                ->addColumn($columns['numero_nf']);
        }
    
        protected function setupColumnFilter(ColumnFilter $columnFilter)
        {
    
        }
    
        protected function setupFilterBuilder(FilterBuilder $filterBuilder, FixedKeysArray $columns)
        {
            $main_editor = new SpinEdit('id_notas_edit');
            
            $filterBuilder->addColumn(
                $columns['id_notas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new SpinEdit('id_licencas_edit');
            
            $filterBuilder->addColumn(
                $columns['id_licencas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('chave_edit');
            
            $filterBuilder->addColumn(
                $columns['chave'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new SpinEdit('sequencia_edit');
            
            $filterBuilder->addColumn(
                $columns['sequencia'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('tipo_nf_edit');
            
            $filterBuilder->addColumn(
                $columns['tipo_nf'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new DateTimeEdit('dt_inclusao_edit', false, 'Y-m-d H:i:s');
            
            $filterBuilder->addColumn(
                $columns['dt_inclusao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::DATE_EQUALS => $main_editor,
                    FilterConditionOperator::DATE_DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::TODAY => null,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new DateTimeEdit('dt_concluido_edit', false, 'Y-m-d H:i:s');
            
            $filterBuilder->addColumn(
                $columns['dt_concluido'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::DATE_EQUALS => $main_editor,
                    FilterConditionOperator::DATE_DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::TODAY => null,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('st_nota_edit');
            
            $filterBuilder->addColumn(
                $columns['st_nota'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('tx_obs_edit');
            
            $filterBuilder->addColumn(
                $columns['tx_obs'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('nm_arquivo_retorno_edit');
            
            $filterBuilder->addColumn(
                $columns['nm_arquivo_retorno'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('natureza_operacao_edit');
            
            $filterBuilder->addColumn(
                $columns['natureza_operacao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('forma_pagamento_edit');
            
            $filterBuilder->addColumn(
                $columns['forma_pagamento'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new DateTimeEdit('data_emissao_edit', false, 'Y-m-d H:i:s');
            
            $filterBuilder->addColumn(
                $columns['data_emissao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::DATE_EQUALS => $main_editor,
                    FilterConditionOperator::DATE_DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::TODAY => null,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new DateTimeEdit('data_entrada_saida_edit', false, 'Y-m-d H:i:s');
            
            $filterBuilder->addColumn(
                $columns['data_entrada_saida'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::DATE_EQUALS => $main_editor,
                    FilterConditionOperator::DATE_DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::TODAY => null,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('tipo_documento_edit');
            
            $filterBuilder->addColumn(
                $columns['tipo_documento'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('local_destino_edit');
            
            $filterBuilder->addColumn(
                $columns['local_destino'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('finalidade_emissao_edit');
            
            $filterBuilder->addColumn(
                $columns['finalidade_emissao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('consumidor_final_edit');
            
            $filterBuilder->addColumn(
                $columns['consumidor_final'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('presenca_comprador_edit');
            
            $filterBuilder->addColumn(
                $columns['presenca_comprador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________notas_referenciadas_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________notas_referenciadas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________pessoas_autorizadas_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________pessoas_autorizadas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnpj_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['cnpj_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('nome_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['nome_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('nome_fantasia_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['nome_fantasia_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('logradouro_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['logradouro_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('numero_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('complemento_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['complemento_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('bairro_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['bairro_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('prestador_codigo_municipio_edit');
            
            $filterBuilder->addColumn(
                $columns['prestador_codigo_municipio'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('municipio_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['municipio_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cep_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['cep_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('telefone_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['telefone_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_estadual_emitenete_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_estadual_emitenete'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_estadual_st_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_estadual_st_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_municipal_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_municipal_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnae_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['cnae_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('regime_tributario_emitente_edit');
            
            $filterBuilder->addColumn(
                $columns['regime_tributario_emitente'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnpj_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['cnpj_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cpf_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['cpf_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('id_estrangeiro_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['id_estrangeiro_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('nome_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['nome_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('logradoura_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['logradoura_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('numero_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('complemento_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['complemento_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('bairro_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['bairro_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('codigo_municipio_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['codigo_municipio_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('municipio_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['municipio_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cep_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['cep_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('pais_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['pais_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('telefone_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['telefone_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('indicador_inscricao_estadual_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['indicador_inscricao_estadual_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_estadual_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_estadual_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_suframa_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_suframa_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('email_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['email_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_municipal_destinatario_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_municipal_destinatario'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnpj_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['cnpj_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cpf_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['cpf_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('logradoura_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['logradoura_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('numero_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('complemento_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['complemento_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('bairro_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['bairro_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('codigo_municipio_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['codigo_municipio_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('municipio_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['municipio_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_retirada_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_retirada'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnpj_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['cnpj_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cpf_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['cpf_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('logradouro_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['logradouro_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('numero_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('complemento_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['complemento_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('bairro_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['bairro_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('codigo_municipio_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['codigo_municipio_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('municipio_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['municipio_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_entrega_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_entrega'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________itens_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________itens'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('icms_base_calculo_edit');
            
            $filterBuilder->addColumn(
                $columns['icms_base_calculo'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('icms_valor_total_edit');
            
            $filterBuilder->addColumn(
                $columns['icms_valor_total'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('icms_valor_total_desonerado_edit');
            
            $filterBuilder->addColumn(
                $columns['icms_valor_total_desonerado'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('icms_base_calculo_st_edit');
            
            $filterBuilder->addColumn(
                $columns['icms_base_calculo_st'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('icms_valor_total_st_edit');
            
            $filterBuilder->addColumn(
                $columns['icms_valor_total_st'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_produtos_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_produtos'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_frete_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_frete'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_seguro_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_seguro'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_desconto_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_desconto'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_ii_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_ii'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_ipi_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_ipi'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_pis_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_pis'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_cofins_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_cofins'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_outras_despesas_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_outras_despesas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_servicos_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_servicos'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('base_issqn_edit');
            
            $filterBuilder->addColumn(
                $columns['base_issqn'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_pis_servico_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_pis_servico'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('data_prestacao_servico_edit');
            
            $filterBuilder->addColumn(
                $columns['data_prestacao_servico'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_deducao_base_calculo_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_deducao_base_calculo'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_outras_retencoes_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_outras_retencoes'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_desconto_incondicionado_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_desconto_incondicionado'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_valor_condicionado_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_valor_condicionado'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_total_retencao_iss_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_total_retencao_iss'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('codigo_regime_especial_tributacao_edit');
            
            $filterBuilder->addColumn(
                $columns['codigo_regime_especial_tributacao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_retido_pis_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_retido_pis'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_retido_cofins_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_retido_cofins'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_retido_csll_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_retido_csll'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('base_calculo_irrf_edit');
            
            $filterBuilder->addColumn(
                $columns['base_calculo_irrf'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_retido_irrf_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_retido_irrf'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('prev_social_base_calculo_edit');
            
            $filterBuilder->addColumn(
                $columns['prev_social_base_calculo'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('prev_social_valor_retido_edit');
            
            $filterBuilder->addColumn(
                $columns['prev_social_valor_retido'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('modalidade_frete_edit');
            
            $filterBuilder->addColumn(
                $columns['modalidade_frete'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cnpj_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['cnpj_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('cpf_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['cpf_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('nome_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['nome_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('inscricao_estadual_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['inscricao_estadual_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('endereco_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['endereco_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('municipio_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['municipio_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_transportador_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_transportador'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_servico_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_servico'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_base_servico_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_base_servico'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_aliquota_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_aliquota'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_valor_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_valor'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_cfop_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_cfop'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('transporte_icms_codigo_municipio_edit');
            
            $filterBuilder->addColumn(
                $columns['transporte_icms_codigo_municipio'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('veiculo_placa_edit');
            
            $filterBuilder->addColumn(
                $columns['veiculo_placa'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('veiculo_uf_edit');
            
            $filterBuilder->addColumn(
                $columns['veiculo_uf'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('veiculo_rntc_edit');
            
            $filterBuilder->addColumn(
                $columns['veiculo_rntc'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('veiculo_identificacao_vagao_edit');
            
            $filterBuilder->addColumn(
                $columns['veiculo_identificacao_vagao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('veiculo_identificacao_balsa_edit');
            
            $filterBuilder->addColumn(
                $columns['veiculo_identificacao_balsa'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________volumes_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________volumes'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('numero_fatura_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_fatura'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_original_fatura_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_original_fatura'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_desconto_fatura_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_desconto_fatura'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('valor_liquido_fatura_edit');
            
            $filterBuilder->addColumn(
                $columns['valor_liquido_fatura'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________duplicatas_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________duplicatas'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('informacoes_adicionais_contribuinte_edit');
            
            $filterBuilder->addColumn(
                $columns['informacoes_adicionais_contribuinte'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('uf_local_embarque_edit');
            
            $filterBuilder->addColumn(
                $columns['uf_local_embarque'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('local_embarque_edit');
            
            $filterBuilder->addColumn(
                $columns['local_embarque'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('local_despacho_edit');
            
            $filterBuilder->addColumn(
                $columns['local_despacho'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('colecao____________________formas_pagamento_edit');
            
            $filterBuilder->addColumn(
                $columns['colecao____________________formas_pagamento'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('operacao_edit');
            
            $filterBuilder->addColumn(
                $columns['operacao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('tx_cancelamento_edit');
            
            $filterBuilder->addColumn(
                $columns['tx_cancelamento'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new TextEdit('tx_correcao_edit');
            
            $filterBuilder->addColumn(
                $columns['tx_correcao'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::CONTAINS => $main_editor,
                    FilterConditionOperator::DOES_NOT_CONTAIN => $main_editor,
                    FilterConditionOperator::BEGINS_WITH => $main_editor,
                    FilterConditionOperator::ENDS_WITH => $main_editor,
                    FilterConditionOperator::IS_LIKE => $main_editor,
                    FilterConditionOperator::IS_NOT_LIKE => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new SpinEdit('id_pedido_edit');
            
            $filterBuilder->addColumn(
                $columns['id_pedido'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
            
            $main_editor = new SpinEdit('numero_nf_edit');
            
            $filterBuilder->addColumn(
                $columns['numero_nf'],
                array(
                    FilterConditionOperator::EQUALS => $main_editor,
                    FilterConditionOperator::DOES_NOT_EQUAL => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN => $main_editor,
                    FilterConditionOperator::IS_GREATER_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN => $main_editor,
                    FilterConditionOperator::IS_LESS_THAN_OR_EQUAL_TO => $main_editor,
                    FilterConditionOperator::IS_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_NOT_BETWEEN => $main_editor,
                    FilterConditionOperator::IS_BLANK => null,
                    FilterConditionOperator::IS_NOT_BLANK => null
                )
            );
        }
    
        protected function AddOperationsColumns(Grid $grid)
        {
            $actions = $grid->getActions();
            $actions->setCaption($this->GetLocalizerCaptions()->GetMessageString('Actions'));
            $actions->setPosition(ActionList::POSITION_LEFT);
            
            if ($this->GetSecurityInfo()->HasViewGrant())
            {
                $operation = new AjaxOperation(OPERATION_VIEW,
                    $this->GetLocalizerCaptions()->GetMessageString('View'),
                    $this->GetLocalizerCaptions()->GetMessageString('View'), $this->dataset,
                    $this->GetModalGridViewHandler(), $grid);
                $operation->setUseImage(true);
                $actions->addOperation($operation);
            }
        }
    
        protected function AddFieldColumns(Grid $grid, $withDetails = true)
        {
            if (GetCurrentUserPermissionSetForDataSource('Notas Finalizadas.itens')->HasViewGrant() && $withDetails)
            {
            //
            // View column for Notas_Finalizadas_itens detail
            //
            $column = new DetailColumn(array('chave'), 'Notas Finalizadas.itens', 'Notas_Finalizadas_itens_handler', $this->dataset, 'Itens');
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $grid->AddViewColumn($column);
            }
            
            //
            // View column for id_notas field
            //
            $column = new TextViewColumn('id_notas', 'id_notas', 'Id Notas', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for dt_inclusao field
            //
            $column = new DateTimeViewColumn('dt_inclusao', 'dt_inclusao', 'Dt Inclusao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for tx_obs field
            //
            $column = new TextViewColumn('tx_obs', 'tx_obs', 'Tx Obs', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for nome_destinatario field
            //
            $column = new TextViewColumn('nome_destinatario', 'nome_destinatario', 'Nome Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for valor_total field
            //
            $column = new TextViewColumn('valor_total', 'valor_total', 'Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for sequencia field
            //
            $column = new TextViewColumn('sequencia', 'sequencia', '', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for tipo_nf field
            //
            $column = new TextViewColumn('tipo_nf', 'tipo_nf', '', $this->dataset);
            $column->SetOrderable(true);
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for id_pedido field
            //
            $column = new NumberViewColumn('id_pedido', 'id_pedido', 'Id Pedido', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
            
            //
            // View column for numero_nf field
            //
            $column = new NumberViewColumn('numero_nf', 'numero_nf', 'Numero Nf', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $column->setMinimalVisibility(ColumnVisibility::PHONE);
            $column->SetDescription('');
            $column->SetFixedWidth(null);
            $grid->AddViewColumn($column);
        }
    
        protected function AddSingleRecordViewColumns(Grid $grid)
        {
            //
            // View column for id_notas field
            //
            $column = new TextViewColumn('id_notas', 'id_notas', 'Id Notas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for id_licencas field
            //
            $column = new TextViewColumn('id_licencas', 'id_licencas', 'Id Licencas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for sequencia field
            //
            $column = new TextViewColumn('sequencia', 'sequencia', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for tipo_nf field
            //
            $column = new TextViewColumn('tipo_nf', 'tipo_nf', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for dt_inclusao field
            //
            $column = new DateTimeViewColumn('dt_inclusao', 'dt_inclusao', 'Dt Inclusao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for dt_concluido field
            //
            $column = new DateTimeViewColumn('dt_concluido', 'dt_concluido', 'Dt Concluido', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for st_nota field
            //
            $column = new TextViewColumn('st_nota', 'st_nota', 'Status da Nota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for tx_obs field
            //
            $column = new TextViewColumn('tx_obs', 'tx_obs', 'Tx Obs', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nm_arquivo_retorno field
            //
            $column = new TextViewColumn('nm_arquivo_retorno', 'nm_arquivo_retorno', 'Nm Arquivo Retorno', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for natureza_operacao field
            //
            $column = new TextViewColumn('natureza_operacao', 'natureza_operacao', 'Natureza Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for forma_pagamento field
            //
            $column = new TextViewColumn('forma_pagamento', 'forma_pagamento', 'Forma Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for data_emissao field
            //
            $column = new DateTimeViewColumn('data_emissao', 'data_emissao', 'Data Emissao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('Y-m-d');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for data_entrada_saida field
            //
            $column = new DateTimeViewColumn('data_entrada_saida', 'data_entrada_saida', 'Data Entrada Saida', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for tipo_documento field
            //
            $column = new TextViewColumn('tipo_documento', 'tipo_documento', 'Tipo Documento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for local_destino field
            //
            $column = new TextViewColumn('local_destino', 'local_destino', 'Local Destino', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for finalidade_emissao field
            //
            $column = new TextViewColumn('finalidade_emissao', 'finalidade_emissao', 'Finalidade Emissao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for consumidor_final field
            //
            $column = new TextViewColumn('consumidor_final', 'consumidor_final', 'Consumidor Final', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for presenca_comprador field
            //
            $column = new TextViewColumn('presenca_comprador', 'presenca_comprador', 'Presenca Comprador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________notas_referenciadas field
            //
            $column = new TextViewColumn('colecao____________________notas_referenciadas', 'colecao____________________notas_referenciadas', 'Colecao                    Notas Referenciadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________pessoas_autorizadas field
            //
            $column = new TextViewColumn('colecao____________________pessoas_autorizadas', 'colecao____________________pessoas_autorizadas', 'Colecao                    Pessoas Autorizadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnpj_emitente field
            //
            $column = new TextViewColumn('cnpj_emitente', 'cnpj_emitente', 'Cnpj Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nome_emitente field
            //
            $column = new TextViewColumn('nome_emitente', 'nome_emitente', 'Nome Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nome_fantasia_emitente field
            //
            $column = new TextViewColumn('nome_fantasia_emitente', 'nome_fantasia_emitente', 'Nome Fantasia Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for logradouro_emitente field
            //
            $column = new TextViewColumn('logradouro_emitente', 'logradouro_emitente', 'Logradouro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_emitente field
            //
            $column = new TextViewColumn('numero_emitente', 'numero_emitente', 'Numero Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for complemento_emitente field
            //
            $column = new TextViewColumn('complemento_emitente', 'complemento_emitente', 'Complemento Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for bairro_emitente field
            //
            $column = new TextViewColumn('bairro_emitente', 'bairro_emitente', 'Bairro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for prestador_codigo_municipio field
            //
            $column = new TextViewColumn('prestador_codigo_municipio', 'prestador_codigo_municipio', 'Prestador Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for municipio_emitente field
            //
            $column = new TextViewColumn('municipio_emitente', 'municipio_emitente', 'Municipio Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_emitente field
            //
            $column = new TextViewColumn('uf_emitente', 'uf_emitente', 'Uf Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cep_emitente field
            //
            $column = new TextViewColumn('cep_emitente', 'cep_emitente', 'Cep Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for telefone_emitente field
            //
            $column = new TextViewColumn('telefone_emitente', 'telefone_emitente', 'Telefone Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_estadual_emitenete field
            //
            $column = new TextViewColumn('inscricao_estadual_emitenete', 'inscricao_estadual_emitenete', 'Inscricao Estadual Emitenete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_estadual_st_emitente field
            //
            $column = new TextViewColumn('inscricao_estadual_st_emitente', 'inscricao_estadual_st_emitente', 'Inscricao Estadual St Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_municipal_emitente field
            //
            $column = new TextViewColumn('inscricao_municipal_emitente', 'inscricao_municipal_emitente', 'Inscricao Municipal Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnae_emitente field
            //
            $column = new TextViewColumn('cnae_emitente', 'cnae_emitente', 'Cnae Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for regime_tributario_emitente field
            //
            $column = new TextViewColumn('regime_tributario_emitente', 'regime_tributario_emitente', 'Regime Tributario Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnpj_destinatario field
            //
            $column = new TextViewColumn('cnpj_destinatario', 'cnpj_destinatario', 'Cnpj Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cpf_destinatario field
            //
            $column = new TextViewColumn('cpf_destinatario', 'cpf_destinatario', 'Cpf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for id_estrangeiro_destinatario field
            //
            $column = new TextViewColumn('id_estrangeiro_destinatario', 'id_estrangeiro_destinatario', 'Id Estrangeiro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nome_destinatario field
            //
            $column = new TextViewColumn('nome_destinatario', 'nome_destinatario', 'Nome Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for logradoura_destinatario field
            //
            $column = new TextViewColumn('logradoura_destinatario', 'logradoura_destinatario', 'Logradoura Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_destinatario field
            //
            $column = new TextViewColumn('numero_destinatario', 'numero_destinatario', 'Numero Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for complemento_destinatario field
            //
            $column = new TextViewColumn('complemento_destinatario', 'complemento_destinatario', 'Complemento Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for bairro_destinatario field
            //
            $column = new TextViewColumn('bairro_destinatario', 'bairro_destinatario', 'Bairro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_municipio_destinatario field
            //
            $column = new TextViewColumn('codigo_municipio_destinatario', 'codigo_municipio_destinatario', 'Codigo Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for municipio_destinatario field
            //
            $column = new TextViewColumn('municipio_destinatario', 'municipio_destinatario', 'Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_destinatario field
            //
            $column = new TextViewColumn('uf_destinatario', 'uf_destinatario', 'Uf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cep_destinatario field
            //
            $column = new TextViewColumn('cep_destinatario', 'cep_destinatario', 'Cep Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for pais_destinatario field
            //
            $column = new TextViewColumn('pais_destinatario', 'pais_destinatario', 'Pais Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for telefone_destinatario field
            //
            $column = new TextViewColumn('telefone_destinatario', 'telefone_destinatario', 'Telefone Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for indicador_inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('indicador_inscricao_estadual_destinatario', 'indicador_inscricao_estadual_destinatario', 'Indicador Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('inscricao_estadual_destinatario', 'inscricao_estadual_destinatario', 'Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_suframa_destinatario field
            //
            $column = new TextViewColumn('inscricao_suframa_destinatario', 'inscricao_suframa_destinatario', 'Inscricao Suframa Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for email_destinatario field
            //
            $column = new TextViewColumn('email_destinatario', 'email_destinatario', 'Email Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_municipal_destinatario field
            //
            $column = new TextViewColumn('inscricao_municipal_destinatario', 'inscricao_municipal_destinatario', 'Inscricao Municipal Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnpj_retirada field
            //
            $column = new TextViewColumn('cnpj_retirada', 'cnpj_retirada', 'Cnpj Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cpf_retirada field
            //
            $column = new TextViewColumn('cpf_retirada', 'cpf_retirada', 'Cpf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for logradoura_retirada field
            //
            $column = new TextViewColumn('logradoura_retirada', 'logradoura_retirada', 'Logradoura Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_retirada field
            //
            $column = new TextViewColumn('numero_retirada', 'numero_retirada', 'Numero Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for complemento_retirada field
            //
            $column = new TextViewColumn('complemento_retirada', 'complemento_retirada', 'Complemento Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for bairro_retirada field
            //
            $column = new TextViewColumn('bairro_retirada', 'bairro_retirada', 'Bairro Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_municipio_retirada field
            //
            $column = new TextViewColumn('codigo_municipio_retirada', 'codigo_municipio_retirada', 'Codigo Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for municipio_retirada field
            //
            $column = new TextViewColumn('municipio_retirada', 'municipio_retirada', 'Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_retirada field
            //
            $column = new TextViewColumn('uf_retirada', 'uf_retirada', 'Uf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnpj_entrega field
            //
            $column = new TextViewColumn('cnpj_entrega', 'cnpj_entrega', 'Cnpj Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cpf_entrega field
            //
            $column = new TextViewColumn('cpf_entrega', 'cpf_entrega', 'Cpf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for logradouro_entrega field
            //
            $column = new TextViewColumn('logradouro_entrega', 'logradouro_entrega', 'Logradouro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_entrega field
            //
            $column = new TextViewColumn('numero_entrega', 'numero_entrega', 'Numero Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for complemento_entrega field
            //
            $column = new TextViewColumn('complemento_entrega', 'complemento_entrega', 'Complemento Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for bairro_entrega field
            //
            $column = new TextViewColumn('bairro_entrega', 'bairro_entrega', 'Bairro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_municipio_entrega field
            //
            $column = new TextViewColumn('codigo_municipio_entrega', 'codigo_municipio_entrega', 'Codigo Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for municipio_entrega field
            //
            $column = new TextViewColumn('municipio_entrega', 'municipio_entrega', 'Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_entrega field
            //
            $column = new TextViewColumn('uf_entrega', 'uf_entrega', 'Uf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________itens field
            //
            $column = new TextViewColumn('colecao____________________itens', 'colecao____________________itens', 'Colecao                    Itens', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_total field
            //
            $column = new TextViewColumn('icms_valor_total', 'icms_valor_total', 'Icms Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_total_desonerado field
            //
            $column = new TextViewColumn('icms_valor_total_desonerado', 'icms_valor_total_desonerado', 'Icms Valor Total Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for icms_valor_total_st field
            //
            $column = new TextViewColumn('icms_valor_total_st', 'icms_valor_total_st', 'Icms Valor Total St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_produtos field
            //
            $column = new TextViewColumn('valor_produtos', 'valor_produtos', 'Valor Produtos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_seguro field
            //
            $column = new TextViewColumn('valor_seguro', 'valor_seguro', 'Valor Seguro', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_desconto field
            //
            $column = new TextViewColumn('valor_desconto', 'valor_desconto', 'Valor Desconto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_ii field
            //
            $column = new TextViewColumn('valor_total_ii', 'valor_total_ii', 'Valor Total Ii', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_ipi field
            //
            $column = new TextViewColumn('valor_ipi', 'valor_ipi', 'Valor Ipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_pis field
            //
            $column = new TextViewColumn('valor_pis', 'valor_pis', 'Valor Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_cofins field
            //
            $column = new TextViewColumn('valor_cofins', 'valor_cofins', 'Valor Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total field
            //
            $column = new TextViewColumn('valor_total', 'valor_total', 'Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_servicos field
            //
            $column = new TextViewColumn('valor_total_servicos', 'valor_total_servicos', 'Valor Total Servicos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for base_issqn field
            //
            $column = new TextViewColumn('base_issqn', 'base_issqn', 'Base Issqn', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_pis_servico field
            //
            $column = new TextViewColumn('valor_pis_servico', 'valor_pis_servico', 'Valor Pis Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for data_prestacao_servico field
            //
            $column = new TextViewColumn('data_prestacao_servico', 'data_prestacao_servico', 'Data Prestacao Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_deducao_base_calculo field
            //
            $column = new TextViewColumn('valor_total_deducao_base_calculo', 'valor_total_deducao_base_calculo', 'Valor Total Deducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_outras_retencoes field
            //
            $column = new TextViewColumn('valor_total_outras_retencoes', 'valor_total_outras_retencoes', 'Valor Total Outras Retencoes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_desconto_incondicionado field
            //
            $column = new TextViewColumn('valor_total_desconto_incondicionado', 'valor_total_desconto_incondicionado', 'Valor Total Desconto Incondicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_valor_condicionado field
            //
            $column = new TextViewColumn('valor_total_valor_condicionado', 'valor_total_valor_condicionado', 'Valor Total Valor Condicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_total_retencao_iss field
            //
            $column = new TextViewColumn('valor_total_retencao_iss', 'valor_total_retencao_iss', 'Valor Total Retencao Iss', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for codigo_regime_especial_tributacao field
            //
            $column = new TextViewColumn('codigo_regime_especial_tributacao', 'codigo_regime_especial_tributacao', 'Codigo Regime Especial Tributacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_retido_pis field
            //
            $column = new TextViewColumn('valor_retido_pis', 'valor_retido_pis', 'Valor Retido Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_retido_cofins field
            //
            $column = new TextViewColumn('valor_retido_cofins', 'valor_retido_cofins', 'Valor Retido Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_retido_csll field
            //
            $column = new TextViewColumn('valor_retido_csll', 'valor_retido_csll', 'Valor Retido Csll', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for base_calculo_irrf field
            //
            $column = new TextViewColumn('base_calculo_irrf', 'base_calculo_irrf', 'Base Calculo Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_retido_irrf field
            //
            $column = new TextViewColumn('valor_retido_irrf', 'valor_retido_irrf', 'Valor Retido Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for prev_social_base_calculo field
            //
            $column = new TextViewColumn('prev_social_base_calculo', 'prev_social_base_calculo', 'Prev Social Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for prev_social_valor_retido field
            //
            $column = new TextViewColumn('prev_social_valor_retido', 'prev_social_valor_retido', 'Prev Social Valor Retido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for modalidade_frete field
            //
            $column = new TextViewColumn('modalidade_frete', 'modalidade_frete', 'Modalidade Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cnpj_transportador field
            //
            $column = new TextViewColumn('cnpj_transportador', 'cnpj_transportador', 'Cnpj Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for cpf_transportador field
            //
            $column = new TextViewColumn('cpf_transportador', 'cpf_transportador', 'Cpf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for nome_transportador field
            //
            $column = new TextViewColumn('nome_transportador', 'nome_transportador', 'Nome Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for inscricao_estadual_transportador field
            //
            $column = new TextViewColumn('inscricao_estadual_transportador', 'inscricao_estadual_transportador', 'Inscricao Estadual Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for endereco_transportador field
            //
            $column = new TextViewColumn('endereco_transportador', 'endereco_transportador', 'Endereco Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for municipio_transportador field
            //
            $column = new TextViewColumn('municipio_transportador', 'municipio_transportador', 'Municipio Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_transportador field
            //
            $column = new TextViewColumn('uf_transportador', 'uf_transportador', 'Uf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_servico field
            //
            $column = new TextViewColumn('transporte_icms_servico', 'transporte_icms_servico', 'Transporte Icms Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_base_servico field
            //
            $column = new TextViewColumn('transporte_icms_base_servico', 'transporte_icms_base_servico', 'Transporte Icms Base Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_aliquota field
            //
            $column = new TextViewColumn('transporte_icms_aliquota', 'transporte_icms_aliquota', 'Transporte Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_valor field
            //
            $column = new TextViewColumn('transporte_icms_valor', 'transporte_icms_valor', 'Transporte Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_cfop field
            //
            $column = new TextViewColumn('transporte_icms_cfop', 'transporte_icms_cfop', 'Transporte Icms Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for transporte_icms_codigo_municipio field
            //
            $column = new TextViewColumn('transporte_icms_codigo_municipio', 'transporte_icms_codigo_municipio', 'Transporte Icms Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for veiculo_placa field
            //
            $column = new TextViewColumn('veiculo_placa', 'veiculo_placa', 'Veiculo Placa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for veiculo_uf field
            //
            $column = new TextViewColumn('veiculo_uf', 'veiculo_uf', 'Veiculo Uf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for veiculo_rntc field
            //
            $column = new TextViewColumn('veiculo_rntc', 'veiculo_rntc', 'Veiculo Rntc', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for veiculo_identificacao_vagao field
            //
            $column = new TextViewColumn('veiculo_identificacao_vagao', 'veiculo_identificacao_vagao', 'Veiculo Identificacao Vagao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for veiculo_identificacao_balsa field
            //
            $column = new TextViewColumn('veiculo_identificacao_balsa', 'veiculo_identificacao_balsa', 'Veiculo Identificacao Balsa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________volumes field
            //
            $column = new TextViewColumn('colecao____________________volumes', 'colecao____________________volumes', 'Colecao                    Volumes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_fatura field
            //
            $column = new TextViewColumn('numero_fatura', 'numero_fatura', 'Numero Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_original_fatura field
            //
            $column = new TextViewColumn('valor_original_fatura', 'valor_original_fatura', 'Valor Original Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_desconto_fatura field
            //
            $column = new TextViewColumn('valor_desconto_fatura', 'valor_desconto_fatura', 'Valor Desconto Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for valor_liquido_fatura field
            //
            $column = new TextViewColumn('valor_liquido_fatura', 'valor_liquido_fatura', 'Valor Liquido Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________duplicatas field
            //
            $column = new TextViewColumn('colecao____________________duplicatas', 'colecao____________________duplicatas', 'Colecao                    Duplicatas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for informacoes_adicionais_contribuinte field
            //
            $column = new TextViewColumn('informacoes_adicionais_contribuinte', 'informacoes_adicionais_contribuinte', 'Informacoes Adicionais Contribuinte', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for uf_local_embarque field
            //
            $column = new TextViewColumn('uf_local_embarque', 'uf_local_embarque', 'Uf Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for local_embarque field
            //
            $column = new TextViewColumn('local_embarque', 'local_embarque', 'Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for local_despacho field
            //
            $column = new TextViewColumn('local_despacho', 'local_despacho', 'Local Despacho', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for colecao____________________formas_pagamento field
            //
            $column = new TextViewColumn('colecao____________________formas_pagamento', 'colecao____________________formas_pagamento', 'Colecao                    Formas Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for operacao field
            //
            $column = new TextViewColumn('operacao', 'operacao', 'Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for tx_cancelamento field
            //
            $column = new TextViewColumn('tx_cancelamento', 'tx_cancelamento', 'Tx Cancelamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for tx_correcao field
            //
            $column = new TextViewColumn('tx_correcao', 'tx_correcao', 'Tx Correcao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for id_pedido field
            //
            $column = new NumberViewColumn('id_pedido', 'id_pedido', 'Id Pedido', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddSingleRecordViewColumn($column);
            
            //
            // View column for numero_nf field
            //
            $column = new NumberViewColumn('numero_nf', 'numero_nf', 'Numero Nf', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddSingleRecordViewColumn($column);
        }
    
        protected function AddEditColumns(Grid $grid)
        {
    
        }
    
        protected function AddMultiEditColumns(Grid $grid)
        {
    
        }
    
        protected function AddInsertColumns(Grid $grid)
        {
    
            $grid->SetShowAddButton(false && $this->GetSecurityInfo()->HasAddGrant());
        }
    
        private function AddMultiUploadColumn(Grid $grid)
        {
    
        }
    
        protected function AddPrintColumns(Grid $grid)
        {
            //
            // View column for id_notas field
            //
            $column = new TextViewColumn('id_notas', 'id_notas', 'Id Notas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for id_licencas field
            //
            $column = new TextViewColumn('id_licencas', 'id_licencas', 'Id Licencas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for sequencia field
            //
            $column = new TextViewColumn('sequencia', 'sequencia', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for tipo_nf field
            //
            $column = new TextViewColumn('tipo_nf', 'tipo_nf', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for dt_inclusao field
            //
            $column = new DateTimeViewColumn('dt_inclusao', 'dt_inclusao', 'Dt Inclusao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddPrintColumn($column);
            
            //
            // View column for dt_concluido field
            //
            $column = new DateTimeViewColumn('dt_concluido', 'dt_concluido', 'Dt Concluido', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddPrintColumn($column);
            
            //
            // View column for st_nota field
            //
            $column = new TextViewColumn('st_nota', 'st_nota', 'Status da Nota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for tx_obs field
            //
            $column = new TextViewColumn('tx_obs', 'tx_obs', 'Tx Obs', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nm_arquivo_retorno field
            //
            $column = new TextViewColumn('nm_arquivo_retorno', 'nm_arquivo_retorno', 'Nm Arquivo Retorno', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for natureza_operacao field
            //
            $column = new TextViewColumn('natureza_operacao', 'natureza_operacao', 'Natureza Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for forma_pagamento field
            //
            $column = new TextViewColumn('forma_pagamento', 'forma_pagamento', 'Forma Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for data_emissao field
            //
            $column = new DateTimeViewColumn('data_emissao', 'data_emissao', 'Data Emissao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('Y-m-d');
            $grid->AddPrintColumn($column);
            
            //
            // View column for data_entrada_saida field
            //
            $column = new DateTimeViewColumn('data_entrada_saida', 'data_entrada_saida', 'Data Entrada Saida', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddPrintColumn($column);
            
            //
            // View column for tipo_documento field
            //
            $column = new TextViewColumn('tipo_documento', 'tipo_documento', 'Tipo Documento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for local_destino field
            //
            $column = new TextViewColumn('local_destino', 'local_destino', 'Local Destino', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for finalidade_emissao field
            //
            $column = new TextViewColumn('finalidade_emissao', 'finalidade_emissao', 'Finalidade Emissao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for consumidor_final field
            //
            $column = new TextViewColumn('consumidor_final', 'consumidor_final', 'Consumidor Final', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for presenca_comprador field
            //
            $column = new TextViewColumn('presenca_comprador', 'presenca_comprador', 'Presenca Comprador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________notas_referenciadas field
            //
            $column = new TextViewColumn('colecao____________________notas_referenciadas', 'colecao____________________notas_referenciadas', 'Colecao                    Notas Referenciadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________pessoas_autorizadas field
            //
            $column = new TextViewColumn('colecao____________________pessoas_autorizadas', 'colecao____________________pessoas_autorizadas', 'Colecao                    Pessoas Autorizadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnpj_emitente field
            //
            $column = new TextViewColumn('cnpj_emitente', 'cnpj_emitente', 'Cnpj Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nome_emitente field
            //
            $column = new TextViewColumn('nome_emitente', 'nome_emitente', 'Nome Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nome_fantasia_emitente field
            //
            $column = new TextViewColumn('nome_fantasia_emitente', 'nome_fantasia_emitente', 'Nome Fantasia Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for logradouro_emitente field
            //
            $column = new TextViewColumn('logradouro_emitente', 'logradouro_emitente', 'Logradouro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_emitente field
            //
            $column = new TextViewColumn('numero_emitente', 'numero_emitente', 'Numero Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for complemento_emitente field
            //
            $column = new TextViewColumn('complemento_emitente', 'complemento_emitente', 'Complemento Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for bairro_emitente field
            //
            $column = new TextViewColumn('bairro_emitente', 'bairro_emitente', 'Bairro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for prestador_codigo_municipio field
            //
            $column = new TextViewColumn('prestador_codigo_municipio', 'prestador_codigo_municipio', 'Prestador Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for municipio_emitente field
            //
            $column = new TextViewColumn('municipio_emitente', 'municipio_emitente', 'Municipio Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_emitente field
            //
            $column = new TextViewColumn('uf_emitente', 'uf_emitente', 'Uf Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cep_emitente field
            //
            $column = new TextViewColumn('cep_emitente', 'cep_emitente', 'Cep Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for telefone_emitente field
            //
            $column = new TextViewColumn('telefone_emitente', 'telefone_emitente', 'Telefone Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_estadual_emitenete field
            //
            $column = new TextViewColumn('inscricao_estadual_emitenete', 'inscricao_estadual_emitenete', 'Inscricao Estadual Emitenete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_estadual_st_emitente field
            //
            $column = new TextViewColumn('inscricao_estadual_st_emitente', 'inscricao_estadual_st_emitente', 'Inscricao Estadual St Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_municipal_emitente field
            //
            $column = new TextViewColumn('inscricao_municipal_emitente', 'inscricao_municipal_emitente', 'Inscricao Municipal Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnae_emitente field
            //
            $column = new TextViewColumn('cnae_emitente', 'cnae_emitente', 'Cnae Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for regime_tributario_emitente field
            //
            $column = new TextViewColumn('regime_tributario_emitente', 'regime_tributario_emitente', 'Regime Tributario Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnpj_destinatario field
            //
            $column = new TextViewColumn('cnpj_destinatario', 'cnpj_destinatario', 'Cnpj Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cpf_destinatario field
            //
            $column = new TextViewColumn('cpf_destinatario', 'cpf_destinatario', 'Cpf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for id_estrangeiro_destinatario field
            //
            $column = new TextViewColumn('id_estrangeiro_destinatario', 'id_estrangeiro_destinatario', 'Id Estrangeiro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nome_destinatario field
            //
            $column = new TextViewColumn('nome_destinatario', 'nome_destinatario', 'Nome Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for logradoura_destinatario field
            //
            $column = new TextViewColumn('logradoura_destinatario', 'logradoura_destinatario', 'Logradoura Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_destinatario field
            //
            $column = new TextViewColumn('numero_destinatario', 'numero_destinatario', 'Numero Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for complemento_destinatario field
            //
            $column = new TextViewColumn('complemento_destinatario', 'complemento_destinatario', 'Complemento Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for bairro_destinatario field
            //
            $column = new TextViewColumn('bairro_destinatario', 'bairro_destinatario', 'Bairro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_municipio_destinatario field
            //
            $column = new TextViewColumn('codigo_municipio_destinatario', 'codigo_municipio_destinatario', 'Codigo Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for municipio_destinatario field
            //
            $column = new TextViewColumn('municipio_destinatario', 'municipio_destinatario', 'Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_destinatario field
            //
            $column = new TextViewColumn('uf_destinatario', 'uf_destinatario', 'Uf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cep_destinatario field
            //
            $column = new TextViewColumn('cep_destinatario', 'cep_destinatario', 'Cep Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for pais_destinatario field
            //
            $column = new TextViewColumn('pais_destinatario', 'pais_destinatario', 'Pais Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for telefone_destinatario field
            //
            $column = new TextViewColumn('telefone_destinatario', 'telefone_destinatario', 'Telefone Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for indicador_inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('indicador_inscricao_estadual_destinatario', 'indicador_inscricao_estadual_destinatario', 'Indicador Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('inscricao_estadual_destinatario', 'inscricao_estadual_destinatario', 'Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_suframa_destinatario field
            //
            $column = new TextViewColumn('inscricao_suframa_destinatario', 'inscricao_suframa_destinatario', 'Inscricao Suframa Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for email_destinatario field
            //
            $column = new TextViewColumn('email_destinatario', 'email_destinatario', 'Email Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_municipal_destinatario field
            //
            $column = new TextViewColumn('inscricao_municipal_destinatario', 'inscricao_municipal_destinatario', 'Inscricao Municipal Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnpj_retirada field
            //
            $column = new TextViewColumn('cnpj_retirada', 'cnpj_retirada', 'Cnpj Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cpf_retirada field
            //
            $column = new TextViewColumn('cpf_retirada', 'cpf_retirada', 'Cpf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for logradoura_retirada field
            //
            $column = new TextViewColumn('logradoura_retirada', 'logradoura_retirada', 'Logradoura Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_retirada field
            //
            $column = new TextViewColumn('numero_retirada', 'numero_retirada', 'Numero Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for complemento_retirada field
            //
            $column = new TextViewColumn('complemento_retirada', 'complemento_retirada', 'Complemento Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for bairro_retirada field
            //
            $column = new TextViewColumn('bairro_retirada', 'bairro_retirada', 'Bairro Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_municipio_retirada field
            //
            $column = new TextViewColumn('codigo_municipio_retirada', 'codigo_municipio_retirada', 'Codigo Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for municipio_retirada field
            //
            $column = new TextViewColumn('municipio_retirada', 'municipio_retirada', 'Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_retirada field
            //
            $column = new TextViewColumn('uf_retirada', 'uf_retirada', 'Uf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnpj_entrega field
            //
            $column = new TextViewColumn('cnpj_entrega', 'cnpj_entrega', 'Cnpj Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cpf_entrega field
            //
            $column = new TextViewColumn('cpf_entrega', 'cpf_entrega', 'Cpf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for logradouro_entrega field
            //
            $column = new TextViewColumn('logradouro_entrega', 'logradouro_entrega', 'Logradouro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_entrega field
            //
            $column = new TextViewColumn('numero_entrega', 'numero_entrega', 'Numero Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for complemento_entrega field
            //
            $column = new TextViewColumn('complemento_entrega', 'complemento_entrega', 'Complemento Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for bairro_entrega field
            //
            $column = new TextViewColumn('bairro_entrega', 'bairro_entrega', 'Bairro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_municipio_entrega field
            //
            $column = new TextViewColumn('codigo_municipio_entrega', 'codigo_municipio_entrega', 'Codigo Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for municipio_entrega field
            //
            $column = new TextViewColumn('municipio_entrega', 'municipio_entrega', 'Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_entrega field
            //
            $column = new TextViewColumn('uf_entrega', 'uf_entrega', 'Uf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________itens field
            //
            $column = new TextViewColumn('colecao____________________itens', 'colecao____________________itens', 'Colecao                    Itens', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_total field
            //
            $column = new TextViewColumn('icms_valor_total', 'icms_valor_total', 'Icms Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_total_desonerado field
            //
            $column = new TextViewColumn('icms_valor_total_desonerado', 'icms_valor_total_desonerado', 'Icms Valor Total Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for icms_valor_total_st field
            //
            $column = new TextViewColumn('icms_valor_total_st', 'icms_valor_total_st', 'Icms Valor Total St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_produtos field
            //
            $column = new TextViewColumn('valor_produtos', 'valor_produtos', 'Valor Produtos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_seguro field
            //
            $column = new TextViewColumn('valor_seguro', 'valor_seguro', 'Valor Seguro', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_desconto field
            //
            $column = new TextViewColumn('valor_desconto', 'valor_desconto', 'Valor Desconto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_ii field
            //
            $column = new TextViewColumn('valor_total_ii', 'valor_total_ii', 'Valor Total Ii', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_ipi field
            //
            $column = new TextViewColumn('valor_ipi', 'valor_ipi', 'Valor Ipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_pis field
            //
            $column = new TextViewColumn('valor_pis', 'valor_pis', 'Valor Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_cofins field
            //
            $column = new TextViewColumn('valor_cofins', 'valor_cofins', 'Valor Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total field
            //
            $column = new TextViewColumn('valor_total', 'valor_total', 'Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_servicos field
            //
            $column = new TextViewColumn('valor_total_servicos', 'valor_total_servicos', 'Valor Total Servicos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for base_issqn field
            //
            $column = new TextViewColumn('base_issqn', 'base_issqn', 'Base Issqn', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_pis_servico field
            //
            $column = new TextViewColumn('valor_pis_servico', 'valor_pis_servico', 'Valor Pis Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for data_prestacao_servico field
            //
            $column = new TextViewColumn('data_prestacao_servico', 'data_prestacao_servico', 'Data Prestacao Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_deducao_base_calculo field
            //
            $column = new TextViewColumn('valor_total_deducao_base_calculo', 'valor_total_deducao_base_calculo', 'Valor Total Deducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_outras_retencoes field
            //
            $column = new TextViewColumn('valor_total_outras_retencoes', 'valor_total_outras_retencoes', 'Valor Total Outras Retencoes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_desconto_incondicionado field
            //
            $column = new TextViewColumn('valor_total_desconto_incondicionado', 'valor_total_desconto_incondicionado', 'Valor Total Desconto Incondicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_valor_condicionado field
            //
            $column = new TextViewColumn('valor_total_valor_condicionado', 'valor_total_valor_condicionado', 'Valor Total Valor Condicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_total_retencao_iss field
            //
            $column = new TextViewColumn('valor_total_retencao_iss', 'valor_total_retencao_iss', 'Valor Total Retencao Iss', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for codigo_regime_especial_tributacao field
            //
            $column = new TextViewColumn('codigo_regime_especial_tributacao', 'codigo_regime_especial_tributacao', 'Codigo Regime Especial Tributacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_retido_pis field
            //
            $column = new TextViewColumn('valor_retido_pis', 'valor_retido_pis', 'Valor Retido Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_retido_cofins field
            //
            $column = new TextViewColumn('valor_retido_cofins', 'valor_retido_cofins', 'Valor Retido Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_retido_csll field
            //
            $column = new TextViewColumn('valor_retido_csll', 'valor_retido_csll', 'Valor Retido Csll', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for base_calculo_irrf field
            //
            $column = new TextViewColumn('base_calculo_irrf', 'base_calculo_irrf', 'Base Calculo Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_retido_irrf field
            //
            $column = new TextViewColumn('valor_retido_irrf', 'valor_retido_irrf', 'Valor Retido Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for prev_social_base_calculo field
            //
            $column = new TextViewColumn('prev_social_base_calculo', 'prev_social_base_calculo', 'Prev Social Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for prev_social_valor_retido field
            //
            $column = new TextViewColumn('prev_social_valor_retido', 'prev_social_valor_retido', 'Prev Social Valor Retido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for modalidade_frete field
            //
            $column = new TextViewColumn('modalidade_frete', 'modalidade_frete', 'Modalidade Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cnpj_transportador field
            //
            $column = new TextViewColumn('cnpj_transportador', 'cnpj_transportador', 'Cnpj Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for cpf_transportador field
            //
            $column = new TextViewColumn('cpf_transportador', 'cpf_transportador', 'Cpf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for nome_transportador field
            //
            $column = new TextViewColumn('nome_transportador', 'nome_transportador', 'Nome Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for inscricao_estadual_transportador field
            //
            $column = new TextViewColumn('inscricao_estadual_transportador', 'inscricao_estadual_transportador', 'Inscricao Estadual Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for endereco_transportador field
            //
            $column = new TextViewColumn('endereco_transportador', 'endereco_transportador', 'Endereco Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for municipio_transportador field
            //
            $column = new TextViewColumn('municipio_transportador', 'municipio_transportador', 'Municipio Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_transportador field
            //
            $column = new TextViewColumn('uf_transportador', 'uf_transportador', 'Uf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_servico field
            //
            $column = new TextViewColumn('transporte_icms_servico', 'transporte_icms_servico', 'Transporte Icms Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_base_servico field
            //
            $column = new TextViewColumn('transporte_icms_base_servico', 'transporte_icms_base_servico', 'Transporte Icms Base Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_aliquota field
            //
            $column = new TextViewColumn('transporte_icms_aliquota', 'transporte_icms_aliquota', 'Transporte Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_valor field
            //
            $column = new TextViewColumn('transporte_icms_valor', 'transporte_icms_valor', 'Transporte Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_cfop field
            //
            $column = new TextViewColumn('transporte_icms_cfop', 'transporte_icms_cfop', 'Transporte Icms Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for transporte_icms_codigo_municipio field
            //
            $column = new TextViewColumn('transporte_icms_codigo_municipio', 'transporte_icms_codigo_municipio', 'Transporte Icms Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for veiculo_placa field
            //
            $column = new TextViewColumn('veiculo_placa', 'veiculo_placa', 'Veiculo Placa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for veiculo_uf field
            //
            $column = new TextViewColumn('veiculo_uf', 'veiculo_uf', 'Veiculo Uf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for veiculo_rntc field
            //
            $column = new TextViewColumn('veiculo_rntc', 'veiculo_rntc', 'Veiculo Rntc', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for veiculo_identificacao_vagao field
            //
            $column = new TextViewColumn('veiculo_identificacao_vagao', 'veiculo_identificacao_vagao', 'Veiculo Identificacao Vagao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for veiculo_identificacao_balsa field
            //
            $column = new TextViewColumn('veiculo_identificacao_balsa', 'veiculo_identificacao_balsa', 'Veiculo Identificacao Balsa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________volumes field
            //
            $column = new TextViewColumn('colecao____________________volumes', 'colecao____________________volumes', 'Colecao                    Volumes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_fatura field
            //
            $column = new TextViewColumn('numero_fatura', 'numero_fatura', 'Numero Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_original_fatura field
            //
            $column = new TextViewColumn('valor_original_fatura', 'valor_original_fatura', 'Valor Original Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_desconto_fatura field
            //
            $column = new TextViewColumn('valor_desconto_fatura', 'valor_desconto_fatura', 'Valor Desconto Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for valor_liquido_fatura field
            //
            $column = new TextViewColumn('valor_liquido_fatura', 'valor_liquido_fatura', 'Valor Liquido Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________duplicatas field
            //
            $column = new TextViewColumn('colecao____________________duplicatas', 'colecao____________________duplicatas', 'Colecao                    Duplicatas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for informacoes_adicionais_contribuinte field
            //
            $column = new TextViewColumn('informacoes_adicionais_contribuinte', 'informacoes_adicionais_contribuinte', 'Informacoes Adicionais Contribuinte', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for uf_local_embarque field
            //
            $column = new TextViewColumn('uf_local_embarque', 'uf_local_embarque', 'Uf Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for local_embarque field
            //
            $column = new TextViewColumn('local_embarque', 'local_embarque', 'Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for local_despacho field
            //
            $column = new TextViewColumn('local_despacho', 'local_despacho', 'Local Despacho', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for colecao____________________formas_pagamento field
            //
            $column = new TextViewColumn('colecao____________________formas_pagamento', 'colecao____________________formas_pagamento', 'Colecao                    Formas Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for operacao field
            //
            $column = new TextViewColumn('operacao', 'operacao', 'Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for tx_cancelamento field
            //
            $column = new TextViewColumn('tx_cancelamento', 'tx_cancelamento', 'Tx Cancelamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for tx_correcao field
            //
            $column = new TextViewColumn('tx_correcao', 'tx_correcao', 'Tx Correcao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddPrintColumn($column);
            
            //
            // View column for id_pedido field
            //
            $column = new NumberViewColumn('id_pedido', 'id_pedido', 'Id Pedido', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddPrintColumn($column);
            
            //
            // View column for numero_nf field
            //
            $column = new NumberViewColumn('numero_nf', 'numero_nf', 'Numero Nf', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddPrintColumn($column);
        }
    
        protected function AddExportColumns(Grid $grid)
        {
            //
            // View column for id_notas field
            //
            $column = new TextViewColumn('id_notas', 'id_notas', 'Id Notas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for id_licencas field
            //
            $column = new TextViewColumn('id_licencas', 'id_licencas', 'Id Licencas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for chave field
            //
            $column = new TextViewColumn('chave', 'chave', 'Chave', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for sequencia field
            //
            $column = new TextViewColumn('sequencia', 'sequencia', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for tipo_nf field
            //
            $column = new TextViewColumn('tipo_nf', 'tipo_nf', '', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for dt_inclusao field
            //
            $column = new DateTimeViewColumn('dt_inclusao', 'dt_inclusao', 'Dt Inclusao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddExportColumn($column);
            
            //
            // View column for dt_concluido field
            //
            $column = new DateTimeViewColumn('dt_concluido', 'dt_concluido', 'Dt Concluido', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddExportColumn($column);
            
            //
            // View column for st_nota field
            //
            $column = new TextViewColumn('st_nota', 'st_nota', 'Status da Nota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for tx_obs field
            //
            $column = new TextViewColumn('tx_obs', 'tx_obs', 'Tx Obs', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nm_arquivo_retorno field
            //
            $column = new TextViewColumn('nm_arquivo_retorno', 'nm_arquivo_retorno', 'Nm Arquivo Retorno', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for natureza_operacao field
            //
            $column = new TextViewColumn('natureza_operacao', 'natureza_operacao', 'Natureza Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for forma_pagamento field
            //
            $column = new TextViewColumn('forma_pagamento', 'forma_pagamento', 'Forma Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for data_emissao field
            //
            $column = new DateTimeViewColumn('data_emissao', 'data_emissao', 'Data Emissao', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('Y-m-d');
            $grid->AddExportColumn($column);
            
            //
            // View column for data_entrada_saida field
            //
            $column = new DateTimeViewColumn('data_entrada_saida', 'data_entrada_saida', 'Data Entrada Saida', $this->dataset);
            $column->SetOrderable(true);
            $column->SetDateTimeFormat('d.m.Y H:i:s');
            $grid->AddExportColumn($column);
            
            //
            // View column for tipo_documento field
            //
            $column = new TextViewColumn('tipo_documento', 'tipo_documento', 'Tipo Documento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for local_destino field
            //
            $column = new TextViewColumn('local_destino', 'local_destino', 'Local Destino', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for finalidade_emissao field
            //
            $column = new TextViewColumn('finalidade_emissao', 'finalidade_emissao', 'Finalidade Emissao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for consumidor_final field
            //
            $column = new TextViewColumn('consumidor_final', 'consumidor_final', 'Consumidor Final', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for presenca_comprador field
            //
            $column = new TextViewColumn('presenca_comprador', 'presenca_comprador', 'Presenca Comprador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________notas_referenciadas field
            //
            $column = new TextViewColumn('colecao____________________notas_referenciadas', 'colecao____________________notas_referenciadas', 'Colecao                    Notas Referenciadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________pessoas_autorizadas field
            //
            $column = new TextViewColumn('colecao____________________pessoas_autorizadas', 'colecao____________________pessoas_autorizadas', 'Colecao                    Pessoas Autorizadas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnpj_emitente field
            //
            $column = new TextViewColumn('cnpj_emitente', 'cnpj_emitente', 'Cnpj Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nome_emitente field
            //
            $column = new TextViewColumn('nome_emitente', 'nome_emitente', 'Nome Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nome_fantasia_emitente field
            //
            $column = new TextViewColumn('nome_fantasia_emitente', 'nome_fantasia_emitente', 'Nome Fantasia Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for logradouro_emitente field
            //
            $column = new TextViewColumn('logradouro_emitente', 'logradouro_emitente', 'Logradouro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_emitente field
            //
            $column = new TextViewColumn('numero_emitente', 'numero_emitente', 'Numero Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for complemento_emitente field
            //
            $column = new TextViewColumn('complemento_emitente', 'complemento_emitente', 'Complemento Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for bairro_emitente field
            //
            $column = new TextViewColumn('bairro_emitente', 'bairro_emitente', 'Bairro Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for prestador_codigo_municipio field
            //
            $column = new TextViewColumn('prestador_codigo_municipio', 'prestador_codigo_municipio', 'Prestador Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for municipio_emitente field
            //
            $column = new TextViewColumn('municipio_emitente', 'municipio_emitente', 'Municipio Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_emitente field
            //
            $column = new TextViewColumn('uf_emitente', 'uf_emitente', 'Uf Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cep_emitente field
            //
            $column = new TextViewColumn('cep_emitente', 'cep_emitente', 'Cep Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for telefone_emitente field
            //
            $column = new TextViewColumn('telefone_emitente', 'telefone_emitente', 'Telefone Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_estadual_emitenete field
            //
            $column = new TextViewColumn('inscricao_estadual_emitenete', 'inscricao_estadual_emitenete', 'Inscricao Estadual Emitenete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_estadual_st_emitente field
            //
            $column = new TextViewColumn('inscricao_estadual_st_emitente', 'inscricao_estadual_st_emitente', 'Inscricao Estadual St Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_municipal_emitente field
            //
            $column = new TextViewColumn('inscricao_municipal_emitente', 'inscricao_municipal_emitente', 'Inscricao Municipal Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnae_emitente field
            //
            $column = new TextViewColumn('cnae_emitente', 'cnae_emitente', 'Cnae Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for regime_tributario_emitente field
            //
            $column = new TextViewColumn('regime_tributario_emitente', 'regime_tributario_emitente', 'Regime Tributario Emitente', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnpj_destinatario field
            //
            $column = new TextViewColumn('cnpj_destinatario', 'cnpj_destinatario', 'Cnpj Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cpf_destinatario field
            //
            $column = new TextViewColumn('cpf_destinatario', 'cpf_destinatario', 'Cpf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for id_estrangeiro_destinatario field
            //
            $column = new TextViewColumn('id_estrangeiro_destinatario', 'id_estrangeiro_destinatario', 'Id Estrangeiro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nome_destinatario field
            //
            $column = new TextViewColumn('nome_destinatario', 'nome_destinatario', 'Nome Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for logradoura_destinatario field
            //
            $column = new TextViewColumn('logradoura_destinatario', 'logradoura_destinatario', 'Logradoura Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_destinatario field
            //
            $column = new TextViewColumn('numero_destinatario', 'numero_destinatario', 'Numero Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for complemento_destinatario field
            //
            $column = new TextViewColumn('complemento_destinatario', 'complemento_destinatario', 'Complemento Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for bairro_destinatario field
            //
            $column = new TextViewColumn('bairro_destinatario', 'bairro_destinatario', 'Bairro Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_municipio_destinatario field
            //
            $column = new TextViewColumn('codigo_municipio_destinatario', 'codigo_municipio_destinatario', 'Codigo Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for municipio_destinatario field
            //
            $column = new TextViewColumn('municipio_destinatario', 'municipio_destinatario', 'Municipio Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_destinatario field
            //
            $column = new TextViewColumn('uf_destinatario', 'uf_destinatario', 'Uf Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cep_destinatario field
            //
            $column = new TextViewColumn('cep_destinatario', 'cep_destinatario', 'Cep Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for pais_destinatario field
            //
            $column = new TextViewColumn('pais_destinatario', 'pais_destinatario', 'Pais Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for telefone_destinatario field
            //
            $column = new TextViewColumn('telefone_destinatario', 'telefone_destinatario', 'Telefone Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for indicador_inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('indicador_inscricao_estadual_destinatario', 'indicador_inscricao_estadual_destinatario', 'Indicador Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_estadual_destinatario field
            //
            $column = new TextViewColumn('inscricao_estadual_destinatario', 'inscricao_estadual_destinatario', 'Inscricao Estadual Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_suframa_destinatario field
            //
            $column = new TextViewColumn('inscricao_suframa_destinatario', 'inscricao_suframa_destinatario', 'Inscricao Suframa Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for email_destinatario field
            //
            $column = new TextViewColumn('email_destinatario', 'email_destinatario', 'Email Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_municipal_destinatario field
            //
            $column = new TextViewColumn('inscricao_municipal_destinatario', 'inscricao_municipal_destinatario', 'Inscricao Municipal Destinatario', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnpj_retirada field
            //
            $column = new TextViewColumn('cnpj_retirada', 'cnpj_retirada', 'Cnpj Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cpf_retirada field
            //
            $column = new TextViewColumn('cpf_retirada', 'cpf_retirada', 'Cpf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for logradoura_retirada field
            //
            $column = new TextViewColumn('logradoura_retirada', 'logradoura_retirada', 'Logradoura Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_retirada field
            //
            $column = new TextViewColumn('numero_retirada', 'numero_retirada', 'Numero Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for complemento_retirada field
            //
            $column = new TextViewColumn('complemento_retirada', 'complemento_retirada', 'Complemento Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for bairro_retirada field
            //
            $column = new TextViewColumn('bairro_retirada', 'bairro_retirada', 'Bairro Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_municipio_retirada field
            //
            $column = new TextViewColumn('codigo_municipio_retirada', 'codigo_municipio_retirada', 'Codigo Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for municipio_retirada field
            //
            $column = new TextViewColumn('municipio_retirada', 'municipio_retirada', 'Municipio Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_retirada field
            //
            $column = new TextViewColumn('uf_retirada', 'uf_retirada', 'Uf Retirada', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnpj_entrega field
            //
            $column = new TextViewColumn('cnpj_entrega', 'cnpj_entrega', 'Cnpj Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cpf_entrega field
            //
            $column = new TextViewColumn('cpf_entrega', 'cpf_entrega', 'Cpf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for logradouro_entrega field
            //
            $column = new TextViewColumn('logradouro_entrega', 'logradouro_entrega', 'Logradouro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_entrega field
            //
            $column = new TextViewColumn('numero_entrega', 'numero_entrega', 'Numero Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for complemento_entrega field
            //
            $column = new TextViewColumn('complemento_entrega', 'complemento_entrega', 'Complemento Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for bairro_entrega field
            //
            $column = new TextViewColumn('bairro_entrega', 'bairro_entrega', 'Bairro Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_municipio_entrega field
            //
            $column = new TextViewColumn('codigo_municipio_entrega', 'codigo_municipio_entrega', 'Codigo Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for municipio_entrega field
            //
            $column = new TextViewColumn('municipio_entrega', 'municipio_entrega', 'Municipio Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_entrega field
            //
            $column = new TextViewColumn('uf_entrega', 'uf_entrega', 'Uf Entrega', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________itens field
            //
            $column = new TextViewColumn('colecao____________________itens', 'colecao____________________itens', 'Colecao                    Itens', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_base_calculo field
            //
            $column = new TextViewColumn('icms_base_calculo', 'icms_base_calculo', 'Icms Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_total field
            //
            $column = new TextViewColumn('icms_valor_total', 'icms_valor_total', 'Icms Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_total_desonerado field
            //
            $column = new TextViewColumn('icms_valor_total_desonerado', 'icms_valor_total_desonerado', 'Icms Valor Total Desonerado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_base_calculo_st field
            //
            $column = new TextViewColumn('icms_base_calculo_st', 'icms_base_calculo_st', 'Icms Base Calculo St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for icms_valor_total_st field
            //
            $column = new TextViewColumn('icms_valor_total_st', 'icms_valor_total_st', 'Icms Valor Total St', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_produtos field
            //
            $column = new TextViewColumn('valor_produtos', 'valor_produtos', 'Valor Produtos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_frete field
            //
            $column = new TextViewColumn('valor_frete', 'valor_frete', 'Valor Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_seguro field
            //
            $column = new TextViewColumn('valor_seguro', 'valor_seguro', 'Valor Seguro', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_desconto field
            //
            $column = new TextViewColumn('valor_desconto', 'valor_desconto', 'Valor Desconto', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_ii field
            //
            $column = new TextViewColumn('valor_total_ii', 'valor_total_ii', 'Valor Total Ii', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_ipi field
            //
            $column = new TextViewColumn('valor_ipi', 'valor_ipi', 'Valor Ipi', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_pis field
            //
            $column = new TextViewColumn('valor_pis', 'valor_pis', 'Valor Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_cofins field
            //
            $column = new TextViewColumn('valor_cofins', 'valor_cofins', 'Valor Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_outras_despesas field
            //
            $column = new TextViewColumn('valor_outras_despesas', 'valor_outras_despesas', 'Valor Outras Despesas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total field
            //
            $column = new TextViewColumn('valor_total', 'valor_total', 'Valor Total', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_servicos field
            //
            $column = new TextViewColumn('valor_total_servicos', 'valor_total_servicos', 'Valor Total Servicos', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for base_issqn field
            //
            $column = new TextViewColumn('base_issqn', 'base_issqn', 'Base Issqn', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_pis_servico field
            //
            $column = new TextViewColumn('valor_pis_servico', 'valor_pis_servico', 'Valor Pis Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for data_prestacao_servico field
            //
            $column = new TextViewColumn('data_prestacao_servico', 'data_prestacao_servico', 'Data Prestacao Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_deducao_base_calculo field
            //
            $column = new TextViewColumn('valor_total_deducao_base_calculo', 'valor_total_deducao_base_calculo', 'Valor Total Deducao Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_outras_retencoes field
            //
            $column = new TextViewColumn('valor_total_outras_retencoes', 'valor_total_outras_retencoes', 'Valor Total Outras Retencoes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_desconto_incondicionado field
            //
            $column = new TextViewColumn('valor_total_desconto_incondicionado', 'valor_total_desconto_incondicionado', 'Valor Total Desconto Incondicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_valor_condicionado field
            //
            $column = new TextViewColumn('valor_total_valor_condicionado', 'valor_total_valor_condicionado', 'Valor Total Valor Condicionado', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_total_retencao_iss field
            //
            $column = new TextViewColumn('valor_total_retencao_iss', 'valor_total_retencao_iss', 'Valor Total Retencao Iss', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for codigo_regime_especial_tributacao field
            //
            $column = new TextViewColumn('codigo_regime_especial_tributacao', 'codigo_regime_especial_tributacao', 'Codigo Regime Especial Tributacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_retido_pis field
            //
            $column = new TextViewColumn('valor_retido_pis', 'valor_retido_pis', 'Valor Retido Pis', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_retido_cofins field
            //
            $column = new TextViewColumn('valor_retido_cofins', 'valor_retido_cofins', 'Valor Retido Cofins', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_retido_csll field
            //
            $column = new TextViewColumn('valor_retido_csll', 'valor_retido_csll', 'Valor Retido Csll', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for base_calculo_irrf field
            //
            $column = new TextViewColumn('base_calculo_irrf', 'base_calculo_irrf', 'Base Calculo Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_retido_irrf field
            //
            $column = new TextViewColumn('valor_retido_irrf', 'valor_retido_irrf', 'Valor Retido Irrf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for prev_social_base_calculo field
            //
            $column = new TextViewColumn('prev_social_base_calculo', 'prev_social_base_calculo', 'Prev Social Base Calculo', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for prev_social_valor_retido field
            //
            $column = new TextViewColumn('prev_social_valor_retido', 'prev_social_valor_retido', 'Prev Social Valor Retido', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for modalidade_frete field
            //
            $column = new TextViewColumn('modalidade_frete', 'modalidade_frete', 'Modalidade Frete', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cnpj_transportador field
            //
            $column = new TextViewColumn('cnpj_transportador', 'cnpj_transportador', 'Cnpj Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for cpf_transportador field
            //
            $column = new TextViewColumn('cpf_transportador', 'cpf_transportador', 'Cpf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for nome_transportador field
            //
            $column = new TextViewColumn('nome_transportador', 'nome_transportador', 'Nome Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for inscricao_estadual_transportador field
            //
            $column = new TextViewColumn('inscricao_estadual_transportador', 'inscricao_estadual_transportador', 'Inscricao Estadual Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for endereco_transportador field
            //
            $column = new TextViewColumn('endereco_transportador', 'endereco_transportador', 'Endereco Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for municipio_transportador field
            //
            $column = new TextViewColumn('municipio_transportador', 'municipio_transportador', 'Municipio Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_transportador field
            //
            $column = new TextViewColumn('uf_transportador', 'uf_transportador', 'Uf Transportador', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_servico field
            //
            $column = new TextViewColumn('transporte_icms_servico', 'transporte_icms_servico', 'Transporte Icms Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_base_servico field
            //
            $column = new TextViewColumn('transporte_icms_base_servico', 'transporte_icms_base_servico', 'Transporte Icms Base Servico', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_aliquota field
            //
            $column = new TextViewColumn('transporte_icms_aliquota', 'transporte_icms_aliquota', 'Transporte Icms Aliquota', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_valor field
            //
            $column = new TextViewColumn('transporte_icms_valor', 'transporte_icms_valor', 'Transporte Icms Valor', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_cfop field
            //
            $column = new TextViewColumn('transporte_icms_cfop', 'transporte_icms_cfop', 'Transporte Icms Cfop', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for transporte_icms_codigo_municipio field
            //
            $column = new TextViewColumn('transporte_icms_codigo_municipio', 'transporte_icms_codigo_municipio', 'Transporte Icms Codigo Municipio', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for veiculo_placa field
            //
            $column = new TextViewColumn('veiculo_placa', 'veiculo_placa', 'Veiculo Placa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for veiculo_uf field
            //
            $column = new TextViewColumn('veiculo_uf', 'veiculo_uf', 'Veiculo Uf', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for veiculo_rntc field
            //
            $column = new TextViewColumn('veiculo_rntc', 'veiculo_rntc', 'Veiculo Rntc', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for veiculo_identificacao_vagao field
            //
            $column = new TextViewColumn('veiculo_identificacao_vagao', 'veiculo_identificacao_vagao', 'Veiculo Identificacao Vagao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for veiculo_identificacao_balsa field
            //
            $column = new TextViewColumn('veiculo_identificacao_balsa', 'veiculo_identificacao_balsa', 'Veiculo Identificacao Balsa', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________volumes field
            //
            $column = new TextViewColumn('colecao____________________volumes', 'colecao____________________volumes', 'Colecao                    Volumes', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_fatura field
            //
            $column = new TextViewColumn('numero_fatura', 'numero_fatura', 'Numero Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_original_fatura field
            //
            $column = new TextViewColumn('valor_original_fatura', 'valor_original_fatura', 'Valor Original Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_desconto_fatura field
            //
            $column = new TextViewColumn('valor_desconto_fatura', 'valor_desconto_fatura', 'Valor Desconto Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for valor_liquido_fatura field
            //
            $column = new TextViewColumn('valor_liquido_fatura', 'valor_liquido_fatura', 'Valor Liquido Fatura', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________duplicatas field
            //
            $column = new TextViewColumn('colecao____________________duplicatas', 'colecao____________________duplicatas', 'Colecao                    Duplicatas', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for informacoes_adicionais_contribuinte field
            //
            $column = new TextViewColumn('informacoes_adicionais_contribuinte', 'informacoes_adicionais_contribuinte', 'Informacoes Adicionais Contribuinte', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for uf_local_embarque field
            //
            $column = new TextViewColumn('uf_local_embarque', 'uf_local_embarque', 'Uf Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for local_embarque field
            //
            $column = new TextViewColumn('local_embarque', 'local_embarque', 'Local Embarque', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for local_despacho field
            //
            $column = new TextViewColumn('local_despacho', 'local_despacho', 'Local Despacho', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for colecao____________________formas_pagamento field
            //
            $column = new TextViewColumn('colecao____________________formas_pagamento', 'colecao____________________formas_pagamento', 'Colecao                    Formas Pagamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for operacao field
            //
            $column = new TextViewColumn('operacao', 'operacao', 'Operacao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for tx_cancelamento field
            //
            $column = new TextViewColumn('tx_cancelamento', 'tx_cancelamento', 'Tx Cancelamento', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for tx_correcao field
            //
            $column = new TextViewColumn('tx_correcao', 'tx_correcao', 'Tx Correcao', $this->dataset);
            $column->SetOrderable(true);
            $grid->AddExportColumn($column);
            
            //
            // View column for id_pedido field
            //
            $column = new NumberViewColumn('id_pedido', 'id_pedido', 'Id Pedido', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddExportColumn($column);
            
            //
            // View column for numero_nf field
            //
            $column = new NumberViewColumn('numero_nf', 'numero_nf', 'Numero Nf', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddExportColumn($column);
        }
    
        private function AddCompareColumns(Grid $grid)
        {
            //
            // View column for id_pedido field
            //
            $column = new NumberViewColumn('id_pedido', 'id_pedido', 'Id Pedido', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddCompareColumn($column);
            
            //
            // View column for numero_nf field
            //
            $column = new NumberViewColumn('numero_nf', 'numero_nf', 'Numero Nf', $this->dataset);
            $column->SetOrderable(true);
            $column->setNumberAfterDecimal(0);
            $column->setThousandsSeparator('.');
            $column->setDecimalSeparator('');
            $grid->AddCompareColumn($column);
        }
    
        private function AddCompareHeaderColumns(Grid $grid)
        {
    
        }
    
        public function GetPageDirection()
        {
            return null;
        }
    
        public function isFilterConditionRequired()
        {
            return false;
        }
    
        protected function ApplyCommonColumnEditProperties(CustomEditColumn $column)
        {
            $column->SetDisplaySetToNullCheckBox(false);
            $column->SetDisplaySetToDefaultCheckBox(false);
    		$column->SetVariableContainer($this->GetColumnVariableContainer());
        }
    
        function CreateMasterDetailRecordGrid()
        {
            $result = new Grid($this, $this->dataset);
            
            $this->AddFieldColumns($result, false);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
            
            $result->SetAllowDeleteSelected(false);
            $result->SetShowUpdateLink(false);
            $result->SetShowKeyColumnsImagesInHeader(false);
            $result->SetViewMode(ViewMode::TABLE);
            $result->setEnableRuntimeCustomization(false);
            $result->setTableBordered(false);
            $result->setTableCondensed(false);
            
            $this->setupGridColumnGroup($result);
            $this->attachGridEventHandlers($result);
            
            return $result;
        }
        
        function GetCustomClientScript()
        {
            return ;
        }
        
        function GetOnPageLoadedClientScript()
        {
            return ;
        }
        public function GetEnableModalSingleRecordView() { return true; }
    
        protected function CreateGrid()
        {
            $result = new Grid($this, $this->dataset);
            if ($this->GetSecurityInfo()->HasDeleteGrant())
               $result->SetAllowDeleteSelected(false);
            else
               $result->SetAllowDeleteSelected(false);   
            
            ApplyCommonPageSettings($this, $result);
            
            $result->SetUseImagesForActions(true);
            $defaultSortedColumns = array();
            $defaultSortedColumns[] = new SortColumn('chave', 'DESC');
            $result->setDefaultOrdering($defaultSortedColumns);
            $result->SetUseFixedHeader(false);
            $result->SetShowLineNumbers(false);
            $result->SetViewMode(ViewMode::TABLE);
            $result->setEnableRuntimeCustomization(true);
            $result->setAllowCompare(true);
            $this->AddCompareHeaderColumns($result);
            $this->AddCompareColumns($result);
            $result->setSelectionFilterAllowed(false);
            $result->setMultiEditAllowed($this->GetSecurityInfo()->HasEditGrant() && false);
            $result->setTableBordered(false);
            $result->setTableCondensed(false);
            
            $result->SetHighlightRowAtHover(false);
            $result->SetWidth('');
            $this->AddOperationsColumns($result);
            $this->AddFieldColumns($result);
            $this->AddSingleRecordViewColumns($result);
            $this->AddEditColumns($result);
            $this->AddMultiEditColumns($result);
            $this->AddInsertColumns($result);
            $this->AddPrintColumns($result);
            $this->AddExportColumns($result);
            $this->AddMultiUploadColumn($result);
    
    
            $this->SetShowPageList(true);
            $this->SetShowTopPageNavigator(true);
            $this->SetShowBottomPageNavigator(true);
            $this->setPrintListAvailable(true);
            $this->setPrintListRecordAvailable(false);
            $this->setPrintOneRecordAvailable(true);
            $this->setAllowPrintSelectedRecords(true);
            $this->setExportListAvailable(array('pdf', 'excel', 'word', 'xml', 'csv'));
            $this->setExportSelectedRecordsAvailable(array('pdf', 'excel', 'word', 'xml', 'csv'));
            $this->setExportListRecordAvailable(array());
            $this->setExportOneRecordAvailable(array('pdf', 'excel', 'word', 'xml', 'csv'));
    
            return $result;
        }
     
        protected function setClientSideEvents(Grid $grid) {
    
        }
    
        protected function doRegisterHandlers() {
            $detailPage = new Notas_Finalizadas_itensPage('Notas_Finalizadas_itens', $this, array('chave'), array('chave'), $this->GetForeignKeyFields(), $this->CreateMasterDetailRecordGrid(), $this->dataset, GetCurrentUserPermissionSetForDataSource('Notas Finalizadas.itens'), 'UTF-8');
            $detailPage->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('Notas Finalizadas.itens'));
            $detailPage->SetHttpHandlerName('Notas_Finalizadas_itens_handler');
            $handler = new PageHTTPHandler('Notas_Finalizadas_itens_handler', $detailPage);
            GetApplication()->RegisterHTTPHandler($handler);
            
        }
       
        protected function doCustomRenderColumn($fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
            if ($fieldName == 'sequencia')
            {
               $customText = '<a href="php/corrige_nfe_modal.php?chave=' .$rowData['chave'] .'">CARTA DE CORRE&Ccedil;&Atilde;O</a>';
               $handled = true;
            };
            if ($fieldName == 'tipo_nf')
            {
               $customText = '<a href="php/cancela_nfe_modal.php?chave=' .$rowData['chave'] .'">CANCELAR NOTA</a>';
               $handled = true;
            }
        }
    
        protected function doCustomRenderPrintColumn($fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
    
        }
    
        protected function doCustomRenderExportColumn($exportType, $fieldName, $fieldData, $rowData, &$customText, &$handled)
        { 
    
        }
    
        protected function doCustomDrawRow($rowData, &$cellFontColor, &$cellFontSize, &$cellBgColor, &$cellItalicAttr, &$cellBoldAttr)
        {
    
        }
    
        protected function doExtendedCustomDrawRow($rowData, &$rowCellStyles, &$rowStyles, &$rowClasses, &$cellClasses)
        {
    
        }
    
        protected function doCustomRenderTotal($totalValue, $aggregate, $columnName, &$customText, &$handled)
        {
    
        }
    
        protected function doCustomDefaultValues(&$values, &$handled) 
        {
    
        }
    
        protected function doCustomCompareColumn($columnName, $valueA, $valueB, &$result)
        {
    
        }
    
        protected function doBeforeInsertRecord($page, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doBeforeUpdateRecord($page, $oldRowData, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doBeforeDeleteRecord($page, &$rowData, $tableName, &$cancel, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterInsertRecord($page, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterUpdateRecord($page, $oldRowData, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doAfterDeleteRecord($page, $rowData, $tableName, &$success, &$message, &$messageDisplayTime)
        {
    
        }
    
        protected function doCustomHTMLHeader($page, &$customHtmlHeaderText)
        { 
    
        }
    
        protected function doGetCustomTemplate($type, $part, $mode, &$result, &$params)
        {
    
        }
    
        protected function doGetCustomExportOptions(Page $page, $exportType, $rowData, &$options)
        {
    
        }
    
        protected function doFileUpload($fieldName, $rowData, &$result, &$accept, $originalFileName, $originalFileExtension, $fileSize, $tempFileName)
        {
    
        }
    
        protected function doPrepareChart(Chart $chart)
        {
    
        }
    
        protected function doPrepareColumnFilter(ColumnFilter $columnFilter)
        {
    
        }
    
        protected function doPrepareFilterBuilder(FilterBuilder $filterBuilder, FixedKeysArray $columns)
        {
    
        }
    
        protected function doGetSelectionFilters(FixedKeysArray $columns, &$result)
        {
    
        }
    
        protected function doGetCustomFormLayout($mode, FixedKeysArray $columns, FormLayout $layout)
        {
    
        }
    
        protected function doGetCustomColumnGroup(FixedKeysArray $columns, ViewColumnGroup $columnGroup)
        {
    
        }
    
        protected function doPageLoaded()
        {
    
        }
    
        protected function doCalculateFields($rowData, $fieldName, &$value)
        {
    
        }
    
        protected function doGetCustomPagePermissions(Page $page, PermissionSet &$permissions, &$handled)
        {
    
        }
    
        protected function doGetCustomRecordPermissions(Page $page, &$usingCondition, $rowData, &$allowEdit, &$allowDelete, &$mergeWithDefault, &$handled)
        {
    
        }
    
    }

    SetUpUserAuthorization();

    try
    {
        $Page = new Notas_FinalizadasPage("Notas_Finalizadas", "Notas_Finalizadas.php", GetCurrentUserPermissionSetForDataSource("Notas Finalizadas"), 'UTF-8');
        $Page->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource("Notas Finalizadas"));
        GetApplication()->SetMainPage($Page);
        GetApplication()->Run();
    }
    catch(Exception $e)
    {
        ShowErrorPage($e);
    }
	
