Jump to content
Fivewin Brasil

Kleyton

Membros
  • Posts

    1,668
  • Joined

  • Last visited

Posts posted by Kleyton

  1. Vilian, no site da receita, eu tenho que lançar a nota, ou apenas enviar o arquivo gerado pelo meu sistema? Como funciona?

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  2. Gilmer ou quem tiver conhecimento.

    Estou querendo adquirir o pacote de NF´e do Gilmer e alguns clientes estão me questionando, qual a vantagem de ter a rotina de Nota Fiscal Eletrônica pelo sistema ou emití-la pelo site da receita. Se alguém puder dar sua opinião, fico grato.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  3. Gilmer ou quem tiver conhecimento.

    Estou querendo adquirir o pacote de NF´e do Gilmer e alguns clientes estão me questionando, qual a vantagem de ter a rotina de Nota Fiscal Eletrônica pelo sistema ou emití-la pelo site da receita. Se alguém puder dar sua opinião, fico grato.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  4. Vailtom, essa da bematech é diferente, é paralela mas tem que declarar a DLL.

    Veja abaixo a declaração em delphi:

    ----------------------------------------------------------

    function IniciaPorta( Porta: string ): integer; stdcall; far; eexternal 'MP2032.DLL';

    function FechaPorta: integer; stdcall; far; external 'MP2032.DLL';

    function BematechTX( BufTrans: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ComandoTX( BufTrans: string; TamBufTrans: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function CaracterGrafico( BufTrans: string; TamBufTrans: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function DocumentInserted: integer; stdcall; far; external 'MP2032.DLL';

    function Le_Status: integer; stdcall; far; external 'MP2032.DLL';

    function AutenticaDoc( texto: string; tempo: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function Le_Status_Gaveta: integer; stdcall; far; external 'MP2032.DLL';

    function ConfiguraTamanhoExtrato( NumeroLinhas: Integer ): integer; stdcall; far; external 'MP2032.DLL';

    function HabilitaExtratoLongo( Flag: Integer ): integer; stdcall; far; external 'MP2032.DLL';

    function HabilitaEsperaImpressao( Flag: Integer ): integer; stdcall; far; external 'MP2032.DLL';

    function EsperaImpressao: integer; stdcall; far; external 'MP2032.DLL';

    function ConfiguraModeloImpressora( ModeloImpressora: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function AcionaGuilhotina( Modo: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function FormataTX (BufTras: string; TpoLtra: integer; Italic: integer; Sublin: integer; expand: integer; enfat: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function HabilitaPresenterRetratil( iFlag: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function ProgramaPresenterRetratil( iTempo: integer ): integer; stdcall; far; external 'MP2032.DLL';

    function VerificaPapelPresenter: integer; stdcall; far; external 'MP2032.DLL';

    // Função para Configuração dos Códigos de Barras

    function ConfiguraCodigoBarras( Altura: integer; Largura: integer; PosicaoCaracteres: integer; Fonte: integer; Margem: integer ): integer; stdcall; far; external 'MP2032.DLL';

    // Funções para impressão dos códigos de barras

    function ImprimeCodigoBarrasUPCA( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasUPCE( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasEAN13( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasEAN8( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasCODE39( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasCODE93( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasCODE128( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasITF( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasCODABAR( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasISBN( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasMSI( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasPLESSEY( Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeCodigoBarrasPDF417( NivelCorrecaoErros: integer; Altura: integer; Largura: integer; Colunas: integer; Codigo: string ): integer; stdcall; far; external 'MP2032.DLL';

    // Funções para impressão de BitMap

    function ImprimeBitmap ( name: string; mode: integer): integer; stdcall; far; external 'MP2032.DLL';

    function ImprimeBmpEspecial ( name: string; xScale: integer; yScale: integer; angle: integer): integer; stdcall; far; external 'MP2032.DLL';

    function AjustaLarguraPapel ( width: integer): integer; stdcall; far; external 'MP2032.DLL';

    function SelectDithering ( mode: integer): integer; stdcall; far; external 'MP2032.DLL';

    function PrinterReset : integer; stdcall; far; external 'MP2032.DLL';

    function LeituraStatusEstendido ( A: array of byte ): integer; stdcall; far; external 'MP2032.DLL';

    function IoControl ( flag: Integer; mode : Boolean ): integer; stdcall; far; external 'MP2032.DLL';

    Agora a declaração em Visual Basic:

    ----------------------------------------------------------

    Public Declare Function IniciaPorta Lib "MP2032.DLL" (ByVal Porta As String) As Integer

    Public Declare Function BematechTX Lib "MP2032.DLL" (ByVal comando As String) As Integer

    Public Declare Function ComandoTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal Flag As Integer) As Integer

    Public Declare Function CaracterGrafico Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TamBufTrans As Integer) As Integer

    Public Declare Function Le_Status Lib "MP2032.DLL" () As Integer

    Public Declare Function AutenticaDoc Lib "MP2032.DLL" (ByVal texto As String, ByVal tempo As Integer) As Integer

    Public Declare Function DocumentInserted Lib "MP2032.DLL" () As Integer

    Public Declare Function FechaPorta Lib "MP2032.DLL" () As Integer

    Public Declare Function Le_Status_Gaveta Lib "MP2032.DLL" () As Integer

    Public Declare Function ConfiguraTamanhoExtrato Lib "MP2032.DLL" (ByVal NumeroLinhas As Integer) As Integer

    Public Declare Function HabilitaExtratoLongo Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer

    Public Declare Function HabilitaEsperaImpressao Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer

    Public Declare Function EsperaImpressao Lib "MP2032.DLL" () As Integer

    Public Declare Function ConfiguraModeloImpressora Lib "MP2032.DLL" (ByVal ModeloImpressora As Integer) As Integer

    Public Declare Function AcionaGuilhotina Lib "MP2032.DLL" (ByVal Modo As Integer) As Integer

    Public Declare Function FormataTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TpoLtra As Integer, ByVal Italic As Integer, ByVal Sublin As Integer, ByVal Expand As Integer, ByVal Enfat As Integer) As Integer

    Public Declare Function HabilitaPresenterRetratil Lib "MP2032.DLL" (ByVal iFlag As Integer) As Integer

    Public Declare Function ProgramaPresenterRetratil Lib "MP2032.DLL" (ByVal iTempo As Integer) As Integer

    Public Declare Function VerificaPapelPresenter Lib "MP2032.DLL" () As Integer

    ' Função para Configuração dos Códigos de Barras

    Public Declare Function ConfiguraCodigoBarras Lib "MP2032.DLL" (ByVal Altura As Integer, ByVal Largura As Integer, ByVal PosicaoCaracteres As Integer, ByVal Fonte As Integer, ByVal Margem As Integer) As Integer

    ' Funções para impressão dos códigos de barras

    Public Declare Function ImprimeCodigoBarrasUPCA Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasUPCE Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasEAN13 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasEAN8 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasCODE39 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasCODE93 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasCODE128 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasITF Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasCODABAR Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasISBN Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasMSI Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasPLESSEY Lib "MP2032.DLL" (ByVal Codigo As String) As Integer

    Public Declare Function ImprimeCodigoBarrasPDF417 Lib "MP2032.DLL" (ByVal NivelCorrecaoErros As Integer, ByVal Altura As Integer, ByVal Largura As Integer, ByVal Colunas As Integer, ByVal Codigo As String) As Integer

    ' Funções para impressão de BitMap

    Public Declare Function ImprimeBitmap Lib "MP2032.DLL" (ByVal Name As String, ByVal mode As Integer) As Integer

    Public Declare Function ImprimeBmpEspecial Lib "MP2032.DLL" (ByVal Name As String, ByVal xScale As Integer, ByVal yScale As Integer, ByVal angle As Integer) As Integer

    Public Declare Function AjustaLarguraPapel Lib "MP2032.DLL" (ByVal width As Integer) As Integer

    Public Declare Function SelectDithering Lib "MP2032.DLL" (ByVal type As Integer) As Integer

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  5. Estou precisando utilizar a impressora não fiscal BEMATECH MP-20 MI, alguém tem exemplos de como utilizar a DLL, ou seja, as declarações da DLL?

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  6. Estou precisando utilizar a impressora não fiscal BEMATECH MP-20 MI, alguém tem exemplos de como utilizar a DLL, ou seja, as declarações da DLL?

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  7. Estou precisando converter um arquivo do firebird, alguém poderia me enviar o programa para converter, preciso converter

    o arquivo do firebird, e não estou conseguindo, até consegui abrir o arquivo com o IBExpert e ver as tabelas, mas ai converter as tabelas

    para DBF ou TXT, não estou conseguindo.

    Extensão do arquivo do FIREBIRD é FDB

    Se alguém puder me dar uma ajuda, ficarei enternamente grato.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  8. Estou precisando converter um arquivo do firebird, alguém poderia me enviar o programa para converter, preciso converter

    o arquivo do firebird, e não estou conseguindo, até consegui abrir o arquivo com o IBExpert e ver as tabelas, mas ai converter as tabelas

    para DBF ou TXT, não estou conseguindo.

    Extensão do arquivo do FIREBIRD é FDB

    Se alguém puder me dar uma ajuda, ficarei enternamente grato.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  9. Alguém tem um arquivo de confirmação pra eu ver como está para eu comparar com o meu.

    Instalaram o TEF PLUG&PLAY discado no meu cliente e agora só no visa quando mando o arquivo de confirmação da a mensagem: "Arquivo de confirmação inválido".

    O que será que é?

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  10. Alguém tem um arquivo de confirmação pra eu ver como está para eu comparar com o meu.

    Instalaram o TEF PLUG&PLAY discado no meu cliente e agora só no visa quando mando o arquivo de confirmação da a mensagem: "Arquivo de confirmação inválido".

    O que será que é?

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  11. Jef2_tim, tem um escritório da daruma, ai na avenida paulista, justamente para ajudar os programadores que forem homologar sistema com tef, vale a pena dar uma passada lá. Só não sei o endereço, entre em contato com eles.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  12. Peguei esse exemplo aqui no fórun e adaptei a minha necessidade, preciso incluir no início umas três linhas de cabeçalho, alguém poderia me dar uma dica de como fazer, aliás, onde consigo material que fale sobre essas rotinas texcel?

    Mesmo eu informando na variável aTitCol, a mesma não sai no arquivo gerado.

    * 06/10/2008

    Function ExcProp_()

    local aSql:={}, cCmdSql

    * links úteis : http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10595

    * http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10593

    * http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10015

    * aqui no final deste arquivo tem um execelente exemplo de geração para excel.

    cArqExcel:="C:\SISMOT\EXCEL\"+alltrim(LOTEAMEN->NOME_EMP)+".XLS"

    aTitCol:={ "Proposta", "Quadra", "Lote", "Vlr Parcela", "Qtd Parcela", "Total" }

    aTipoDado:={ "000000", "@", "000000", "0,00", "0,00", "0,00" }

    aadd( aSql, { "PROPOSTA", "QUADRA", "LOTE", "VLR PARCELA", "QTD PARCELA", "VLR TOTAL" } )

    select CLASSIF

    set order to 1

    go top

    do while !eof()

    SysReFresh()

    aadd( aSql, { CLASSIF->PROPOSTA_, CLASSIF->QUADRA_, CLASSIF->LOTE_, CLASSIF->VLR_PARC_, CLASSIF->QTD_PARC_, transform(CLASSIF->TOTAL_,"@E 99,999,999.99") } )

    skip

    enddo

    GeraExcel( cArqExcel, aTitCol, aSql, aTipoDado, .f. )

    MsgInfo("Arquivo gerado em " + cArqExcel,"Atenção")

    return nil

    ////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////

    // NOME : GeraArqExcel //

    // SINTESE : Gerar arquivo XLS //

    // PARAMETROS : <1> cNome do arquivo a ser gerado //

    // <2> aVetor com os títulos das colunas //

    // <3> aVetor bidimensional com os dados //

    // <4> aVetor com os tipos de dados //

    // [5] lEmite preview (default=.f.) //

    // RETORNO : nada //

    ///////////////////////////////////////////////////////////////////////////////////////

    function GeraExcel( cArqExcel, aTitCol, aDados, aTipoDado, lPreview )

    local oExcel, oFolha

    local x1, x2

    oExcel := TOleauto():New( "Excel.Application" )

    if Ole2TxtError()='S_OK'

    oExcel:WorkBooks:Add()

    oFolha := oExcel:Get("ActiveSheet")

    oFolha:Cells:Font:Name := 'Arial'

    oFolha:Cells:Font:Size := 10

    for x1=1 to len( aTitCol )

    // Títulos dos Cabeçalhos

    oFolha:Cells(1,x1):Value := aTitCol[x1]

    next

    *x++

    *x++

    for x1=1 to len( aDados )

    for x2=1 to len( aDados[x1] )

    oFolha:Columns(x2):AutoFit()

    oFolha:Cells(x1,x2):set( "NumberFormat", aTipoDado[x2] )

    oFolha:Cells(x1,x2):Value := aDados[x1,x2]

    next

    next

    if lPreview

    // aqui mostra o relatorio direto no excel sem preview e nem importação

    oExcel:Visible := .T.

    endif

    // Incluir a geração do arquivo

    // oExcel:saveas( cArqExcel )

    oFOlha:SaveAs( cArqExcel )

    oExcel:WorkBooks:Close()

    oExcel:Quit()

    else

    MsgInfo( 'Excel não está instalado nessa máquina!'+CRLF+'Impossível gerar planilha', 'ATENÇÃO')

    endif

    return .t.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

  13. Peguei esse exemplo aqui no fórun e adaptei a minha necessidade, preciso incluir no início umas três linhas de cabeçalho, alguém poderia me dar uma dica de como fazer, aliás, onde consigo material que fale sobre essas rotinas texcel?

    Mesmo eu informando na variável aTitCol, a mesma não sai no arquivo gerado.

    * 06/10/2008

    Function ExcProp_()

    local aSql:={}, cCmdSql

    * links úteis : http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10595

    * http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10593

    * http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10015

    * aqui no final deste arquivo tem um execelente exemplo de geração para excel.

    cArqExcel:="C:\SISMOT\EXCEL\"+alltrim(LOTEAMEN->NOME_EMP)+".XLS"

    aTitCol:={ "Proposta", "Quadra", "Lote", "Vlr Parcela", "Qtd Parcela", "Total" }

    aTipoDado:={ "000000", "@", "000000", "0,00", "0,00", "0,00" }

    aadd( aSql, { "PROPOSTA", "QUADRA", "LOTE", "VLR PARCELA", "QTD PARCELA", "VLR TOTAL" } )

    select CLASSIF

    set order to 1

    go top

    do while !eof()

    SysReFresh()

    aadd( aSql, { CLASSIF->PROPOSTA_, CLASSIF->QUADRA_, CLASSIF->LOTE_, CLASSIF->VLR_PARC_, CLASSIF->QTD_PARC_, transform(CLASSIF->TOTAL_,"@E 99,999,999.99") } )

    skip

    enddo

    GeraExcel( cArqExcel, aTitCol, aSql, aTipoDado, .f. )

    MsgInfo("Arquivo gerado em " + cArqExcel,"Atenção")

    return nil

    ////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////

    // NOME : GeraArqExcel //

    // SINTESE : Gerar arquivo XLS //

    // PARAMETROS : <1> cNome do arquivo a ser gerado //

    // <2> aVetor com os títulos das colunas //

    // <3> aVetor bidimensional com os dados //

    // <4> aVetor com os tipos de dados //

    // [5] lEmite preview (default=.f.) //

    // RETORNO : nada //

    ///////////////////////////////////////////////////////////////////////////////////////

    function GeraExcel( cArqExcel, aTitCol, aDados, aTipoDado, lPreview )

    local oExcel, oFolha

    local x1, x2

    oExcel := TOleauto():New( "Excel.Application" )

    if Ole2TxtError()='S_OK'

    oExcel:WorkBooks:Add()

    oFolha := oExcel:Get("ActiveSheet")

    oFolha:Cells:Font:Name := 'Arial'

    oFolha:Cells:Font:Size := 10

    for x1=1 to len( aTitCol )

    // Títulos dos Cabeçalhos

    oFolha:Cells(1,x1):Value := aTitCol[x1]

    next

    *x++

    *x++

    for x1=1 to len( aDados )

    for x2=1 to len( aDados[x1] )

    oFolha:Columns(x2):AutoFit()

    oFolha:Cells(x1,x2):set( "NumberFormat", aTipoDado[x2] )

    oFolha:Cells(x1,x2):Value := aDados[x1,x2]

    next

    next

    if lPreview

    // aqui mostra o relatorio direto no excel sem preview e nem importação

    oExcel:Visible := .T.

    endif

    // Incluir a geração do arquivo

    // oExcel:saveas( cArqExcel )

    oFOlha:SaveAs( cArqExcel )

    oExcel:WorkBooks:Close()

    oExcel:Quit()

    else

    MsgInfo( 'Excel não está instalado nessa máquina!'+CRLF+'Impossível gerar planilha', 'ATENÇÃO')

    endif

    return .t.

    Kleyton

    xHarbour 99.5 Clipper5.2E+Clipper5.3b+Blink7+FW2.0d+Fwh 2.5 (xHarbour 0.99.3)

    cleitonbala@bol.com.br

×
×
  • Create New...