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.

2056 lines
84 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_fee_Recheck;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DB, ADODB, StdCtrls, Mask, bsSkinBoxCtrls, bsdbctrls, bsSkinCtrls,
ExtCtrls, DBCtrls, Grids, Wwdbigrd, Wwdbgrid, Menus, XPMenu,inifiles;
type
Tfra_fee_Recheck = class(TFrame)
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
a_bo: TbsSkinGroupBox;
DBMemo1: TDBMemo;
a_delete: TbsSkinGroupBox;
DBMemo2: TDBMemo;
a_modify_old: TbsSkinGroupBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
a_modify_new: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBMemo3: TDBMemo;
wwDBGrid1: TwwDBGrid;
DBEdit17: TDBEdit;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay: TADOQuery;
t_ch_pay1: TDataSource;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
a_shen_delete: TADOQuery;
a_shen_modify_old: TADOQuery;
a_shen_modify_new: TADOQuery;
a_shen_modify_new1: TDataSource;
a_shen_modify_old1: TDataSource;
a_shen_delete1: TDataSource;
p_shen_delete: TADOQuery;
p_shen_delete1: TDataSource;
p_shen_modify_old: TADOQuery;
p_shen_modify_old1: TDataSource;
p_shen_modify_new: TADOQuery;
p_shen_modify_new1: TDataSource;
PopupMenu4: TPopupMenu;
N82: TMenuItem;
N83: TMenuItem;
N84: TMenuItem;
N85: TMenuItem;
N86: TMenuItem;
N87: TMenuItem;
N88: TMenuItem;
PopupMenu5: TPopupMenu;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem10: TMenuItem;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
MenuItem13: TMenuItem;
MenuItem14: TMenuItem;
XPMenu1: TXPMenu;
bsSkinButton10: TbsSkinButton;
Label1: TLabel;
DBEdit35: TDBEdit;
Label2: TLabel;
DBEdit36: TDBEdit;
bsSkinPanel7: TbsSkinPanel;
Label5: TLabel;
Label6: TLabel;
DBEdit39: TDBEdit;
DBEdit40: TDBEdit;
Panel3: TPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinStdLabel5: TbsSkinStdLabel;
bsSkinStdLabel6: TbsSkinStdLabel;
bsSkinStdLabel7: TbsSkinStdLabel;
bsSkinStdLabel8: TbsSkinStdLabel;
bsSkinStdLabel9: TbsSkinStdLabel;
bsSkinStdLabel10: TbsSkinStdLabel;
bsSkinDBEdit1: TbsSkinDBEdit;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
bsSkinDBEdit4: TbsSkinDBEdit;
bsSkinDBEdit5: TbsSkinDBEdit;
bsSkinDBEdit6: TbsSkinDBEdit;
bsSkinDBEdit7: TbsSkinDBEdit;
bsSkinDBEdit8: TbsSkinDBEdit;
bsSkinDBEdit9: TbsSkinDBEdit;
bsSkinDBEdit10: TbsSkinDBEdit;
bsSkinPanel9: TbsSkinPanel;
bsSkinStdLabel11: TbsSkinStdLabel;
bsSkinStdLabel12: TbsSkinStdLabel;
bsSkinStdLabel13: TbsSkinStdLabel;
bsSkinStdLabel14: TbsSkinStdLabel;
bsSkinStdLabel15: TbsSkinStdLabel;
bsSkinStdLabel16: TbsSkinStdLabel;
bsSkinStdLabel17: TbsSkinStdLabel;
bsSkinStdLabel18: TbsSkinStdLabel;
bsSkinStdLabel19: TbsSkinStdLabel;
bsSkinStdLabel20: TbsSkinStdLabel;
bsSkinDBEdit11: TbsSkinDBEdit;
bsSkinDBEdit12: TbsSkinDBEdit;
bsSkinDBEdit13: TbsSkinDBEdit;
bsSkinDBEdit14: TbsSkinDBEdit;
bsSkinDBEdit15: TbsSkinDBEdit;
bsSkinDBEdit16: TbsSkinDBEdit;
bsSkinDBEdit17: TbsSkinDBEdit;
bsSkinDBEdit18: TbsSkinDBEdit;
bsSkinDBEdit19: TbsSkinDBEdit;
bsSkinDBEdit20: TbsSkinDBEdit;
t_op_gain_main: TADOQuery;
t_op_gain_main1: TDataSource;
Label43: TLabel;
DBEdit44: TDBEdit;
Label45: TLabel;
DBEdit46: TDBEdit;
limited_str: TEdit;
chk_accept: TEdit;
chk_pay: TEdit;
ywlb: TEdit;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinPanel5: TbsSkinPanel;
bsSkinPanel6: TbsSkinPanel;
wwDBGrid2: TwwDBGrid;
p_bo: TbsSkinGroupBox;
DBMemo4: TDBMemo;
p_delete: TbsSkinGroupBox;
DBMemo5: TDBMemo;
bsSkinPanel8: TbsSkinPanel;
Label7: TLabel;
Label42: TLabel;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
p_modify_old: TbsSkinGroupBox;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label4: TLabel;
Label3: TLabel;
Label44: TLabel;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
DBEdit45: TDBEdit;
p_modify_new: TbsSkinGroupBox;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label46: TLabel;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
DBEdit47: TDBEdit;
DBMemo6: TDBMemo;
DBEdit18: TDBEdit;
DBEdit43: TDBEdit;
Panel2: TPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinEdit1: TbsSkinEdit;
bsSkinPanel10: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Memo1: TMemo;
Label47: TLabel;
Label48: TLabel;
DBEdit48: TDBEdit;
DBEdit49: TDBEdit;
Label49: TLabel;
DBEdit50: TDBEdit;
Label50: TLabel;
Label51: TLabel;
DBEdit51: TDBEdit;
DBEdit52: TDBEdit;
Label52: TLabel;
DBEdit53: TDBEdit;
Label53: TLabel;
Label54: TLabel;
DBEdit54: TDBEdit;
DBEdit55: TDBEdit;
Label55: TLabel;
DBEdit56: TDBEdit;
Label56: TLabel;
Label57: TLabel;
DBEdit57: TDBEdit;
DBEdit58: TDBEdit;
Label58: TLabel;
DBEdit59: TDBEdit;
Label59: TLabel;
Label60: TLabel;
DBEdit60: TDBEdit;
DBEdit61: TDBEdit;
Label61: TLabel;
Label62: TLabel;
DBEdit62: TDBEdit;
DBEdit63: TDBEdit;
Label63: TLabel;
Label64: TLabel;
DBEdit64: TDBEdit;
DBEdit65: TDBEdit;
Label65: TLabel;
Label66: TLabel;
DBEdit66: TDBEdit;
DBEdit67: TDBEdit;
bsSkinComboBox1: TbsSkinComboBox;
procedure DBEdit17Change(Sender: TObject);
procedure DBEdit18Change(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure wwDBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure wwDBGrid2DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure Panel1Resize(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
procedure t_ch_payBeforePost(DataSet: TDataSet);
procedure N82Click(Sender: TObject);
procedure N84Click(Sender: TObject);
procedure N86Click(Sender: TObject);
procedure N88Click(Sender: TObject);
procedure MenuItem5Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure MenuItem12Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure DBEdit43Change(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure bsSkinPanel9Resize(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinDBEdit18Change(Sender: TObject);
procedure bsSkinDBEdit8Change(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure getsumstr;
procedure getsumstr_op;
procedure getsumstr_cw;
procedure getsumstr_vat;
procedure t_ch_payAfterOpen(DataSet: TDataSet);
procedure t_ch_payAfterScroll(DataSet: TDataSet);
procedure t_ch_acceptAfterScroll(DataSet: TDataSet);
procedure t_ch_acceptAfterOpen(DataSet: TDataSet);
procedure FrameEnter(Sender: TObject);
procedure bsSkinComboBox1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
uses my_sys_function, u_fee_check_shen, u_main,u_lcxunit, u_data_share,
u_check_all;
{$R *.dfm}
procedure Tfra_fee_Recheck.getsumstr_op;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
if not strtobool(get_parameters_value(150,'false')) then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
/// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee_Recheck.getsumstr_cw;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
if not strtobool(get_parameters_value(150,'false')) then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
/// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee_Recheck.getsumstr_vat;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
if not strtobool(get_parameters_value(150,'false')) then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
/// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee_Recheck.getsumstr;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal,rarmb,rausd,raot,ratotal,rprmb,rpusd,rpot,rptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// if not bsSkinPanel3.Visible then exit;
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
rarmb:=0;
rausd:=0;
raot:=0;
ratotal:=0;
rprmb:=0;
rpusd:=0;
rpot:=0;
rptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',120);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str1:=str1+' ';
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
rarmb:=rarmb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rausd:=rausd+aquery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
raot:=raot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
ratotal:=ratotal+aquery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',120);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str2:=str2+' ';
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
rprmb:=rprmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rpusd:=rpusd+aquery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
rpot:=rpot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rptotal:=rptotal+aquery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false);
if rarmb<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rarmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false);
if rausd<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rausd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false);
if raot<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',raot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
if ratotal<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',ratotal),8,' ',false)+')'
else
str1:=str1+' ';
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false);
if rprmb<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rprmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false);
if rpusd<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpusd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false);
if rpot<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
if rptotal<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rptotal),8,' ',false)+')'
else
str2:=str2+' ';
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false)+FixLenStr('',48);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='6') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='7') then
// memo1.Lines.Add(str1+'|'+str2);
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then
begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA> ',24,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD> ',24,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
{
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
if not strtobool(get_parameters_value(150,'false')) then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
/// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
}
procedure Tfra_fee_Recheck.DBEdit17Change(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
exit;
end;
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ') or
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>')then
begin
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_bo.Visible:=true;
a_bo.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_delete.Visible:=true;
a_delete.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_new.Visible:=true;
a_modify_new.Align:=alRight;
a_modify_old.Visible:=true;
a_modify_old.Align:=alRight;
exit;
end;
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
end;
procedure Tfra_fee_Recheck.DBEdit18Change(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
exit;
end;
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ') or
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>')then
begin
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_bo.Visible:=true;
p_bo.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_delete.Visible:=true;
p_delete.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_new.Visible:=true;
p_modify_new.Align:=alRight;
p_modify_old.Visible:=true;
p_modify_old.Align:=alRight;
exit;
end;
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
end;
procedure Tfra_fee_Recheck.bsSkinButton1Click(Sender: TObject);
begin
fee_Recheck_part(limited_str.text,t_ch_accept,wwDBGrid1,chk_accept.Text,ywlb.text);
end;
procedure Tfra_fee_Recheck.bsSkinButton5Click(Sender: TObject);
begin
fee_Recheck_part(limited_str.text,t_ch_pay,wwDBGrid2,chk_pay.Text,ywlb.text);
end;
procedure Tfra_fee_Recheck.bsSkinButton2Click(Sender: TObject);
begin
fee_Reback(limited_str.text,t_ch_accept,wwDBGrid1,chk_accept.Text,ywlb.Text);
end;
procedure Tfra_fee_Recheck.bsSkinButton7Click(Sender: TObject);
begin
fee_Reback(limited_str.text,t_ch_pay,wwDBGrid2,chk_pay.Text,ywlb.Text);
end;
procedure Tfra_fee_Recheck.wwDBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_accept,wwDBGrid1,Rect,Field);
end;
procedure Tfra_fee_Recheck.wwDBGrid2DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_pay,wwDBGrid2,Rect,Field);
end;
procedure Tfra_fee_Recheck.bsSkinButton4Click(Sender: TObject);
begin
fee_shen_check_ok(limited_str.text,t_ch_accept,a_shen_delete,a_shen_modify_old,a_shen_modify_new);
if Panel3.Visible then
t_op_gain.Requery();
if bsSkinPanel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee_Recheck.bsSkinButton8Click(Sender: TObject);
begin
fee_shen_check_ok(limited_str.text,t_ch_pay,p_shen_delete,p_shen_modify_old,p_shen_modify_new);
if Panel3.Visible then
t_op_gain.Requery();
if bsSkinPanel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee_Recheck.bsSkinButton3Click(Sender: TObject);
begin
fee_shen_check_back(limited_str.text,t_ch_accept,a_shen_delete,a_shen_modify_old,a_shen_modify_new);
end;
procedure Tfra_fee_Recheck.bsSkinButton9Click(Sender: TObject);
begin
fee_shen_check_back(limited_str.text,t_ch_pay,p_shen_delete,p_shen_modify_old,p_shen_modify_new);
end;
procedure Tfra_fee_Recheck.bsSkinButton11Click(Sender: TObject);
begin
try
frm_fee_check_shen:=tfrm_fee_check_shen.Create(self);
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').Value;
frm_fee_check_shen.t_ch_fee.open;
frm_fee_check_shen.t_ch_fee_new.open;
frm_fee_check_shen.ShowModal;
finally
frm_fee_check_shen.Free;
end;
end;
procedure Tfra_fee_Recheck.bsSkinButton6Click(Sender: TObject);
begin
try
frm_fee_check_shen:=tfrm_fee_check_shen.Create(self);
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').Value;
frm_fee_check_shen.t_ch_fee.open;
frm_fee_check_shen.t_ch_fee_new.open;
frm_fee_check_shen.ShowModal;
finally
frm_fee_check_shen.Free;
end;
end;
procedure Tfra_fee_Recheck.bsSkinPanel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round((bsSkinPanel2.Width-196)/11);
bsSkinDBEdit1.Width:=i;
bsSkinDBEdit2.Width:=i;
bsSkinDBEdit3.Width:=i;
bsSkinDBEdit4.Width:=i;
bsSkinDBEdit5.Width:=i;
bsSkinDBEdit6.Width:=i;
bsSkinDBEdit7.Width:=i;
bsSkinDBEdit8.Width:=i;
bsSkinDBEdit9.Width:=i;
bsSkinDBEdit10.Width:=i;
end;
procedure Tfra_fee_Recheck.Panel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel1.Width/9);
bsSkinButton1.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton16.Width:=i;
end;
procedure Tfra_fee_Recheck.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/6);
bsSkinButton5.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
end;
procedure Tfra_fee_Recheck.t_ch_acceptBeforePost(DataSet: TDataSet);
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_accept['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=t_ch_accept['<27><><EFBFBD>뿪Ʊ'];
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfra_fee_Recheck.t_ch_payBeforePost(DataSet: TDataSet);
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_pay['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=t_ch_pay['<27><><EFBFBD>뿪Ʊ'];
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfra_fee_Recheck.N82Click(Sender: TObject);
begin
fee_balance_view(t_ch_accept);
end;
procedure Tfra_fee_Recheck.N84Click(Sender: TObject);
begin
fee_invoice_view(t_ch_accept);
end;
procedure Tfra_fee_Recheck.N86Click(Sender: TObject);
begin
fee_modify_view(t_ch_accept);
end;
procedure Tfra_fee_Recheck.N88Click(Sender: TObject);
begin
price_person_view;
end;
procedure Tfra_fee_Recheck.MenuItem5Click(Sender: TObject);
begin
fee_balance_view(t_ch_pay);
end;
procedure Tfra_fee_Recheck.MenuItem10Click(Sender: TObject);
begin
fee_check_view(t_ch_pay);
end;
procedure Tfra_fee_Recheck.MenuItem12Click(Sender: TObject);
begin
fee_modify_view(t_ch_pay);
end;
procedure Tfra_fee_Recheck.bsSkinButton10Click(Sender: TObject);
begin
fee_Recheck_all(limited_str.text,t_ch_accept,chk_accept.text,ywlb.text);
end;
procedure Tfra_fee_Recheck.bsSkinButton12Click(Sender: TObject);
begin
fee_Recheck_all(limited_str.text,t_ch_pay,chk_pay.text,ywlb.text);
end;
procedure Tfra_fee_Recheck.DBEdit43Change(Sender: TObject);
begin
if Panel3.Visible then
begin
if (DBEdit43.Text='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ')then
begin
bsSkinPanel9.Visible:=true;
Panel3.Height:=40;
end
else
begin
bsSkinPanel9.Visible:=false;
Panel3.Height:=20;
end;
end;
end;
procedure Tfra_fee_Recheck.bsSkinPanel1Resize(Sender: TObject);
begin
bsSkinPanel3.Height:=round((bsSkinPanel1.height)/3);
end;
procedure Tfra_fee_Recheck.bsSkinPanel9Resize(Sender: TObject);
var
i:integer;
begin
i:=round((bsSkinPanel9.Width-196)/10);
bsSkinDBEdit11.Width:=i;
bsSkinDBEdit12.Width:=i;
bsSkinDBEdit13.Width:=i;
bsSkinDBEdit14.Width:=i;
bsSkinDBEdit15.Width:=i;
bsSkinDBEdit16.Width:=i;
bsSkinDBEdit17.Width:=i;
bsSkinDBEdit18.Width:=i;
bsSkinDBEdit19.Width:=i;
end;
procedure Tfra_fee_Recheck.bsSkinButton13Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close; SQL.Clear;
SQL.Add('update t_ch_fee set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ=1 where CH_ID='+inttostr(t_ch_accept.FieldbyName('CH_ID').asinteger));
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_accept.Requery();
end;
procedure Tfra_fee_Recheck.bsSkinButton14Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('update t_ch_fee set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ=0 where CH_ID='+inttostr(t_ch_accept.FieldbyName('CH_ID').asinteger));
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_accept.Requery();
end;
procedure Tfra_fee_Recheck.bsSkinDBEdit18Change(Sender: TObject);
begin
if t_op_gain_main.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit18.font.Color:=clRed
else
bsSkinDBEdit18.font.Color:=clBlue;
end;
procedure Tfra_fee_Recheck.bsSkinDBEdit8Change(Sender: TObject);
begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit8.font.Color:=clRed
else
bsSkinDBEdit8.font.Color:=clBlue;
end;
procedure Tfra_fee_Recheck.bsSkinButton15Click(Sender: TObject);
begin
if Trim(bsSkinEdit1.text)='' then
begin
MessageDlg('<27><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>Ϊ0<CEAA><30><EFBFBD>գ<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
if t_ch_pay.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','Ԫ<><D4AA>',[])then exit;
t_ch_pay.Insert;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_pay['<27><>׼']:='TEU';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>ұ<EFBFBD>']:='USD';
if t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString);
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=FormatFloat('0.00;-0.00;0',StrToFloat(bsSkinEdit1.text));
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=FormatFloat('0.00;-0.00;0',StrToFloat(bsSkinEdit1.text));
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='Ԫ<><D4AA>';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˷<EFBFBD>';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay.Post;
end;
procedure Tfra_fee_Recheck.bsSkinButton16Click(Sender: TObject);
begin
try
if not ASSIGNED(frm_check_all) then
frm_check_all:=Tfrm_check_all.Create(application);
frm_check_all.BSNO:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asString;
// frm_check_all.DataSource1:=t_ch_accept.DataSource;
frm_check_all.ShowModal;
finally
frm_check_all.Free;
frm_check_all:=nil;
end;
end;
procedure Tfra_fee_Recheck.t_ch_payAfterOpen(DataSet: TDataSet);
begin
getsumstr_vat;
end;
procedure Tfra_fee_Recheck.t_ch_payAfterScroll(DataSet: TDataSet);
begin
getsumstr_vat;
end;
procedure Tfra_fee_Recheck.t_ch_acceptAfterScroll(DataSet: TDataSet);
begin
getsumstr_vat;
end;
procedure Tfra_fee_Recheck.t_ch_acceptAfterOpen(DataSet: TDataSet);
begin
getsumstr_vat;
end;
procedure Tfra_fee_Recheck.FrameEnter(Sender: TObject);
var inifile1:Tinifile;
begin
{
with t_ch_accept do
begin
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
Close;sql.Clear;
sql.Add('select * from t_ch_fee');
sql.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
sql.Add('order by ˳<><CBB3>,CH_ID');
end
else
begin
Close;sql.Clear;
sql.Add('select * from t_ch_fee');
sql.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
sql.Add('order by ˳<><CBB3>,CH_ID');
end;
end;
ShowMessage(t_ch_accept.SQL.Text);
with t_ch_pay do
begin
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
Close;sql.Clear;
sql.Add('select * from t_ch_fee');
sql.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
sql.Add('order by ˳<><CBB3>,CH_ID');
end
else
begin
Close;sql.Clear;
sql.Add('select * from t_ch_fee');
sql.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
sql.Add('order by ˳<><CBB3>,CH_ID');
end;
end;
ShowMessage(t_ch_pay.SQL.Text);
}
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
bsSkinComboBox1.ItemIndex:=inifile1.ReadInteger('FEE','FEEVAT',0);
inifile1.free;
end;
procedure Tfra_fee_Recheck.bsSkinComboBox1Change(Sender: TObject);
var
inifile1:Tinifile;
begin
case bsSkinComboBox1.ItemIndex of
0:
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
1:
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end
else
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
case bsSkinComboBox1.ItemIndex of
0: begin
getsumstr_vat;
end;
1: begin
getsumstr_cw;
end;
end;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
inifile1.WriteInteger('FEE','FEEVAT',bsSkinComboBox1.ItemIndex);
inifile1.free;
end;
{ case bsSkinComboBox1.ItemIndex of
0:
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
1:
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
2:
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end
else
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
///
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit14.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit11.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit18.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit17.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
}
end.