You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1640 lines
66 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_rp_ch_clienttotal;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, ComCtrls, bsSkinTabs, DB, ADODB,
dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner,
RxLookup, StdCtrls, RxMemDS, Menus, XPMenu, Grids, DBGrids;
type
Tfrm_rp_ch_clienttotal = class(TForm)
Panel1: TPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
SaveDialog: TSaveDialog;
bsSkinPageControl4: TbsSkinPageControl;
p_accept_bill1: TDataSource;
t_ch_dui_format: TADOQuery;
t_ch_dui_format1: TDataSource;
QryFeeDetail: TADOQuery;
t_bill_fee_dong: TRxMemoryData;
t_bill_fee_dong1: TDataSource;
PopupMenu2: TPopupMenu;
N16: TMenuItem;
XPMenu1: TXPMenu;
bsSkinTabSheet3: TbsSkinTabSheet;
bstab4: TbsSkinTabSheet;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGridColumn26: TdxDBGridColumn;
dxDBGridColumn27: TdxDBGridColumn;
dxDBGridColumn28: TdxDBGridColumn;
dxDBGridColumn29: TdxDBGridColumn;
dxDBGridColumn30: TdxDBGridColumn;
dxDBGridColumn31: TdxDBGridColumn;
dxDBGridColumn32: TdxDBGridColumn;
dxDBGridColumn33: TdxDBGridColumn;
dxDBGridColumn34: TdxDBGridColumn;
dxDBGridColumn35: TdxDBGridColumn;
dxDBGridColumn36: TdxDBGridColumn;
dxDBGridColumn37: TdxDBGridColumn;
bsSkinButton2: TbsSkinButton;
p_accept_bill: TADOStoredProc;
bsSkinPanel1: TbsSkinPanel;
Label15: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
p_total_client: TADOStoredProc;
p_total_client1: TDataSource;
t_fee_group: TRxMemoryData;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure dxDBGrid5DblClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
private
procedure Createdui_table(t_bill: TRxMemoryData;str:widestring;table_bill,table_fee:TDataSet;DM_ID:integer);
procedure Createdui_Grid(str:widestring;dxdbgrid2:TdxdbGrid);
procedure dui_chgrid(str:widestring;dxdbgrid2,dxdbgridgroup:TdxdbGrid;DM_ID:integer;aAllTable:TDataSet;DC:String);
procedure dui_chtable(t_bill,t_group: TRxMemoryData;str:widestring;table_bill,table_fee:TDataSet;DM_ID:integer;sortstr:String);
{ Private declarations }
public
FeeGroup:String;
{ Public declarations }
end;
var
frm_rp_ch_clienttotal: Tfrm_rp_ch_clienttotal;
implementation
uses u_main, u_rp_no_seae_query,my_sys_function, u_rp_total_query,
u_rp_dui_format, u_sys_progress, u_rp_dui_formatrpt;
{$R *.dfm}
procedure Tfrm_rp_ch_clienttotal.Createdui_Grid(str:widestring;dxdbgrid2:TdxdbGrid);
var
Column :TdxDBTreeListColumn;
i:integer;
str_list:Tstringlist;
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
str_list:=Tstringlist.create();
str_list.Text:=trim(str);
while dxDBGrid2.columncount>0 do
begin
dxDBGrid2.Columns[0].Destroy;
end;
for i:=0 to str_list.Count-1 do
begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:=copy(str_list[i],2,length(str_list[i])-1);
Column.FieldName:=copy(str_list[i],2,length(str_list[i])-1);
Column.ReadOnly:=true;
if Pos('<27><><EFBFBD><EFBFBD>',str_list[i])>0 then
begin
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end
else
begin
Column.Width:=100;
end;
end;
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee '+FeeGroup);
Open;
First;
while not Eof do begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Next;
end;
end;
finally
str_list.free;
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_rp_ch_clienttotal.Createdui_table(t_bill: TRxMemoryData;str:widestring;table_bill,table_fee:TDataSet;DM_ID:integer);
var
i,j:integer;
str_list:Tstringlist;
aQuery,aQuery2,aQuery3:TADOQuery;
sl:Double;
cntrStr:String;
begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
aQuery3:=CreateAdoQuery;
try
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=table_bill.RecordCount*2+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
str_list:=Tstringlist.create();
str_list.Text:=trim(str);
t_bill.close;
t_bill.FieldDefs.Clear;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.FieldDefs.Add('<27><><EFBFBD><EFBFBD>',ftString,12);
t_bill.FieldDefs.Add('BILLID',ftInteger);
for i:=0 to str_list.Count-1 do
begin
if copy(str_list[i],1,1)='0' then
begin
t_bill.FieldDefs.Add(copy(str_list[i],2,length(str_list[i])-1),ftString,80);
end
else
begin
t_bill.FieldDefs.Add(copy(str_list[i],2,length(str_list[i])-1),ftFloat);
end;
end;
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee '+FeeGroup);
Open;
First;
while not Eof do begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>',ftFloat);
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>',ftFloat);
Next;
end;
end;
t_bill.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
table_bill.first;
while not table_bill.eof do
begin
inc(j);
t_bill.insert;
t_bill['BILLID']:=j;
t_bill['<27><><EFBFBD><EFBFBD>']:=table_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
for i:=0 to str_list.Count-1 do
begin
if copy(str_list[i],1,1)='0' then
begin
t_bill[copy(str_list[i],2,length(str_list[i])-1)]:=
table_bill.fieldbyname(copy(str_list[i],2,length(str_list[i])-1)).asstring;
end
else
begin
t_bill[copy(str_list[i],2,length(str_list[i])-1)]:=0;
end;
end;
with aQuery do begin
First;
while not Eof do begin
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat:=0;
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>').AsFloat:=0;
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat:=0;
Next;
end;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
aQuery.First;
while not aQuery.Eof do begin
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+table_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+table_bill.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'''');
aQuery2.Open;
if not aQuery2.IsEmpty then begin
aQuery2.First;
while not aQuery2.Eof do begin
sl:=aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
cntrStr:=aQuery2.FieldByName('<27><>׼').AsString;
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>').AsFloat:=t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>').AsFloat+aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
aQuery3.Close;
aQuery3.SQL.Clear;
aQuery3.SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+table_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+''' and <20><>׼='''+cntrStr+'''');
aQuery3.Open;
if not aQuery3.IsEmpty then
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat:=t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat+aQuery3.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*sl;
aQuery2.Next;
end;
t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat:=t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>').AsFloat-t_bill.FieldByName(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'֧<><D6A7>').AsFloat;
end;
aQuery.Next;
end;
t_bill.post;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
table_bill.next;
end;
t_bill.SortOnFields('BILLID');
finally
str_list.free;
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
FreeAndNil(aQuery3);
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
procedure Tfrm_rp_ch_clienttotal.dui_chgrid(str:widestring;dxdbgrid2,dxdbgridgroup:TdxdbGrid;DM_ID:integer;aAllTable:TDataSet;DC:String);
var
Column :TdxDBTreeListColumn;
i:integer;
str_list:Tstringlist;
aQuery,aQuery2:TADOQuery;
begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
aQuery.Close;aQuery.SQL.Clear;
aQuery.SQL.Add('Select * from t_ch_dui_feefield where DM_ID='+inttostr(DM_ID));
aQuery.Open;
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select * from t_ch_dui_feename where DM_ID='+inttostr(DM_ID));
aQuery2.Open;
str_list:=Tstringlist.create();
str_list.Text:=trim(str);
while dxDBGrid2.columncount>0 do
begin
dxDBGrid2.Columns[0].Destroy;
end;
while dxDBGridgroup.columncount>0 do
begin
dxDBGridgroup.Columns[0].Destroy;
end;
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=100;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=100;
for i:=0 to str_list.Count-1 do
begin
if copy(str_list[i],1,1)='0' then
begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:=copy(str_list[i],2,length(str_list[i])-1);
Column.FieldName:=copy(str_list[i],2,length(str_list[i])-1);
Column.ReadOnly:=true;
Column.Width:=100;
end
else
begin
// Column.Width:=80;
// Column.SummaryFooterType:=cstSum;
end;
end;
if not aQuery.IsEmpty then begin
aQuery.First;
while not aQuery.eof do begin
if (DC='<27><>') or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>USD<53><44>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>USD<53><44>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>USD<53><44>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>USD<53><44>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>OT<4F><54>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>OT<4F><54>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>OT<4F><54>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>OT<4F><54>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<>պϼ<D5BA><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<>պϼ<D5BA><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<>պϼ<D5BA><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<>պϼ<D5BA><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
if (DC='<27><>') or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>USD<53><44>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>USD<53><44>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>USD<53><44>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>USD<53><44>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>OT<4F><54>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>OT<4F><54>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>OT<4F><54>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>OT<4F><54>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6>RMB<4D><42>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
if Trim(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ'])<>'' then
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>ʾ']
else
Column.Caption:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
aQuery.Next;
end;
end;
if (DC='<27><>') or (DC='ȫ<><C8AB>') then begin
if aAllTable['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<>պϼ<D5BA>USD'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>USD';
Column.FieldName:='Ӧ<>պϼ<D5BA>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>USD';
Column.FieldName:='Ӧ<>պϼ<D5BA>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<>պϼ<D5BA>OT'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>OT';
Column.FieldName:='Ӧ<>պϼ<D5BA>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>OT';
Column.FieldName:='Ӧ<>պϼ<D5BA>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<>պϼ<D5BA>RMB'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>RMB';
Column.FieldName:='Ӧ<>պϼ<D5BA>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<>պϼ<D5BA>RMB';
Column.FieldName:='Ӧ<>պϼ<D5BA>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<>պϼ<D5BA>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='Ӧ<>պϼ<D5BA>';
Column.FieldName:='Ӧ<>պϼ<D5BA>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='Ӧ<>պϼ<D5BA>';
Column.FieldName:='Ӧ<>պϼ<D5BA>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
if (DC='<27><>') or (DC='ȫ<><C8AB>') then begin
if aAllTable['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.FieldName:='Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn);
Column.Caption:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT';
Column.FieldName:='Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
if (DC='ȫ<><C8AB>') then begin
if aAllTable['USD<53><44><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='USD<53><44><EFBFBD><EFBFBD>';
Column.FieldName:='USD<53><44><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='USD<53><44><EFBFBD><EFBFBD>';
Column.FieldName:='USD<53><44><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['RMB<4D><42><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='RMB<4D><42><EFBFBD><EFBFBD>';
Column.FieldName:='RMB<4D><42><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='RMB<4D><42><EFBFBD><EFBFBD>';
Column.FieldName:='RMB<4D><42><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['OT<4F><54><EFBFBD><EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='OT<4F><54><EFBFBD><EFBFBD>';
Column.FieldName:='OT<4F><54><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='OT<4F><54><EFBFBD><EFBFBD>';
Column.FieldName:='OT<4F><54><EFBFBD><EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
if aAllTable['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
Column:=dxDBGrid2.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:='<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
Column:=dxDBGridgroup.CreateColumn(TdxDBGridColumn) ;
Column.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.FieldName:='<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>';
Column.ReadOnly:=true;
Column.Width:=80;
Column.SummaryFooterType:=cstSum;
end;
end;
finally
str_list.free;
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
procedure Tfrm_rp_ch_clienttotal.dui_chtable(t_bill,t_group: TRxMemoryData;str:widestring;table_bill,table_fee:TDataSet;DM_ID:integer;sortstr:String);
var
i,j:integer;
str_list:Tstringlist;
aQuery,aQuery2:TADOQuery;
DC,aFieldN:String;
begin
DC:='ȫ<><C8AB>';
if bsSkinCheckRadioBox1.Checked then
aFieldN:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else
aFieldN:='<27><><EFBFBD><EFBFBD>';
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
aQuery.Close;aQuery.SQL.Clear;
aQuery.SQL.Add('Select * from t_ch_dui_feefield where DM_ID='+inttostr(DM_ID));
aQuery.Open;
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select * from t_ch_dui_feename where DM_ID='+inttostr(DM_ID));
aQuery2.Open;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=table_bill.RecordCount*2+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
str_list:=Tstringlist.create();
str_list.Text:=trim(str);
t_bill.close;
t_bill.FieldDefs.Clear;
t_group.close;
t_group.FieldDefs.Clear;
t_group.FieldDefs.Add('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',ftString,30);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.FieldDefs.Add('<27><><EFBFBD><EFBFBD>',ftString,12);
t_bill.FieldDefs.Add('BILLID',ftInteger);
t_bill.FieldDefs.Add('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',ftString,30);
for i:=0 to str_list.Count-1 do
begin
if copy(str_list[i],1,1)='0' then
begin
if pos('<27><><EFBFBD><EFBFBD>',str_list[i])>0 then
t_bill.FieldDefs.Add(copy(str_list[i],2,length(str_list[i])-1),ftDate,0)
else
t_bill.FieldDefs.Add(copy(str_list[i],2,length(str_list[i])-1),ftString,80);
end
else
begin
// t_bill.FieldDefs.Add(copy(str_list[i],2,length(str_list[i])-1),ftFloat);
end;
end;
if not aQuery.IsEmpty then begin
aQuery.First;
while not aQuery.eof do begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD',ftFloat);
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB',ftFloat);
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT',ftFloat);
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>',ftFloat);
end;
end;
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD',ftFloat);
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT',ftFloat);
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB',ftFloat);
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',ftFloat);
end;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>',ftFloat);
t_group.FieldDefs.Add(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>',ftFloat);
end;
end;
aQuery.Next;
end;
end;
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill.FieldDefs.Add('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<>պϼ<D5BA>USD',ftFloat);
t_bill.FieldDefs.Add('Ӧ<>պϼ<D5BA>RMB',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<>պϼ<D5BA>OT',ftFloat);
t_bill.FieldDefs.Add('Ӧ<>պϼ<D5BA>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<>պϼ<D5BA>USD',ftFloat);
t_group.FieldDefs.Add('Ӧ<>պϼ<D5BA>RMB',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<>պϼ<D5BA>OT',ftFloat);
t_group.FieldDefs.Add('Ӧ<>պϼ<D5BA>',ftFloat);
end;
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ',ftString,200);
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill.FieldDefs.Add('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT',ftFloat);
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT',ftFloat);
t_group.FieldDefs.Add('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',ftFloat);
end;
t_bill.FieldDefs.Add('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ',ftString,200);
if (DC='ȫ<><C8AB>') then begin
t_bill.FieldDefs.Add('USD<53><44><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('RMB<4D><42><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('OT<4F><54><EFBFBD><EFBFBD>',ftFloat);
t_bill.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>',ftFloat);
t_group.FieldDefs.Add('USD<53><44><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('RMB<4D><42><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('OT<4F><54><EFBFBD><EFBFBD>',ftFloat);
t_group.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>',ftFloat);
end;
t_bill.open;
t_group.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
table_bill.first;
while not table_bill.eof do
begin
inc(j);
if t_group.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',table_bill.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then begin
t_group.edit;
end else begin
t_group.Insert;
t_group['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=table_bill.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
for i:=0 to t_group.FieldCount-1 do begin
if t_group.Fields[i].FieldName<>'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>' then begin
t_group.Fields[i].AsFloat:=0;
end;
end;
end;
t_bill.insert;
t_bill['BILLID']:=j;
t_bill['<27><><EFBFBD><EFBFBD>']:=table_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bill['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=table_bill.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
for i:=0 to str_list.Count-1 do
begin
if copy(str_list[i],1,1)='0' then
begin
t_bill[copy(str_list[i],2,length(str_list[i])-1)]:=
table_bill.fieldbyname(copy(str_list[i],2,length(str_list[i])-1)).value;
end
else
begin
// t_bill[copy(str_list[i],2,length(str_list[i])-1)]:=0;
end;
end;
if not aQuery.IsEmpty then begin
aQuery.First;
while not aQuery.eof do begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=0;
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=0;
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=0;
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=0;
end;
end;
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=0;
end;
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=0;
end;
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=0;
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
end;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
end;
end;
aQuery.Next;
end;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
table_fee.first;
while not table_fee.eof do
begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='USD'then
begin
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>USD').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['USD<53><44><EFBFBD><EFBFBD>']:=t_bill.FieldByName('USD<53><44><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['USD<53><44><EFBFBD><EFBFBD>']:=t_group.FieldByName('USD<53><44><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end
else
begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB'then begin
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['RMB<4D><42><EFBFBD><EFBFBD>']:=t_bill.FieldByName('RMB<4D><42><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_group['RMB<4D><42><EFBFBD><EFBFBD>']:=t_group.FieldByName('RMB<4D><42><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
end
end else begin
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>OT').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['OT<4F><54><EFBFBD><EFBFBD>']:=t_bill.FieldByName('OT<4F><54><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['OT<4F><54><EFBFBD><EFBFBD>']:=t_group.FieldByName('OT<4F><54><EFBFBD><EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='USD'then
begin
t_bill['Ӧ<>պϼ<D5BA>USD']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>USD').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['Ӧ<>պϼ<D5BA>']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<>պϼ<D5BA>USD']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>USD').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<>պϼ<D5BA>']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['USD<53><44><EFBFBD><EFBFBD>']:=t_bill.FieldByName('USD<53><44><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['USD<53><44><EFBFBD><EFBFBD>']:=t_group.FieldByName('USD<53><44><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end
else
begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then begin
t_bill['Ӧ<>պϼ<D5BA>RMB']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bill['Ӧ<>պϼ<D5BA>']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<>պϼ<D5BA>RMB']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<>պϼ<D5BA>']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['RMB<4D><42><EFBFBD><EFBFBD>']:=t_bill.FieldByName('RMB<4D><42><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['RMB<4D><42><EFBFBD><EFBFBD>']:=t_group.FieldByName('RMB<4D><42><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
end;
end else begin
t_bill['Ӧ<>պϼ<D5BA>OT']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>OT').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['Ӧ<>պϼ<D5BA>']:=t_bill.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['Ӧ<>պϼ<D5BA>OT']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>OT').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<>պϼ<D5BA>']:=t_group.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
if (DC='ȫ<><C8AB>') then begin
t_bill['OT<4F><54><EFBFBD><EFBFBD>']:=t_bill.FieldByName('OT<4F><54><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_bill['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_bill.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group['OT<4F><54><EFBFBD><EFBFBD>']:=t_group.FieldByName('OT<4F><54><EFBFBD><EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat;
t_group['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>']:=t_group.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
end;
if aQuery2.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
begin
aQuery.Locate('FF_ID',aQuery2['FF_ID'],[]);
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='USD'then begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>USD'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>USD').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
end else begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB'then begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>RMB'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>RMB').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
END else begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
-table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
if aQuery['Ӧ<><D3A6>OT'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<><D3A6>OT').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if aQuery['Ӧ<>պϼ<D5BA>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'Ӧ<>պϼ<D5BA>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
if (DC='ȫ<><C8AB>') then begin
if aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'] then begin
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_bill.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=
t_group.fieldbyname(aQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>']+'<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat*table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
end;
end;
end
else
begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='USD'then begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':'+table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring+table_fee.fieldbyname(aFieldN).asstring+';';
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>USD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':USD'+table_fee.fieldbyname(aFieldN).asstring+';';
end;
end else begin
if table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':'+table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring+table_fee.fieldbyname(aFieldN).asstring+';';
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>RMB<4D><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':RMB'+table_fee.fieldbyname(aFieldN).asstring+';';
end;
END else begin
if table_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>' then begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':'+table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring+table_fee.fieldbyname(aFieldN).asstring+';';
end else begin
if (DC='<27><>')or (DC='ȫ<><C8AB>') then begin
t_bill['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_bill.FieldByName('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
t_group['Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=
t_group.FieldByName('Ӧ<><D3A6>OT<4F><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
+table_fee.fieldbyname(aFieldN).asfloat;
end;
if table_fee.fieldbyname(aFieldN).AsFloat<>0 then
t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString:=t_bill.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ').AsString+table_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+':'+table_fee.fieldbyname('<27>ұ<EFBFBD>').asstring+table_fee.fieldbyname(aFieldN).asstring+';';
end;
end;
end;
end;
table_fee.next;
end;
t_bill.post;
t_group.Post;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
table_bill.next;
end;
t_bill.First;
while not t_bill.Eof do begin
if DC='<27><>' then begin
if t_bill['Ӧ<>պϼ<D5BA>']=0 then
t_bill.Delete;
end;
if DC='<27><>' then begin
if t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']=0 then
t_bill.Delete;
end;
if DC='ȫ<><C8AB>' then begin
if (t_bill['Ӧ<>պϼ<D5BA>']=0) and (t_bill['Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>']=0) then
t_bill.Delete;
end;
t_bill.Next;
end;
if sortstr=''then
t_bill.SortOnFields('BILLID')
else
t_bill.SortOnFields(sortstr);
finally
str_list.free;
frm_sys_progress.close;
frm_sys_progress:=nil;
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
procedure Tfrm_rp_ch_clienttotal.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_ch_clienttotal.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_rp_ch_clienttotal.Hide;
frm_rp_ch_clienttotal.ManualFloat(frm_rp_ch_clienttotal.BoundsRect );
frm_main.freeTabs('frm_rp_ch_clienttotal');
action:=cafree;
frm_rp_ch_clienttotal:=nil;
end;
procedure Tfrm_rp_ch_clienttotal.bsSkinButton10Click(Sender: TObject);
begin
if t_ch_dui_format.IsEmpty then
exit;
try
frm_rp_total_query:=tfrm_rp_total_query.Create (self);
rp_seae_query_num:=3;
if bsSkinCheckRadioBox1.Checked then
rp_seae_query_type:=1
else
rp_seae_query_type:=3;
if RxDBLookupCombo3.DisplayValue='' then begin
rp_seae_query_group:=0;
end else begin
rp_seae_query_group:=1;
end;
rp_seae_query_limited:='no';
rp_seae_query_str:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>ͳ<EFBFBD><CDB3>';
frm_rp_total_query.ShowModal;
finally
frm_rp_total_query.Free;
end;
if p_accept_bill.IsEmpty then
exit;
if RxDBLookupCombo3.DisplayValue='' then begin
Createdui_Grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxDBGrid1);
Createdui_table(t_bill_fee_dong,t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,p_accept_bill,QryFeeDetail,t_ch_dui_format.fieldbyname('DM_ID').asInteger);
p_total_client1.DataSet:=p_total_client;
t_bill_fee_dong.SortOnFields('BILLID');
end else begin
dui_chgrid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid1,dxdbgrid2,strtoint(RxDBLookupCombo3.DisplayValues[0]),t_ch_dui_format,'ȫ<><C8AB>');
dui_chtable(t_bill_fee_dong,t_fee_group,t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,p_accept_bill,QryFeeDetail,strtoint(RxDBLookupCombo3.DisplayValues[0]),'');
p_total_client1.DataSet:=t_fee_group;
end;
end;
procedure Tfrm_rp_ch_clienttotal.bsSkinButton1Click(Sender: TObject);
begin
with SaveDialog do
begin
DefaultExt :='xls';
Filter := '(*.xls)|*.xls';
if Execute then
begin
if bsSkinTabSheet3.Showing then
dxDBGrid1.SaveToXLS(FileName,true)
else if bstab4.Showing then
dxDBGrid2.SaveToXLS(FileName,true);
end;
end;
end;
procedure Tfrm_rp_ch_clienttotal.bsSkinButton9Click(Sender: TObject);
begin
sys_print('ҵ<><D2B5><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ӡ',2,nil,nil,nil,nil,t_bill_fee_dong1,nil,NIL,NIL,p_total_client1,nil,nil);
// sys_print('ҵ<><D2B5><EFBFBD>ۺϷ<DBBA><CFB7><EFBFBD>',2,nil,nil,nil,nil,nil,p_accept_fee1,nil,nil,nil,nil,nil);
end;
procedure Tfrm_rp_ch_clienttotal.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort_pro(Column,p_total_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_rp_ch_clienttotal.dxDBGrid5DblClick(Sender: TObject);
begin
fee_view(p_accept_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_rp_ch_clienttotal.FormShow(Sender: TObject);
begin
if not t_ch_dui_format.Active then
t_ch_dui_format.open;
end;
procedure Tfrm_rp_ch_clienttotal.bsSkinButton2Click(Sender: TObject);
begin
try
if not assigned(frm_rp_dui_formatrpt) then
frm_rp_dui_formatrpt:=tfrm_rp_dui_formatrpt.Create (self);
dui_format_type:=12;
frm_rp_dui_formatrpt.showmodal;
finally
frm_rp_dui_formatrpt.free;
frm_rp_dui_formatrpt:=nil;
t_ch_dui_format.requery;
end;
end;
end.