unit u_rp_sales_profit2022; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, RxMemDS, DB, ADODB, Menus, XPMenu, bsSkinCtrls, dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner, ComCtrls,DateUtils, bsSkinTabs, ExtCtrls, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, kbmMemTable, kbmMemBinaryStreamFormat, wwdbdatetimepicker, RxLookup,IniFiles; type Tfrm_rp_sales_profit2022 = class(TForm) Panel1: TPanel; bsSkinPageControl1: TbsSkinPageControl; bsSkinTabSheet1: TbsSkinTabSheet; bsSkinTabSheet4: TbsSkinTabSheet; bsSkinTabSheet6: TbsSkinTabSheet; bsSkinPageControl2: TbsSkinPageControl; bsSkinTabSheet11: TbsSkinTabSheet; dxDBGrid1: TdxDBGrid; dxDBGrid1Column5: TdxDBGridMaskColumn; dxDBGrid1Column3: TdxDBGridMaskColumn; dxDBGrid1Column4: TdxDBGridMaskColumn; dxDBGrid1Column6: TdxDBGridDateColumn; dxDBGrid1Column7: TdxDBGridMaskColumn; dxDBGrid1Column8: TdxDBGridMaskColumn; dxDBGrid1Column9: TdxDBGridMaskColumn; dxDBGrid1Column10: TdxDBGridMaskColumn; dxDBGrid1Column11: TdxDBGridMaskColumn; dxDBGrid1Column24: TdxDBGridMaskColumn; dxDBGrid1Column25: TdxDBGridMaskColumn; dxDBGrid1Column26: TdxDBGridDateColumn; dxDBGrid1Column31: TdxDBGridMaskColumn; dxDBGrid1Column54: TdxDBGridMaskColumn; dxDBGrid1Column55: TdxDBGridMaskColumn; dxDBGrid1Column56: TdxDBGridColumn; dxDBGrid1Column57: TdxDBGridColumn; dxDBGrid11: TdxDBGridMaskColumn; dxDBGrid12: TdxDBGridMaskColumn; dxDBGrid13: TdxDBGridMaskColumn; dxDBGrid14: TdxDBGridMaskColumn; dxDBGrid15: TdxDBGridMaskColumn; dxDBGrid16: TdxDBGridMaskColumn; dxDBGrid17: TdxDBGridMaskColumn; dxDBGrid18: TdxDBGridMaskColumn; dxDBGrid19: TdxDBGridMaskColumn; dxDBGrid110: TdxDBGridMaskColumn; dxDBGrid1Column80: TdxDBGridMaskColumn; dxDBGrid1TEU: TdxDBGridMaskColumn; dxDBGrid1Column82: TdxDBGridMaskColumn; dxDBGrid1Column83: TdxDBGridMaskColumn; dxDBGrid1Column84: TdxDBGridDateColumn; dxDBGrid1Column89: TdxDBGridMaskColumn; dxDBGrid1Column90: TdxDBGridMaskColumn; dxDBGrid1Column92: TdxDBGridMaskColumn; dxDBGrid1Column85: TdxDBGridMaskColumn; dxDBGrid1Column87: TdxDBGridMaskColumn; dxDBGrid1Column86: TdxDBGridMaskColumn; dxDBGrid1USD: TdxDBGridColumn; dxDBGrid1RMB: TdxDBGridColumn; dxDBGrid1Column102: TdxDBGridColumn; dxDBGrid1Column105: TdxDBGridColumn; dxDBGrid1Column108: TdxDBGridColumn; dxDBGrid1Column111: TdxDBGridColumn; dxDBGrid1Column114: TdxDBGridColumn; dxDBGrid1Column115: TdxDBGridColumn; dxDBGrid1Column116: TdxDBGridColumn; dxDBGrid1Column117: TdxDBGridMaskColumn; dxDBGrid2: TdxDBGrid; dxDBGridMaskColumn93: TdxDBGridMaskColumn; dxDBGrid1Column68: TdxDBGridColumn; dxDBGrid1Column69: TdxDBGridColumn; PopupMenu2: TPopupMenu; N10: TMenuItem; N11: TMenuItem; N14: TMenuItem; N13: TMenuItem; N12: TMenuItem; N15: TMenuItem; N16: TMenuItem; XPMenu2: TXPMenu; bsSkinPanel1: TbsSkinPanel; bsSkinPanel3: TbsSkinPanel; kbmThreadDataSet1: TkbmThreadDataSet; kbmBinaryStreamFormat1: TkbmBinaryStreamFormat; memtblrpt_total: TkbmMemTable; P_SUM: TkbmMemTable; DataSource1: TDataSource; DataSource4: TDataSource; dxDBGrid1Column51: TdxDBGridColumn; dxDBGrid1Column52: TdxDBGridColumn; dxDBGrid1Column53: TdxDBGridColumn; dxDBGrid1Column58: TdxDBGridColumn; dxDBGrid1Column59: TdxDBGridColumn; dxDBGrid2Column12: TdxDBGridColumn; dxDBGrid2Column13: TdxDBGridColumn; dxDBGrid2Column14: TdxDBGridColumn; dxDBGrid2Column15: TdxDBGridColumn; dxDBGrid2Column16: TdxDBGridColumn; dxDBGrid2Column17: TdxDBGridColumn; dxDBGrid2Column18: TdxDBGridColumn; dxDBGrid2Column19: TdxDBGridColumn; dxDBGrid1Column62: TdxDBGridColumn; dxDBGrid9: TdxDBGrid; dxDBGridMaskColumn77: TdxDBGridMaskColumn; dxDBGridColumn27: TdxDBGridColumn; dxDBGridColumn28: TdxDBGridColumn; dxDBGridColumn29: TdxDBGridColumn; dxDBGridColumn30: TdxDBGridColumn; dxDBGridColumn31: TdxDBGridColumn; dxDBGridColumn32: TdxDBGridColumn; dxDBGridColumn33: TdxDBGridColumn; dxDBGridColumn34: TdxDBGridColumn; dxDBGridColumn35: TdxDBGridColumn; dxDBGridColumn36: TdxDBGridColumn; dxDBGridColumn37: TdxDBGridColumn; dxDBGridColumn38: TdxDBGridColumn; dxDBGridColumn39: TdxDBGridColumn; dxDBGridColumn40: TdxDBGridColumn; dxDBGridColumn41: TdxDBGridColumn; dxDBGridColumn42: TdxDBGridColumn; dxDBGridColumn43: TdxDBGridColumn; dxDBGridColumn44: TdxDBGridColumn; dxDBGridColumn45: TdxDBGridColumn; dxDBGridColumn56: TdxDBGridColumn; dxDBGrid2Column23: TdxDBGridColumn; P_SUMField: TStringField; P_SUMField2: TFloatField; P_SUMField7: TFloatField; P_SUMField8: TFloatField; P_SUMField9: TFloatField; P_SUMField10: TFloatField; P_SUMField11: TFloatField; P_SUMField12: TFloatField; P_SUMField13: TFloatField; P_SUMField16: TFloatField; pnl1: TPanel; bsSkinButton10: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton5: TbsSkinButton; dxDBGrid2Column21: TdxDBGridColumn; bsSkinGroupBox1: TbsSkinGroupBox; bsSkinGroupBox2: TbsSkinGroupBox; Label6: TLabel; Edit1: TEdit; Label1: TLabel; Edit2: TEdit; Label2: TLabel; Label3: TLabel; Edit3: TEdit; Label4: TLabel; Edit4: TEdit; Label5: TLabel; Edit5: TEdit; Label7: TLabel; Edit6: TEdit; Label8: TLabel; bsSkinGroupBox3: TbsSkinGroupBox; Label9: TLabel; Label10: TLabel; Label11: TLabel; Edit7: TEdit; Edit8: TEdit; wwDBComboBox2: TwwDBComboBox; Label12: TLabel; dxDBGrid1Column60: TdxDBGridColumn; dxDBGrid1Column61: TdxDBGridColumn; dxDBGrid1Column63: TdxDBGridColumn; dxDBGrid1Column64: TdxDBGridColumn; dxDBGrid1Column65: TdxDBGridColumn; dxDBGrid1Column66: TdxDBGridColumn; dxDBGrid1Column67: TdxDBGridColumn; dxDBGrid1Column70: TdxDBGridColumn; dxDBGrid1Column71: TdxDBGridColumn; P_SUMA1: TFloatField; P_SUMA2: TFloatField; P_SUMField3: TFloatField; P_SUMField4: TFloatField; P_SUMField5: TFloatField; dxDBGrid2Column20: TdxDBGridColumn; dxDBGrid2Column22: TdxDBGridColumn; dxDBGrid2Column24: TdxDBGridColumn; dxDBGrid2Column25: TdxDBGridColumn; dxDBGrid2Column26: TdxDBGridColumn; dxDBGrid1Column72: TdxDBGridColumn; procedure bsSkinButton5Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure N10Click(Sender: TObject); procedure N14Click(Sender: TObject); procedure N12Click(Sender: TObject); procedure N16Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure P_SUMAfterOpen(DataSet: TDataSet); procedure memtblrpt_totalAfterOpen(DataSet: TDataSet); private procedure GetProfit; procedure Getlx; procedure Getcq; procedure GetProfitSum; function GetSALEprofit(SALE:string;aMonth:Integer;profit:Double;tuo:boolean):Double; function GetBetwMonth(aBe,aEe:TDate):Integer; function issameMonth(aBe,aEe:TDate):Boolean; function gettotalprofit(sale:string):double; { Private declarations } public sqlstr:WideString; { Public declarations } end; var frm_rp_sales_profit2022: Tfrm_rp_sales_profit2022; rp_rp_total_open:boolean; implementation uses u_main, my_sys_function, u_rp_query, u_sys_progress, u_data_share; {$R *.dfm} procedure Tfrm_rp_sales_profit2022.bsSkinButton5Click(Sender: TObject); begin close; end; function Tfrm_rp_sales_profit2022.GetSALEprofit(SALE:string;aMonth:Integer;profit:Double;tuo:boolean):Double; begin end; procedure Tfrm_rp_sales_profit2022.FormClose(Sender: TObject; var Action: TCloseAction); begin savereggrid(dxdbgrid1,caption+'1'); savereggrid(dxdbgrid2,caption+'2'); frm_rp_sales_profit2022.Hide; frm_rp_sales_profit2022.ManualFloat(frm_rp_sales_profit2022.BoundsRect ); frm_main.freeTabs('frm_rp_sales_profit2022'); action:=cafree; frm_rp_sales_profit2022:=nil; end; procedure Tfrm_rp_sales_profit2022.FormShow(Sender: TObject); var inifile1:Tinifile; begin inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini'); edit1.text:=inifile1.ReadString('TC2022','FA1DAY','17'); edit2.text:=inifile1.ReadString('TC2022','FABL1','15'); edit3.text:=inifile1.ReadString('TC2022','FABL2','10'); edit4.text:=inifile1.ReadString('TC2022','FBBL1','10'); edit5.text:=inifile1.ReadString('TC2022','FBBL2','10'); edit6.text:=inifile1.ReadString('TC2022','FBBL3','10'); edit7.text:=inifile1.ReadString('TC2022','SZKK','15'); edit8.text:=inifile1.ReadString('TC2022','SZTC','5'); inifile1.free; loadreggrid(dxdbgrid1,true,caption+'1'); loadreggrid(dxdbgrid2,false,caption+'2'); end; procedure Tfrm_rp_sales_profit2022.bsSkinButton9Click(Sender: TObject); begin sys_print('业务提成2022',2,nil,nil,nil,DataSource4,DataSource1,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_rp_sales_profit2022.N10Click(Sender: TObject); begin if bsSkinTabSheet1.Showing then begin if bsSkinTabSheet11.Showing then begin update_grid_view_no(dxdbgrid1); exit; end; end else begin if bsSkinTabSheet4.Showing then begin update_grid_view_no(dxdbgrid2); exit; end; end; end; procedure Tfrm_rp_sales_profit2022.N14Click(Sender: TObject); begin if bsSkinTabSheet1.Showing then begin if bsSkinTabSheet11.Showing then begin update_grid_view_all(dxdbgrid1); exit; end; end else begin if bsSkinTabSheet4.Showing then begin update_grid_view_all(dxdbgrid2); exit; end; end; end; procedure Tfrm_rp_sales_profit2022.N12Click(Sender: TObject); begin if bsSkinTabSheet1.Showing then begin if bsSkinTabSheet11.Showing then begin update_grid(dxdbgrid1,211); exit; end; end; if bsSkinTabSheet4.Showing then begin update_grid(dxdbgrid2,212); exit; end; end; procedure Tfrm_rp_sales_profit2022.N16Click(Sender: TObject); begin if bsSkinTabSheet1.Showing then begin if bsSkinTabSheet11.Showing then begin grid_save_xls(dxdbgrid1); exit; end; end else begin if bsSkinTabSheet4.Showing then begin grid_save_xls(dxdbgrid2); exit; end; end; end; procedure Tfrm_rp_sales_profit2022.bsSkinButton10Click(Sender: TObject); var betd,eetd:TDate; aquery:TADOQuery; str:String; inifile1:Tinifile; begin inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini'); inifile1.WriteString('TC2022','FA1DAY',edit1.text); inifile1.WriteString('TC2022','FABL1',edit2.text); Inifile1.WriteString('TC2022','FABL2',edit3.text); inifile1.WriteString('TC2022','FBBL1',edit4.text); inifile1.WriteString('TC2022','FBBL2',edit5.text); Inifile1.WriteString('TC2022','FBBL3',edit6.text); inifile1.WriteString('TC2022','SZKK',edit7.text); inifile1.WriteString('TC2022','SZTC',edit8.text); inifile1.free; if (Trim(wwDBComboBox2.text)='') then begin ShowMessage('提成模板不能为空!'); exit; end; sqlstr:=''; query_seae(22,'0001'); sqlstr:=StringReplace(sqlstr,'t_op_seae','v_op_bscard_MAX_2022',[replaceAll]); memtblrpt_total.EmptyTable; P_SUM.EmptyTable; aQuery:=CreateAdoQuery; try with aQuery do begin aQuery.Close; aquery.sql.Clear; aquery.SQL.Add('select * from v_op_bscard_MAX_2022 '); aquery.SQL.Add(sqlstr); aquery.Open; memtblrpt_total.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]); end; GetProfit; finally FreeAndNil(aQuery); end; end; procedure Tfrm_rp_sales_profit2022.GetProfit; var aQuery,aQuery3:TADOQuery; aStlDate:TDate; bYear,bMonth,bDate,eYear,eMonth,eDate:Word; btMonth,l,d,Aday:Integer; Abl1,Abl2,Bbl1,Bbl2,Bbl3,Szbl,Sztc:Double; ED:Boolean; begin if not P_SUM.Active then P_SUM.Open; Aday:=StrToIntDef(Edit1.Text,0); Abl1:=StrToFloatDef(Edit2.Text,0); Abl2:=StrToFloatDef(Edit3.Text,0); Bbl1:=StrToFloatDef(Edit4.Text,0); Bbl2:=StrToFloatDef(Edit5.Text,0); Bbl3:=StrToFloatDef(Edit6.Text,0); Szbl:=StrToFloatDef(Edit7.Text,0); Sztc:=StrToFloatDef(Edit8.Text,0); if memtblrpt_total.RecordCount=0 then exit; l:=memtblrpt_total.RecordCount; if l=0 then l:=100; memtblrpt_total.FieldByName('A方案1').ReadOnly:=false; memtblrpt_total.FieldByName('A方案2').ReadOnly:=false; memtblrpt_total.FieldByName('次月结算').ReadOnly:=false; memtblrpt_total.FieldByName('次二月结算').ReadOnly:=false; memtblrpt_total.FieldByName('次三月结算').ReadOnly:=false; memtblrpt_total.FieldByName('死账提成').ReadOnly:=false; memtblrpt_total.FieldByName('死账扣除').ReadOnly:=false; memtblrpt_total.FieldByName('已收A方案1').ReadOnly:=false; memtblrpt_total.FieldByName('已收A方案2').ReadOnly:=false; memtblrpt_total.FieldByName('已收次月结算').ReadOnly:=false; memtblrpt_total.FieldByName('已收次二月结算').ReadOnly:=false; memtblrpt_total.FieldByName('已收次三月结算').ReadOnly:=false; memtblrpt_total.FieldByName('回款天数').ReadOnly:=false; try if not ASSIGNED(frm_sys_progress) then frm_sys_progress:=tfrm_sys_progress.Create(application); frm_sys_progress.Show; frm_sys_progress.bsSkinGauge1.MaxValue:=l; frm_sys_progress.bsSkinGauge1.MinValue:=0; frm_sys_progress.bsSkinGauge1.Value:=0; frm_sys_progress.Update; memtblrpt_total.First; while not memtblrpt_total.eof do begin memtblrpt_total.Edit; if (memtblrpt_total.FieldByName('合计应收').AsFloat=memtblrpt_total.FieldByName('合计已收').AsFloat) then begin if (wwDBComboBox2.Text='A方案') then begin memtblrpt_total.fieldbyname('回款天数').AsInteger:=DaysBetween(memtblrpt_total.FieldByName('结算日期').AsDateTime,memtblrpt_total.FieldByName('预抵日期').AsDateTime); if (memtblrpt_total.fieldbyname('回款天数').AsInteger<=Aday) then begin memtblrpt_total.fieldbyname('A方案1').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Abl1/100; memtblrpt_total.fieldbyname('已收A方案1').AsFloat:=memtblrpt_total.fieldbyname('合计已收').AsFloat; end else begin memtblrpt_total.fieldbyname('A方案2').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Abl2/100; memtblrpt_total.fieldbyname('已收A方案2').AsFloat:=memtblrpt_total.fieldbyname('合计已收').AsFloat; end; end else if (wwDBComboBox2.Text='B方案') then begin if (GetBetwMonth(memtblrpt_total.FieldByName('结算日期').AsDateTime,memtblrpt_total.FieldByName('预抵日期').AsDateTime)<=1) then begin memtblrpt_total.fieldbyname('次月结算').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Bbl1/100; memtblrpt_total.fieldbyname('已收次月结算').AsFloat:=memtblrpt_total.fieldbyname('合计已收').AsFloat; end else if (GetBetwMonth(memtblrpt_total.FieldByName('结算日期').AsDateTime,memtblrpt_total.FieldByName('预抵日期').AsDateTime)<=2) then begin memtblrpt_total.fieldbyname('已收次二月结算').AsFloat:=memtblrpt_total.fieldbyname('合计已收').AsFloat; memtblrpt_total.fieldbyname('次二月结算').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Bbl2/100; end else if (GetBetwMonth(memtblrpt_total.FieldByName('结算日期').AsDateTime,memtblrpt_total.FieldByName('预抵日期').AsDateTime)<=6) then begin memtblrpt_total.fieldbyname('次三月结算').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Bbl3/100; memtblrpt_total.fieldbyname('已收次三月结算').AsFloat:=memtblrpt_total.fieldbyname('合计已收').AsFloat; end; end; if (GetBetwMonth(Date,memtblrpt_total.FieldByName('预抵日期').AsDateTime)>6) then begin memtblrpt_total.fieldbyname('死账提成').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Sztc/100; end; end else begin if (GetBetwMonth(Date,memtblrpt_total.FieldByName('预抵日期').AsDateTime)>=6) then begin memtblrpt_total.fieldbyname('死账扣除').AsFloat:=memtblrpt_total.fieldbyname('毛利润').AsFloat*Szbl/100; end; end; memtblrpt_total.Post; if not P_SUM.Locate('揽货人',memtblrpt_total.fieldbyname('揽货人').asstring,[])then begin P_SUM.insert; P_SUM['揽货人']:=memtblrpt_total.fieldbyname('揽货人').asstring; P_SUM['A方案1']:=memtblrpt_total.fieldbyname('A方案1').AsFloat; P_SUM['A方案2']:=memtblrpt_total.fieldbyname('A方案2').AsFloat; P_SUM['次月结算']:=memtblrpt_total.fieldbyname('次月结算').AsFloat; P_SUM['次二月结算']:=memtblrpt_total.fieldbyname('次二月结算').AsFloat; P_SUM['次三月结算']:=memtblrpt_total.fieldbyname('次三月结算').AsFloat; P_SUM['死账扣除']:=memtblrpt_total.fieldbyname('死账扣除').AsFloat; P_SUM['死账提成']:=memtblrpt_total.fieldbyname('死账提成').AsFloat; P_SUM['毛利润']:=memtblrpt_total.fieldbyname('毛利润').AsFloat; P_SUM['合计提成']:=P_SUM['A方案1']+P_SUM['A方案2']+P_SUM['次月结算']+P_SUM['次二月结算']+P_SUM['次三月结算']+P_SUM['死账提成']-P_SUM['死账扣除']; P_SUM.Post; end else begin P_SUM.edit; P_SUM['揽货人']:=memtblrpt_total.fieldbyname('揽货人').asstring; P_SUM['A方案1']:=P_SUM.fieldbyname('A方案1').AsFloat+memtblrpt_total.fieldbyname('A方案1').AsFloat; P_SUM['A方案2']:=P_SUM.fieldbyname('A方案2').AsFloat+memtblrpt_total.fieldbyname('A方案2').AsFloat; P_SUM['次月结算']:=P_SUM.fieldbyname('次月结算').AsFloat+memtblrpt_total.fieldbyname('次月结算').AsFloat; P_SUM['次二月结算']:=P_SUM.fieldbyname('次二月结算').AsFloat+memtblrpt_total.fieldbyname('次二月结算').AsFloat; P_SUM['次三月结算']:=P_SUM.fieldbyname('次三月结算').AsFloat+memtblrpt_total.fieldbyname('次三月结算').AsFloat; P_SUM['死账扣除']:=P_SUM.fieldbyname('死账扣除').AsFloat+memtblrpt_total.fieldbyname('死账扣除').AsFloat; P_SUM['死账提成']:=P_SUM.fieldbyname('死账提成').AsFloat+memtblrpt_total.fieldbyname('死账提成').AsFloat; P_SUM['毛利润']:=P_SUM.fieldbyname('毛利润').AsFloat+memtblrpt_total.fieldbyname('毛利润').AsFloat; P_SUM['合计提成']:=P_SUM['A方案1']+P_SUM['A方案2']+P_SUM['次月结算']+P_SUM['次二月结算']+P_SUM['次三月结算']+P_SUM['死账提成']-P_SUM['死账扣除']; P_SUM.Post; end; frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; memtblrpt_total.Next; end; finally frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.MaxValue; frm_sys_progress.free; frm_sys_progress:=nil; FreeAndNil(aQuery); FreeAndNil(aQuery3); end; end; procedure Tfrm_rp_sales_profit2022.GetProfitSum; begin end; procedure Tfrm_rp_sales_profit2022.Getlx; begin end; function Tfrm_rp_sales_profit2022.GetBetwMonth(aBe, aEe: TDate): Integer; var bYear,bMonth,bDate,eYear,eMonth,eDate:Word; begin DecodeDate(aBe,bYear,bMonth,bDate); DecodeDate(aEe,eYear,eMonth,eDate); if bYear=eYear then Result:=Abs(bMonth-eMonth) else begin if bYear>eYear then begin Result:=bMonth+(12-eMonth); end else begin Result:=eMonth+(12-bMonth); end; end; end; function Tfrm_rp_sales_profit2022.issameMonth(aBe, aEe: TDate): Boolean; begin end; procedure Tfrm_rp_sales_profit2022.Getcq; begin end; procedure Tfrm_rp_sales_profit2022.P_SUMAfterOpen(DataSet: TDataSet); begin AdoFormatdxDBGrid(DataSet); end; procedure Tfrm_rp_sales_profit2022.memtblrpt_totalAfterOpen(DataSet: TDataSet); begin AdoFormatdxDBGrid(DataSet); end; function Tfrm_rp_sales_profit2022.gettotalprofit(sale: string): double; begin end; end.