duvida com arquivo txt
gostaria de saber como pular a primeira linha deste arquivo txt
A2101727 PM GUAIMBE 104CAIXA ECON. FEDERAL 2006040600003304CODIGO DE BARRAS
G0318006000000068 2006040520060407816600000001200172720060407100200600048701040000000012000000100000000010318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600004403040000000025000000100000000020318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600002003040000000025000000100000000030318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600030204040000000025000000100000000040318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600055803040000000025000000100000000050318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600029003040000000025000000100000000060318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600017203040000000025000000100000000070318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600025603040000000025000000100000000080318 5 1
G0318006000000068 2006040520060407816500000002000172720060407100200600040102040000000020000000100000000090318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600030303040000000025000000100000000100318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600031703040000000025000000100000000110318 5 1
G0318006000000068 2006040520060407816700000001500172720060407100200600058203040000000015000000100000000120318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600021603040000000025000000100000000130318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600022004040000000025000000100000000140318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600023503040000000025000000100000000150318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600035704040000000025000000100000000160318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600052604040000000025000000100000000170318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600008703040000000025000000100000000180318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600010703040000000025000000100000000190318 5 1
G0318006000000068 2006040520060407816400000001500172720060407100200600036203040000000015000000100000000200318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600052503040000000025000000100000000210318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600021503040000000025000000100000000220318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600023903040000000025000000100000000230318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600026204040000000025000000100000000240318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600027703040000000025000000100000000250318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600032403040000000025000000100000000260318 5 1
G0318006000000068 2006040520060407816300000002000172720060407100200600041602040000000020000000100000000270318 5 1
G0318006000000068 2006040520060407816300000002500172720060407100200600016803040000000025000000100000000280318 5 1
G0318006000000068 2006040520060407816400000001500172720060407100200600039305040000000015000000100000000290318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600039903040000000025000000100000000300318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600014403040000000025000000100000000310318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600016303040000000025000000100000000320318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600017703040000000025000000100000000330318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600021804040000000025000000100000000340318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600030403040000000025000000100000000350318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600036103040000000025000000100000000360318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600037503040000000025000000100000000370318 5 1
G0318006000000068 2006040520060407816100000002000172720060407100200600033702040000000020000000100000000380318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600011403040000000025000000100000000390318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600022504040000000025000000100000000400318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600016103040000000025000000100000000410318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600028403040000000025000000100000000420318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600025503040000000025000000100000000430318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600010803040000000025000000100000000440318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600037803040000000025000000100000000450318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600029403040000000015000000100000000460318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600053803040000000015000000100000000470318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600057603040000000015000000100000000480318 5 1
G0318006000000068 2006040520060407817500000002491172720060410000038500126402000000000024910000100000000490318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600051803040000000025000000100000000500318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600022904040000000025000000100000000510318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600052303040000000025000000100000000520318 5 1
G0318006000000068 2006040520060407816000000001200172720060407100200600042702040000000012000000100000000530318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600014103040000000025000000100000000540318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600054203040000000025000000100000000550318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600058003040000000025000000100000000560318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600018803040000000025000000100000000570318 5 1
G0318006000000068 2006040520060407817800000001389172720060430000038500111204510000000013890000100000000580318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600018003040000000025000000100000000590318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600024103040000000025000000100000000600318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600014703040000000025000000100000000610318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600011803040000000025000000100000000620318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600057205040000000025000000100000000630318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600000303040000000025000000100000000640318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600009803040000000025000000100000000650318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600015903040000000025000000100000000660318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600016403040000000025000000100000000670318 5 1
G0318006000000068 2006040520060407816800000001200172720060407100200600048701030000000012000000100000000680318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600020103040000000025000000100000000690318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600017803040000000025000000100000000700318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600050003040000000025000000100000000710318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600017103040000000025000000100000000720318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600023104040000000025000000100000000730318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600058103040000000025000000100000000740318 5 1
G0318006000000068 2006040520060407816800000001200172720060407100200600042802040000000012000000100000000750318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600034503040000000025000000100000000760318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600027003040000000025000000100000000770318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600026503040000000025000000100000000780318 5 1
Z00008000000000000181180
a linha onde aparece o cabeçalho do banco
e minha rotina é esta
var
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
end; begin
closefile(arq);
A2101727 PM GUAIMBE 104CAIXA ECON. FEDERAL 2006040600003304CODIGO DE BARRAS
G0318006000000068 2006040520060407816600000001200172720060407100200600048701040000000012000000100000000010318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600004403040000000025000000100000000020318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600002003040000000025000000100000000030318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600030204040000000025000000100000000040318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600055803040000000025000000100000000050318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600029003040000000025000000100000000060318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600017203040000000025000000100000000070318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600025603040000000025000000100000000080318 5 1
G0318006000000068 2006040520060407816500000002000172720060407100200600040102040000000020000000100000000090318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600030303040000000025000000100000000100318 5 1
G0318006000000068 2006040520060407816600000002500172720060407100200600031703040000000025000000100000000110318 5 1
G0318006000000068 2006040520060407816700000001500172720060407100200600058203040000000015000000100000000120318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600021603040000000025000000100000000130318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600022004040000000025000000100000000140318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600023503040000000025000000100000000150318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600035704040000000025000000100000000160318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600052604040000000025000000100000000170318 5 1
G0318006000000068 2006040520060407816500000002500172720060407100200600008703040000000025000000100000000180318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600010703040000000025000000100000000190318 5 1
G0318006000000068 2006040520060407816400000001500172720060407100200600036203040000000015000000100000000200318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600052503040000000025000000100000000210318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600021503040000000025000000100000000220318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600023903040000000025000000100000000230318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600026204040000000025000000100000000240318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600027703040000000025000000100000000250318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600032403040000000025000000100000000260318 5 1
G0318006000000068 2006040520060407816300000002000172720060407100200600041602040000000020000000100000000270318 5 1
G0318006000000068 2006040520060407816300000002500172720060407100200600016803040000000025000000100000000280318 5 1
G0318006000000068 2006040520060407816400000001500172720060407100200600039305040000000015000000100000000290318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600039903040000000025000000100000000300318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600014403040000000025000000100000000310318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600016303040000000025000000100000000320318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600017703040000000025000000100000000330318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600021804040000000025000000100000000340318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600030403040000000025000000100000000350318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600036103040000000025000000100000000360318 5 1
G0318006000000068 2006040520060407816400000002500172720060407100200600037503040000000025000000100000000370318 5 1
G0318006000000068 2006040520060407816100000002000172720060407100200600033702040000000020000000100000000380318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600011403040000000025000000100000000390318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600022504040000000025000000100000000400318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600016103040000000025000000100000000410318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600028403040000000025000000100000000420318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600025503040000000025000000100000000430318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600010803040000000025000000100000000440318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600037803040000000025000000100000000450318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600029403040000000015000000100000000460318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600053803040000000015000000100000000470318 5 1
G0318006000000068 2006040520060407816900000001500172720060407100200600057603040000000015000000100000000480318 5 1
G0318006000000068 2006040520060407817500000002491172720060410000038500126402000000000024910000100000000490318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600051803040000000025000000100000000500318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600022904040000000025000000100000000510318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600052303040000000025000000100000000520318 5 1
G0318006000000068 2006040520060407816000000001200172720060407100200600042702040000000012000000100000000530318 5 1
G0318006000000068 2006040520060407816000000002500172720060407100200600014103040000000025000000100000000540318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600054203040000000025000000100000000550318 5 1
G0318006000000068 2006040520060407816900000002500172720060407100200600058003040000000025000000100000000560318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600018803040000000025000000100000000570318 5 1
G0318006000000068 2006040520060407817800000001389172720060430000038500111204510000000013890000100000000580318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600018003040000000025000000100000000590318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600024103040000000025000000100000000600318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600014703040000000025000000100000000610318 5 1
G0318006000000068 2006040520060407816800000002500172720060407100200600011803040000000025000000100000000620318 5 1
G0318006000000068 2006040520060407816100000002500172720060407100200600057205040000000025000000100000000630318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600000303040000000025000000100000000640318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600009803040000000025000000100000000650318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600015903040000000025000000100000000660318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600016403040000000025000000100000000670318 5 1
G0318006000000068 2006040520060407816800000001200172720060407100200600048701030000000012000000100000000680318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600020103040000000025000000100000000690318 5 1
G0318006000000068 2006040520060407816200000002500172720060407100200600017803040000000025000000100000000700318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600050003040000000025000000100000000710318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600017103040000000025000000100000000720318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600023104040000000025000000100000000730318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600058103040000000025000000100000000740318 5 1
G0318006000000068 2006040520060407816800000001200172720060407100200600042802040000000012000000100000000750318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600034503040000000025000000100000000760318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600027003040000000025000000100000000770318 5 1
G0318006000000068 2006040520060407816700000002500172720060407100200600026503040000000025000000100000000780318 5 1
Z00008000000000000181180
a linha onde aparece o cabeçalho do banco
e minha rotina é esta
var
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
end; begin
closefile(arq);
Famatec
Curtidas 0
Respostas
Edilcimar
22/04/2006
coloque um contador para não pegar a primeira
var
I : WORD; // INCLUA ISTO
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
I := 0; // INCLUA ISTO
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
end; begin
closefile(arq);
var
I : WORD; // INCLUA ISTO
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
I := 0; // INCLUA ISTO
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
end; begin
closefile(arq);
GOSTEI 0
Famatec
22/04/2006
testei mas parece que o contador nao termina fica infinito entao vou passar a rotina inteira para analise
var
I : WORD; // INCLUA ISTO
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
I := 0; // INCLUA ISTO
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
end; begin
closefile(arq);
tbbarra.First;
WHILE NOT tbbarra.Eof DO
begin
tbbarra.Edit;
if tbbarravpago.Value = ´´ then
tbbarravpago1.Value := 0 else
tbbarravpago1.Value := strtofloat(tbbarravpago.Value)/100;
if not tblan003.Locate(´barra´,tbbarrabarra.Value,[])then
begin
showmessage(´Registro Não Encontrado Vamos Para o Proximo Registro´);
tbbarra.Next
end else
if tblan003.Locate(´barra´,tbbarrabarra.Value,[])then
begin
if tbbaixa.Locate(´barra´,tbbarrabarra.Value,[])then
tbbarra.Next else
if not tbbaixa.Locate(´barra´,tbbarrabarra.Value,[])then
begin
tbbaixa.edit;
tbbaixa.insert;
tbbaixacodlancamento.Value := tblan003codlancamento.Value;
tbbaixacodgeral.Value := tblan003codgeral.Value;
tbbaixacodparcela.Value := tblan003codparcela.Value;
tbbaixadvencimento.Value := tblan003dvencimento.Value;
tbbaixadpagamento.Value := strtodate(tbbarraDpagamento.Value);
tbbaixavfixado.Value := tblan003vfixado.Value;
tbbaixavpago.Value := strtofloat(tbbarravpago.Value)/100;
tbbaixavalormulta.value := tblan003valormulta.value;
tbbaixaunica.Value := tblan003unica.Value;
tbbaixacodsitparcela.Value := tblan003codsitparcela.Value;
tbbaixanumabertura.Value := tblan003numabertura.Value;
tbbaixagerarlan.Value := tblan003gerarlan.Value;
tbbaixadesconto.Value := tblan003desconto.Value;
tbbaixatipodesconto.Value := tblan003tipodesconto.Value;
tbbaixaobservacao.Value := tblan003observacao.Value;
tbbaixacontrole.Value := tblan003controle.Value;
tbbaixavalordesconto.Value := tblan003valordesconto.Value;
tbbaixavtfixa.Value := tblan003vtfixa.Value;
tbbaixacodlote.Value := tblan003codlote.Value;
tbbaixacodespec1.Value := tblan003codespec1.Value;
tbbaixavalorespec1.Value := tblan003valorespec1.Value;
tbbaixacodespec2.Value := tblan003codespec2.Value;
tbbaixavalorespec2.Value := tblan003valorespec2.Value;
tbbaixacodespec3.Value := tblan003codespec3.Value;
tbbaixavalorespec3.Value := tblan003valorespec3.Value;
tbbaixacodespec4.Value := tblan003codespec4.Value;
tbbaixavalorespec4.Value := tblan003valorespec4.Value;
tbbaixacodespec5.Value := tblan003codespec5.Value;
tbbaixavalorespec5.Value := tblan003valorespec5.Value;
tbbaixacodespec6.Value := tblan003codespec6.Value;
tbbaixavalorespec6.Value := tblan003valorespec6.Value;
tbbaixacodespec7.Value := tblan003codespec7.Value;
tbbaixavalorespec7.Value := tblan003valorespec7.Value;
tbbaixacodespec8.Value := tblan003codespec8.Value;
tbbaixavalorespec8.Value := tblan003valorespec8.Value;
tbbaixacodespec9.Value := tblan003codespec9.Value;
tbbaixavalorespec9.Value := tblan003valorespec9.Value;
tbbaixacodespec10.Value := tblan003codespec10.Value;
tbbaixavalorespec10.Value := tblan003valorespec10.Value;
tbbaixatipobaixa.Value := ´A´;
tbbaixavdescontolei.Value := tblan003vdescontolei.Value;
tbbaixavalorcustas.Value := tblan003valorcustas.Value;
tbbaixabarra.Value := tblan003barra.Value;
tbbaixacampo1.Value := tblan003campo1.Value;
tbbaixacampo2.Value := tblan003campo2.Value;
tbbaixacampo3.Value := tblan003campo3.Value;
tbbaixacampo4.Value := tblan003campo4.Value;
tbbaixabarracomp.Value := tblan003barracomp.Value;
tbbarra.Next;
end;
end;
end;
end;
showmessage(´Finalizado Processo de Baixa´);
quickrep3.Preview;
tbDBDeleteAll(tbbarra);
end;
var
I : WORD; // INCLUA ISTO
a,b,c,d,e:string;
arq: TextFile;
linha: String;
begin
I := 0; // INCLUA ISTO
if (radiogroup1.ItemIndex = 0)or (radiogroup1.ItemIndex = 2)then
panel5.Visible := true else
if (radiogroup1.ItemIndex = 1)then
begin
opendialog1.Execute;
AssignFile ( arq,opendialog1.FileName);
Reset ( arq );
ReadLn ( arq, linha );
while not Eof ( arq ) do
begin
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
end; begin
closefile(arq);
tbbarra.First;
WHILE NOT tbbarra.Eof DO
begin
tbbarra.Edit;
if tbbarravpago.Value = ´´ then
tbbarravpago1.Value := 0 else
tbbarravpago1.Value := strtofloat(tbbarravpago.Value)/100;
if not tblan003.Locate(´barra´,tbbarrabarra.Value,[])then
begin
showmessage(´Registro Não Encontrado Vamos Para o Proximo Registro´);
tbbarra.Next
end else
if tblan003.Locate(´barra´,tbbarrabarra.Value,[])then
begin
if tbbaixa.Locate(´barra´,tbbarrabarra.Value,[])then
tbbarra.Next else
if not tbbaixa.Locate(´barra´,tbbarrabarra.Value,[])then
begin
tbbaixa.edit;
tbbaixa.insert;
tbbaixacodlancamento.Value := tblan003codlancamento.Value;
tbbaixacodgeral.Value := tblan003codgeral.Value;
tbbaixacodparcela.Value := tblan003codparcela.Value;
tbbaixadvencimento.Value := tblan003dvencimento.Value;
tbbaixadpagamento.Value := strtodate(tbbarraDpagamento.Value);
tbbaixavfixado.Value := tblan003vfixado.Value;
tbbaixavpago.Value := strtofloat(tbbarravpago.Value)/100;
tbbaixavalormulta.value := tblan003valormulta.value;
tbbaixaunica.Value := tblan003unica.Value;
tbbaixacodsitparcela.Value := tblan003codsitparcela.Value;
tbbaixanumabertura.Value := tblan003numabertura.Value;
tbbaixagerarlan.Value := tblan003gerarlan.Value;
tbbaixadesconto.Value := tblan003desconto.Value;
tbbaixatipodesconto.Value := tblan003tipodesconto.Value;
tbbaixaobservacao.Value := tblan003observacao.Value;
tbbaixacontrole.Value := tblan003controle.Value;
tbbaixavalordesconto.Value := tblan003valordesconto.Value;
tbbaixavtfixa.Value := tblan003vtfixa.Value;
tbbaixacodlote.Value := tblan003codlote.Value;
tbbaixacodespec1.Value := tblan003codespec1.Value;
tbbaixavalorespec1.Value := tblan003valorespec1.Value;
tbbaixacodespec2.Value := tblan003codespec2.Value;
tbbaixavalorespec2.Value := tblan003valorespec2.Value;
tbbaixacodespec3.Value := tblan003codespec3.Value;
tbbaixavalorespec3.Value := tblan003valorespec3.Value;
tbbaixacodespec4.Value := tblan003codespec4.Value;
tbbaixavalorespec4.Value := tblan003valorespec4.Value;
tbbaixacodespec5.Value := tblan003codespec5.Value;
tbbaixavalorespec5.Value := tblan003valorespec5.Value;
tbbaixacodespec6.Value := tblan003codespec6.Value;
tbbaixavalorespec6.Value := tblan003valorespec6.Value;
tbbaixacodespec7.Value := tblan003codespec7.Value;
tbbaixavalorespec7.Value := tblan003valorespec7.Value;
tbbaixacodespec8.Value := tblan003codespec8.Value;
tbbaixavalorespec8.Value := tblan003valorespec8.Value;
tbbaixacodespec9.Value := tblan003codespec9.Value;
tbbaixavalorespec9.Value := tblan003valorespec9.Value;
tbbaixacodespec10.Value := tblan003codespec10.Value;
tbbaixavalorespec10.Value := tblan003valorespec10.Value;
tbbaixatipobaixa.Value := ´A´;
tbbaixavdescontolei.Value := tblan003vdescontolei.Value;
tbbaixavalorcustas.Value := tblan003valorcustas.Value;
tbbaixabarra.Value := tblan003barra.Value;
tbbaixacampo1.Value := tblan003campo1.Value;
tbbaixacampo2.Value := tblan003campo2.Value;
tbbaixacampo3.Value := tblan003campo3.Value;
tbbaixacampo4.Value := tblan003campo4.Value;
tbbaixabarracomp.Value := tblan003barracomp.Value;
tbbarra.Next;
end;
end;
end;
end;
showmessage(´Finalizado Processo de Baixa´);
quickrep3.Preview;
tbDBDeleteAll(tbbarra);
end;
GOSTEI 0
Edilcimar
22/04/2006
Sem ler o teu programa
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
eu realmente esqueci disto
antes do end
Else If i = 0 then
I := I +1
e depois i End acima
IF I <> 0 THEN // INCLUA ISTO
BEGIN
tbbarra.Insert;
a:= copy(linha,28,2);
b:= copy(linha,26,2);
c:= copy(linha,22,4);
d := a+´/´+b+´/´+c;
tbbarradpagamento.Value := d;
tbbarrabarra.Value := copy(linha,38,44);
e:= copy(linha,82,12);
tbbarravpago.Value := e;
ReadLn ( arq, linha );
I := I + 1 // INCLUA ISTO
END
eu realmente esqueci disto
antes do end
Else If i = 0 then
I := I +1
e depois i End acima
GOSTEI 0
Famatec
22/04/2006
ainda continua lendo a primeira linha e dando uma mensagem
´codigo de ba´ is not a float point
este codigo de ba faz parte da primeira linha do txt por esta razao que nao quero ler esta linha agradecimentos a toda ajuda
´codigo de ba´ is not a float point
este codigo de ba faz parte da primeira linha do txt por esta razao que nao quero ler esta linha agradecimentos a toda ajuda
GOSTEI 0
Famatec
22/04/2006
valeu muito pelas dicas e ao inves de nao pegar aprimeira linha e peguei a primeira posicao de cada linha e se for g normal e se for a nao é para ler e assim por diante e obrigado msm pela atencao dos colegas
GOSTEI 0