function __construct() { parent::__construct('Contas a Pagar', 'contas_pagar.png'); // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->lancar = $toolbar->append_stock('gtk-add', 0, array($this, 'lancar_clicked')); $this->lancar->set_label(latin1('Lançar')); $this->baixar = $toolbar->append_stock('gtk-go-down', 1, array($this, 'baixar_clicked')); $this->baixar->set_label('Baixar'); $this->cancelar = $toolbar->append_stock('gtk-cancel', 2, array($this, 'cancelar_clicked')); $this->estornar = $toolbar->append_stock('gtk-cancel', 3, array($this, 'estornar_clicked')); $this->estornar->set_label('Estornar'); $this->info_mov = $toolbar->append_stock('gtk-info', 4, array($this, 'info_mov_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 5, array($this, 'imprimir_clicked')); // contas em aberto $this->pack_start($this->notebook = new GtkNotebook()); $this->notebook->append_page($vbox = new GtkVBox(), new GtkLabel(' Em aberto ')); $vbox->pack_start($this->filtro = new TFiltroContasPagar(array($this, 'pega_dados')), false); $vbox->pack_start($this->grid = new TGridContasPagar($this)); // contas pagas baixadas $this->notebook->append_page($vbox = new GtkVBox(), new GtkLabel(' Baixas ')); $vbox->pack_start($this->mov_filtro = new TFiltroMovContasPagar(array($this, 'pega_dados_mov')), false); $vbox->pack_start($this->mov_grid = new TGridMovContasPagar($this)); // contas pagas canceladas $this->notebook->append_page($vbox = new GtkVBox(), new GtkLabel(' Canceladas ')); $vbox->pack_start($this->del_filtro = new TFiltroDelContasPagar(array($this, 'pega_dados_del')), false); $vbox->pack_start($this->del_grid = new TGridDelContasPagar($this)); $this->notebook->connect('switch-page', array($this, 'notebook_switch_page')); $this->notebook->set_current_page(0); $this->lancar->set_sensitive(CheckPermissao($this, 'lancar_conta_pagar')); $this->info_mov->set_sensitive(CheckPermissao($this, 'info_mov_conta_pagar')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_contas_pagar')); }
function __construct() { parent::__construct('Produtos', 'produtos.png'); // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'novo_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'editar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 3, array($this, 'imprimir_clicked')); // filtro $this->pack_start($this->filtro = new TFiltroProdutos(array($this, 'pega_dados')), false); // grid $this->pack_start($this->grid = new TGridProdutos($this)); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_produto')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_produto')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_produto')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_produtos')); }
function __construct() { parent::__construct(latin1('Unidades de Vendas'), 'unid_vendas.png'); // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'novo_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'editar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 3, array($this, 'imprimir_clicked')); // grid $this->pack_start($this->grid = new TGridUnidVendas($this)); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_unid_venda')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_unid_venda')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_unid_venda')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_unid_vendas')); // preenche lista $this->pega_dados(); }
function __construct() { parent::__construct('Tipos de Despesa', 'tipos_despesa.png'); // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'novo_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'editar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 3, array($this, 'imprimir_clicked')); // grid $this->pack_start($this->grid = new TGridTiposDespesa($this)); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_tipo_despesa')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_tipo_despesa')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_tipo_despesa')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_tipos_despesa')); // preenche lista $this->pega_dados(); }
function __construct() { parent::__construct('Transportadoras', 'transportadoras.png'); // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'novo_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'editar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->enderecos = $toolbar->append('enderecos.png', latin1('Endereços'), 3, array($this, 'enderecos_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 4, array($this, 'imprimir_clicked')); // filtro $this->pack_start($this->filtro = new TFiltroTransportadoras(array($this, 'pega_dados')), false); // grid $this->pack_start($this->grid = new TGridTransportadoras($this)); $this->filtro->set_focus(); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_transportadora')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_transportadora')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_transportadora')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_transportadoras')); $this->enderecos->set_sensitive(CheckPermissao($this, 'enderecos_transportadora')); }
function __construct($CodFor, $NomeFor) { $this->CodFor = $CodFor; parent::__construct(latin1('Endereços do Fornecedor'), 'enderecos.png'); // toolbar $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'incluir_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'alterar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 3, array($this, 'imprimir_clicked')); // grid $this->pack_start($this->grid = new TGridEndFornecedores($this)); // info fornecedor $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($label = new GtkLabel(), false); $label->set_markup('<b> Cod. Fornecedor: </b>' . $CodFor); $hbox->pack_start($label = new GtkLabel()); $label->set_markup('<b>' . latin1(' Nome Fornecedor / Razão: ') . '</b>' . $NomeFor); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_end_fornecedor')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_end_fornecedor')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_end_fornecedor')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_end_fornecedor')); }
function __construct($CodTrans, $NomeTrans) { $this->CodTrans = $CodTrans; parent::__construct(latin1('Endereços da Transportadora'), 'enderecos.png'); // toolbar $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'incluir_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'alterar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); $this->imprimir = $toolbar->append_stock('gtk-print-preview', 3, array($this, 'imprimir_clicked')); // grid $this->pack_start($this->grid = new TGridEndTransportadoras($this)); // info transportadora $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($label = new GtkLabel(), false); $label->set_markup('<b> Cod. Transp.: </b>' . $CodTrans); $hbox->pack_start($label = new GtkLabel()); $label->set_markup('<b> Transportadora </b>' . $NomeTrans); $this->incluir->set_sensitive(CheckPermissao($this, 'incluir_end_transportadora')); $this->alterar->set_sensitive(CheckPermissao($this, 'alterar_end_transportadora')); $this->excluir->set_sensitive(CheckPermissao($this, 'excluir_end_transportadora')); $this->imprimir->set_sensitive(CheckPermissao($this, 'imprimir_end_transportadora')); }
function __construct() { parent::__construct(latin1('Lista de Preços'), 'lista_precos.png'); $this->tipo = $tipo; $this->CodId = $CodId; // barra de ferramentas $this->pack_start($toolbar = new TToolbar(), false); $this->incluir = $toolbar->append_stock('gtk-add', 0, array($this, 'novo_clicked')); $this->alterar = $toolbar->append_stock('gtk-edit', 1, array($this, 'editar_clicked')); $this->excluir = $toolbar->append_stock('gtk-delete', 2, array($this, 'excluir_clicked')); /* if ($tipo == 'n') { } else { switch ($tipo) { case 'cc': // Cotacao de Compra { $lbl_anexo = 'na Cotacao de Compra'; break; } case 'cv': // Cotacao de Venda { $lbl_anexo = 'na Cotacao de Venda'; break; } case 'pc': // Pedido de Compra { $lbl_anexo = 'no Pedido de Compra'; break; } case 'pv': // Pedido de Venda { $lbl_anexo = 'no Pedido de Venda'; break; } }; $hbox->pack_start ($eventbox = new GtkEventBox); $eventbox->add ($label = new GtkLabel); $label->set_markup ('<b>Anexar os itens selecionados ' . $lbl_anexo . ': ' . $CodId . '</b>'); } if ($tipo == 'n' || $tipo == 'cc') { $hbox->pack_start ($this->cot_compra = new GtkButton ('Cot. Compra'), false); $this->cot_compra->set_image (GtkImage::new_from_file (XMImage ('cotacao_compra.png'))); $this->cot_compra->connect ('clicked', array ($this, 'cotped_compra_venda_clicked'), 'cc'); // $this->incluir->add_accelerator ('clicked', $this->accel_group, Gdk::KEY_Insert, 0, 0); } if ($tipo == 'n' || $tipo == 'cv') { $hbox->pack_start ($this->cot_venda = new GtkButton ('Cot. Venda'), false); $this->cot_venda->set_image (GtkImage::new_from_file (XMImage ('cotacao_venda.png'))); $this->cot_venda->connect ('clicked', array ($this, 'cotped_compra_venda_clicked'), 'cv'); // $this->incluir->add_accelerator ('clicked', $this->accel_group, Gdk::KEY_Insert, 0, 0); } if ($tipo == 'n' || $tipo == 'pc') { $hbox->pack_start ($this->ped_compra = new GtkButton ('Ped. Compra'), false); $this->ped_compra->set_image (GtkImage::new_from_file (XMImage ('pedido_compra.png'))); $this->ped_compra->connect ('clicked', array ($this, 'cotped_compra_venda_clicked'), 'pc'); // $this->incluir->add_accelerator ('clicked', $this->accel_group, Gdk::KEY_Insert, 0, 0); } if ($tipo == 'n' || $tipo == 'pv') { $hbox->pack_start ($this->ped_venda = new GtkButton ('Ped. Venda'), false); $this->ped_venda->set_image (GtkImage::new_from_file (XMImage ('pedido_venda.png'))); $this->ped_venda->connect ('clicked', array ($this, 'cotped_compra_venda_clicked'), 'pv'); // $this->incluir->add_accelerator ('clicked', $this->accel_group, Gdk::KEY_Insert, 0, 0); } if ($tipo == 'n') { $hbox->pack_start ($this->imprimir = GtkButton::new_from_stock ('gtk-print-preview'), false); $this->imprimir->connect ('clicked', array ($this, 'imprimir_clicked')); $this->imprimir->add_accelerator ('clicked', $this->accel_group, Gdk::KEY_p, Gdk::CONTROL_MASK, 0); } */ // filtro $this->pack_start($this->filtro = new TFiltroListaPrecos(array($this, 'pega_dados')), false); // grid $this->pack_start($this->grid = new TGridListaPrecos($this)); return; // cli / for $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($cli_for = new GtkButton(), false); $cli_for->add(GtkImage::new_from_stock('gtk-orientation-portrait', Gtk::ICON_SIZE_BUTTON)); $cli_for->connect('clicked', array($this, 'cli_for_clicked')); $hbox->pack_start($this->box_cli_for = new GtkHBox()); $cli_for->clicked(); }
function append_background() { if (!$this->get_n_pages()) { $this->background = true; $this->append($page = new TNotebookPage('X-Money', null)); $page->pack_start($image = GtkImage::new_from_file(XMONEY_IMAGES . DIRECTORY_SEPARATOR . 'fundo.png')); $image->show(); } }