Aquí el módulo que reúne los bancos
Aquí la imagen
Aquí el código
https://gist.github.com/anonymous/5693125
y nuevas funciones usadas de mi archivo Fun.pas
Código Delphi
[-]function EditLogico(edit:TEdit;Cadena:string='SNsn'):String;
var
i : integer;
aux,aux2: string;
begin
aux2:='';
with Edit do
begin
aux:=text;
for i:=1 to length(aux) do
if pos(aux[i],Cadena)>0 then aux2:=aux2+aux[i];
SelStart:=length(aux2);
end;
Result:=aux2;
end;
function CalculaDC(BancoOficina, Cuenta: string):integer;
const
Pesos: array[0..9] of integer=(6,3,7,9,10,5,8,4,2,1);
var
n: byte;
iTemp: integer;
begin
iTemp := 0;
for n := 0 to 7 do
iTemp := iTemp + StrToInt(Copy(BancoOficina, 8 - n, 1)) * Pesos[n];
Result := 11 - iTemp mod 11;
if (Result > 9) then Result := 1 - Result mod 10;
iTemp := 0;
for n := 0 to 9 do
iTemp := iTemp + StrToInt(Copy(Cuenta, 10 - n, 1)) * Pesos[n];
iTemp := 11 - iTemp mod 11;
if (iTemp > 9) then iTemp := 1 - iTemp mod 10;
Result := Result * 10 + iTemp;
end;
function ceros(text:string;Cant:integer):string;
var
valor,x:integer;
dev,con:string;
begin
con:='';
valor:=length(text);
if valorthen
begin
for x:=1 to (cant-valor) do
begin
con:=con+'0';
end;
dev:=con+text;
end
else
dev:=text;
result:=dev;
end;