|
|
unit u_code_fee_project_add;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl,
|
|
|
dxDBGrid, dxCntner, BusinessSkinForm, ExtCtrls, bsSkinCtrls, StdCtrls,
|
|
|
Mask, DBCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_code_fee_project_add = class(TForm)
|
|
|
t_ch_project: TADOQuery;
|
|
|
t_ch_project1: TDataSource;
|
|
|
t_ch_project_fee: TADOQuery;
|
|
|
t_ch_project_fee1: TDataSource;
|
|
|
t_ch_project_standard: TADOQuery;
|
|
|
t_ch_project_standard1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
Panel1: TPanel;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGrid3Column1: TdxDBGridColumn;
|
|
|
dxDBGrid3Column2: TdxDBGridColumn;
|
|
|
dxDBGrid3Column4: TdxDBGridColumn;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
op_type: TEdit;
|
|
|
fee_type: TEdit;
|
|
|
t_op_bill1: TDataSource;
|
|
|
t_ch_fee1: TDataSource;
|
|
|
t_op_ctn: TADOQuery;
|
|
|
dxDBGrid2Column7: TdxDBGridColumn;
|
|
|
dxDBGrid2Column8: TdxDBGridColumn;
|
|
|
DBEdit1: TDBEdit;
|
|
|
dxDBGrid2Column9: TdxDBGridCheckColumn;
|
|
|
dxDBGrid2Column10: TdxDBGridColumn;
|
|
|
dxDBGrid2Column11: TdxDBGridColumn;
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
function fee_get_client(str:string):string;
|
|
|
function fee_get_num:real;
|
|
|
procedure DBEdit1Change(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_code_fee_project_add: Tfrm_code_fee_project_add;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
function Tfrm_code_fee_project_add.fee_get_num:real;
|
|
|
begin
|
|
|
;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_code_fee_project_add.fee_get_client(str:string):string;
|
|
|
begin
|
|
|
if str='' then
|
|
|
result:=''
|
|
|
else
|
|
|
begin
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7') then
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>˾'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
|
|
|
if str='<27><>վ'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><>վ').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27>ջ<EFBFBD><D5BB><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
|
|
|
if str='֪ͨ<CDA8><D6AA>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
|
|
|
end
|
|
|
else
|
|
|
if (op_type.text='3')OR(op_type.text='4') then
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
if str='<27><><EFBFBD>չ<EFBFBD>˾'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end else if (op_type.text='6') then
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27>ջ<EFBFBD><D5BB><EFBFBD>'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
|
|
|
else if (op_type.text='5') then
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_op_bill1.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
end
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_fee_project_add.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_fee_project_add.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_project.SQL.clear;
|
|
|
t_ch_project.sql.add('select * from t_ch_project ');
|
|
|
t_ch_project.SQL.Add(' where '+open_data('8005','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
|
|
|
t_ch_project.sql.add(' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+fee_type.text+'''');
|
|
|
if op_type.text='1'then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+'''');
|
|
|
end;
|
|
|
if (op_type.text='2') OR (op_type.text='7')then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+'''');
|
|
|
end;
|
|
|
if op_type.text='3'then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+'''');
|
|
|
end;
|
|
|
if op_type.text='4'then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+'''');
|
|
|
end;
|
|
|
if op_type.text='5'then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>ܳ<EFBFBD>'+'''');
|
|
|
end;
|
|
|
if op_type.text='6'then
|
|
|
begin
|
|
|
t_ch_project.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>'+'''');
|
|
|
end;
|
|
|
|
|
|
t_ch_project.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_ch_project.open;
|
|
|
t_ch_project_fee.open;
|
|
|
t_ch_project_standard.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_fee_project_add.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
i,price,Exrate:real;
|
|
|
s_bz,CorpsName:string;
|
|
|
if_do:boolean;
|
|
|
function GetFeeCodeStd(feeName:string):Boolean;
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
Result:=False;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('Select * from t_code_fee');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:FeeName and <20><>=''<27><><EFBFBD><EFBFBD>''');
|
|
|
Parameters.ParamByName('FeeName').Value:=feeName;
|
|
|
Open;
|
|
|
Result:=not IsEmpty;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
begin
|
|
|
if t_op_bill1.DataSet.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if t_ch_project_fee.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7')then
|
|
|
begin
|
|
|
if not t_op_ctn.Active then
|
|
|
begin
|
|
|
t_op_ctn.Parameters[0].value:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.open;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
t_ch_project_fee.first;
|
|
|
while not t_ch_project_fee.eof do
|
|
|
begin
|
|
|
if t_ch_project_fee.FieldByName('<27><>').asstring<>'<27><><EFBFBD><EFBFBD>'then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
// if t_ch_fee1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',Trim(t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring),[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
|
|
|
t_ch_fee1.DataSet['<27><>']:=t_ch_project_fee.fieldbyname('<27><>').asstring;
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='<27><>Ʊ' then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
end
|
|
|
else
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7')then
|
|
|
begin
|
|
|
if s_w(4,t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(4,t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='ë<><C3AB>' then
|
|
|
begin
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7')then
|
|
|
begin
|
|
|
if s_w(4,t_op_bill1.DataSet.fieldbyname('ë<><C3AB>').asfloat/1000)>1 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(4,t_op_bill1.DataSet.fieldbyname('ë<><C3AB>').asfloat/1000)
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('ë<><C3AB>').asfloat;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;;
|
|
|
end
|
|
|
else
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='<27>ƷѶ<C6B7>' then
|
|
|
begin
|
|
|
if t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>=s_w(4,t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)then
|
|
|
begin
|
|
|
if t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if s_w(4,t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(4,t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').asfloat;
|
|
|
end
|
|
|
else if t_ch_project_fee.fieldbyname('<27><>').asstring='<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7')then
|
|
|
if t_ch_project_fee.fieldbyname('<27><>').asstring='TEU' then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_bill1.DataSet.fieldbyname('<27><>TEU').asfloat;
|
|
|
end;
|
|
|
|
|
|
if not t_ch_project_fee.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰').AsBoolean then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_ch_fee1.DataSet.fieldbyname('<27><>ע').asstring:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
|
|
|
|
|
|
t_ch_fee1.DataSet['˳<><CBB3>']:=t_ch_project_fee['˳<><CBB3>'];
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
end
|
|
|
else //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
if (op_type.text='1')OR(op_type.text='2') OR (op_type.text='7')then
|
|
|
begin
|
|
|
if t_op_ctn.IsEmpty then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
// if t_ch_fee1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
if t_ch_project_fee['˳<><CBB3>']<>null then
|
|
|
t_ch_fee1.DataSet['˳<><CBB3>']:=t_ch_project_fee['˳<><CBB3>'];
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
end
|
|
|
else //<2F><>װ<EFBFBD>䲻Ϊ<E4B2BB><CEAA>
|
|
|
begin
|
|
|
|
|
|
if t_ch_project_standard.IsEmpty then //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
// if t_ch_fee1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
end
|
|
|
else //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD>Ϊ<EFBFBD><CEAA>
|
|
|
begin
|
|
|
//
|
|
|
if not GetFeeCodeStd(t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
|
|
|
begin //<2F><><EFBFBD><EFBFBD>
|
|
|
t_ch_project_standard.first;
|
|
|
while not t_ch_project_standard.eof do
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_ch_project_standard.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring,[])then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet['<27><>']:=t_ch_project_standard.fieldbyname('<27><>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if not t_ch_project_fee.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰').AsBoolean then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet.fieldbyname('<27><>ע').asstring:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
|
|
|
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
if_do:=true;
|
|
|
end;
|
|
|
t_ch_project_standard.Next;
|
|
|
end;
|
|
|
end
|
|
|
else //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
if t_op_ctn.RecordCount<=1 then //ֻ<><D6BB>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
t_ch_project_standard.first;
|
|
|
while not t_ch_project_standard.eof do
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_ch_project_standard.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring,[])then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet['<27><>']:=t_ch_project_standard.fieldbyname('<27><>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
|
|
|
|
|
|
if not t_ch_project_fee.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰').AsBoolean then
|
|
|
begin
|
|
|
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet.fieldbyname('<27><>ע').asstring:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
|
|
|
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
if_do:=true;
|
|
|
end;
|
|
|
t_ch_project_standard.Next;
|
|
|
end;
|
|
|
end
|
|
|
else //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
s_bz:='';
|
|
|
CorpsName:='';
|
|
|
price:=0;
|
|
|
Exrate:=1;
|
|
|
t_ch_project_standard.first;
|
|
|
while not t_ch_project_standard.eof do
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_ch_project_standard.fieldbyname('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>').asstring,[])then
|
|
|
begin
|
|
|
price:=price+t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
if trim(s_bz)='' then
|
|
|
s_bz:=t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'*'+t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
|
|
|
else s_bz:=s_bz+' '+t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'*'+t_ch_project_standard.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
Exrate:=1
|
|
|
else
|
|
|
begin
|
|
|
if Exrate<>0 then
|
|
|
Exrate:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Exrate:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
Exrate:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
CorpsName:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
CorpsName:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
if_do:=true;
|
|
|
end;
|
|
|
t_ch_project_standard.Next;
|
|
|
end;
|
|
|
if Trim(s_bz)<>'' then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=CorpsName;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><>']:=s_bz;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=Exrate;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
|
|
|
if not t_ch_project_fee.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰').AsBoolean then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=price;
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').asfloat;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=price;
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet.fieldbyname('<27><>ע').asstring:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
|
|
|
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if not if_do then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet.Append;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
|
|
|
t_ch_fee1.DataSet['<27>ұ<EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=1
|
|
|
else
|
|
|
begin
|
|
|
if t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
|
|
|
// if t_ch_fee1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0 then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else begin
|
|
|
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
abort;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(38,'true')) then
|
|
|
begin
|
|
|
if t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(145,'true')) then
|
|
|
begin
|
|
|
if op_type.text='1' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if (op_type.text='2') OR (op_type.text='7') then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='3' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='4' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
else if op_type.text='6' then
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee1.DataSet.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee1.DataSet.FieldByName('<27>ұ<EFBFBD>').AsString)
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_ch_fee1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_ch_fee1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
|
|
|
if t_ch_project_fee['˳<><CBB3>']<>null then
|
|
|
t_ch_fee1.DataSet['˳<><CBB3>']:=t_ch_project_fee['˳<><CBB3>'];
|
|
|
t_ch_fee1.DataSet.post;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_project_fee.next;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_fee_project_add.DBEdit1Change(Sender: TObject);
|
|
|
begin
|
|
|
if DBEdit1.Text<>'<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
dxDBGrid3.Visible:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
dxDBGrid3.Visible:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|