Página 1 de 1

CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 16 Oct 2018 04:27
por dripro
Portugues
Olá amigos fiz esse pequeno exemplo de como criar Código de Barra Para Faturas em SQLite

Inglês
Hello friends I made this small example of how to create Barcode for Invoices in SQLite

Espanhol
Hola amigos. Hice este pequeño ejemplo de cómo crear un código de barras para facturas en SQLite

CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018
HIDE: ON
Hidebb Message Hidden Description


imagem
Imagen

Código
----------------------------------------<< CÓDIGOS DE BARRA PARA FATURAS >>
function tCodigoBarra()
ListBox.DeleteItem("ListBox1", LB_ALLITEMS);

tInfo_Selected = SQLite.QueryToTable(db, "SELECT * FROM BARCODES WHERE RecordID")
sID = "0"
for nRow = 1, tInfo_Selected.Rows do

sID = tInfo_Selected.Data[nRow]["RecordID"]

ListBox.AddItem("ListBox1", string.format("%010d",String.ToNumber(sID)), sID);

end

--------------------------<< GERAR CÓDIGO >>
function sComprimento(tGerarCodigo) 
if String.Length(tGerarCodigo) == 12 then 

sMinimo = 12;  
sMaximo = 1;   
  tStep = - 2;   
tSomaCodigos = "" 

--------------------------<< CONTAR CÓDIGO e MULTIPLICAR >>
for sContar = sMinimo, sMaximo, tStep do 
tSomaCodigos=String.ToNumber(tSomaCodigos) + String.ToNumber(String.Mid(tGerarCodigo, sContar, 1)); 
end 

tSomaCodigos = tSomaCodigos * sID
sMinimo = 11; 
sMaximo = 1;   
step = -2;  

--------------------------<< CONTAR CÓDIGO e MULTIPLICAR >>
for sContar = sMinimo, sMaximo, step do 
tSomaCodigos=String.ToNumber(tSomaCodigos)+String.ToNumber(String.Mid(tGerarCodigo, sContar, 1)); 
end 


tGerarCodigo = tGerarCodigo..Math.Mod(10 - Math.Mod(tSomaCodigos, 10), 10) 
sCodigoBarra = String.Left(tGerarCodigo, 1)..String.Char(65 + String.Mid(tGerarCodigo, 2, 1)) 
     
    end 
    sNumero= String.ToNumber(String.Left(tGerarCodigo, 1)); 
    sMinimo = 3; 
    sMaximo = 7;  
    for sContar = sMinimo, sMaximo do 
        sTabela = false 
         
        if (sContar == 3) then 
            if (sNumero == 0 or sNumero == 1 or sNumero == 2 or sNumero == 3) then 
            sTabela = true 
            end 
        elseif (sContar==4) then 
            if (sNumero == 0 or sNumero == 4 or sNumero == 7 or sNumero == 8) then 
            sTabela = true 
            end 
        elseif (sConta == 5) then 
            if (sNumero == 0 or sNumero == 1 or sNumero == 4 or sNumero == 5 or sNumero == 9) then 
            sTabela = true 
            end 
        elseif (sContar == 6) then 
            if (sNumero == 0 or sNumero == 2 or sNumero == 5 or sNumero == 6 or sNumero == 7) then 
            sTabela = true 
            end 
        elseif (sContar == 7) then 
            if (sNumero == 0 or sNumero == 3 or sNumero == 6 or sNumero == 9) then 
            sTabela = true 
            end 
        end 
         
if (sTabela == true) then 
sCodigoBarra = sCodigoBarra..String.Char(65 + String.Mid(tGerarCodigo, sContar, 1)); 
else 
sCodigoBarra = sCodigoBarra..String.Char(75 + String.Mid(tGerarCodigo, sContar, 1)); 
end 
end 
    
    sCodigoBarra = sCodigoBarra.."*" 
    sMinimo = 8;   
    sMaximo = 13;  
    for sContar = sMinimo, sMaximo do 
        sCodigoBarra=sCodigoBarra..String.Char(97+String.Mid(tGerarCodigo, sContar, 1)); 
end 
sCodigoBarra=sCodigoBarra.."+" 
return sCodigoBarra 
end 

sComprimento(123456789123);-----<< DIGITE APENAS 20 NÚMERO >>
Label.SetText("Label1", sCodigoBarra);
end

tCodigoBarra()

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 16 Oct 2018 13:14
por dripro
dripro escribió:
16 Oct 2018 04:27
Portugues
Olá amigos fiz esse pequeno exemplo de como criar Código de Barra Para Faturas em SQLite

Inglês
Hello friends I made this small example of how to create Barcode for Invoices in SQLite

Espanhol
Hola amigos. Hice este pequeño ejemplo de cómo crear un código de barras para facturas en SQLite

CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018
HIDE: ON
Hidebb Message Hidden Description


imagem
Imagen

Código
----------------------------------------<< CÓDIGOS DE BARRA PARA FATURAS >>
function tCodigoBarra()
ListBox.DeleteItem("ListBox1", LB_ALLITEMS);

tInfo_Selected = SQLite.QueryToTable(db, "SELECT * FROM BARCODES WHERE RecordID")
sID = "0"
for nRow = 1, tInfo_Selected.Rows do

sID = tInfo_Selected.Data[nRow]["RecordID"]

ListBox.AddItem("ListBox1", string.format("%010d",String.ToNumber(sID)), sID);

end

--------------------------<< GERAR CÓDIGO >>
function sComprimento(tGerarCodigo) 
if String.Length(tGerarCodigo) == 12 then 

sMinimo = 12;  
sMaximo = 1;   
  tStep = - 2;   
tSomaCodigos = "" 

--------------------------<< CONTAR CÓDIGO e MULTIPLICAR >>
for sContar = sMinimo, sMaximo, tStep do 
tSomaCodigos=String.ToNumber(tSomaCodigos) + String.ToNumber(String.Mid(tGerarCodigo, sContar, 1)); 
end 

tSomaCodigos = tSomaCodigos * sID
sMinimo = 11; 
sMaximo = 1;   
step = -2;  

--------------------------<< CONTAR CÓDIGO e MULTIPLICAR >>
for sContar = sMinimo, sMaximo, step do 
tSomaCodigos=String.ToNumber(tSomaCodigos)+String.ToNumber(String.Mid(tGerarCodigo, sContar, 1)); 
end 


tGerarCodigo = tGerarCodigo..Math.Mod(10 - Math.Mod(tSomaCodigos, 10), 10) 
sCodigoBarra = String.Left(tGerarCodigo, 1)..String.Char(65 + String.Mid(tGerarCodigo, 2, 1)) 
     
    end 
    sNumero= String.ToNumber(String.Left(tGerarCodigo, 1)); 
    sMinimo = 3; 
    sMaximo = 7;  
    for sContar = sMinimo, sMaximo do 
        sTabela = false 
         
        if (sContar == 3) then 
            if (sNumero == 0 or sNumero == 1 or sNumero == 2 or sNumero == 3) then 
            sTabela = true 
            end 
        elseif (sContar==4) then 
            if (sNumero == 0 or sNumero == 4 or sNumero == 7 or sNumero == 8) then 
            sTabela = true 
            end 
        elseif (sConta == 5) then 
            if (sNumero == 0 or sNumero == 1 or sNumero == 4 or sNumero == 5 or sNumero == 9) then 
            sTabela = true 
            end 
        elseif (sContar == 6) then 
            if (sNumero == 0 or sNumero == 2 or sNumero == 5 or sNumero == 6 or sNumero == 7) then 
            sTabela = true 
            end 
        elseif (sContar == 7) then 
            if (sNumero == 0 or sNumero == 3 or sNumero == 6 or sNumero == 9) then 
            sTabela = true 
            end 
        end 
         
if (sTabela == true) then 
sCodigoBarra = sCodigoBarra..String.Char(65 + String.Mid(tGerarCodigo, sContar, 1)); 
else 
sCodigoBarra = sCodigoBarra..String.Char(75 + String.Mid(tGerarCodigo, sContar, 1)); 
end 
end 
    
    sCodigoBarra = sCodigoBarra.."*" 
    sMinimo = 8;   
    sMaximo = 13;  
    for sContar = sMinimo, sMaximo do 
        sCodigoBarra=sCodigoBarra..String.Char(97+String.Mid(tGerarCodigo, sContar, 1)); 
end 
sCodigoBarra=sCodigoBarra.."+" 
return sCodigoBarra 
end 

sComprimento(123456789123);-----<< DIGITE APENAS 20 NÚMERO >>
Label.SetText("Label1", sCodigoBarra);
end

tCodigoBarra()

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 16 Oct 2018 17:31
por luasqlite
obrigado :pc:

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 19 Feb 2019 01:55
por reporterosx
thanks

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 22 Feb 2019 05:33
por RolandoLT
:friends:

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 07 Mar 2019 17:21
por nivaldorhk
bom de mais

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 15 May 2019 07:25
por gruposasp
lo que andaba buscando

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 21 May 2019 23:37
por jaynor
sos lo maximo

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 12 Jul 2019 17:53
por electrobyte
Gracias Dipro :pc:

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 24 Jul 2019 12:58
por sendai
gracias

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 11 Mar 2021 14:28
por Y2K38

Re: CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Publicado: 27 Ago 2021 01:14
por tupixelcolombia
:google: :google: :google: :google: :google: