>
iNC (n2) ;. Cells [n2,2]:= Залишок на початку + a0;
Ligidov.SetBase4(laquo;GurOper1.DBraquo;,laquo;DatOperraquo;,laquo;Debetraquo;,laquo;raquo;,laquo;raquo;,laquo;Summaraquo;,laquo;Summaraquo;,laquo;01.01.2000raquo;,a0,laquo;50raquo;,laquo;raquo;,laquo;raquo;,kold1,d1);.SetBase4(laquo;GurOper1.DBraquo;,laquo;DatOperraquo;,laquo;Kreditraquo;,laquo;raquo;,laquo;raquo;,laquo;Summaraquo;,laquo;Summaraquo;,laquo;01.01.2000raquo;,a0,laquo;50raquo;,laquo;raquo;,laquo;raquo;,kold1,d2);:=d1-d2;(d3:13:2,a1);:=Trim(a1);.Cells[n2,5]:=a1;(n2);
//Sheet.Cells [n2,0]:= ?? raquo ;;. Cells [n2,1]:= №№ raquo ;;
Sheet.Cells [n2,2]:= Найменування операції raquo ;;. Cells [n2,3]:= Дебет raquo ;;. Cells [n2,4]:= суммаДебетraquo;;.Cells[n2,5]:=laquo;Кредитraquo;;.Cells[n2,6]:=laquo;суммаКредитraquo;;
Sheet.Cells [n2,7]:= Сума raquo ;;
iNC (n2);:=0; s2:=0; s3:=0; Ligidov do begin(laquo;GurOper1.DBraquo;,laquo;DatOperraquo;,laquo;raquo;,laquo;raquo;,laquo;raquo;,laquo;raquo;,laquo;Summaraquo;,a0,a0,laquo;raquo;,laquo;raquo;,laquo;raquo;,kold1,d1);.First;
//a1:=Query1.fieldbyname ( KodTovara ). AsString;
//KodPr:=Query1.fieldbyname(laquo;KodKassiraraquo;).AsString;.Cells[n2,2]:=Query1.fieldbyname(laquo;Operacraquo;).AsString;.Cells[n2,3]:=Query1.fieldbyname(laquo;Debetraquo;).AsString;.Cells[n2,4]:=Query1.fieldbyname(laquo;DebetSraquo;).AsString;.Cells[n2,5]:=Query1.fieldbyname(laquo;Kreditraquo;).AsString;.Cells[n2,6]:=Query1.fieldbyname(laquo;KreditSraquo;).AsString;.Cells[n2,7]:=Query1.fieldbyname(laquo;Summaraquo;).AsString;.Cells[n2,1]:=IntToStr(n2-2);:=s2+Query1.fieldbyname(laquo;DebetSraquo;).AsInteger;:=s3+Query1.fieldbyname(laquo;KreditSraquo;).AsInteger;:=s2-s3;.Next;(n2);Query1.Eof;.Cells[n2,2]:=laquo;Итогоraquo;;.Cells[n2,4]:=IntToStr(s2);.Cells[n2,6]:=IntToStr(s3);.Cells[n2,7]:=IntToStr(s1);
Sheet.Cells [n2 + 3,7]:= Підпис касира ___________________________ raquo ;;. Cells [n2 + 5,7]:= Підпис бугалтера _________________________ raquo ;;
end;
Лістинг коду форми Data Module проекту:
unit LAV ;, Classes, DBTables, DB;=class (TDataModule): TDataSource ;: TDataSource ;: TDataSource ;: TDataSource ;: TTable ;: TTable ;: TTable ;: TQuery;SetBase3(Fils,Datp,Buhp,KodWrkPl,ScetPl,DaTT1,DaTT2,szet,KodWrk,Korenscet:string);SetBase4(Fils,Datp,Buhp,KodWrkPl,ScetPl,Kolp,Sump,DaTT1,DaTT2,szet,KodWrk,Korenscet:string; Var Kol1, Sum1: real);
{Private declarations}
{Public declarations} ;: TLigidov;: string;
{$ R *.dfm}TLigidov.SetBase4(Fils,Datp,Buhp,KodWrkPl,ScetPl,Kolp,Sump,DaTT1,DaTT2,szet,KodWrk,Korenscet:string; Var Kol1, Sum1: real) ;, s, s1, s0, a1, a0: string;: integer ;, summ1: real; (Fils, Datp, Buhp, KodWrkPl, ScetPl, DaTT1, DaTT2, szet, KodWrk, Korenscet) ;
//SetBase3 (Fils, Datp, KodWrkPl, ScetPl, DaTT1, DaTT2, KodWrk, Korenscet);:=0; summ1:=0; .First; i1:=1 to Query1.RecordCount do begin
//Koli1:=Koli1+Query1.FieldByName(Kolp).AsFloat;:=summ1+Query1.FieldByName(Sump).AsFloat;.Next;;//i:=Koli1;:=summ1;;TLigidov.SetBase3(Fils,Datp,Buhp,KodWrkPl,ScetPl,DaTT1,DaTT2,szet,KodWrk,Korenscet:string);,s,s1,s0,a1,a0:string;
//TekDir:= C: Scet60 raquo ;;. DataSet:=Query1;
//Dbgrid1.DataSource:=FDataSource4;.DatabaseName:=TekDir;.Close;.sql.Clear;.sql.Add(laquo;SELECT * FROM + Fils);:= WHERE ( + Datp + BETWEEN + DaTT1 + and + DaTT2 + ) raquo ;;. sql.Add (a1);
//if length (BuhP) gt; 0 then Query1.sql.Add ( and ( + BuhP + LIKE % || + laquo ; + szet + || % ) ); length (BuhP) gt; 0 then Query1.sql.Add ( and ( + BuhP + = + szet + ) ); length (ScetPl) gt; 0 then Query1.sql.Add ( and ( + ScetPl + LIKE % || + + Korenscet + || % ) ); length (KodWrkPl) gt; 0 then Query1.sql.Add ( and ( + KodWrkPl + = + KodWrk + ) );
{:= and ( + Datp + BETWEEN + DaTT1 + and + DaTT2 + ) raquo ;;.Query1.sql.Add (a1);
}. sql.SaveToFile ( sql11.txt ) ;. open ;;