📄 hesapekstresi.pas
字号:
unit hesapekstresi;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Mask, ComCtrls, StdCtrls, Buttons, ExtCtrls, Db, DBTables, Grids, DBGrids,
dxmdaset, DBCtrls;
type
Thesapeks = class(TForm)
Panel1: TPanel;
Label4: TLabel;
Label1: TLabel;
Label2: TLabel;
BitBtn4: TBitBtn;
DateTimePicker1: TDateTimePicker;
Edit1: TEdit;
Edit2: TEdit;
DateTimePicker2: TDateTimePicker;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
satinalq: TQuery;
stkfisq: TQuery;
cekaq: TQuery;
cekaqSIRKOD: TStringField;
cekaqSNO: TIntegerField;
cekaqCEKNO: TStringField;
cekaqATAR: TDateField;
cekaqMUSNO: TFloatField;
cekaqFIRADI: TStringField;
cekaqVADE: TDateField;
cekaqTAHSIL: TDateField;
cekaqTIP: TStringField;
cekaqBANKA: TStringField;
cekaqSUBE: TStringField;
cekaqTUTAR: TFloatField;
stkfisqSIRKOD: TStringField;
stkfisqFISTUR: TFloatField;
stkfisqFISNO: TFloatField;
stkfisqFISTAR: TDateField;
stkfisqFIRKOD: TFloatField;
stkfisqKDVTUT: TFloatField;
stkfisqISKTUT: TFloatField;
stkfisqFISTUT: TFloatField;
stkfisqGENTUT: TFloatField;
satinalqSIRKOD: TStringField;
satinalqFISTUR: TFloatField;
satinalqFISNO: TFloatField;
satinalqFISTAR: TDateField;
satinalqFIRKOD: TFloatField;
satinalqKDVTUT: TFloatField;
satinalqISKTUT: TFloatField;
satinalqFISTUT: TFloatField;
satinalqGENTUT: TFloatField;
cekbq: TQuery;
cekbqSIRKOD: TStringField;
cekbqSNO: TIntegerField;
cekbqCEKNO: TStringField;
cekbqATAR: TDateField;
cekbqMUSNO: TFloatField;
cekbqFIRADI: TStringField;
cekbqVADE: TDateField;
cekbqTAHSIL: TDateField;
cekbqTIP: TStringField;
cekbqBANKA: TStringField;
cekbqSUBE: TStringField;
cekbqTUTAR: TFloatField;
ekstra: TdxMemData;
ekstraISLEM: TStringField;
ekstraNO: TIntegerField;
ekstraTARIH: TDateField;
ekstraBORC: TCurrencyField;
ekstraALACAK: TCurrencyField;
tahsilq: TQuery;
tahsilqSIRKOD: TStringField;
tahsilqSIRA: TIntegerField;
tahsilqTARIH: TDateField;
tahsilqFIRKOD: TFloatField;
tahsilqFIRADI: TStringField;
tahsilqACIKLAMA: TStringField;
tahsilqTUTAR: TFloatField;
tahsilqKFISNO: TFloatField;
odemeq: TQuery;
odemeqSIRKOD: TStringField;
odemeqSIRA: TIntegerField;
odemeqTARIH: TDateField;
odemeqFIRKOD: TFloatField;
odemeqFIRADI: TStringField;
odemeqACIKLAMA: TStringField;
odemeqTUTAR: TFloatField;
odemeqKFISNO: TFloatField;
DBEdit1: TDBEdit;
DBText1: TDBText;
Panel2: TPanel;
Label3: TLabel;
MaskEdit1: TMaskEdit;
MaskEdit2: TMaskEdit;
MaskEdit3: TMaskEdit;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
hesapeks: Thesapeks;
implementation
USES unit1,unitgenel, firmagozlem, firmalistesi;
{$R *.DFM}
procedure Thesapeks.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;
procedure Thesapeks.BitBtn1Click(Sender: TObject);
Var
firkod:Integer;
tborc,talacak:Currency;
begin
tborc:=0; talacak:=0;
firkod:=dtaksit.firmaFIRKOD.AsInteger;
Satinalq.close;
Stkfisq.close;
cekaq.close;
cekbq.close;
tahsilq.close;
odemeq.close;
Satinalq.ParamByName('XSIRKOD1').Value:=sb.sirkod;
Satinalq.ParamByName('XFIRKOD1').VAlue:=firkod;
Satinalq.ParamByName('XBTARIH1').Value:=Datetimepicker1.Date;
Satinalq.ParamByName('XSTARIH1').Value:=Datetimepicker2.Date;
// ----------
Stkfisq.ParamByName('XSIRKOD2').Value:=sb.sirkod;
Stkfisq.ParamByName('XFIRKOD2').VAlue:=firkod;
Stkfisq.ParamByName('XBTARIH2').Value:=Datetimepicker1.Date;
Stkfisq.ParamByName('XSTARIH2').Value:=Datetimepicker2.Date;
// ----------
cekaq.ParamByName('XSIRKOD3').Value:=sb.sirkod;
cekaq.ParamByName('XFIRKOD3').VAlue:=firkod;
cekaq.ParamByName('XBTARIH3').Value:=Datetimepicker1.Date;
cekaq.ParamByName('XSTARIH3').Value:=Datetimepicker2.Date;
// ----------
cekbq.ParamByName('XSIRKOD4').Value:=sb.sirkod;
cekbq.ParamByName('XFIRKOD4').VAlue:=firkod;
cekbq.ParamByName('XBTARIH4').Value:=Datetimepicker1.Date;
cekbq.ParamByName('XSTARIH4').Value:=Datetimepicker2.Date;
//--------------------------
tahsilq.ParamByName('XSIRKOD5').Value:=sb.sirkod;
tahsilq.ParamByName('XFIRKOD5').VAlue:=firkod;
tahsilq.ParamByName('XBTARIH5').Value:=Datetimepicker1.Date;
tahsilq.ParamByName('XSTARIH5').Value:=Datetimepicker2.Date;
//--------------------------
odemeq.ParamByName('XSIRKOD6').Value:=sb.sirkod;
odemeq.ParamByName('XFIRKOD6').VAlue:=firkod;
odemeq.ParamByName('XBTARIH6').Value:=Datetimepicker1.Date;
odemeq.ParamByName('XSTARIH6').Value:=Datetimepicker2.Date;
//--------------------------
Satinalq.prepare;
Stkfisq.prepare;
cekaq.prepare;
cekbq.prepare;
tahsilq.prepare;
odemeq.prepare;
Satinalq.open;
Stkfisq.open;
tahsilq.Open;
odemeq.open;
cekaq.open;
cekbq.open;
ekstra.close;
ekstra.open;
// -------------- Kay齮lar Aktar齦齳or ---------------
satinalq.first;
if satinalq.RecordCount > 0 then
Begin
while not satinalq.Eof do
Begin
ekstra.edit;
ekstraTARIH.Value:=satinalqFISTAR.Value;
ekstrano.Value:=satinalqFISNO.AsInteger;
if satinalqFISTUR.Value=10 then
begin
ekstraISLEM.Text:='SATIN ALIM';
ekstraALACAK.Value:=satinalqGENTUT.Value;
talacak:=talacak + satinalqGENTUT.Value;
end;
if satinalqFISTUR.Value=20 then
begin
ekstraISLEM.Text:='SATI
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -