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.

455 lines
14 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_seae_fenzhang;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, bsSkinCtrls, Grids, Wwdbigrd, Wwdbgrid, StdCtrls,
wwdblook, Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinBoxCtrls, bsdbctrls,
RxMemDS;
type
Tfrm_op_seae_fenzhang = class(TForm)
t_ch_fee_fenzhang: TADOQuery;
t_ch_fee_fenzhang1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
wwDBGrid1: TwwDBGrid;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
wwDBLookupCombo3: TwwDBLookupCombo;
t_ch_fee: TADOQuery;
bsSkinButton5: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
t_sum: TRxMemoryData;
t_sum1: TDataSource;
bsSkinDBEdit1: TbsSkinDBEdit;
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure t_ch_fee_fenzhangAfterInsert(DataSet: TDataSet);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure wwDBGrid1ColExit(Sender: TObject);
procedure t_ch_fee_fenzhangBeforePost(DataSet: TDataSet);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure wwDBLookupCombo2Change(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure t_ch_fee_fenzhangAfterOpen(DataSet: TDataSet);
procedure t_ch_fee_fenzhangAfterPost(DataSet: TDataSet);
procedure bsSkinButton9Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure t_ch_fee_fenzhangBeforeInsert(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_fenzhang: Tfrm_op_seae_fenzhang;
implementation
uses u_main, u_op_seae, my_sys_function, u_data_share,
u_op_seae_fenzhang_his, u_ch_fee_se;
{$R *.dfm}
procedure Tfrm_op_seae_fenzhang.bsSkinButton1Click(Sender: TObject);
begin
t_ch_fee_fenzhang.insert;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_fee_fenzhang);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton6Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
afield := vararraycreate([0,t_ch_fee_fenzhang.fieldcount-1],varvariant);
for i := 0 to (t_ch_fee_fenzhang.fieldcount-1) do
begin
afield[i] :=t_ch_fee_fenzhang.fields[i].value ;
end;
t_ch_fee_fenzhang.append;
for i := 0 to (t_ch_fee_fenzhang.fieldcount-1) do
begin
if t_ch_fee_fenzhang.fields[i].FieldName<>'FD_ID' then
t_ch_fee_fenzhang.fields[i].value := afield[i] ;
end;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang['<27>ұ<EFBFBD>']:='USD';
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton7Click(Sender: TObject);
begin
try
if not assigned(frm_op_seae_fenzhang_his) then
frm_op_seae_fenzhang_his:=tfrm_op_seae_fenzhang_his.Create (self);
frm_op_seae_fenzhang_his.ShowModal;
finally
frm_op_seae_fenzhang_his.free;
frm_op_seae_fenzhang_his:=nil;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton4Click(Sender: TObject);
begin
if t_ch_fee_fenzhang.IsEmpty then
exit;
if t_ch_fee_fenzhang.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
if application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhang.delete;
end
else
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhang.delete;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBGrid1ColExit(Sender: TObject);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
if (t_ch_fee_fenzhang.state<>dsinsert)and(t_ch_fee_fenzhang.state<>dsedit)then
exit;
IF t_ch_fee_fenzhang.IsEmpty THEN
EXIT;
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING='')
or (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING='<27>ֹ<EFBFBD>')then
exit;
if (wwDBGrid1.GetActiveCol=10)or(wwDBGrid1.GetActiveCol=6)
or (wwDBGrid1.GetActiveCol=7)or(wwDBGrid1.GetActiveCol=8)
or (wwDBGrid1.GetActiveCol=9)then
begin
try
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangBeforePost(
DataSet: TDataSet);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27>ұ<EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>');
try
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
if (t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0)and(t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat<>0)then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>Ӧ<EFBFBD>ա<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EEA3A1>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo3Change(Sender: TObject);
begin
if (t_ch_fee_fenzhang.state=dsinsert)or(t_ch_fee_fenzhang.state=dsedit) then
begin
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo3.text,[])then
begin
end;
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_seae_fenzhang.FormShow(Sender: TObject);
begin
frm_data_share.t_code_fee.REQUERY;
frm_data_share.t_crm_client_daili.REQUERY;
frm_data_share.t_code_currency.REQUERY;
frm_data_share.t_code_fee.Filtered:=false;
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee.Filtered:=true;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo2Change(Sender: TObject);
begin
if (t_ch_fee_fenzhang.state=dsinsert)or(t_ch_fee_fenzhang.state=dsedit) then
begin
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_fee.insert;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
end;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=t_ch_fee_fenzhang['<27>ұ<EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
t_ch_fee_fenzhang.edit;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_fenzhang.post;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton5Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
t_ch_fee.insert;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
end;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=t_ch_fee_fenzhang['<27>ұ<EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
t_ch_fee_fenzhang.edit;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_fenzhang.post;
t_ch_fee_fenzhang.next;
end;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.bsSkinPanel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel1.width/9);
bsSkinButton1.width:=i;
bsSkinButton6.width:=i;
bsSkinButton7.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
bsSkinButton3.width:=i;
bsSkinButton11.width:=i;
bsSkinButton5.width:=i;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterOpen(
DataSet: TDataSet);
var
debit,credit:real;
begin
debit:=0;
credit:=0;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
debit:=debit+t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
credit:=credit+t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_fee_fenzhang.next;
end;
t_sum.close;
t_sum.open;
t_sum.insert;
debit:=debit-credit;
if debit>=0 then
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
t_sum['<27>ϼ<EFBFBD>']:=debit;
t_sum['<27><>д']:='SAY:US DOLLARS '+ntoc(debit,true)+' ONLY.';
t_sum.post;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterPost(
DataSet: TDataSet);
var
debit,credit:real;
book1:Tbookmark;
begin
debit:=0;
credit:=0;
book1:=t_ch_fee_fenzhang.GetBookmark;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
debit:=debit+t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
credit:=credit+t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_fee_fenzhang.next;
end;
t_ch_fee_fenzhang.GotoBookmark(book1);
t_sum.close;
t_sum.open;
t_sum.insert;
debit:=debit-credit;
if debit>=0 then
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
t_sum['<27>ϼ<EFBFBD>']:=debit;
t_sum['<27><>д']:='SAY:US DOLLARS '+ntoc(debit,true)+'ONLY.';
t_sum.post;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڷ<EFBFBD><DAB7><EFBFBD>',2,frm_op_seae.t_op_seae2,t_sum1,nil,nil,t_ch_fee_fenzhang1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_op_seae_fenzhang.Hide;
frm_op_seae_fenzhang.ManualFloat(frm_op_seae_fenzhang.BoundsRect );
action:=cafree;
frm_op_seae_fenzhang:=nil;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangBeforeInsert(
DataSet: TDataSet);
begin
if t_ch_fee_fenzhang.DataSource.DataSet.State=dsinsert then
t_ch_fee_fenzhang.DataSource.DataSet.post;
end;
end.