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.

1010 lines
29 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_op_fee2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
ADODB, dxDBTLCl, dxGrClms, ExtCtrls, RxLookup, StdCtrls,DateUtils,
wwdbdatetimepicker, Mask, wwdbedit, Wwdotdot, Wwdbcomb, DBCtrls, wwdblook,
Menus, DBCtrlsEh, DBLookupEh, dxGrClEx, bsSkinBoxCtrls;
type
Tfrm_op_fee2 = class(TForm)
bsSkinPanel1: TbsSkinPanel;
dxDBGrid1: TdxDBGrid;
t_op_fee: TADOQuery;
t_op_fee1: TDataSource;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridDateColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridDateColumn;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label23: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label4: TLabel;
DBEdit1: TDBEdit;
DBMemo1: TDBMemo;
Label5: TLabel;
dxDBGrid1Column6: TdxDBGridColumn;
Label6: TLabel;
RxDBLookupCombo9: TRxDBLookupCombo;
dxDBGrid1Column9: TdxDBGridColumn;
Label91: TLabel;
wwDBComboBox4: TwwDBComboBox;
Label95: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
dxDBGrid1Column10: TdxDBGridColumn;
dxDBGrid1Column11: TdxDBGridColumn;
dxDBGrid1Column12: TdxDBGridColumn;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N1: TMenuItem;
N3: TMenuItem;
N2: TMenuItem;
N4: TMenuItem;
bsSkinButton9: TbsSkinButton;
ADOQuery_bc: TADOQuery;
ADOQuery_cost: TADOQuery;
Label13: TLabel;
ADOQuery_bc1: TDataSource;
ADOQuery_cost1: TDataSource;
Label14: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
dxDBGrid1Column20: TdxDBGridLookupColumn;
Label15: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
RxDBLookupCombo6: TRxDBLookupCombo;
Label16: TLabel;
dxDBGrid1Column21: TdxDBGridCheckColumn;
Label36: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
bsSkinPanel10: TbsSkinPanel;
Label49: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
Label52: TLabel;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label7: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
Label17: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
Label18: TLabel;
RxDBLookupCombo10: TRxDBLookupCombo;
Label8: TLabel;
wwDBComboBox31: TwwDBComboBox;
Label10: TLabel;
wwDBComboBox3: TwwDBComboBox;
bsSkinButton8: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
Label2: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
dxDBGrid1Column13: TdxDBGridColumn;
Label3: TLabel;
wwDBComboBox2: TwwDBComboBox;
bsSkinButton11: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
dxDBGrid1Column14: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridCheckColumn;
dxDBGrid1Column15: TdxDBGridCheckColumn;
Label11: TLabel;
Edit1: TEdit;
Label12: TLabel;
RxDBLookupCombo12: TRxDBLookupCombo;
bsSkinPanel15: TbsSkinPanel;
bsSkinButton54: TbsSkinButton;
bsSkinButton53: TbsSkinButton;
bsSkinLabel1: TbsSkinLabel;
ComboBox1: TComboBox;
t_op_feeField: TFloatField;
t_op_feeField2: TFloatField;
t_op_feeOF_ID: TAutoIncField;
t_op_feeDSDesigner: TStringField;
t_op_feeDSDesigner2: TStringField;
t_op_feeDSDesigner3: TDateTimeField;
t_op_feeDSDesigner4: TStringField;
t_op_feeDSDesigner5: TBCDField;
t_op_feeDSDesigner6: TStringField;
t_op_feeDSDesigner7: TStringField;
t_op_feeDSDesigner8: TStringField;
t_op_feeDSDesigner9: TDateTimeField;
t_op_feeDSDesigner10: TStringField;
t_op_feeDSDesigner11: TStringField;
t_op_feeDSDesigner12: TStringField;
t_op_feeDSDesigner13: TStringField;
t_op_feeDSDesigner14: TStringField;
t_op_feeDSDesigner15: TDateTimeField;
t_op_feeVOUNO: TStringField;
t_op_feeITEMNO: TIntegerField;
t_op_feeACCYEAR: TIntegerField;
t_op_feeACCMONTH: TSmallintField;
t_op_feeACCID_BC: TStringField;
t_op_feeACCID_COST: TStringField;
t_op_feeACCID_BCNAME: TStringField;
t_op_feeACCID_COSTNAME: TStringField;
t_op_feeDSDesigner16: TBooleanField;
t_op_feeDSDesigner17: TStringField;
t_op_feeDSDesigner18: TStringField;
t_op_feeDSDesigner19: TStringField;
t_op_feeDSDesigner20: TBCDField;
t_op_feeDSDesigner21: TStringField;
t_op_feeDSDesigner22: TStringField;
t_op_feeDSDesigner23: TBCDField;
t_op_feeDSDesigner24: TBCDField;
t_op_feeDSDesigner25: TStringField;
t_op_feeDSDesigner26: TDateTimeField;
t_op_feeDSDesigner27: TBooleanField;
t_op_feeDSDesigner28: TBooleanField;
t_op_feeDSDesigner29: TStringField;
t_op_feeDSDesigner30: TStringField;
t_op_feeDSDesigner31: TStringField;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridColumn;
t_op_feeField3: TFloatField;
dxDBGrid1Column19: TdxDBGridColumn;
procedure t_op_feeAfterInsert(DataSet: TDataSet);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure t_op_feeBeforePost(DataSet: TDataSet);
procedure FormShow(Sender: TObject);
procedure RxDBLookupCombo9Enter(Sender: TObject);
procedure RxDBLookupCombo9Exit(Sender: TObject);
procedure t_op_feeBeforeDelete(DataSet: TDataSet);
procedure t_op_feeBeforeEdit(DataSet: TDataSet);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure dxDBGrid1Column10CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure RxDBLookupCombo3Enter(Sender: TObject);
procedure RxDBLookupCombo3Exit(Sender: TObject);
procedure RxDBLookupCombo3Change(Sender: TObject);
procedure RxDBLookupCombo5Enter(Sender: TObject);
procedure RxDBLookupCombo5Exit(Sender: TObject);
procedure RxDBLookupCombo5Change(Sender: TObject);
procedure dxDBGrid1CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure t_op_feeAfterScroll(DataSet: TDataSet);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure dxDBGrid1Column16CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure ComboBox1DropDown(Sender: TObject);
procedure bsSkinButton53Click(Sender: TObject);
procedure bsSkinButton54Click(Sender: TObject);
procedure t_op_feeCalcFields(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
function GetBankAccid(fdataSet:TDataSet):String;
function InsertVouItems(fDataSet:TDataSet):String;
function GetVouNo:String;
function EditFieldVlaueZeros(FieldVlaue:string;len:integer):String;
end;
var
frm_op_fee2: Tfrm_op_fee2;
implementation
uses u_main, u_data_share, my_sys_function, dmAccu;
{$R *.dfm}
function Tfrm_op_fee2.EditFieldVlaueZeros(FieldVlaue:string;len:integer):String;
begin
Result:='';
while Length(FieldVlaue)<3 do
FieldVlaue:='0'+FieldVlaue;
Result:=FieldVlaue;
end;
function Tfrm_op_fee2.GetVouNo:String;
var i :integer;
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select vouno from t_op_fee where OF_ID=(select max(OF_ID) from t_op_fee )');
Open;
if IsEmpty then begin
Close;SQL.Clear;
SQL.Add('select vouno from t_op_fee where OF_ID=(select max(OF_ID) from t_op_fee )');
Open;
end;
try
i:=strtoint(aQuery.fieldbyname('vouno').AsString);
result:=inttostr(i+1);
result:=EditFieldVlaueZeros(result,3);
except
;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_fee2.t_op_feeAfterInsert(DataSet: TDataSet);
begin
t_op_fee['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=DATE;
t_op_fee['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='<27><>';
t_op_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_op_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_op_fee['<27>ұ<EFBFBD>']:='RMB';
t_op_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_op_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_op_fee['ITEMNO']:=1;
t_op_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_op_fee['<27><>ע']:='';
t_op_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա']:='';
t_op_fee['ACCID_COST']:='';
t_op_fee['ACCID_COSTNAME']:='';
t_op_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_op_fee['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='<27><>';
t_op_fee['<27>ұ<EFBFBD>']:='RMB';
t_op_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_op_fee['<27><><EFBFBD>ʽ']:='<27>ֽ<EFBFBD>';
t_op_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_op_fee['ҵ<>񻹿<EFBFBD>']:=0;
t_op_fee['<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>']:=0;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',employee,[]) then
t_op_fee['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_op_fee.fieldByName('VouNO').value:=GetVouNo;
end;
procedure Tfrm_op_fee2.bsSkinButton1Click(Sender: TObject);
begin
t_op_fee.insert;
end;
procedure Tfrm_op_fee2.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_fee);
end;
procedure Tfrm_op_fee2.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_op_fee);
end;
procedure Tfrm_op_fee2.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_fee);
end;
procedure Tfrm_op_fee2.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_fee2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ADOQuery_bc.Close;
ADOQuery_cost.Close;
savereggrid(dxdbgrid1,caption+'1');
frm_op_fee2.Hide;
frm_op_fee2.ManualFloat(frm_op_fee2.BoundsRect );
frm_main.freeTabs('frm_op_fee2');
action:=cafree;
frm_op_fee2:=nil;
end;
procedure Tfrm_op_fee2.t_op_feeBeforePost(DataSet: TDataSet);
begin
if not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').IsNull then
begin
t_op_fee.fieldByName('Accyear').value:=Yearof(t_op_fee.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').value);
t_op_fee.fieldByName('AccMonth').value:=Monthof(t_op_fee.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').value);
end;
table_before_post(t_op_fee,'<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>');
table_before_post(t_op_fee,'<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_fee,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_op_fee,'<27>ұ<EFBFBD>');
{
if trim(t_op_fee.fieldByName('<27><><EFBFBD>ʽ').value)='֧Ʊ' then
if trim(t_op_fee.FieldByName('<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>').asstring)='' then
begin
showmessage('<27><><EFBFBD>ʽΪ֧Ʊ֧Ʊ<D6A7>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
abort;
end;
}
if StrToBool(get_parameters_value(83,'false')) then
begin
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo15.Value,[]) then
if Trim(t_op_fee.fieldbyname('<27>ұ<EFBFBD>').asstring)='RMB' THEN
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_op_fee.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:='';
end
else
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring:='';
t_op_fee.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo12.Value,[]) then
if Trim(t_op_fee.fieldbyname('<27>ұ<EFBFBD>').asstring)='RMB' THEN
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:='';
end
else
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:='';
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
if Trim(t_op_fee.fieldbyname('<27>ұ<EFBFBD>').asstring)='RMB' THEN
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').asFloat:=t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat;
t_op_fee.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asFloat:=0;
end
else
begin
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').asFloat:=0;
t_op_fee.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asFloat:=t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat;
end;
end;
end;
procedure Tfrm_op_fee2.FormShow(Sender: TObject);
begin
bsSkinPanel15.Visible:=false;
loadreggrid(dxdbgrid1,true,caption+'1');
ADOQuery_bc.Open;
ADOQuery_cost.Open;
t_op_fee.close;
t_op_fee.sql.clear;
t_op_fee.sql.add('select top 100 * from t_op_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=0 and ¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''+' order by of_id');
t_op_fee.open;
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
RxDBLookupCombo11.value:=Employee;
if not if_open('345') then
begin
bsSkinButton6.Visible:=false;
bsSkinButton7.Visible:=false;
end;
if not if_open('032') then begin
bsSkinButton9.Visible:=false;
bsSkinButton12.Visible:=false;
end;
end;
procedure Tfrm_op_fee2.RxDBLookupCombo9Enter(Sender: TObject);
begin
RxDBLookupCombo9.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_fee2.RxDBLookupCombo9Exit(Sender: TObject);
begin
RxDBLookupCombo9.LookupDisplay:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_fee2.t_op_feeBeforeDelete(DataSet: TDataSet);
var
sdate:tdate;
begin
if t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
showmessage('<27><><EFBFBD><EFBFBD>״̬Ϊ<CCAC><CEAA><EFBFBD><EFBFBD>״̬,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>');
abort;
end;
sdate:=EncodeDate(Logininfo.offyear,Logininfo.offmonth,1);
if not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').IsNull then
if sdate>t_op_fee['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'] then begin
showmessage('<27>ѽ<EFBFBD><D1BD>˲<EFBFBD><CBB2><EFBFBD>ɾ<EFBFBD><C9BE>!');
abort;
end;
end;
procedure Tfrm_op_fee2.t_op_feeBeforeEdit(DataSet: TDataSet);
var
sdate:tdate;
begin
if not modify_all then
if t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
showmessage('<27><><EFBFBD><EFBFBD>״̬Ϊ<CCAC><CEAA><EFBFBD><EFBFBD>״̬,<2C><><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
sdate:=EncodeDate(Logininfo.offyear,Logininfo.offmonth,1);
if not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').IsNull then
if sdate>t_op_fee['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'] then begin
showmessage('<27>ѽ<EFBFBD><D1BD>˲<EFBFBD><CBB2><EFBFBD><EFBFBD>޸<EFBFBD>!');
abort;
end;
end;
procedure Tfrm_op_fee2.bsSkinButton8Click(Sender: TObject);
begin
with t_op_fee do begin
close;sql.Clear;
sql.Add('select * from t_op_fee where 1=1 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD>''');
if wwDBDateTimePicker9.text<>'' then
sql.Add(' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='''+wwDBDateTimePicker9.text+'''');
if wwDBDateTimePicker12.text<>'' then
sql.Add(' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='''+wwDBDateTimePicker12.text+'''');
if RxDBLookupCombo4.DisplayValue<>''then
sql.Add(' and <20><><EFBFBD>ؿͻ<D8BF>='''+RxDBLookupCombo4.DisplayValues[1]+'''');
if RxDBLookupCombo8.DisplayValue<>''then
sql.Add(' and <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>='''+RxDBLookupCombo8.DisplayValues[1]+'''');
if RxDBLookupCombo10.DisplayValue<>''then
sql.Add(' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա='''+RxDBLookupCombo10.DisplayValues[1]+'''');
if wwDBComboBox31.text<>'' then
sql.Add(' and <20>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>='''+wwDBComboBox31.text+'''');
if Edit1.text<>'' then
sql.Add(' and Of_id='+Edit1.text);
if wwDBComboBox3.text<>'' then
begin
case wwDBComboBox3.ItemIndex of
0: begin
sql.Add(' and ҵ<>񻹿<EFBFBD>=0');
end;
1: begin
sql.Add(' and ҵ<>񻹿<EFBFBD>=1');
end;
end;
end;
open;
end;
end;
procedure Tfrm_op_fee2.bsSkinButton6Click(Sender: TObject);
var i:Integer;
begin
if not t_op_fee.Active then exit;
if t_op_fee.IsEmpty then exit;
if dxDBGrid1.SelectedCount>=1 then
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_fee.GotoBookmark(pointer(dxdbgrid1.selectedrows[i]));
if t_op_fee['<27><><EFBFBD><EFBFBD>'] then
begin
Showmessage(t_op_fee.FieldByName('VOUNO').AsString+' '+'<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤,<2C><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
end
else
begin
if t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
t_op_fee.Edit;
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime:=date;
t_op_fee.post;
end;
end;
end;
end;
procedure Tfrm_op_fee2.bsSkinButton7Click(Sender: TObject);
var i:Integer;
begin
if not t_op_fee.Active then exit;
if t_op_fee.IsEmpty then exit;
if dxDBGrid1.SelectedCount>=1 then
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_fee.GotoBookmark(pointer(dxdbgrid1.selectedrows[I]));
if t_op_fee['<27><><EFBFBD><EFBFBD>'] then
begin
Showmessage(t_op_fee.FieldByName('VOUNO').AsString+' '+'<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤,<2C><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>');
end
else
begin
if t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
begin
modify_all:=True;
t_op_fee.Edit;
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='¼<><C2BC>״̬';
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='';
t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=null;
t_op_fee.post;
modify_all:=False;
end;
end;
end;
end;
procedure Tfrm_op_fee2.dxDBGrid1Column10CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid1Column10.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_fee2.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_fee2.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_fee2.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,211);
end;
procedure Tfrm_op_fee2.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_fee2.N3Click(Sender: TObject);
begin
dxdbgrid1.FullExpand;
end;
procedure Tfrm_op_fee2.N4Click(Sender: TObject);
begin
dxdbgrid1.FullCollapse;
end;
procedure Tfrm_op_fee2.RxDBLookupCombo3Enter(Sender: TObject);
begin
RxDBLookupCombo3.LookupDisplay:='ACCID;ACCNAME';
end;
procedure Tfrm_op_fee2.RxDBLookupCombo3Exit(Sender: TObject);
begin
RxDBLookupCombo3.LookupDisplay:='accname';
end;
procedure Tfrm_op_fee2.RxDBLookupCombo3Change(Sender: TObject);
begin
if t_op_fee1.DataSet=nil then
exit;
if t_op_fee1.DataSet.State in [dsinsert,dsEdit] then
begin
if ADOQuery_cost.Locate('accid',trim(t_op_fee.fieldbyname('accid_COST').asstring),[])then
begin
t_op_fee1.DataSet['accid_COSTname']:=ADOQuery_cost.fieldbyname('Accname').asstring;
end;
end;
end;
procedure Tfrm_op_fee2.RxDBLookupCombo5Enter(Sender: TObject);
begin
RxDBLookupCombo5.LookupDisplay:='ACCID;ACCNAME';
end;
procedure Tfrm_op_fee2.RxDBLookupCombo5Exit(Sender: TObject);
begin
RxDBLookupCombo5.LookupDisplay:='accname';
end;
procedure Tfrm_op_fee2.RxDBLookupCombo5Change(Sender: TObject);
begin
if t_op_fee1.DataSet=nil then
exit;
if t_op_fee1.DataSet.State in [dsinsert,dsEdit] then
begin
if ADOQuery_bc.Locate('accid',trim(t_op_fee.fieldbyname('accid_bc').asstring),[])then
begin
t_op_fee1.DataSet['accid_bcname']:=ADOQuery_bc.fieldbyname('Accname').asstring;
end;
end;
end;
procedure Tfrm_op_fee2.dxDBGrid1CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if uppercase(ANode.Strings[dxDBGrid1Column21.Index])='TRUE' then begin
AColor:=clAqua;
exit;
end;
end;
function Tfrm_op_fee2.GetBankAccid(fdataSet:TDataSet):String;
var
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;sql.Clear;
sql.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_bank');
sql.Add('where <20><><EFBFBD><EFBFBD>='''+fDataSet.fieldbyname('<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').AsString+'''');
Open;
if Recordcount<>0 then
result:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString
else
result:='';
finally
freeAndNil(aQuery);
end;
end;
function Tfrm_op_fee2.InsertVouItems(fDataSet:TDataSet):String;
begin
end;
procedure Tfrm_op_fee2.bsSkinButton9Click(Sender: TObject);
var aQuery:TAdoQuery;
begin
if not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set <20><><EFBFBD><EFBFBD>=1 where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>''');
if (trim(t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString)='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and (not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean) then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Requery();
end;
end
else
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set <20><><EFBFBD><EFBFBD>=0 where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>''');
if (trim(t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString)='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and (t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean) then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Requery();
end;
end;
end;
{procedure Tfrm_op_fee2.bsSkinButton9Click(Sender: TObject);
var k:integer;
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set <20><><EFBFBD><EFBFBD>=1,<2C><><EFBFBD><EFBFBD>ƾ֤=:<3A><><EFBFBD><EFBFBD>ƾ֤ where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>''');
if dxdbgrid1.SelectedCount>0 then
begin
for k:=0 to dxdbgrid1.SelectedCount-1 do
begin
t_op_fee.GotoBookmark(pointer(dxdbgrid1.selectedrows[k]));
if (trim(t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString)='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and (not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean) then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=dmacc.ADOTblVou.fieldbyname('OF_ID').AsString;
aQuery.ExecSQL;
end;
end
end;
finally
Free;
t_op_fee.Requery();
end;
end;
}
procedure Tfrm_op_fee2.bsSkinButton10Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,nil,nil,nil,nil,t_op_fee1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_fee2.t_op_feeAfterScroll(DataSet: TDataSet);
begin
if not t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then
bsSkinButton9.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else
bsSkinButton9.Caption:='ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
if not t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean then
bsSkinButton11.Caption:='ҵ<>񻹿<EFBFBD>'
else
bsSkinButton11.Caption:='ȡ<><C8A1>ҵ<EFBFBD>񻹿<EFBFBD>';
if not t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
bsSkinButton12.Caption:='<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>'
else
bsSkinButton12.Caption:='ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_fee2.bsSkinButton11Click(Sender: TObject);
var aQuery:TAdoQuery;
begin
if t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean=false then
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set ҵ<>񻹿<EFBFBD>=1 where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>=1');
if (t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean=false)
and (t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=false)
then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Requery();
end;
end
else
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set ҵ<>񻹿<EFBFBD>=0 where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>=1');
if (t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=false)
then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Requery();
end;
end;
end;
procedure Tfrm_op_fee2.bsSkinButton12Click(Sender: TObject);
var aQuery:TAdoQuery;
begin
if t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=false then
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set <20><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>=1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:adate where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>=1');
if (t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=false)
then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.Parameters.ParamByName('adate').Value:=date;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Refresh;
end;
end
else
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_op_fee set <20><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>=0,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=null where OF_ID=:OF_ID and <20><><EFBFBD><EFBFBD>=1');
if (t_op_fee.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('ҵ<>񻹿<EFBFBD>').AsBoolean=true)
and (t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=true)
then
begin
aQuery.Close;
aQuery.Parameters.ParamByName('OF_ID').Value:=t_op_fee.fieldbyname('OF_ID').AsInteger;
aQuery.ExecSQL;
end;
finally
Free;
t_op_fee.Refresh;
end;
end;
if t_op_fee.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=True then
bsSkinPanel15.Visible:=true;
end;
procedure Tfrm_op_fee2.dxDBGrid1Column16CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if Uppercase(Trim(ANode.Strings[dxDBGrid1Column16.Index]))='TRUE' then
begin
AColor:=clRed;
AFont.Color:=clblack;
end;
end;
procedure Tfrm_op_fee2.ComboBox1DropDown(Sender: TObject);
var aQuery:TAdoQuery;
begin
ComboBox1.Clear;
ComboBox1.Text:='';
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;
SQL.Clear;
SQL.add('select * from t_sys_bank');
Open;First;
while not Eof do
begin
ComboBox1.Items.Add(FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_op_fee2.bsSkinButton53Click(Sender: TObject);
begin
bsSkinPanel15.Visible:=false;
end;
procedure Tfrm_op_fee2.bsSkinButton54Click(Sender: TObject);
var aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;
SQL.Clear;
SQL.add('select * from t_sys_bank');
SQL.add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=trim(ComboBox1.Text);
Open;First;
if trim(ComboBox1.Text)='' then
begin
showmessage('<27><><EFBFBD>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>');
Exit;
end;
if Trim(t_op_fee.fieldbyname('<27>ұ<EFBFBD>').asstring)='RMB' THEN
begin
modify_all:=True;
t_op_fee.Edit;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').asstring:=fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:='';
t_op_fee.post;
end
else
begin
modify_all:=True;
t_op_fee.Edit;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').asstring:=fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:='';
t_op_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').asstring:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_op_fee.post;
end;
finally
Free;
modify_all:=False;
bsSkinPanel15.Visible:=false;
end;
end;
procedure Tfrm_op_fee2.t_op_feeCalcFields(DataSet: TDataSet);
begin
if DataSet.FieldByName('<27><><EFBFBD>񻹿<EFBFBD><F1BBB9BF><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
end
else
begin
end;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
dataset.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat-dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
end.