CÓDIGOS DE BARRA PARA FATURAS_DriPro_2018

Ejemplos y plantillas para Autoplay Media Studio.
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()
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()
obrigado :pc:
thanks
:friends:
bom de mais
lo que andaba buscando
sos lo maximo
Gracias Dipro :pc:
gracias
:google: :google: :google: :google: :google: