Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Reported for Version 2.01 » View Incident Report |
Serious |
Reported By: Fernando Dias Reported On: 9/7/2008 For: Version 2.01 Build 4 |
function AlDireita(n: Integer): String; var s: string; begin s:=IntToStr(n); while Length(s)<12 do s:=' '+s; Result:=s; end; procedure TForm1.Button1Click(Sender: TObject); var Diario, NumLanc, Linha: Integer; begin dbGrid2.DataSource:=nil; dbNavigator2.DataSource:=nil; try Mov.IndexFieldNames:='AnoDoc;TipoDoc;SerieDoc;NumDoc;AbrFecho'; Rec.First; While not Rec.Eof do begin if Mov.FindKey([2008, 'NRE', RecSerieRecibo.Value, AlDireita(RecNumRecibo.Value), 'F']) then begin Diario :=MovDiario.Value; NumLanc:=MovNumLanc.Value; MovL.SetRange([Diario, NumLanc, 0],[Diario, NumLanc, MaxInt]); MovL.First; while not MovL.eof do begin MovL.Delete; MovL.First; end; MovL.CancelRange; Linha:=1; RecL.First; while not RecL.eof do begin MovL.Append; MovLDiario.value :=98; MovLNumLanc.Value :=NumLanc; MovLLinha.Value:=Linha; MovLTipoLanc.Value:=RecLTipoLanc.Value; MovLAnoDoc.Value :=RecLAnoDoc.Value; MovLTipoDoc.Value :=RecLTipoDoc.Value; MovLSerieDoc.Value:=RecLSerieDoc.Value; MovLNumDoc.Value :=RecLNumDoc.Value; MovLDataDoc.Value :=RecLDataDoc.Value; MovLValor.Value :=RecLValor.Value; Inc(Linha); MovL.Post; RecL.Next; end; end; Rec.Next; end; finally dbGrid2.DataSource:=DataSourceMovL; dbNavigator2.DataSource:=DataSourceMovL; end; end; // //******* End of "Original Code" *********** procedure TForm1.Button4Click(Sender: TObject); begin Mov.IndexFieldNames:='Diario;NumLanc'; Mov.FindKey([98, 84]); MovL.SetRange([MovDiario.Value,MovNumLanc.Value,0], [MovDiario.Value,MovNumLanc.Value,MaxInt]); end; procedure TForm1.Button5Click(Sender: TObject); begin MovL.CancelRange; MovL.FindKey([98, 84, 1]); end;
This web page was last updated on Monday, August 19, 2024 at 05:55 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |