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.

10113 lines
390 KiB
Plaintext

This file contains ambiguous Unicode characters!

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

unit u_fee;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
RxMemDS, Menus, DB, ADODB, wwdblook, StdCtrls, bsSkinCtrls, ExtCtrls,
DBCtrls, Mask, bsSkinBoxCtrls, Grids, Wwdbigrd, Wwdbgrid, Variants,
bsdbctrls, XPMenu, kbmMemTable, kbmMemBinaryStreamFormat, DBGrids,IniFiles;
type
Tfra_fee = class(TFrame)
Panel11: TPanel;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay: TADOQuery;
t_ch_pay1: TDataSource;
PopupMenu1: TPopupMenu;
N2: TMenuItem;
N3: TMenuItem;
N1: TMenuItem;
N4: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
t_bz_balance: TRxMemoryData;
t_bz_client: TRxMemoryData;
a_shen_delete: TADOQuery;
a_shen_delete1: TDataSource;
a_shen_modify_old: TADOQuery;
a_shen_modify_old1: TDataSource;
a_shen_modify_new1: TDataSource;
a_shen_modify_new: TADOQuery;
p_shen_delete: TADOQuery;
p_shen_delete1: TDataSource;
p_shen_modify_old: TADOQuery;
p_shen_modify_old1: TDataSource;
p_shen_modify_new: TADOQuery;
p_shen_modify_new1: TDataSource;
PopupMenu2: TPopupMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
PopupMenu3: TPopupMenu;
N10: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N31: TMenuItem;
N11: TMenuItem;
N12: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N34: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N37: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N38: TMenuItem;
N39: TMenuItem;
N40: TMenuItem;
N13: TMenuItem;
N14: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
N43: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N44: TMenuItem;
N45: TMenuItem;
N46: TMenuItem;
N24: TMenuItem;
N25: TMenuItem;
N28: TMenuItem;
N47: TMenuItem;
N48: TMenuItem;
N49: TMenuItem;
N27: TMenuItem;
N26: TMenuItem;
N50: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N53: TMenuItem;
N54: TMenuItem;
N55: TMenuItem;
t_ch_client: TADOQuery;
t_ch_client1: TDataSource;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
Panel3: TPanel;
Panel4: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
Panel5: TPanel;
a_bo: TbsSkinGroupBox;
DBMemo1: TDBMemo;
a_delete: TbsSkinGroupBox;
DBMemo2: TDBMemo;
a_modify_old: TbsSkinGroupBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
a_modify_new: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBMemo3: TDBMemo;
wwDBGrid1: TwwDBGrid;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
edit_type: TEdit;
DBEdit17: TDBEdit;
Panel1: TPanel;
Panel6: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Panel7: TPanel;
p_bo: TbsSkinGroupBox;
DBMemo4: TDBMemo;
p_delete: TbsSkinGroupBox;
DBMemo5: TDBMemo;
p_modify_old: TbsSkinGroupBox;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
p_modify_new: TbsSkinGroupBox;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
DBEdit18: TDBEdit;
wwDBLookupCombo6: TwwDBLookupCombo;
wwDBLookupCombo7: TwwDBLookupCombo;
wwDBLookupCombo8: TwwDBLookupCombo;
wwDBLookupCombo9: TwwDBLookupCombo;
wwDBLookupCombo10: TwwDBLookupCombo;
wwDBGrid2: TwwDBGrid;
edit_report: TEdit;
N56: TMenuItem;
N57: TMenuItem;
N58: TMenuItem;
N59: TMenuItem;
N60: TMenuItem;
N61: TMenuItem;
N62: TMenuItem;
N63: TMenuItem;
N64: TMenuItem;
N65: TMenuItem;
N66: TMenuItem;
N67: TMenuItem;
N68: TMenuItem;
N69: TMenuItem;
N70: TMenuItem;
N71: TMenuItem;
N72: TMenuItem;
N73: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N74: TMenuItem;
N75: TMenuItem;
N76: TMenuItem;
N77: TMenuItem;
N78: TMenuItem;
N79: TMenuItem;
N80: TMenuItem;
N81: TMenuItem;
PopupMenu4: TPopupMenu;
N82: TMenuItem;
N84: TMenuItem;
N85: TMenuItem;
N86: TMenuItem;
N87: TMenuItem;
N88: TMenuItem;
PopupMenu5: TPopupMenu;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem10: TMenuItem;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
MenuItem13: TMenuItem;
MenuItem14: TMenuItem;
PopupMenu6: TPopupMenu;
N89: TMenuItem;
N90: TMenuItem;
N91: TMenuItem;
PopupMenu7: TPopupMenu;
MenuItem15: TMenuItem;
MenuItem16: TMenuItem;
MenuItem17: TMenuItem;
XPMenu1: TXPMenu;
N92: TMenuItem;
N93: TMenuItem;
N94: TMenuItem;
N95: TMenuItem;
N96: TMenuItem;
N97: TMenuItem;
N98: TMenuItem;
N99: TMenuItem;
N100: TMenuItem;
N101: TMenuItem;
N102: TMenuItem;
N103: TMenuItem;
Label1: TLabel;
DBEdit35: TDBEdit;
Label2: TLabel;
DBEdit36: TDBEdit;
Label3: TLabel;
DBEdit37: TDBEdit;
Label4: TLabel;
DBEdit38: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
Label5: TLabel;
DBEdit39: TDBEdit;
Label6: TLabel;
DBEdit40: TDBEdit;
bsSkinPanel2: TbsSkinPanel;
Label7: TLabel;
Label42: TLabel;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
N104: TMenuItem;
N105: TMenuItem;
N106: TMenuItem;
N107: TMenuItem;
N108: TMenuItem;
N109: TMenuItem;
N110: TMenuItem;
N111: TMenuItem;
N112: TMenuItem;
N113: TMenuItem;
N114: TMenuItem;
N115: TMenuItem;
N116: TMenuItem;
N117: TMenuItem;
edit_data: TEdit;
N118: TMenuItem;
N119: TMenuItem;
N120: TMenuItem;
N121: TMenuItem;
t_ch_fee_truck: TADOQuery;
t_ch_fee_truck1: TDataSource;
Panel8: TPanel;
Panel9: TPanel;
bsSkinStdLabel11: TbsSkinStdLabel;
bsSkinStdLabel12: TbsSkinStdLabel;
bsSkinStdLabel13: TbsSkinStdLabel;
bsSkinStdLabel14: TbsSkinStdLabel;
bsSkinStdLabel15: TbsSkinStdLabel;
bsSkinStdLabel16: TbsSkinStdLabel;
bsSkinStdLabel17: TbsSkinStdLabel;
bsSkinStdLabel18: TbsSkinStdLabel;
bsSkinStdLabel19: TbsSkinStdLabel;
bsSkinStdLabel20: TbsSkinStdLabel;
bsSkinDBEdit11: TbsSkinDBEdit;
bsSkinDBEdit12: TbsSkinDBEdit;
bsSkinDBEdit13: TbsSkinDBEdit;
bsSkinDBEdit14: TbsSkinDBEdit;
bsSkinDBEdit15: TbsSkinDBEdit;
bsSkinDBEdit16: TbsSkinDBEdit;
bsSkinDBEdit17: TbsSkinDBEdit;
bsSkinDBEdit18: TbsSkinDBEdit;
bsSkinDBEdit19: TbsSkinDBEdit;
bsSkinDBEdit20: TbsSkinDBEdit;
Panel2: TPanel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel5: TbsSkinStdLabel;
bsSkinStdLabel6: TbsSkinStdLabel;
bsSkinStdLabel7: TbsSkinStdLabel;
bsSkinStdLabel8: TbsSkinStdLabel;
bsSkinStdLabel9: TbsSkinStdLabel;
bsSkinStdLabel10: TbsSkinStdLabel;
bsSkinDBEdit6: TbsSkinDBEdit;
bsSkinDBEdit4: TbsSkinDBEdit;
bsSkinDBEdit1: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
bsSkinDBEdit5: TbsSkinDBEdit;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit8: TbsSkinDBEdit;
bsSkinDBEdit7: TbsSkinDBEdit;
bsSkinDBEdit9: TbsSkinDBEdit;
bsSkinDBEdit10: TbsSkinDBEdit;
t_op_gain_main: TADOQuery;
t_op_gain_main1: TDataSource;
DBEdit43: TDBEdit;
t_ch_client_sum: TADOQuery;
t_ch_client_sum1: TDataSource;
Label43: TLabel;
DBEdit44: TDBEdit;
Label44: TLabel;
DBEdit45: TDBEdit;
Label45: TLabel;
DBEdit46: TDBEdit;
Label41: TLabel;
DBEdit47: TDBEdit;
DBMemo7: TDBMemo;
Label46: TLabel;
baoguan: TEdit;
ds_ch_fee_fenzhang1: TDataSource;
t_ch_fee_fenzhang: TADOQuery;
t_op_fenzhang: TADOQuery;
ds_op_fenzhang1: TDataSource;
t_ch_fee_fenzhang2: TADOQuery;
ds_ch_fee_fenzhang21: TDataSource;
dsrmodify_old: TDataSource;
at_modify_old: TADOQuery;
dsrmodify_new: TDataSource;
at_modify_new: TADOQuery;
kbmThreadDataSet1: TkbmThreadDataSet;
kbmBinaryStreamFormat1: TkbmBinaryStreamFormat;
memaccept: TkbmMemTable;
memaccept1: TDataSource;
mempay1: TDataSource;
mempay: TkbmMemTable;
memdd1: TDataSource;
memdd: TkbmMemTable;
N122: TMenuItem;
N123: TMenuItem;
N124: TMenuItem;
N125: TMenuItem;
qrytmp: TADOQuery;
t_print_histry1: TDataSource;
t_print_histry: TADOQuery;
memtblprint: TkbmMemTable;
memtblprint1: TDataSource;
wwDBLookupCombo11: TwwDBLookupCombo;
at_modify_del1: TDataSource;
at_modify_del: TADOQuery;
N126: TMenuItem;
bsSkinPanel3: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Memo1: TMemo;
DBEdit48: TDBEdit;
N83: TMenuItem;
N127: TMenuItem;
N128: TMenuItem;
N129: TMenuItem;
memtblProfit: TkbmMemTable;
memtblProfit1: TDataSource;
t_crm_client_info: TADOQuery;
t_crm_client_info1: TDataSource;
bsSkinButton19: TbsSkinButton;
memtblOther: TkbmMemTable;
memtblOther1: TDataSource;
memtblOtherOrdNo: TIntegerField;
memtblOtherField: TStringField;
memtblOtherField2: TFloatField;
memtblOtherField3: TFloatField;
memtblOtherField4: TStringField;
memtblOtherField5: TFloatField;
memtblOtherField6: TFloatField;
memtblOtherField7: TStringField;
memtblOtherField8: TIntegerField;
memtblOtherField9: TStringField;
memtblOtherField11: TFloatField;
memtblOtherField12: TStringField;
Label47: TLabel;
DBEdit49: TDBEdit;
Label48: TLabel;
DBEdit50: TDBEdit;
Label49: TLabel;
DBEdit51: TDBEdit;
Label50: TLabel;
DBEdit52: TDBEdit;
Label51: TLabel;
DBEdit53: TDBEdit;
Label52: TLabel;
DBEdit54: TDBEdit;
Label53: TLabel;
DBEdit55: TDBEdit;
Label54: TLabel;
DBEdit56: TDBEdit;
Label55: TLabel;
DBEdit57: TDBEdit;
Label56: TLabel;
Label57: TLabel;
DBEdit58: TDBEdit;
DBEdit59: TDBEdit;
Label58: TLabel;
DBEdit60: TDBEdit;
Label59: TLabel;
Label60: TLabel;
DBEdit61: TDBEdit;
DBEdit62: TDBEdit;
Label61: TLabel;
DBEdit63: TDBEdit;
Label62: TLabel;
DBEdit64: TDBEdit;
Label63: TLabel;
DBEdit65: TDBEdit;
Label64: TLabel;
DBEdit66: TDBEdit;
Label65: TLabel;
DBEdit67: TDBEdit;
Label66: TLabel;
DBEdit68: TDBEdit;
memtblOtherField10: TFloatField;
bsSkinButton20: TbsSkinButton;
bsSkinButton21: TbsSkinButton;
wwDBLookupCombo12: TwwDBLookupCombo;
bsSkinComboBox1: TbsSkinComboBox;
procedure FrameEnter(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure t_ch_acceptAfterInsert(DataSet: TDataSet);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
procedure t_ch_acceptBeforeEdit(DataSet: TDataSet);
procedure wwDBLookupCombo5Change(Sender: TObject);
procedure wwDBLookupCombo4Change(Sender: TObject);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure wwDBLookupCombo7Change(Sender: TObject);
procedure wwDBLookupCombo9Change(Sender: TObject);
procedure wwDBLookupCombo10Change(Sender: TObject);
procedure t_ch_payAfterInsert(DataSet: TDataSet);
procedure t_ch_payBeforeEdit(DataSet: TDataSet);
procedure t_ch_payBeforePost(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure wwDBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure wwDBGrid2DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure DBEdit17Change(Sender: TObject);
procedure DBEdit18Change(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem7Click(Sender: TObject);
procedure wwDBGrid1ColExit(Sender: TObject);
procedure wwDBGrid2ColExit(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure N41Click(Sender: TObject);
procedure N43Click(Sender: TObject);
procedure N53Click(Sender: TObject);
procedure N35Click(Sender: TObject);
procedure N37Click(Sender: TObject);
procedure N47Click(Sender: TObject);
procedure N49Click(Sender: TObject);
procedure N38Click(Sender: TObject);
procedure N40Click(Sender: TObject);
procedure N50Click(Sender: TObject);
procedure N52Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N44Click(Sender: TObject);
procedure N46Click(Sender: TObject);
procedure t_ch_acceptAfterPost(DataSet: TDataSet);
procedure t_ch_acceptBeforeInsert(DataSet: TDataSet);
procedure t_ch_payBeforeInsert(DataSet: TDataSet);
procedure Panel11Resize(Sender: TObject);
procedure Panel3Resize(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure wwDBLookupCombo1Change(Sender: TObject);
procedure wwDBLookupCombo6Change(Sender: TObject);
procedure N56Click(Sender: TObject);
procedure N58Click(Sender: TObject);
procedure N60Click(Sender: TObject);
procedure N62Click(Sender: TObject);
procedure N64Click(Sender: TObject);
procedure N66Click(Sender: TObject);
procedure N68Click(Sender: TObject);
procedure N70Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure MenuItem3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N77Click(Sender: TObject);
procedure N74Click(Sender: TObject);
procedure N75Click(Sender: TObject);
procedure N79Click(Sender: TObject);
procedure N81Click(Sender: TObject);
procedure MenuItem5Click(Sender: TObject);
procedure N82Click(Sender: TObject);
procedure N84Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure N86Click(Sender: TObject);
procedure MenuItem12Click(Sender: TObject);
procedure N88Click(Sender: TObject);
procedure N89Click(Sender: TObject);
procedure MenuItem15Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure N91Click(Sender: TObject);
procedure MenuItem17Click(Sender: TObject);
procedure N93Click(Sender: TObject);
procedure N95Click(Sender: TObject);
procedure N97Click(Sender: TObject);
procedure N101Click(Sender: TObject);
procedure N103Click(Sender: TObject);
procedure t_ch_acceptAfterDelete(DataSet: TDataSet);
procedure t_ch_payAfterPost(DataSet: TDataSet);
procedure N108Click(Sender: TObject);
procedure N113Click(Sender: TObject);
procedure N110Click(Sender: TObject);
procedure N112Click(Sender: TObject);
procedure N115Click(Sender: TObject);
procedure N117Click(Sender: TObject);
procedure N119Click(Sender: TObject);
procedure N121Click(Sender: TObject);
procedure DBEdit43Change(Sender: TObject);
procedure Panel9Resize(Sender: TObject);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo6KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo5Exit(Sender: TObject);
procedure wwDBLookupCombo7Exit(Sender: TObject);
procedure a_shen_modify_newBeforePost(DataSet: TDataSet);
procedure p_shen_modify_newBeforePost(DataSet: TDataSet);
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure N123Click(Sender: TObject);
procedure N125Click(Sender: TObject);
procedure wwDBGrid1Exit(Sender: TObject);
procedure wwDBGrid2Exit(Sender: TObject);
procedure wwDBLookupCombo11Enter(Sender: TObject);
procedure DBEdit48Change(Sender: TObject);
procedure t_ch_acceptAfterOpen(DataSet: TDataSet);
procedure t_ch_payAfterOpen(DataSet: TDataSet);
procedure N127Click(Sender: TObject);
procedure N129Click(Sender: TObject);
procedure bsSkinDBEdit17Change(Sender: TObject);
procedure bsSkinDBEdit8Change(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure wwDBGrid2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBGrid1KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinComboBox1Change(Sender: TObject);
private
{ Private declarations }
gdo,xdo:smallint;
upfee,feelist:boolean;
procedure chkPc(M_dataset:TADOQuery) ; //<2F><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>
procedure ChkBg(M_dataset:TADOQuery) ; //<2F><><EFBFBD><EFBFBD><E9B1A8>
procedure t_ch_acceptdjoncharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure t_ch_paydjoncharge(Sender: TField); //<2F><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure GetAllFeeItems;
procedure t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure DatasetAmtcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure getsumstr;// <20><>˰
procedure getsumstr_op;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰
procedure getsumstr_cw;// ˰ǰ
procedure getsumstr_vat;// ˰<><CBB0>
procedure UpdateFeeRemarks;
procedure UpdateFeePrint(Adofee:TadoQuery);
public
{ Public declarations }
aAdoQuery:TAdoQuery;
procedure CancelApply(open_1,open_2,open_3,open_4:string;Adofee:TadoQuery);
end;
var
shenmodify: Boolean=false;
implementation
uses u_main, my_sys_function, u_data_share, u_code_fee_project_add,
u_fee_history, u_fee_list, u_ch_invoice_shen, u_fee_calc;
{$R *.dfm}
procedure Tfra_fee.FrameEnter(Sender: TObject);
var
str_list:Tstringlist;
i,k,j:integer;
inifile1:Tinifile;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><E8B4A6>
upfee:=false;
feelist:=false;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if (edit_type.text='1')or(edit_type.text='2') then
begin
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
aAdoQuery.open;
end;
try
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
t_bz_balance.post;
try
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
begin
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_bz_balance['three']:=1;
end
else
begin
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
end;
t_bz_balance.post;
except
;
end;
k:=0;
if baoguan.text='1'then
begin
// try
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
if t_ch_accept.DataSource.DataSet.FindField('<27><>TEU')<>nil then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asFloat;
t_bz_balance.post;
// except
;
// end;
// try
// except
;
// end;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
t_bz_balance.post;
end;
if (str_list.Count=0) and (not aAdoQuery.IsEmpty) then begin
aAdoQuery.First;
i:=0;
while not aAdoQuery.Eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_bz_balance['two']:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_bz_balance['three']:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger;
t_bz_balance.post;
aAdoQuery.Next;
end;
end;
end else begin
// try
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asFloat;
t_bz_balance.post;
// except
;
// end;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
t_bz_balance.post;
end;
if (str_list.Count=0) and (not aAdoQuery.IsEmpty) then begin
aAdoQuery.First;
i:=0;
while not aAdoQuery.Eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_bz_balance['two']:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_bz_balance['three']:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger;
t_bz_balance.post;
aAdoQuery.Next;
end;
end;
end;
finally
str_list.free;
end;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
t_bz_client.close;
t_bz_client.open;
if baoguan.text='1'then
begin
t_bz_client.Append;
t_bz_client['one']:='0-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
else
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring
else
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
end else begin
t_bz_client.Append;
t_bz_client['one']:='0-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='9-ͨ ֪ <20><>';
t_bz_client['two']:='֪ͨ<CDA8><D6AA>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='10-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='11-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='12-<2D><> <20><>';
t_bz_client['two']:='<27>ֿ<EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27>ֿ<EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ֿ<EFBFBD>').asstring
else
t_bz_client['three']:='';
t_bz_client.post;
end;
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;
////
if (edit_type.text='7') then
begin
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
aAdoQuery.open;
end;
try
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
t_bz_balance.post;
try
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
begin
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_bz_balance['three']:=1;
end
else
begin
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
end;
t_bz_balance.post;
except
;
end;
k:=0;
if baoguan.text='1'then
begin
// try
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
if t_ch_accept.DataSource.DataSet.FindField('<27><>TEU')<>nil then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asFloat;
t_bz_balance.post;
// except
;
// end;
// try
// except
;
// end;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
t_bz_balance.post;
end;
end else begin
// try
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asFloat;
t_bz_balance.post;
// except
;
// end;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
t_bz_balance.post;
end;
end;
finally
str_list.free;
end;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
t_bz_client.close;
t_bz_client.open;
if baoguan.text='1'then
begin
t_bz_client.Append;
t_bz_client['one']:='0-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
else
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring
else
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
end else begin
t_bz_client.Append;
t_bz_client['one']:='0-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='9-ͨ ֪ <20><>';
t_bz_client['two']:='֪ͨ<CDA8><D6AA>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='10-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='11-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
end;
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;
////
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if (edit_type.text='3')or(edit_type.text='4') then
begin
try
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='';
aAdoQuery.open;
end;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>')<>nil then
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').asfloat);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='5-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
if edit_type.text='3' then
begin
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='6-ë<><C3AB>';
t_bz_balance['two']:='ë<><C3AB>';
if edit_type.text='4' then
begin
if t_ch_accept.DataSource.DataSet.FindField('ë<><C3AB>')<>nil then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ë<><C3AB>').asfloat;
end;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD>չ<EFBFBD>˾';
t_bz_client['two']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
if (edit_type.text='3') then begin
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
end else begin
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
end;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
if (edit_type.text='3') then begin
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>').asstring;
t_bz_client.post;
end else begin
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('<27>ջ<EFBFBD><D5BB><EFBFBD>λ')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.FindField('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')<>nil then
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
end;
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;
//<2F><><EFBFBD>ܳ<EFBFBD>ҵ<EFBFBD><D2B5>
if (edit_type.text='5') then
begin
try
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='';
aAdoQuery.open;
end;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
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;
//<2F><>·ҵ<C2B7><D2B5>
if (edit_type.text='6') then
begin
try
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='';
aAdoQuery.open;
end;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><>';
t_bz_balance['two']:='<27><>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-'+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=1;
t_bz_balance.post;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
end;
if (edit_type.text='8') then
begin
try
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='';
aAdoQuery.open;
end;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-TEU';
t_bz_balance['two']:='TEU';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=1;
t_bz_balance.post;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><><EFBFBD><EFBFBD><EFBFBD>乫˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>乫˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>乫˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
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;
if (edit_type.text='9') then
begin
try
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:='';
aAdoQuery.open;
end;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='5-װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='6-ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asFloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD><EFBFBD>˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-װ<>˳<EFBFBD><CBB3><EFBFBD>';
t_bz_client['two']:='װ<>˳<EFBFBD><CBB3><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('װ<>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.Append;
t_bz_client['one']:='9-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='10-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='11-ͨ ֪ <20><>';
t_bz_client['two']:='֪ͨ<CDA8><D6AA>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='12-<2D><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='13-<2D><> <20><>';
t_bz_client['two']:='<27>ֿ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='14-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
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;
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).EditFormat:=';;';
TNumericField(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
TNumericField(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).EditFormat:=';;';
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
TNumericField(t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).DisplayFormat:='#,##0.00"%";-#,##0.00"%";#';
TNumericField(t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).EditFormat:='0.00;-0.00;0.00';
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
TNumericField(t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).DisplayFormat:='#,##0.00"%";-#,##0.00"%";#';
TNumericField(t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).EditFormat:='0.00;-0.00;0.00';
TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).EditFormat:=';;';
TNumericField(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
TNumericField(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>')).EditFormat:=';;';
end;
//<2F><><EFBFBD>ܳ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>ʾ<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>
if (edit_type.text='5') then begin
{
if wwDBGrid1.ColumnByName('<27>ֵ<EFBFBD><D6B5><EFBFBD>').FieldName='' then begin
wwDBGrid1.AddField('<27>ֵ<EFBFBD><D6B5><EFBFBD>');
wwDBGrid1.Invalidate;
wwDBGrid1.Fields[wwDBGrid1.FieldCount-1].Index:=1;
end;
if wwDBGrid2.ColumnByName('<27>ֵ<EFBFBD><D6B5><EFBFBD>').FieldName='' then begin
wwDBGrid2.AddField('<27>ֵ<EFBFBD><D6B5><EFBFBD>');
wwDBGrid2.Invalidate;
wwDBGrid2.Fields[wwDBGrid2.FieldCount-1].Index:=1;
end;
}
end else begin
wwDBGrid1.RemoveField('<27>ֵ<EFBFBD><D6B5><EFBFBD>',true);
wwDBGrid2.RemoveField('<27>ֵ<EFBFBD><D6B5><EFBFBD>',true);
end;
//<2F><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ
if strtobool(get_parameters_value(64,'false')) then
begin
if if_open('206') or if_open('207') or if_open('208') or if_open('209') then begin
if t_ch_accept.Active then
begin
if wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>').FieldName='' then
begin
wwDBGrid1.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid1.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'true;false');
wwDBGrid1.Invalidate;
if wwDBGrid1.Fields[wwDBGrid1.FieldCount-1].FieldName='<27><><EFBFBD><EFBFBD>' then
wwDBGrid1.Fields[wwDBGrid1.FieldCount-1].Index:=1;
end else begin
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>',true);
wwDBGrid1.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid1.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'true;false');
wwDBGrid1.RedrawGrid;
end;
end;
if t_ch_pay.Active then
begin
if wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>').FieldName='' then
begin
wwDBGrid2.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid2.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'true;false');
wwDBGrid2.Invalidate;
if wwDBGrid2.Fields[wwDBGrid2.FieldCount-1].FieldName='<27><><EFBFBD><EFBFBD>' then
wwDBGrid2.Fields[wwDBGrid2.FieldCount-1].Index:=1;
end else begin
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>',true);
wwDBGrid2.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid2.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'true;false');
wwDBGrid2.RedrawGrid;
end;
end;
end else begin
if t_ch_accept.Active then
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>',true);
if t_ch_pay.Active then
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>',true);
end;
end else begin
if t_ch_accept.Active then
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>',true);
if t_ch_pay.Active then
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>',true);
end;
//ֻ<><D6BB><EFBFBD><EFBFBD>
if t_ch_accept.Active then
begin
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>״̬').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
wwDBGrid1.ColumnByName('˰<><CBB0>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').ReadOnly:=true;
if not strtobool(get_parameters_value(38,'true')) then
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=true
else wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=false;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><>ID').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><>״̬').ReadOnly:=true;
wwDBGrid1.ColumnByName('˳<><CBB3>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27>Ƿ񸴺<C7B7>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27><><EFBFBD>뿪Ʊ').ReadOnly:=true;
wwDBGrid1.ColumnByName('<27>ύ').ReadOnly:=true;
{ wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=False;
if if_reg(159) then
begin
ShowMessage('OK');
end
else
begin
ShowMessage('NO');
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
end;
}
end;
if t_ch_pay.Active then
begin
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>״̬').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
wwDBGrid2.ColumnByName('˰<><CBB0>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><>ID').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><>״̬').ReadOnly:=true;
wwDBGrid2.ColumnByName('˳<><CBB3>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27>Ƿ񸴺<C7B7>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27><><EFBFBD>뿪Ʊ').ReadOnly:=true;
wwDBGrid2.ColumnByName('<27>ύ').ReadOnly:=true;
{
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=False;
if if_reg(159) then
begin
ShowMessage('OK');
end
else
begin
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').ReadOnly:=true;
ShowMessage('NO');
end;
}
end;
if not strtobool(get_parameters_value(38,'true')) then
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=true
else wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>').ReadOnly:=false;
if strtobool(get_parameters_value(154,'false')) then begin
N127.Visible:=true;
N83.Visible:=true;
end;
if t_ch_accept.Active then
wwDBGrid1.ImeName:='';
if t_ch_pay.Active then
wwDBGrid2.ImeName:='';
// getsumstr;
if strtobool(get_parameters_value(190,'false')) then
begin
bsSkinButton20.Visible:=true;
bsSkinButton21.Visible:=true;
end
else
begin
bsSkinButton20.Visible:=False;
bsSkinButton21.Visible:=False;
end;
if if_reg(159) then
else
begin
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid1.RemoveField('˰<><CBB0>',true);
wwDBGrid1.RemoveField('˰<><CBB0>',true);
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>',true);
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid1.RemoveField('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>',true);
end;
if if_reg(159) then
else
begin
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid2.RemoveField('˰<><CBB0>',true);
wwDBGrid2.RemoveField('˰<><CBB0>',true);
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>',true);
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>',true);
wwDBGrid2.RemoveField('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>',true);
end;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
if strtoint(get_parameters_value(197,'0'))<>0 then
bsSkinComboBox1.ItemIndex:=strtoint(get_parameters_value(197,'0'))-1
else bsSkinComboBox1.ItemIndex:=inifile1.ReadInteger('FEE','FEEVAT',0);
inifile1.free;
end;
procedure Tfra_fee.bsSkinButton1Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
if Panel1.Visible then
begin
N8.Visible:=true;
N9.Visible:=true;
end
else
begin
N8.Visible:=false;
N9.Visible:=false;
end;
end;
procedure Tfra_fee.bsSkinButton2Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
table_post(t_ch_accept);
end;
procedure Tfra_fee.t_ch_acceptAfterInsert(DataSet: TDataSet);
var AdoQuery_UpdateFeeStatus:TAdoQuery;
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
if strtobool(get_parameters_value(122,'false')) and (t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then begin
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_accept['<27><>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end else begin
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_accept['˰<><CBB0>']:=0;
t_ch_accept['˰<><CBB0>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_accept['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
if strtobool(get_parameters_value(115,'false')) then
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet['ί<>е<EFBFBD>λ'];
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').FocusControl;
{
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC>״̬' then
begin
AdoQuery_UpdateFeeStatus:=CreateAdoQuery;
with AdoQuery_UpdateFeeStatus do
try
Close;sql.Clear;
sql.Clear;
Sql.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
Sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬''');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
finally
Free;
end;
end;
}
end;
procedure Tfra_fee.bsSkinButton4Click(Sender: TObject);
var
i:integer;
str_list:Tstringlist;
begin
if t_ch_accept.isempty then
exit;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
if wwDBGrid1.SelectedList.Count>1 then
begin
try
str_list:=Tstringlist.create;
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
str_list.Add(t_ch_accept.fieldbyname('CH_ID').asstring);
end;
for i:=0 to str_list.Count-1 do
begin
if t_ch_accept.locate('CH_ID',str_list[i],[]) then
t_ch_accept.Delete;
end;
finally
str_list.free;
end;
end
else
begin
t_ch_accept.delete;
end;
t_ch_accept.Refresh;
end;
procedure Tfra_fee.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_accept);
end;
procedure Tfra_fee.t_ch_acceptBeforePost(DataSet: TDataSet);
begin
// if edit_type.Text='1' then chkPc(t_ch_accept) ; //<2F><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>
// if edit_type.Text='1' then ChkBg(t_ch_accept) ; //<2F><><EFBFBD><EFBFBD><E9B1A8> ,<2C><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD>
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_accept['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=t_ch_accept['<27><><EFBFBD>뿪Ʊ'];
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸İ<DEB8>ť<EFBFBD><C5A5>');
abort;
end;
if t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) or
(t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='') or
(t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)then
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
abort;
end;
end;
try
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
begin
if (t_ch_accept.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-t_ch_accept.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><><EFBFBD><EFBFBD>']);
DataSet.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('˰<><CBB0>').asfloat/100)*DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('˰<><CBB0>').asfloat);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
finally
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
// t_ch_accept['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
if frm_data_share.t_crm_client_all.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then
begin
MessageDlg('<27>˿ͻ<CBBF><CDBB><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
//<2F><><EFBFBD>ʵļ<CAB5><C4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_accept.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 // <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8><EFBFBD>
begin
if t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
begin
if strtobool(get_parameters_value(145,'true')) then //Ĭ<>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if not strtobool(get_parameters_value(184,'true')) then //<2F><><EFBFBD>ĵ<EFBFBD>Ĭ<EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString);
end
else
begin
if t_ch_accept.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString);
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
end;
end;
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_accept.FieldByName('<27>ұ<EFBFBD>').AsString)
end;
end
else
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
procedure Tfra_fee.t_ch_acceptBeforeEdit(DataSet: TDataSet);
var holidays,days:integer;
begin
//<2F>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>
if shenmodify then begin
end else begin
if edit_type.text='1' then
begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='3' then
begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='4' then
begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='7' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
end;
if (not do_data('7000',t_ch_accept.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) and (not feelist) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if (t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') and (not upfee) then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(320,'false'))then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
holidays:=GetHoliday(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[]) then
begin
Days:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
end;
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>Days+holidays then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr((date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime))+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr(Days+holidays)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
Abort;
end
else;
end;
end;
end;
end;
end;
fee_befor_modify(t_ch_accept);
end;
procedure Tfra_fee.wwDBLookupCombo5Change(Sender: TObject);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not t_bz_client.IsEmpty then
if t_bz_client.Locate('one',wwDBLookupCombo5.text,[])then
begin
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo4Change(Sender: TObject);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not t_bz_balance.IsEmpty then
if t_bz_balance.Locate('one',wwDBLookupCombo4.text,[])then
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo3Change(Sender: TObject);
begin
//<2F>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
begin
if wwDBLookupCombo3.text<>'RMB' then begin
if strtobool(get_parameters_value(145,'true')) then
begin
if not strtobool(get_parameters_value(184,'true')) then
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='6' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text);
end
else
begin
if t_ch_accept.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='6' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text);
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
end;
end;
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
end;
end
else
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo7Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not t_bz_client.IsEmpty then
if t_bz_client.Locate('one',wwDBLookupCombo7.text,[])then
begin
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo9Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not t_bz_balance.IsEmpty then
if t_bz_balance.Locate('one',wwDBLookupCombo9.text,[])then
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo10Change(Sender: TObject);
begin
//<2F>ұ<EFBFBD>
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo10.text,[])THEN
begin
if wwDBLookupCombo10.text<>'RMB' then
begin
if strtobool(get_parameters_value(145,'true')) then
begin
if not strtobool(get_parameters_value(184,'true')) then
begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='6' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='7' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text);
end
else
begin
if t_ch_pay.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='6' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text)
else if edit_type.text='7' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo10.text);
end
else
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo10.text)
end;
end;
end
else
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo10.text)
end;
end
else
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
procedure Tfra_fee.t_ch_payAfterInsert(DataSet: TDataSet);
var AdoQuery_UpdateFeeStatus:TAdoQuery;
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
if strtobool(get_parameters_value(122,'false')) and (t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then begin
//<2F>ѷ<EFBFBD><D1B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27><>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end else begin
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_pay['˰<><CBB0>']:=0;
t_ch_pay['˰<><CBB0>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_pay['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_pay['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').FocusControl;
{
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC>״̬' then
begin
AdoQuery_UpdateFeeStatus:=CreateAdoQuery;
with AdoQuery_UpdateFeeStatus do
try
Close;sql.Clear;
sql.Clear;
Sql.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
Sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬''');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
finally
Free;
end;
end;
}
end;
procedure Tfra_fee.t_ch_payBeforeEdit(DataSet: TDataSet);
var holidays,days:integer;
begin
if shenmodify then begin
end else begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='7' then
begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
end;
if (not do_data('7000',t_ch_pay.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) and (not feelist) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if (t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') and (not upfee) then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(320,'false'))then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
holidays:=GetHoliday(t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[]) then
begin
Days:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
end;
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>Days+holidays then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr((date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime))+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr(Days+holidays)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
Abort;
end
else;
end;
end;
end;
end;
end;
fee_befor_modify(t_ch_pay);
end;
procedure Tfra_fee.t_ch_payBeforePost(DataSet: TDataSet);
begin
if (edit_type.Text='1') then chkPc(t_ch_pay) ; //<2F><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>
if (edit_type.Text='1') then ChkBg(t_ch_pay) ; //<2F><><EFBFBD><EFBFBD><E9B1A8>
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_pay['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=t_ch_pay['<27><><EFBFBD>뿪Ʊ'];
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸İ<DEB8>ť<EFBFBD><C5A5>');
abort;
end;
if t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)then
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
abort;
end;
end;
try
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
if (t_ch_pay.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-t_ch_pay.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay['<27><><EFBFBD><EFBFBD>']);
DataSet.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('˰<><CBB0>').asfloat/100)*DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('˰<><CBB0>').asfloat);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
finally
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then begin
MessageDlg('<27>˿ͻ<CBBF><CDBB><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
//<2F>жϱұ<CFB1><D2B1>ͻ<EFBFBD><CDBB><EFBFBD>
if t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_pay.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_pay.FieldByName('<27>ұ<EFBFBD>').AsString<>'RMB' then
begin
if strtobool(get_parameters_value(145,'true')) then
begin
if not strtobool(get_parameters_value(184,'true')) then
begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='6' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='7' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString);
end
else
begin
if t_ch_pay.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='6' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
else if edit_type.text='7' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString);
end
else
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
end;
end;
end
else
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_pay.FieldByName('<27>ұ<EFBFBD>').AsString)
end;
end
else
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
end;
procedure Tfra_fee.bsSkinButton10Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton10.ClientToScreen(Point(0,bsSkinButton10.Height));
PopupMenu2.Popup(Pnt.x,Pnt.y);
if Panel3.Visible then
begin
MenuItem8.Visible:=true;
MenuItem9.Visible:=true;
end
else
begin
MenuItem8.Visible:=false;
MenuItem9.Visible:=false;
end;
end;
procedure Tfra_fee.bsSkinButton14Click(Sender: TObject);
begin
table_post(t_ch_pay);
end;
procedure Tfra_fee.bsSkinButton15Click(Sender: TObject);
var
i:integer;
str_list:Tstringlist;
begin
if t_ch_pay.isempty then
exit;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
if wwDBGrid2.SelectedList.Count>1 then
begin
try
str_list:=Tstringlist.create;
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
str_list.Add(t_ch_pay.fieldbyname('CH_ID').asstring);
end;
for i:=0 to str_list.Count-1 do
begin
if t_ch_pay.locate('CH_ID',str_list[i],[]) then
t_ch_pay.Delete;
end;
finally
str_list.free;
end;
end
else
begin
t_ch_pay.delete;
end;
t_ch_pay.Refresh;
end;
procedure Tfra_fee.bsSkinButton16Click(Sender: TObject);
begin
table_cancel(t_ch_pay);
end;
procedure Tfra_fee.wwDBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_accept,wwDBGrid1,Rect,Field);
end;
procedure Tfra_fee.wwDBGrid2DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_pay,wwDBGrid2,Rect,Field);
end;
procedure Tfra_fee.bsSkinButton7Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='7' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
;
if not strtobool(get_parameters_value(112,'false')) then begin
if t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'] then begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD><D1B6>ʲ<EFBFBD><CAB2>ܽ<EFBFBD><DCBD>и<EFBFBD><D0B8>ģ<EFBFBD><C4A3><EFBFBD>');
abort;
end;
end;
fee_shen_delete(edit_type.text,'<27><>',t_ch_accept,a_shen_delete);
end;
procedure Tfra_fee.bsSkinButton18Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='7' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
;
if not strtobool(get_parameters_value(112,'false')) then begin
if t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'] then begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD><D1B6>ʲ<EFBFBD><CAB2>ܽ<EFBFBD><DCBD>и<EFBFBD><D0B8>ģ<EFBFBD><C4A3><EFBFBD>');
abort;
end;
end;
fee_shen_delete(edit_type.text,'<27><>',t_ch_pay,p_shen_delete);
end;
procedure Tfra_fee.DBEdit17Change(Sender: TObject);
begin
//Ӧ<>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĵ<DEB8><C4B5><EFBFBD>ʾ
if t_ch_accept.IsEmpty then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ'then
begin
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_bo.Visible:=true;
a_bo.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_delete.Visible:=true;
a_delete.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_new.Visible:=true;
a_modify_new.Align:=alRight;
a_modify_old.Visible:=true;
a_modify_old.Align:=alRight;
exit;
end;
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
end;
procedure Tfra_fee.DBEdit18Change(Sender: TObject);
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĵ<DEB8><C4B5><EFBFBD>ʾ
if t_ch_pay.IsEmpty then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ'then
begin
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_bo.Visible:=true;
p_bo.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_delete.Visible:=true;
p_delete.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_new.Visible:=true;
p_modify_new.Align:=alRight;
p_modify_old.Visible:=true;
p_modify_old.Align:=alRight;
exit;
end;
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
end;
procedure Tfra_fee.CancelApply(open_1,open_2,open_3,open_4:string;Adofee:TadoQuery);
var aAdoQuery :TADOQuery;
begin
if edit_type.text='1' then begin
if not if_open(open_1) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open(open_2) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='3' then begin
if not if_open(open_3) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open(open_4) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='7' then
begin
if not if_open(open_2) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end ;
try
aAdoQuery :=CreateAdoQuery;
frm_main.db.BeginTrans;
modify_all:=true;
if Adofee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
Adofee.Edit;
Adofee['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
Adofee.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=Adofee.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_delete.Delete;
end;
if Adofee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
Adofee.Edit;
Adofee['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
Adofee.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=Adofee.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=Adofee.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_modify_old.Delete;
// p_shen_modify_new.delete;
end;
modify_all:=false;
frm_main.db.CommitTrans;
finally
FreeAndNil(aAdoQuery);
if frm_main.db.InTransaction then
begin
modify_all:=false;
frm_main.db.RollbackTrans;
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfra_fee.bsSkinButton13Click(Sender: TObject);
begin
CancelApply('023','056','074','082',t_ch_pay);
{
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
try
aAdoQuery :=CreateAdoQuery;
frm_main.db.BeginTrans;
modify_all:=true;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
t_ch_pay.Edit;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_pay.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_delete.Delete;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
t_ch_pay.Edit;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_pay.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_modify_old.Delete;
// p_shen_modify_new.delete;
end;
modify_all:=false;
frm_main.db.CommitTrans;
finally
FreeAndNil(aAdoQuery);
if frm_main.db.InTransaction then
begin
modify_all:=false;
frm_main.db.RollbackTrans;
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
}
end;
procedure Tfra_fee.bsSkinButton6Click(Sender: TObject);
begin
if not if_open('420') then begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end
else
if edit_type.text='2' then
begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
end;
if not strtobool(get_parameters_value(112,'false')) then begin
if t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'] then begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD><D1B6>ʲ<EFBFBD><CAB2>ܽ<EFBFBD><DCBD>и<EFBFBD><D0B8>ģ<EFBFBD><C4A3><EFBFBD>');
abort;
end;
end;
try
if a_shen_modify_new.Active then
begin
// a_shen_modify_new.BeforePost:=nil;
end;
fee_shen_modify(edit_type.text,'<27><>',t_ch_accept,a_shen_modify_new,a_shen_modify_old,t_bz_client,t_bz_balance);
finally
if a_shen_modify_new.Active then
begin
// a_shen_modify_new.BeforePost:=a_shen_modify_newBeforePost;
end;
end;
end;
procedure Tfra_fee.bsSkinButton17Click(Sender: TObject);
begin
if not if_open('420') then begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
end;
if not strtobool(get_parameters_value(112,'false')) then begin
if t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'] then begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ѷ<EFBFBD><D1B6>ʲ<EFBFBD><CAB2>ܽ<EFBFBD><DCBD>и<EFBFBD><D0B8>ģ<EFBFBD><C4A3><EFBFBD>');
abort;
end;
end;
try
if p_shen_modify_new.Active then
begin
//p_shen_modify_new.BeforePost:=nil;
end;
fee_shen_modify(edit_type.text,'<27><>',t_ch_pay,p_shen_modify_new,p_shen_modify_old,t_bz_client,t_bz_balance);
finally
if p_shen_modify_new.Active then
begin
// p_shen_modify_new.BeforePost:=p_shen_modify_newBeforePost;
end;
end;
end;
procedure Tfra_fee.N2Click(Sender: TObject);
begin
t_ch_accept.Append;
end;
procedure Tfra_fee.N7Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_accept.IsEmpty then
exit;
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
afield := vararraycreate([0,t_ch_accept.fieldcount-1],varvariant);
for i := 0 to (t_ch_accept.fieldcount-1) do
begin
afield[i] :=t_ch_accept.fields[i].value ;
end;
t_ch_accept.append;
for i := 1 to (t_ch_accept.fieldcount-1) do
begin
if (t_ch_accept.fields[i].FieldName<>'CH_ID') and (t_ch_accept.fields[i].DataType<>ftDateTime) then
t_ch_accept.fields[i].value := afield[i] ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
//
end;
procedure Tfra_fee.MenuItem1Click(Sender: TObject);
begin
t_ch_pay.Append;
end;
procedure Tfra_fee.MenuItem7Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_pay.IsEmpty then
exit;
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
afield := vararraycreate([0,t_ch_pay.fieldcount-1],varvariant);
for i := 0 to (t_ch_pay.fieldcount-1) do
begin
afield[i] :=t_ch_pay.fields[i].value ;
end;
t_ch_pay.append;
for i := 1 to (t_ch_pay.fieldcount-1) do
begin
if (t_ch_pay.fields[i].FieldName<>'CH_ID') and (t_ch_pay.fields[i].DataType<>ftDateTime) then
t_ch_pay.fields[i].value := afield[i] ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
end;
procedure Tfra_fee.wwDBGrid1ColExit(Sender: TObject);
begin
{
if (wwDBGrid1.GetActiveCol=7)or(wwDBGrid1.GetActiveCol=6)or(wwDBGrid1.GetActiveCol=8) or(wwDBGrid1.GetActiveCol=9) then
begin
if (t_ch_accept.state=dsedit)or(t_ch_accept.state=dsinsert)then
begin
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
end;
}
end;
procedure Tfra_fee.wwDBGrid2ColExit(Sender: TObject);
begin
{ zzz
if (wwDBGrid2.GetActiveCol=7)or(wwDBGrid2.GetActiveCol=6)or(wwDBGrid2.GetActiveCol=8) or(wwDBGrid1.GetActiveCol=9) then
begin
if (t_ch_pay.state=dsedit)or(t_ch_pay.state=dsinsert)then
begin
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
end;
}
end;
procedure Tfra_fee.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
N10.Visible:=true;
N104.Visible:=true;
N105.Visible:=true;
N11.Visible:=true;
N12.Visible:=true;
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>')
or (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then
begin
N19.Visible:=true;
N20.Visible:=true;
end
else
begin
N19.Visible:=false;
N20.Visible:=false;
end;
N13.Visible:=false;
N14.Visible:=false;
N106.Visible:=false;
N107.Visible:=false;
N15.Visible:=false;
N16.Visible:=false;
N24.Visible:=false;
N25.Visible:=false;
if Panel2.Visible then
begin
N17.Visible:=true;
N18.Visible:=true;
end
else
begin
N17.Visible:=false;
N18.Visible:=false;
end;
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.bsSkinButton5Click(Sender: TObject);
var
Pnt:Tpoint;
begin
N10.Visible:=false;
N104.Visible:=false;
N105.Visible:=false;
N11.Visible:=false;
N12.Visible:=false;
N19.Visible:=false;
N20.Visible:=false;
N13.Visible:=false;
N14.Visible:=true;
N106.Visible:=true;
N107.Visible:=true;
N15.Visible:=true;
N16.Visible:=true;
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>')
or (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then
begin
N24.Visible:=true;
N25.Visible:=true;
end
else
begin
N24.Visible:=false;
N25.Visible:=false;
end;
if Panel2.Visible then
begin
N17.Visible:=true;
N18.Visible:=true;
end
else
begin
N17.Visible:=false;
N18.Visible:=false;
end;
Pnt:=bsSkinButton5.ClientToScreen(Point(0,bsSkinButton5.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.N29Click(Sender: TObject);
begin
t_crm_client_info.Close;
t_crm_client_info.Parameters.ParamByName('SName').Value:=t_ch_accept1.DataSet.fieldbyName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_crm_client_info.Open;
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',1,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_crm_client_info1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N31Click(Sender: TObject);
begin
t_crm_client_info.Close;
t_crm_client_info.Parameters.ParamByName('SName').Value:=t_ch_accept1.DataSet.fieldbyName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_crm_client_info.Open;
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_crm_client_info1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N41Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_pay.DataSource,t_op_gain1,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N43Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_pay.DataSource,t_op_gain1,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N53Click(Sender: TObject);
var
book1:Tbookmark;
aQuery,aQueryaccept,aQueryPay,aQueryitems:TADOQuery;
Frt:String;
havprn,Profithavprn:boolean;
i:Integer;
begin
Profithavprn:=true;
if not if_open('230') then
begin
showmessage('<27><>û<EFBFBD><C3BB>Ȩ<EFBFBD>޴<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not strtobool(get_parameters_value(39,'true'))then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
showmessage('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܴ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
end;
if strtobool(get_parameters_value(2,'false'))then
begin
try
book1:=t_ch_accept.GetBookmark;
t_ch_accept.DisableControls;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
Profithavprn:=False;
Break;
end;
t_ch_accept.next;
end;
finally
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
end;
try
book1:=t_ch_pay.GetBookmark;
t_ch_pay.DisableControls;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
Profithavprn:=False;
Break;
end;
t_ch_pay.next;
end;
finally
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
end;
end;
prnlist:=true;
try
if strtobool(get_parameters_value(63,'false'))then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
//<2F>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϻ<D0B6><CFBB><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ijɺϿ<C9BA><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
gdo:=strtoint(get_parameters_value(137,'0'));
xdo:=strtoint(get_parameters_value(138,'0'));
t_ch_accept.DataSource.DataSet.edit;
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_ch_accept.DataSource.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
if (gdo<>0) or (xdo<>0) then begin
if trim(t_ch_accept.DataSource.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then begin
if gdo=1 then begin
if (edit_type.text='1') then begin
if t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end
else
if (edit_type.text='2') then
begin
if t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']
end
else if (edit_type.text='3') then begin
if t_ch_accept.DataSource.DataSet['һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']
end else if (edit_type.text='4') then begin
if t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']
end else if (edit_type.text='5') then begin
if t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']
end else if (edit_type.text='6') then begin
if t_ch_accept.DataSource.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']
end
else
if (edit_type.text='7') then
begin
if t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']
end;
end;
end;
end else if trim(t_ch_accept.DataSource.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>' then begin
if xdo=1 then begin
if t_ch_accept.DataSource.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']>Logininfo.endday then
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=t_ch_accept.DataSource.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
t_ch_accept.DataSource.DataSet.post;
end;
end;
if strtobool(get_parameters_value(146,'false'))then begin
t_ch_accept.DataSource.DataSet.edit;
t_ch_accept.DataSource.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_accept.DataSource.DataSet.post;
end;
finally
prnlist:=false;
end;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>ݼ<EFBFBD> <20>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD>
t_ch_fee_fenzhang.close;
t_ch_fee_fenzhang.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang.open;
t_ch_fee_fenzhang2.close;
t_ch_fee_fenzhang2.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang2.open;
t_op_fenzhang.close;
t_op_fenzhang.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_fenzhang.open;
//<2F><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
at_modify_new.close;
at_modify_new.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
at_modify_new.open;
at_modify_old.close;
at_modify_old.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
at_modify_old.open;
if strtobool(get_parameters_value(111,'false')) then
begin
//Ӧ<><D3A6>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬһ<CDAC>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD><EFBFBD><EFBFBD>
aQueryaccept:=CreateAdoQuery;
aQuerypay:=CreateAdoQuery;
try
if t_ch_accept.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString='<27><>·<EFBFBD><C2B7>Ʊ' then
begin
aQueryaccept.Close;aQueryaccept.sql.Clear;
aQueryaccept.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_railway where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''') order by CH_ID';
aQueryaccept.Open;
aQuerypay.Close;aQuerypay.sql.Clear;
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_railway where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''') order by CH_ID';
aQuerypay.Open;
end
else
begin
aQueryaccept.Close;aQueryaccept.sql.Clear;
aQueryaccept.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
aQueryaccept.Open;
aQuerypay.Close;aQuerypay.sql.Clear;
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
aQuerypay.Open;
end;
memtblprint.close;
memtblprint.Open;
aQueryaccept.First;
while not aQueryaccept.Eof do begin
Frt:=GetFrt(aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblprint.Locate('Frt;ACCNAME;OBJDR',vararrayof([Frt,aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then
begin
memtblprint.Edit;
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblprint.FieldByName('USDDR').AsFloat:=memtblprint.FieldByName('USDDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=memtblprint.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATUSDDR').AsFloat:=memtblprint.FieldByName('NOVATUSDDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=memtblprint.FieldByName('NOVATTTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATUSDDR').AsFloat:=memtblprint.FieldByName('VATUSDDR').AsFloat+aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLDR').AsFloat:=memtblprint.FieldByName('VATTTLDR').AsFloat+(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblprint.FieldByName('RMBDR').AsFloat:=memtblprint.FieldByName('RMBDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=memtblprint.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBDR').AsFloat:=memtblprint.FieldByName('NOVATRMBDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=memtblprint.FieldByName('NOVATTTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATRMBDR').AsFloat:=memtblprint.FieldByName('VATRMBDR').AsFloat+aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLDR').AsFloat:=memtblprint.FieldByName('VATTTLDR').AsFloat+(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblprint.FieldByName('OTDR').AsFloat:=memtblprint.FieldByName('OTDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=memtblprint.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATOTDR').AsFloat:=memtblprint.FieldByName('NOVATOTDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=memtblprint.FieldByName('NOVATTTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATOTDR').AsFloat:=memtblprint.FieldByName('VATOTDR').AsFloat+aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATOTDR').AsFloat:=memtblprint.FieldByName('VATOTDR').AsFloat+(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKDR').AsString='' then
begin
memtblprint.FieldByName('REMARKDR').AsString:=aQueryaccept.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblprint.FieldByName('REMARKDR').AsString:=memtblprint.FieldByName('REMARKDR').AsString+' '+aQueryaccept.fieldbyName('<27><>ע').AsString;
end;
memtblprint.Post;
end
else
begin
memtblprint.Insert;
memtblprint.FieldByName('ORDNO').AsInteger:=0;
memtblprint.FieldByName('FRT').AsString:=GetFrt(aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblprint.FieldByName('ACCNAME').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJDR').AsString:=aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJCR').AsString:='';
memtblprint.FieldByName('REMARKCR').AsString:='';
memtblprint.FieldByName('USDCR').AsFloat:=0;
memtblprint.FieldByName('RMBCR').AsFloat:=0;
memtblprint.FieldByName('OTCR').AsFloat:=0;
memtblprint.FieldByName('TTLCR').AsFloat:=0;
memtblprint.FieldByName('NOVATUSDDR').AsFloat:=0;
memtblprint.FieldByName('NOVATRMBDR').AsFloat:=0;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=0;
memtblprint.FieldByName('NOVATOTDR').AsFloat:=0;
memtblprint.FieldByName('VATUSDDR').AsFloat:=0;
memtblprint.FieldByName('VATTTLDR').AsFloat:=0;
memtblprint.FieldByName('VATOTDR').AsFloat:=0;
memtblprint.FieldByName('DR').AsString:='T';
memtblprint.FieldByName('CR').AsString:='F';
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblprint.FieldByName('USDDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATUSDDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATUSDDR').AsFloat:=aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLDR').AsFloat:=(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblprint.FieldByName('RMBDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATRMBDR').AsFloat:=aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLDR').AsFloat:=(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblprint.FieldByName('OTDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATOTDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATOTDR').AsFloat:=aQueryaccept.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLDR').AsFloat:=(aQueryaccept.fieldByName('˰<><CBB0>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblprint.FieldByName('REMARKDR').AsString:=memtblprint.FieldByName('REMARKDR').AsString+' '+aQueryaccept.fieldbyName('<27><>ע').AsString;
memtblprint.Post;
end;
aQueryaccept.Next;
end;
aQuerypay.First;
while not aQuerypay.Eof do begin
Frt:=GetFrt(aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblprint.Locate('Frt;ACCNAME;CR',vararrayof([Frt,aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'F']),[]) then
begin
memtblprint.Edit;
memtblprint.FieldByName('OBJCR').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblprint.FieldByName('USDCR').AsFloat:=memtblprint.FieldByName('USDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATUSDCR').AsFloat:=memtblprint.FieldByName('NOVATUSDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATUSDCR').AsFloat:=memtblprint.FieldByName('VATUSDCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblprint.FieldByName('RMBCR').AsFloat:=memtblprint.FieldByName('RMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBCR').AsFloat:=memtblprint.FieldByName('NOVATRMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBCR').AsFloat:=memtblprint.FieldByName('VATRMBCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblprint.FieldByName('OTCR').AsFloat:=memtblprint.FieldByName('OTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATOTCR').AsFloat:=memtblprint.FieldByName('NOVATOTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATOTCR').AsFloat:=memtblprint.FieldByName('VATOTCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKCR').AsString='' then begin
memtblprint.FieldByName('REMARKCR').AsString:=aQuerypay.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
end;
memtblprint.FieldByName('CR').AsString:='T';
memtblprint.Post;
end else begin
if memtblprint.Locate('Frt;ACCNAME;OBJCR',vararrayof([Frt,aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then
begin
memtblprint.Edit;
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblprint.FieldByName('USDCR').AsFloat:=memtblprint.FieldByName('USDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATUSDCR').AsFloat:=memtblprint.FieldByName('NOVATUSDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATUSDCR').AsFloat:=memtblprint.FieldByName('VATUSDCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblprint.FieldByName('RMBCR').AsFloat:=memtblprint.FieldByName('RMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBCR').AsFloat:=memtblprint.FieldByName('NOVATRMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATRMBCR').AsFloat:=memtblprint.FieldByName('VATRMBCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblprint.FieldByName('OTCR').AsFloat:=memtblprint.FieldByName('OTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=memtblprint.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATOTCR').AsFloat:=memtblprint.FieldByName('NOVATOTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=memtblprint.FieldByName('NOVATTTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATOTCR').AsFloat:=memtblprint.FieldByName('VATOTCR').AsFloat+aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=memtblprint.FieldByName('VATTTLCR').AsFloat+(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblprint.FieldByName('REMARKCR').AsString='' then
begin
memtblprint.FieldByName('REMARKCR').AsString:=aQuerypay.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
end;
memtblprint.FieldByName('CR').AsString:='T';
memtblprint.Post;
end
else
begin
memtblprint.Insert;
memtblprint.FieldByName('ORDNO').AsInteger:=0;
memtblprint.FieldByName('FRT').AsString:=GetFrt(aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblprint.FieldByName('ACCNAME').AsString:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJCR').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblprint.FieldByName('OBJDR').AsString:='';
memtblprint.FieldByName('REMARKCR').AsString:='';
memtblprint.FieldByName('USDDR').AsFloat:=0;
memtblprint.FieldByName('RMBDR').AsFloat:=0;
memtblprint.FieldByName('OTDR').AsFloat:=0;
memtblprint.FieldByName('TTLDR').AsFloat:=0;
memtblprint.FieldByName('DR').AsString:='F';
memtblprint.FieldByName('CR').AsString:='T';
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblprint.FieldByName('USDCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATUSDCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATUSDCR').AsFloat:=aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblprint.FieldByName('RMBCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATRMBCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATRMBCR').AsFloat:=aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblprint.FieldByName('OTCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('NOVATOTCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
memtblprint.FieldByName('NOVATTTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
memtblprint.FieldByName('VATOTCR').AsFloat:=aQuerypay.fieldByName('˰<><CBB0>').AsFloat;
memtblprint.FieldByName('VATTTLCR').AsFloat:=(aQuerypay.fieldByName('˰<><CBB0>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblprint.FieldByName('REMARKCR').AsString:=memtblprint.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
memtblprint.Post;
end;
end;
aQuerypay.Next;
end;
memtblprint.SortOn('FRT;ACCNAME',[]);
finally
freeandnil(aQueryAccept);
freeandnil(aQueryPay);
end;
//showmessage('ljp');
end;
//GetAllFeeItems;
if strtobool(get_parameters_value(146,'true')) and Profithavprn then
begin
havprn:=true;
end
else
havprn:=false;
if strtobool(get_parameters_value(81,'false')) then
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
memaccept.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> not in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
mempay.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
Close;SQL.Clear;
SQL.Add('Select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+get_parameters_value(82,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')+''') order by ˳<><CBB3>');
Open;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
finally
FreeAndNil(aQuery);
end;
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memaccept1,mempay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1,havprn);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,nil,memaccept1,mempay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,memdd1,havprn);
end
else
begin
//<2F><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ʷ<EFBFBD><CAB7>¼
with t_print_histry do
begin
Close;SQL.Clear;
SQL.Add('Select * from t_sys_printhistry where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''');
Open;
if IsEmpty then
begin
Insert;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>';
FieldByName('<27><>ӡ<EFBFBD><D3A1>').AsString:=employee;
FieldByName('ʱ<><CAB1>').AsDateTime:=Date;
Post;
end;
end;
{*<2A><><EFBFBD><EFBFBD><E2B4A6><EFBFBD><EFBFBD>ʼ**}
aQueryaccept:=CreateAdoQuery;
aQuerypay:=CreateAdoQuery;
aQueryitems:=CreateAdoQuery;
try
memtblOther.Close;
memtblOther.EmptyTable;
memtblOther.Open;
with aQueryaccept do
begin
Close;SQL.Clear;
SQL.Add('select * from t_ch_fee');
SQL.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><>ע=:<3A><>ע');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
with aQuerypay do
begin
Close;SQL.Clear;
SQL.Add('select * from t_ch_fee');
SQL.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><>ע=:<3A><>ע');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
with aQueryitems do
begin
Close;SQL.Clear;
SQL.Add('select <20><>ע from t_ch_fee');
SQL.Add('where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><>ע<>''''');
SQL.Add('Order by <20><>ע');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
Open;First;
while not Eof do
begin
aQueryaccept.Close;
aQueryaccept.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
aQueryaccept.Parameters.ParamByName('<27><>ע').Value:=FieldByName('<27><>ע').AsString;
aQueryaccept.Open;aQueryaccept.First;
while not aQueryaccept.Eof do
begin
i:=i+1;
memtblOther.Insert;
memtblOther.FieldByName('Ordno').AsInteger:=i;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>ձ<EFBFBD>׼').AsString:=aQueryaccept.FieldByName('<27><>׼').AsString;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').AsFloat:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;;
memtblOther.FieldByName('Ӧ<>ձұ<D5B1>').AsString:=aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD>λ').AsString:=aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:='';
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=1;
memtblOther.Post;
aQueryaccept.Next;
end;
aQuerypay.Close;
aQuerypay.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
aQuerypay.Parameters.ParamByName('<27><>ע').Value:=FieldByName('<27><>ע').AsString;
aQuerypay.Open;aQuerypay.First;
while not aQuerypay.Eof do
begin
i:=i+1;
memtblOther.Insert;
memtblOther.FieldByName('Ordno').AsInteger:=i;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ').AsString:='';
memtblOther.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD>λ').AsString:='';
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'-'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' '+aQuerypay.FieldByName('<27><>׼').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'='+aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString+''+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=1;
memtblOther.Post;
aQuerypay.Next;
end;
Next;
end;
end;
aQueryaccept.Close;aQueryaccept.sql.Clear;
aQueryaccept.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and (<28><>ע='''' or <20><>ע is null ) and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
aQueryaccept.Open;
aQuerypay.Close;aQuerypay.sql.Clear;
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and (<28><>ע='''' or <20><>ע is null ) and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
aQuerypay.Open;
aQueryaccept.First;
while not aQueryaccept.Eof do
begin
i:=i+1;
memtblOther.Insert;
memtblOther.FieldByName('Ordno').AsInteger:=i;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>ձ<EFBFBD>׼').AsString:=aQueryaccept.FieldByName('<27><>׼').AsString;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD><D5B5><EFBFBD>').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').AsFloat:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;;
memtblOther.FieldByName('Ӧ<>ձұ<D5B1>').AsString:=aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD>λ').AsString:=aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:='';
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=2;
memtblOther.Post;
aQueryaccept.Next;
end;
aQuerypay.First;
while not aQuerypay.Eof do
begin
if memtblOther.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ;Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>;<3B><><EFBFBD><EFBFBD><>ձ<EFBFBD>׼',vararrayof([aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').asstring,2,aQuerypay.FieldByName('<27><>׼').asstring]),[]) then
begin
memtblOther.Edit;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
if trim(memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString)='' then
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'-'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' '+aQuerypay.FieldByName('<27><>׼').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'='+aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString+''+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString
else memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:=memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString+','+aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'-'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' '+aQuerypay.FieldByName('<27><>׼').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'='+aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString+''+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.Post;
end
else
begin
i:=i+1;
memtblOther.Insert;
memtblOther.FieldByName('Ordno').AsInteger:=i;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ').AsString:='';
memtblOther.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<>ջ<EFBFBD><D5BB><EFBFBD>').AsFloat:=0;
memtblOther.FieldByName('Ӧ<>յ<EFBFBD>λ').AsString:='';
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblOther.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD>λ').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'-'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' '+aQuerypay.FieldByName('<27><>׼').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'*'+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'='+aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString+''+aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
memtblOther.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=2;
memtblOther.Post;
end;
aQuerypay.Next;
end;
finally
memtblOther.SortOn('Ordno',[]);
freeandnil(aQueryAccept);
freeandnil(aQueryPay);
freeandnil(aQueryitems);
end;
{**<2A><><EFBFBD><EFBFBD><E2B4A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*}
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
if strtobool(get_parameters_value(111,'false')) then
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,memtblOther1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,memtblOther1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
if strtobool(get_parameters_value(111,'false')) then
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,memtblOther1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,memtblOther1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end;
{
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
if strtobool(get_parameters_value(111,'false')) then
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
if strtobool(get_parameters_value(111,'false')) then
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,memtblprint1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end
else
begin
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',TMenuItem(Sender).tag,t_ch_accept.DataSource,t_op_gain1,ds_op_fenzhang1,t_ch_fee_truck1,t_ch_accept1,t_ch_pay1,ds_ch_fee_fenzhang21,ds_ch_fee_fenzhang1,dsrmodify_new,dsrmodify_old,t_print_histry1,havprn,t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString);
end;
}
end;
end;
procedure Tfra_fee.N35Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',1,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N37Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',2,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N47Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',1,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N49Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',2,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N38Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',1,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N40Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',2,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N50Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',1,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N52Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',2,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N32Click(Sender: TObject);
var
aQuery,aQuery2:TADOQuery;
NewNoteNo:String;
Hstr,HL:String;
begin
//Ӧ<>տͻ<D5BF><CDBB><EFBFBD>ӡ
if t_ch_accept.IsEmpty then
exit;
if strtobool(get_parameters_value(115,'false')) then begin
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' '
+' order by ˳<><CBB3> ');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
if not t_ch_client.IsEmpty then
memaccept.LoadFromDataSet(t_ch_client,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>','USD',[])THEN
HL:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else
HL:='7.1';
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+' isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE (ISNULL(<28><><EFBFBD><EFBFBD>,0)/'+HL+') END) ,0) AS <20>ۺ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' ');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if not t_ch_client_sum.IsEmpty then
mempay.LoadFromDataSet(t_ch_client_sum,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end else begin
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3> ');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)'
+' order by ˳<><CBB3> ');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end;
if strtobool(get_parameters_value(86,'false'))then begin
//<2F><><EFBFBD>ݿͻ<DDBF><CDBB><EFBFBD><EFBFBD>ƺͱ<C6BA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>(<28><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>)
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='D'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,memaccept1,mempay1,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.N34Click(Sender: TObject);
var
aQuery,aQuery2:TAdoQuery;
Hstr,NewNoteNo,HL:String;
begin
if t_ch_accept.IsEmpty then
exit;
if strtobool(get_parameters_value(115,'false')) then
begin
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' '
+' order by ˳<><CBB3>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
if not t_ch_client.IsEmpty then
memaccept.LoadFromDataSet(t_ch_client,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>','USD',[])THEN
HL:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else
HL:='7.1';
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+' isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE (ISNULL(<28><><EFBFBD><EFBFBD>,0)/'+HL+') END) ,0) AS <20>ۺ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' ');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if not t_ch_client_sum.IsEmpty then
mempay.LoadFromDataSet(t_ch_client_sum,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end
else //<2F><><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>
begin
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null) '
+' order by ˳<><CBB3>');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end;
if strtobool(get_parameters_value(86,'false'))then begin
//<2F><><EFBFBD>ݿͻ<DDBF><CDBB><EFBFBD><EFBFBD>ƺͱ<C6BA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='D'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,memaccept1,mempay1,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.N44Click(Sender: TObject);
var
aQuery,aQuery2:TAdoQuery;
Hstr,NewNoteNo:String;
begin
//Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>ӡ
if t_ch_pay.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)'
+' order by ˳<><CBB3>');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if strtobool(get_parameters_value(86,'false'))then begin
//<2F><><EFBFBD>ݿͻ<DDBF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='C'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_pay.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,nil,nil,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.N46Click(Sender: TObject);
var
aQuery,aQuery2:TAdoQuery;
Hstr,NewNoteNo:String;
begin
if t_ch_pay.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)'
+' order by ˳<><CBB3>');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if strtobool(get_parameters_value(86,'false'))then begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='C'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_pay.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,nil,nil,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.t_ch_acceptAfterPost(DataSet: TDataSet);
var
book1:Tbookmark;
begin
// if t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'then
// begin
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
// end;
// book1:=t_ch_accept.GetBookmark;
// getfeestatus(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_accept.DataSource.DataSet);
// t_ch_accept.GotoBookmark(book1);
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
// UpdateFeeRemarks;
end;
procedure Tfra_fee.t_ch_acceptBeforeInsert(DataSet: TDataSet);
var Days,holidays:integer;
begin
if t_ch_accept.DataSource.DataSet.State=dsinsert then
t_ch_accept.DataSource.DataSet.post;
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>022');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
abort;
end;
end else if (edit_type.text='3') or (edit_type.text='6') then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
abort;
end;
end else if (edit_type.text='5') then begin
if not if_open('349') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
abort;
end;
end;
if strtobool(get_parameters_value(307,'false')) then
begin
if (trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰ״̬Ϊ<CCAC><EFBFBD><E1BDBB><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ſ<EFBFBD><C5BF><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end
else
begin
if MessageDlg('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><E1BDBB><EFBFBD>˲ſ<CBB2><C5BF><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ƿ<EFBFBD><C7B7>ύ',mtWarning,[mbYes,mbNo],0)=mrYes then
begin
t_ch_accept.DataSource.DataSet.Edit;
t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_accept.DataSource.DataSet.Post;
end
else
begin
showmessage('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
end;
if strtobool(get_parameters_value(307,'false')) then
begin
if (trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
end
else
if (trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
if strtobool(get_parameters_value(122,'false')) then
else begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if t_ch_accept.DataSource.DataSet.FindField('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>')=nil then
begin
if not do_data(edit_data.text,t_ch_accept.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring,'','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if not do_data(edit_data.text,t_ch_accept.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(28,'false'))then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if copy(t_ch_accept.DataSource.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString,1,4)<>'ƴ<><C6B4>'then
begin
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(29,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(37,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
end;
end;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(320,'false'))then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
holidays:=GetHoliday(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[]) then
begin
Days:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
end;
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>Days+holidays then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr((date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime))+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr(Days+holidays)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
Abort;
end
else;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.t_ch_payBeforeInsert(DataSet: TDataSet);
var holidays,days:integer;
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if (edit_type.text='3') or (edit_type.text='6') then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if (edit_type.text='5') then begin
if not if_open('350') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
if t_ch_pay.DataSource.DataSet.State=dsinsert then
t_ch_pay.DataSource.DataSet.post;
if strtobool(get_parameters_value(122,'false')) then
else begin
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if strtobool(get_parameters_value(307,'false')) then
begin
if (trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰ״̬Ϊ<CCAC><EFBFBD><E1BDBB><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ſ<EFBFBD><C5BF><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end
else
begin
if MessageDlg('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><E1BDBB><EFBFBD>˲ſ<CBB2><C5BF><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>Ƿ<EFBFBD><C7B7>ύ',mtWarning,[mbYes,mbNo],0)=mrYes then
begin
t_ch_pay.DataSource.DataSet.Edit;
t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_pay.DataSource.DataSet.Post;
end
else
begin
showmessage('<27><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
end;
if strtobool(get_parameters_value(307,'false')) then
begin
if (trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
end
else
if (trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>')
and (t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD>ĵ<EFBFBD>״̬').AsString<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>')=nil then
begin
if not do_data(edit_data.text,t_ch_pay.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring,'','') then
begin
showmessage('<27><>û<EFBFBD><C3BB><EFBFBD>޸ĸ<DEB8>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if not do_data(edit_data.text,t_ch_pay.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27><>û<EFBFBD><C3BB><EFBFBD>޸ĸ<DEB8>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(28,'false'))then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if copy(t_ch_pay.DataSource.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString,1,4)<>'ƴ<><C6B4>'then
begin
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(29,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(37,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
end;
end;
end;
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(320,'false'))then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><>ͨ<EFBFBD><CDA8>' then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
holidays:=GetHoliday(t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if frm_data_share.t_crm_client_ship.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring,[]) then
begin
Days:=frm_data_share.t_crm_client_ship.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
end;
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>Days+holidays then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr((date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime))+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+FloatToStr(Days+holidays)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
Abort;
end
else;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.Panel11Resize(Sender: TObject);
begin
if bsSkinPanel3.Visible then
Panel3.Height:=round((Panel11.height-bsSkinPanel3.height)/2)
else
Panel3.Height:=round((Panel11.height)/2);
end;
procedure Tfra_fee.Panel3Resize(Sender: TObject);
var
i:integer;
begin
if strtobool(get_parameters_value(190,'false')) then
begin
i:=round(Panel3.Width/13);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton15.Width:=i;
bsSkinButton16.Width:=i;
bsSkinButton17.Width:=i;
bsSkinButton18.Width:=i;
bsSkinButton19.Width:=i;
bsSkinButton20.Width:=i;
bsSkinButton21.Width:=i;
end
else
begin
i:=round(Panel3.Width/11);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton15.Width:=i;
bsSkinButton16.Width:=i;
bsSkinButton17.Width:=i;
bsSkinButton18.Width:=i;
bsSkinButton19.Width:=i;
end;
end;
procedure Tfra_fee.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round((Panel2.Width-196)/11);
bsSkinDBEdit1.Width:=i;
bsSkinDBEdit2.Width:=i;
bsSkinDBEdit3.Width:=i;
bsSkinDBEdit4.Width:=i;
bsSkinDBEdit5.Width:=i;
bsSkinDBEdit6.Width:=i;
bsSkinDBEdit7.Width:=i;
bsSkinDBEdit8.Width:=i;
bsSkinDBEdit9.Width:=i;
bsSkinDBEdit10.Width:=i;
end;
procedure Tfra_fee.wwDBLookupCombo1Change(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo1.text,[]) then
begin
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if not aAdoQuery.IsEmpty then
begin
t_ch_accept['<27><>׼']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
end;
end
else t_ch_accept['<27><>׼']:=frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring,[])then
begin
t_ch_accept['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring;
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo6Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo6.text,[]) then
begin
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if not aAdoQuery.IsEmpty then
begin
t_ch_pay['<27><>׼']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
end;
end
else t_ch_pay['<27><>׼']:=frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring;
t_ch_pay['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring,[])then
begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
procedure Tfra_fee.N56Click(Sender: TObject);
begin
t_crm_client_Info.Close;
t_crm_client_Info.Parameters.ParamByName('SName').Value:=t_ch_accept1.DataSet.fieldbyName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_crm_client_Info.Open;
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',3,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_crm_client_Info1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N58Click(Sender: TObject);
var
aQuery,aQuery2:TAdoQuery;
Hstr,NewNoteno,HL:String;
begin
//Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>
if t_ch_accept.IsEmpty then
exit;
if strtobool(get_parameters_value(115,'false')) then begin
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' '
+' order by ˳<><CBB3>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
if not t_ch_client.IsEmpty then
memaccept.LoadFromDataSet(t_ch_client,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>','USD',[])THEN
HL:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else
HL:='7.1';
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+' isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE (ISNULL(<28><><EFBFBD><EFBFBD>,0)/'+HL+') END) ,0) AS <20>ۺ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=''DK(KR)'' ');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if not t_ch_client_sum.IsEmpty then
mempay.LoadFromDataSet(t_ch_client_sum,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end else begin
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)'
+' order by ˳<><CBB3>');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB,sum(ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0)) AS <20>ۺ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
end;
if strtobool(get_parameters_value(86,'false'))then begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='D'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,memaccept1,mempay1,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.N60Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',3,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N62Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',3,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N64Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_pay.DataSource,t_op_gain1,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N66Click(Sender: TObject);
var
aQuery,aQuery2:TAdoQuery;
Hstr,NewNoteNo:String;
begin
//Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
if t_ch_pay.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>');
end
else
begin
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)'
+' order by ˳<><CBB3>');
end;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
if if_open('206') or if_open('207') or if_open('208') or if_open('209') or if_open('351') then
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
end
else
begin
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (<28><><EFBFBD><EFBFBD>=0 or <20><><EFBFBD><EFBFBD> is null)');
end;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
if strtobool(get_parameters_value(86,'false'))then begin
//<2F><>ȡ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_notes where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value+''' and <20><><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value+'''');
Open;
if not IsEmpty then begin
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end else begin
aQuery2.Close;aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select Max(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as NoteNo from t_Notes');
aQuery2.SQL.Add('where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>>='+FormatDateTime('YYYYMM',date)+'0001 and <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><='+FormatDateTime('YYYYMM',date)+'9999');
aQuery2.Open;
if aQuery2.FieldByName('NoteNo').IsNull then
NewNoteNo:=FormatDateTime('YYYYMM',date)+'0001'
else NewNoteNo:=IntToStr(aQuery2.FieldByName('NoteNo').AsInteger+1);
if edit_type.text='3' then begin
Hstr:='AE';
end;
if edit_type.text='4' then begin
Hstr:='AI';
end;
if edit_type.text='1' then begin
Hstr:='SE';
end;
if edit_type.text='2' then begin
Hstr:='SI';
end;
if edit_type.text='5' then begin
Hstr:='IT';
end;
Insert;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><>';
FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=edit_type.text;
FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:=NewNoteNo;
FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString:='C'+Hstr+NewNoteNo;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
Post;
memdd.LoadFromDataSet(aQuery,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_pay.DataSource,t_ch_client_sum1,t_op_gain1,memdd1,t_ch_client1,nil,nil,nil,nil,nil,nil,true,t_ch_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_fee.N68Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',3,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N70Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',3,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N1Click(Sender: TObject);
begin
try
{
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
end;
}
if not assigned(frm_code_fee_project_add) then
frm_code_fee_project_add:=tfrm_code_fee_project_add.Create (self);
frm_code_fee_project_add.op_type.text:=edit_type.text;
frm_code_fee_project_add.fee_type.text:='<27>շ<EFBFBD>';
frm_code_fee_project_add.t_op_bill1.Enabled:=FALSE;
frm_code_fee_project_add.t_op_bill1.DataSet:=t_ch_accept.DataSource.DataSet;
frm_code_fee_project_add.t_op_bill1.Enabled:=true;
frm_code_fee_project_add.t_ch_fee1.Enabled:=false;
frm_code_fee_project_add.t_ch_fee1.DataSet:=t_ch_accept;
frm_code_fee_project_add.t_ch_fee1.Enabled:=true;
frm_code_fee_project_add.ShowModal;
finally
{ if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
end;
}
frm_code_fee_project_add.free;
frm_code_fee_project_add:=nil;
end;
end;
procedure Tfra_fee.MenuItem3Click(Sender: TObject);
begin
try
{
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
end;
}
if not assigned(frm_code_fee_project_add) then
frm_code_fee_project_add:=tfrm_code_fee_project_add.Create (self);
frm_code_fee_project_add.op_type.text:=edit_type.text;
frm_code_fee_project_add.fee_type.text:='<27><><EFBFBD><EFBFBD>';
frm_code_fee_project_add.t_op_bill1.Enabled:=false;
frm_code_fee_project_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
frm_code_fee_project_add.t_op_bill1.Enabled:=true;
frm_code_fee_project_add.t_ch_fee1.Enabled:=false;
frm_code_fee_project_add.t_ch_fee1.DataSet:=t_ch_pay;
frm_code_fee_project_add.t_ch_fee1.Enabled:=true;
frm_code_fee_project_add.ShowModal;
finally
{ if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
end;
}
frm_code_fee_project_add.free;
frm_code_fee_project_add:=nil;
end;
end;
{
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if not assigned(frm_code_fee_project_add) then
frm_code_fee_project_add:=tfrm_code_fee_project_add.Create (self);
frm_code_fee_project_add.op_type.text:=edit_type.text;
frm_code_fee_project_add.fee_type.text:='<27><><EFBFBD><EFBFBD>';
frm_code_fee_project_add.t_op_bill1.Enabled:=false;
frm_code_fee_project_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
frm_code_fee_project_add.t_op_bill1.Enabled:=true;
frm_code_fee_project_add.t_ch_fee1.Enabled:=false;
frm_code_fee_project_add.t_ch_fee1.DataSet:=t_ch_pay;
frm_code_fee_project_add.t_ch_fee1.Enabled:=true;
frm_code_fee_project_add.ShowModal;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
end;
frm_code_fee_project_add.free;
frm_code_fee_project_add:=nil;
end;
}
procedure Tfra_fee.N5Click(Sender: TObject);
var
i,k:integer;
begin
//Ӧ<>ո<EFBFBD><D5B8>Ƶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_accept.IsEmpty then
exit;
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
t_ch_pay.append;
for k := 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if (t_ch_accept.fields[k].FieldName<>'CH_ID') and (t_ch_accept.fields[k].DataType<>ftDateTime) then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
if (edit_type.text='1')OR(edit_type.text='2') then
begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else if (edit_type.text='3')OR(edit_type.text='4') then begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else if (edit_type.text='6') then begin
//<2F><>·ҵ<C2B7><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_pay.post;
end;
end
else
begin
t_ch_pay.append;
for k:= 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if (t_ch_accept.fields[k].FieldName<>'CH_ID') and (t_ch_accept.fields[k].DataType<>ftDateTime) then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
if (edit_type.text='1')OR(edit_type.text='2') then
begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else if (edit_type.text='3')OR(edit_type.text='4') then begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else if (edit_type.text='6') then begin
//<2F><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_pay.post;
end;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
end;
procedure Tfra_fee.N77Click(Sender: TObject);
var
k:integer;
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>Ӧ<EFBFBD><D3A6>
if t_ch_pay.IsEmpty then
exit;
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_accept.post;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.next;
end;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
end;
procedure Tfra_fee.N74Click(Sender: TObject);
var
k:integer;
begin
if t_ch_accept.IsEmpty then
exit;
try
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
t_ch_pay.append;
for k := 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if (t_ch_accept.fields[k].FieldName<>'CH_ID') and (t_ch_accept.fields[k].DataType<>ftDateTime) then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
if (edit_type.text='1')OR(edit_type.text='2') then
begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
end;
end else if (edit_type.text='3')OR(edit_type.text='4') then begin
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD>չ<EFBFBD>˾';
if t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
end;
end else if (edit_type.text='6') then begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>'' then begin
if t_ch_pay.DataSource.DataSet.FindField(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring)<>nil then begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring).asstring;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end else begin
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_pay.post;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.next;
end;
finally
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
end;
end;
procedure Tfra_fee.N75Click(Sender: TObject);
var
i,k:integer;
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>Ƶ<EFBFBD>Ӧ<EFBFBD><D3A6>
if t_ch_pay.IsEmpty then
exit;
try
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil; if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
t_ch_accept.post;
end;
end
else
begin
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if (t_ch_pay.fields[k].FieldName<>'CH_ID') and (t_ch_pay.fields[k].DataType<>ftDateTime) then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept.post;
end;
finally
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
end;
end;
procedure Tfra_fee.N79Click(Sender: TObject);
begin
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if not assigned(frm_fee_history) then
frm_fee_history:=tfrm_fee_history.Create (self);
frm_fee_history.op_type.text:=edit_type.text;
frm_fee_history.fee_type.text:='<27><>';
frm_fee_history.t_do_fee.Enabled:=false;
frm_fee_history.t_do_fee.DataSet:=t_ch_accept;
frm_fee_history.t_do_fee.Enabled:=true;
frm_fee_history.t_bz_balance1.Enabled:=false;
frm_fee_history.t_bz_balance1.DataSet:=t_bz_balance;
frm_fee_history.t_bz_balance1.Enabled:=true;
frm_fee_history.ShowModal;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
frm_fee_history.free;
frm_fee_history:=nil;
end;
end;
procedure Tfra_fee.N81Click(Sender: TObject);
begin
try
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=nil;
end;
if not assigned(frm_fee_history) then
frm_fee_history:=tfrm_fee_history.Create (self);
frm_fee_history.op_type.text:=edit_type.text;
frm_fee_history.fee_type.text:='<27><>';
frm_fee_history.t_do_fee.Enabled:=false;
frm_fee_history.t_do_fee.DataSet:=t_ch_pay;
frm_fee_history.t_do_fee.Enabled:=true;
frm_fee_history.t_bz_balance1.Enabled:=false;
frm_fee_history.t_bz_balance1.DataSet:=t_bz_balance;
frm_fee_history.t_bz_balance1.Enabled:=true;
frm_fee_history.ShowModal;
finally
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_pay.FieldByName('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
frm_fee_history.free;
frm_fee_history:=nil;
end;
end;
procedure Tfra_fee.N82Click(Sender: TObject);
begin
fee_balance_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem5Click(Sender: TObject);
begin
fee_balance_view(t_ch_pay);
end;
procedure Tfra_fee.N84Click(Sender: TObject);
begin
fee_invoice_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem10Click(Sender: TObject);
begin
fee_check_view(t_ch_pay);
end;
procedure Tfra_fee.N86Click(Sender: TObject);
begin
fee_modify_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem12Click(Sender: TObject);
begin
fee_modify_view(t_ch_pay);
end;
procedure Tfra_fee.N88Click(Sender: TObject);
begin
price_person_view;
end;
procedure Tfra_fee.N89Click(Sender: TObject);
var msgs:string;
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
{
msgs:=fee_Service(Tadoquery(t_ch_accept.DataSource.DataSet),t_ch_accept,edit_type.text);
if Trim(msgs)<>'' then
begin
MessageDlg(msgs,mtWarning,[mbOK],0);
end;
}
fee_update_part(edit_type.text,'<27><>',t_ch_accept,wwDBGrid1);
// getfeestatus(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_accept.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.MenuItem15Click(Sender: TObject);
var msgs:string;
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
msgs:=fee_Service(Tadoquery(t_ch_pay.DataSource.DataSet),t_ch_pay,edit_type.text);
if Trim(msgs)<>'' then
begin
MessageDlg(msgs,mtWarning,[mbOK],0);
end;
fee_update_part(edit_type.text,'<27><>',t_ch_pay,wwDBGrid2);
// getfeestatus(t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_pay.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.bsSkinButton11Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton11.ClientToScreen(Point(0,bsSkinButton11.Height));
PopupMenu6.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.bsSkinButton12Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton12.ClientToScreen(Point(0,bsSkinButton12.Height));
PopupMenu7.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.N91Click(Sender: TObject);
var msgs:string;
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
msgs:=fee_Service(Tadoquery(t_ch_accept.DataSource.DataSet),t_ch_accept,edit_type.text);
if Trim(msgs)<>'' then
begin
MessageDlg(msgs,mtWarning,[mbOK],0);
end;
fee_update_all(edit_type.text,'<27><>',t_ch_accept);
// getfeestatus(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_accept.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.MenuItem17Click(Sender: TObject);
var msgs:string;
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
msgs:=fee_Service(Tadoquery(t_ch_pay.DataSource.DataSet),t_ch_pay,edit_type.text);
if Trim(msgs)<>'' then
begin
MessageDlg(msgs,mtWarning,[mbOK],0);
end;
fee_update_all(edit_type.text,'<27><>',t_ch_pay);
// getfeestatus(t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_pay.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.N93Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
table_post(t_ch_accept);
try
feelist:=true;
frm_fee_list:=tfrm_fee_list.Create (self);
frm_fee_list.DataSource1.Enabled:=false;
frm_fee_list.DataSource1.DataSet:=t_ch_accept;
frm_fee_list.DataSource1.Enabled:=true;
frm_fee_list.ShowModal;
finally
feelist:=false;
frm_fee_list.Free;
frm_fee_list:=nil;
t_ch_accept.Requery();
end;
end;
procedure Tfra_fee.N95Click(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
exit;
table_post(t_ch_pay);
try
feelist:=true;
frm_fee_list:=tfrm_fee_list.Create (self);
frm_fee_list.DataSource1.Enabled:=false;
frm_fee_list.DataSource1.DataSet:=t_ch_pay;
frm_fee_list.DataSource1.Enabled:=true;
frm_fee_list.ShowModal;
finally
feelist:=false;
frm_fee_list.Free;
frm_fee_list:=nil;
t_ch_pay.Requery();
end;
end;
procedure Tfra_fee.N97Click(Sender: TObject);
begin
open_code_edit('006');
end;
procedure Tfra_fee.N101Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
fee_update_part_no(t_ch_accept,wwDBGrid1);
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
// getfeestatus(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_accept.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.N103Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
upfee:=true;
fee_update_part_no(t_ch_pay,wwDBGrid2);
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
// getfeestatus(t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_pay.DataSource.DataSet);
upfee:=false;
end;
procedure Tfra_fee.t_ch_acceptAfterDelete(DataSet: TDataSet);
var AdoQuery_UpdateFeeStatus:TAdoQuery;
begin
if (t_ch_accept.IsEmpty) and (t_ch_Pay.IsEmpty) and (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
begin
AdoQuery_UpdateFeeStatus:=CreateAdoQuery;
with AdoQuery_UpdateFeeStatus do
try
Close;sql.Clear;
sql.Clear;
Sql.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬''');
Sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
finally
Free;
end;
end;
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
// getfeestatus(t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,t_ch_accept.DataSource.DataSet);
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
end;
procedure Tfra_fee.t_ch_payAfterPost(DataSet: TDataSet);
var
book1:TBookmark;
begin
//ˢ<><CBA2>
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
end;
procedure Tfra_fee.N108Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
//Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N113Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
//Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N110Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N112Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N115Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N117Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,t_op_gain1,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N119Click(Sender: TObject);
begin
{
try
frm_ch_fee_truck:=tfrm_ch_fee_truck.Create (self);
frm_ch_fee_truck.t_ch_fee_truck.DataSource:=t_ch_accept.DataSource;
frm_ch_fee_truck.ShowModal;
finally
frm_ch_fee_truck.Free;
frm_ch_fee_truck:=nil;
end;
}
end;
procedure Tfra_fee.N121Click(Sender: TObject);
begin
{
try
frm_ch_fee_truck:=tfrm_ch_fee_truck.Create (self);
frm_ch_fee_truck.t_ch_fee_truck.DataSource:=t_ch_pay.DataSource;
frm_ch_fee_truck.ShowModal;
finally
frm_ch_fee_truck.Free;
frm_ch_fee_truck:=nil;
end;
}
end;
procedure Tfra_fee.DBEdit43Change(Sender: TObject);
begin
if Panel8.Visible then
begin
if (DBEdit43.Text='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ') or (DBEdit43.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') or (DBEdit43.Text='<27><>·<EFBFBD><C2B7>Ʊ') then
begin
Panel9.Visible:=true;
Panel8.Height:=40;
end
else
begin
Panel9.Visible:=false;
Panel8.Height:=20;
end;
end;
end;
procedure Tfra_fee.Panel9Resize(Sender: TObject);
var
i:integer;
begin
i:=round((Panel9.Width-196)/10);
bsSkinDBEdit11.Width:=i;
bsSkinDBEdit12.Width:=i;
bsSkinDBEdit13.Width:=i;
bsSkinDBEdit14.Width:=i;
bsSkinDBEdit15.Width:=i;
bsSkinDBEdit16.Width:=i;
bsSkinDBEdit17.Width:=i;
bsSkinDBEdit18.Width:=i;
bsSkinDBEdit19.Width:=i;
bsSkinDBEdit20.Width:=i;
end;
procedure Tfra_fee.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
//Ӧ<>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
if key=#13 then
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
begin
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if not aAdoQuery.IsEmpty then
begin
t_ch_accept['<27><>׼']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
end;
end
else t_ch_accept['<27><>׼']:=frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring,[])then
begin
t_ch_accept['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring;
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo6KeyPress(Sender: TObject;
var Key: Char);
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƹ<EFBFBD><C6B8><EFBFBD>
if key=#13 then
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
begin
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if not aAdoQuery.IsEmpty then
begin
t_ch_pay['<27><>׼']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aAdoQuery.fieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
end;
end
else t_ch_pay['<27><>׼']:=frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring,[])then
begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo5Exit(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>') or (t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
begin
frm_data_share.t_crm_client.Filtered:=false;
frm_data_share.t_crm_client.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_crm_client.Filtered:=true;
end
else
begin
frm_data_share.t_crm_client.Filtered:=false;
frm_data_share.t_crm_client.Filter:=t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
frm_data_share.t_crm_client.Filtered:=true;
end;
end
else
begin
frm_data_share.t_crm_client.Filtered:=false;
end;
// wwDBLookupCombo2.Refresh;
end;
procedure Tfra_fee.wwDBLookupCombo7Exit(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>') or (t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
frm_data_share.t_crm_client.Filtered:=false;
frm_data_share.t_crm_client.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_crm_client.Filtered:=true;
end else begin
frm_data_share.t_crm_client.Filtered:=false;
frm_data_share.t_crm_client.Filter:=t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
frm_data_share.t_crm_client.Filtered:=true;
end;
end
else
begin
frm_data_share.t_crm_client.Filtered:=false;
end;
end;
procedure Tfra_fee.a_shen_modify_newBeforePost(DataSet: TDataSet);
begin
//<2F>շѷ<D5B7><D1B7>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD>ֵ
//DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*DataSet.fieldbyname('˰<><CBB0>').asfloat/100+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
if (a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),a_shen_modify_new['<27><><EFBFBD><EFBFBD>']);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
if a_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',a_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
end;
end else begin
showmessage('<27>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
end;
procedure Tfra_fee.p_shen_modify_newBeforePost(DataSet: TDataSet);
begin
//<2F><><EFBFBD>ѷ<EFBFBD><D1B7>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD>ֵ
// DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*DataSet.fieldbyname('˰<><CBB0>').asfloat/100+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
if (p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),p_shen_modify_new['<27><><EFBFBD><EFBFBD>']);
DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
if p_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',p_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
end;
end else begin
showmessage('<27>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
end;
procedure Tfra_fee.wwDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
//<2F>ұ<EFBFBD>
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
begin
if wwDBLookupCombo3.text<>'RMB' then begin
if strtobool(get_parameters_value(145,'true')) then
begin
if not strtobool(get_parameters_value(184,'true')) then
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text);
end
else
begin
if t_ch_accept.datasource.dataset.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>ͨ<EFBFBD><CDA8>' then
begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text)
else if edit_type.text='7' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo3.text);
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
end;
end;
end
else
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,wwDBLookupCombo3.text)
end;
end
else
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
{
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])THEN
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
}
end;
end;
procedure Tfra_fee.N123Click(Sender: TObject);
begin
fee_dui_view(t_ch_accept);
end;
procedure Tfra_fee.N125Click(Sender: TObject);
begin
fee_dui_view(t_ch_pay);
end;
procedure Tfra_fee.ChkBg(M_dataset: TADOQuery);
var fee_type:string ;
begin
//<2F><><EFBFBD>ؿ<EFBFBD><D8BF><EFBFBD>
if not frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',M_dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then exit ;
fee_type:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring ;
if frm_data_share.t_code_fee_type.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',fee_type,[]) then
begin
if frm_data_share.t_code_fee_type.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ؿ<EFBFBD><D8BF><EFBFBD>' then
begin
if M_dataset.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='' then
begin
showmessage('<27><><EFBFBD><EFBFBD>ط<EFBFBD>֮ǰ<D6AE><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>');
if M_dataset.State in [dsedit,dsinsert] then
M_dataset.Cancel ;
abort ;
end ;
end ;
end ;
end;
procedure Tfra_fee.chkPc(M_dataset: TADOQuery);
var
crm_name:string ;
fee_type,fee_name:string ;
begin
//<2F>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>
if M_dataset.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='' then exit ;
fee_name:=wwDBLookupCombo6.Text ;
if not frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',M_dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then exit ;
fee_type:=trim(frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) ;
if frm_data_share.t_code_fee_type.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',fee_type,[]) then
begin
if tRIM(frm_data_share.t_code_fee_type.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27>ɳ<EFBFBD><C9B3><EFBFBD><EFBFBD><EFBFBD>' then
begin
crm_name:=M_dataset.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring ;
with qrytmp,sql do
begin
close ; clear ;
add('select <20><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> from t_op_letter_pc where <20><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>='+''''+crm_name+'''');
add(' and LE_ID in (select LE_ID from t_op_letter where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27>ɳ<EFBFBD>֪ͨ'+'''');
add(' and <20><><EFBFBD><EFBFBD>='+''''+M_dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''+')') ;
open ;
if recordcount<=0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD>֮ǰ<D6AE><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD>');
if M_dataset.State in [dsedit,dsinsert] then
M_dataset.Cancel ;
abort ;
end ;
end ;
end ;
end ;
end;
procedure Tfra_fee.wwDBGrid1Exit(Sender: TObject);
begin
// if wwDBGrid1.DataSource.dataset.state in [dsedit,dsinsert] then
// begin
// if edit_type.Text='1' then chkPc(t_ch_accept) ; //<2F><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>
// if edit_type.Text='1' then ChkBg(t_ch_accept) ; //<2F><><EFBFBD><EFBFBD><E9B1A8> ,<2C><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD>
// end ;
end;
procedure Tfra_fee.wwDBGrid2Exit(Sender: TObject);
begin
if wwDBGrid2.DataSource.dataset.state in [dsedit,dsinsert] then
begin
if edit_type.Text='1' then chkPc(t_ch_pay) ; //<2F><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>
if edit_type.Text='1' then ChkBg(t_ch_pay) ; //<2F><><EFBFBD><EFBFBD><E9B1A8>
end ;
end;
procedure Tfra_fee.t_ch_acceptdjoncharge(Sender: TField);
begin
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
finally
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
finally
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
end;
procedure Tfra_fee.t_ch_paydjoncharge(Sender: TField);
begin
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
finally
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
finally
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
procedure Tfra_fee.t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
case StrToInt(edit_type.text) of
1,2:
begin
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end
else
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
end
else
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
end;
3,4:
begin
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
if (t_ch_pay.DataSource.DataSet.FindField('<27><><EFBFBD>չ<EFBFBD>˾')<>nil) and (frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').AsString,[])) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
end
else
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end
else
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat;
if not frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').IsNull then
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
else Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat
end
else
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
end;
9:
begin
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('˰<><CBB0>').AsFloat
end
else
begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
end;
end
else
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat
end
else
begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
end;
end;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
end;
end;
procedure Tfra_fee.DatasetAmtcharge(Sender: TField);
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if Sender.FieldName='<27><><EFBFBD><EFBFBD>' then
begin
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
// Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.FieldByName('˰<><CBB0>').asfloat/100));
end;
finally
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end
else
begin
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=DatasetNOPricecharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
end;
end;
procedure Tfra_fee.DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
if Sender.FieldName='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>' then
begin
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
// Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
finally
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge
else Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end
else
if Sender.FieldName='˰<><CBB0>' then
begin
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=nil;
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
// Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
if (Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0) then
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*(1-Sender.DataSet.fieldbyname('Ӷ<><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat/100))
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
if (Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat=0) and (UpperCase(Sender.DataSet.Name)='T_CH_PAY') then
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=0
else Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
finally
Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').OnChange:=DatasetAmtcharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge
else Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
procedure Tfra_fee.GetAllFeeItems;
var Frt,TblName,strSqlAcccept,strSqlPay:string;
aQueryaccept,aQuerypay:TADOQuery;
begin
case StrToInt(edit_type.text) of
1:TblName:='t_op_seae';
2:TblName:='t_op_seai';
3:TblName:='t_op_Aire';
4:TblName:='t_op_Airi';
else TblName:='t_op_seae';
end;
if strtobool(get_parameters_value(111,'false')) then
begin
//Ӧ<><D3A6>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬһ<CDAC>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD><EFBFBD><EFBFBD>
aQueryaccept:=CreateAdoQuery;
aQuerypay:=CreateAdoQuery;
try
if t_ch_accept.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString='<27><>·<EFBFBD><C2B7>Ʊ' then
begin
aQueryaccept.Close;aQueryaccept.sql.Clear;
aQueryaccept.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_railway where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''') order by CH_ID';
aQueryaccept.Open;
aQuerypay.Close;aQuerypay.sql.Clear;
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_railway where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''') order by CH_ID';
aQuerypay.Open;
end
else
begin
aQueryaccept.Close;aQueryaccept.sql.Clear;
strSqlAcccept:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
// aQueryaccept.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
strSqlAcccept:=strSqlAcccept+' Unoin All ';
strSqlAcccept:=strSqlAcccept+' select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from'+ TblName +' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ĵ<EFBFBD>'' and <20><><EFBFBD><EFBFBD><E1B5A5>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''' )';
aQueryaccept.sql.Text:=strSqlAcccept;
aQueryaccept.Open;
aQuerypay.Close;aQuerypay.sql.Clear;
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD>='''+aQuerypay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''' order by CH_ID';
aQuerypay.sql.Text:='Unoin All';
aQuerypay.sql.Text:='select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from'+ TblName +' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ĵ<EFBFBD>'' and <20><><EFBFBD><EFBFBD><E1B5A5>='''+aQuerypay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''' )';
aQuerypay.Open;
end;
memtblProfit.close;
memtblProfit.Open;
aQueryaccept.First;
while not aQueryaccept.Eof do
begin
Frt:=GetFrt(aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblProfit.Locate('Frt;ACCNAME;OBJDR',vararrayof([Frt,aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then
begin
memtblProfit.Edit;
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblProfit.FieldByName('USDDR').AsFloat:=memtblProfit.FieldByName('USDDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=memtblProfit.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblProfit.FieldByName('RMBDR').AsFloat:=memtblProfit.FieldByName('RMBDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=memtblProfit.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblProfit.FieldByName('OTDR').AsFloat:=memtblProfit.FieldByName('OTDR').AsFloat+aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=memtblProfit.FieldByName('TTLDR').AsFloat+(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblProfit.FieldByName('REMARKDR').AsString='' then
begin
memtblProfit.FieldByName('REMARKDR').AsString:=aQueryaccept.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblProfit.FieldByName('REMARKDR').AsString:=memtblProfit.FieldByName('REMARKDR').AsString+' '+aQueryaccept.fieldbyName('<27><>ע').AsString;
end;
memtblProfit.Post;
end
else
begin
memtblProfit.Insert;
memtblProfit.FieldByName('ORDNO').AsInteger:=0;
memtblProfit.FieldByName('FRT').AsString:=GetFrt(aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblProfit.FieldByName('ACCNAME').AsString:=aQueryaccept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblProfit.FieldByName('OBJDR').AsString:=aQueryaccept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblProfit.FieldByName('OBJCR').AsString:='';
memtblProfit.FieldByName('REMARKCR').AsString:='';
memtblProfit.FieldByName('USDCR').AsFloat:=0;
memtblProfit.FieldByName('RMBCR').AsFloat:=0;
memtblProfit.FieldByName('OTCR').AsFloat:=0;
memtblProfit.FieldByName('TTLCR').AsFloat:=0;
memtblProfit.FieldByName('DR').AsString:='T';
memtblProfit.FieldByName('CR').AsString:='F';
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblProfit.FieldByName('USDDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQueryaccept.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblProfit.FieldByName('RMBDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblProfit.FieldByName('OTDR').AsFloat:=aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLDR').AsFloat:=(aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQueryaccept.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblProfit.FieldByName('REMARKDR').AsString:=memtblProfit.FieldByName('REMARKDR').AsString+' '+aQueryaccept.fieldbyName('<27><>ע').AsString;
memtblProfit.Post;
end;
aQueryaccept.Next;
end;
aQuerypay.First;
while not aQuerypay.Eof do
begin
Frt:=GetFrt(aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
if memtblProfit.Locate('Frt;ACCNAME;CR',vararrayof([Frt,aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'F']),[]) then
begin
memtblProfit.Edit;
memtblProfit.FieldByName('OBJCR').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblProfit.FieldByName('USDCR').AsFloat:=memtblProfit.FieldByName('USDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblProfit.FieldByName('RMBCR').AsFloat:=memtblProfit.FieldByName('RMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblProfit.FieldByName('OTCR').AsFloat:=memtblProfit.FieldByName('OTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblProfit.FieldByName('REMARKCR').AsString='' then
begin
memtblProfit.FieldByName('REMARKCR').AsString:=aQuerypay.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblProfit.FieldByName('REMARKCR').AsString:=memtblProfit.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
end;
memtblProfit.FieldByName('CR').AsString:='T';
memtblProfit.Post;
end
else
begin
if memtblProfit.Locate('Frt;ACCNAME;OBJCR',vararrayof([Frt,aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring]),[]) then
begin
memtblProfit.Edit;
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblProfit.FieldByName('USDCR').AsFloat:=memtblProfit.FieldByName('USDCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblProfit.FieldByName('RMBCR').AsFloat:=memtblProfit.FieldByName('RMBCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblProfit.FieldByName('OTCR').AsFloat:=memtblProfit.FieldByName('OTCR').AsFloat+aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=memtblProfit.FieldByName('TTLCR').AsFloat+(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
if memtblProfit.FieldByName('REMARKCR').AsString='' then
begin
memtblProfit.FieldByName('REMARKCR').AsString:=aQuerypay.fieldbyName('<27><>ע').AsString;
end
else
begin
memtblProfit.FieldByName('REMARKCR').AsString:=memtblProfit.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
end;
memtblProfit.FieldByName('CR').AsString:='T';
memtblProfit.Post;
end
else
begin
memtblProfit.Insert;
memtblProfit.FieldByName('ORDNO').AsInteger:=0;
memtblProfit.FieldByName('FRT').AsString:=GetFrt(aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
memtblProfit.FieldByName('ACCNAME').AsString:=aQuerypay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblProfit.FieldByName('OBJCR').AsString:=aQuerypay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
memtblProfit.FieldByName('OBJDR').AsString:='';
memtblProfit.FieldByName('REMARKCR').AsString:='';
memtblProfit.FieldByName('USDDR').AsFloat:=0;
memtblProfit.FieldByName('RMBDR').AsFloat:=0;
memtblProfit.FieldByName('OTDR').AsFloat:=0;
memtblProfit.FieldByName('TTLDR').AsFloat:=0;
memtblProfit.FieldByName('DR').AsString:='F';
memtblProfit.FieldByName('CR').AsString:='T';
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then
begin
memtblProfit.FieldByName('USDCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
if aQuerypay.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
begin
memtblProfit.FieldByName('RMBCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end
else
begin
memtblProfit.FieldByName('OTCR').AsFloat:=aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
memtblProfit.FieldByName('TTLCR').AsFloat:=(aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*aQuerypay.fieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
end;
memtblProfit.FieldByName('REMARKCR').AsString:=memtblProfit.FieldByName('REMARKCR').AsString+' '+aQuerypay.fieldbyName('<27><>ע').AsString;
memtblProfit.Post;
end;
end;
aQuerypay.Next;
end;
memtblProfit.SortOn('FRT;ACCNAME',[]);
finally
freeandnil(aQueryAccept);
freeandnil(aQueryPay);
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo11Enter(Sender: TObject);
begin
frm_data_share.t_crm_client.Filtered:=false;
end;
procedure Tfra_fee.UpdateFeeRemarks;
var aTableName,FeeRemarks,OtherRemarks:string;
aAdoQuery:TAdoQuery;
begin
if edit_type.text='1' then //t_op_seae
aTableName:='t_op_seae'
else
if edit_type.text='2' then //t_op_seai
aTableName:='t_op_seai'
else
if (edit_type.text='3') then //t_op_aire
aTableName:='t_op_aire'
else
if (edit_type.text='4') then //t_op_airi
aTableName:='t_op_airi'
else
if (edit_type.text='5') then //t_op_airtruck
aTableName:='t_op_airtruck'
else
if (edit_type.text='6') then //t_op_railway
aTableName:='t_op_railway'
else
if edit_type.text='7' then //t_op_seai
aTableName:='t_op_seai';
FeeRemarks:='';
OtherRemarks:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;Sql.Clear;
SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=''<27><>'' and <20><>ע<>''''');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
Open;First;
while not Eof do
begin
if FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='THC' then
begin
if OtherRemarks='' then
OtherRemarks:=FieldByName('<27><>ע').AsString
else OtherRemarks:=OtherRemarks+' '+FieldByName('<27><>ע').AsString;
end
else
begin
if FeeRemarks='' then
FeeRemarks:=FieldByName('<27><>ע').AsString
else FeeRemarks:=FeeRemarks+' '+FieldByName('<27><>ע').AsString;
end;
Next;
end;
Close;Sql.Clear;
SQL.Add('Update '+aTableName +' set <20><><EFBFBD>ñ<EFBFBD>ע=:<3A><><EFBFBD>ñ<EFBFBD>ע ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
Parameters.ParamByName('<27><><EFBFBD>ñ<EFBFBD>ע').Value:=trim(FeeRemarks);
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע').Value:=trim(OtherRemarks);
ExecSQL;
finally
Free;
end;
end;
procedure Tfra_fee.getsumstr_op;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not bsSkinPanel3.Visible then exit;
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do
begin
if aQuery1.Eof then
begin
str1:=FixLenStr('',72);
end
else
begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then
begin
str2:=FixLenStr('',72);
end
else
begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='2') and if_open('227') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='3') and if_open('228') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='4') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='6') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='7') or (edit_type.text='9') then
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee.getsumstr_cw;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not bsSkinPanel3.Visible then exit;
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do
begin
if aQuery1.Eof then
begin
str1:=FixLenStr('',72);
end
else
begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then
begin
str2:=FixLenStr('',72);
end
else
begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='2') and if_open('227') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='3') and if_open('228') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='4') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='6') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='7') or (edit_type.text='9') then
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee.getsumstr_vat; //˰<><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ ˰<><CBB0>
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not bsSkinPanel3.Visible then exit;
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do
begin
if aQuery1.Eof then
begin
str1:=FixLenStr('',72);
end
else
begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then
begin
str2:=FixLenStr('',72);
end
else
begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='2') and if_open('227') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='3') and if_open('228') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='4') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='6') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='7') or (edit_type.text='9') then
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee.getsumstr;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal,rarmb,rausd,raot,ratotal,rprmb,rpusd,rpot,rptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not bsSkinPanel3.Visible then exit;
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
rarmb:=0;
rausd:=0;
raot:=0;
ratotal:=0;
rprmb:=0;
rpusd:=0;
rpot:=0;
rptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(<28><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',120);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str1:=str1+' ';
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
// atotal:=ratotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
rarmb:=rarmb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rausd:=rausd+aquery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
raot:=raot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
ratotal:=ratotal+aquery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',120);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str2:=str2+' ';
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
rprmb:=rprmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rpusd:=rpusd+aquery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
rpot:=rpot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rptotal:=rptotal+aquery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false);
if rarmb<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rarmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false);
if rausd<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rausd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false);
if raot<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',raot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
if ratotal<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',ratotal),8,' ',false)+')'
else
str1:=str1+' ';
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false);
if rprmb<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rprmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false);
if rpusd<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpusd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false);
if rpot<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
if rptotal<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rptotal),8,' ',false)+')'
else
str2:=str2+' ';
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false)+FixLenStr('',48);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='2') and if_open('227') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='3') and if_open('228') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='4') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='6') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='7') or (edit_type.text='9') then
memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA> ',24,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD> ',24,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee.DBEdit48Change(Sender: TObject);
begin
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
end;
procedure Tfra_fee.t_ch_acceptAfterOpen(DataSet: TDataSet);
begin
// if not t_ch_pay.Active then
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
end;
procedure Tfra_fee.t_ch_payAfterOpen(DataSet: TDataSet);
begin
case bsSkinComboBox1.ItemIndex of
0: getsumstr_vat;
1: getsumstr_cw;
2: getsumstr_op;
end;
end;
procedure Tfra_fee.N127Click(Sender: TObject);
var
i:integer;
aADOQuery:TAdoQuery;
begin
//<2F><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
if not t_ch_accept.Active then exit;
if t_ch_accept.IsEmpty then exit;
if strtobool(get_parameters_value(154,'false')) then begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
frm_main.qryweb.open;
if frm_main.qryweb.IsEmpty then exit;
aADOQuery:=CreateADOQuery;
with aADOQuery do try
frm_main.db.BeginTrans;
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
if not frm_main.qryweb.IsEmpty then begin
frm_main.qryweb.first;
while not frm_main.qryweb.eof do frm_main.qryweb.delete;
end;
Sql.Clear;
Sql.Add('Update t_ch_fee Set <20>ύ=1');
Sql.Add('where CH_ID=:CH_ID');
t_ch_accept.First;
while not t_ch_accept.Eof do begin
if Trim(t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString)='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
frm_main.qryweb.Insert;
for i:=0 to frm_main.qryweb.FieldCount-1 do begin
if t_ch_accept.FindField(frm_main.qryweb.Fields[i].fieldname)<>nil then
frm_main.qryweb.Fields[i].Value:=t_ch_accept.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
Parameters.ParamByName('CH_ID').Value:=t_ch_accept.fieldbyname('CH_ID').AsInteger;
ExecSql;
end;
t_ch_accept.Next;
end;
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then begin
MessageDlg('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>',mterror,[mbok],0);
frm_main.db.RollbackTrans;
end;
FreeAndNil(aADOQuery);
end;
end;
end;
procedure Tfra_fee.N129Click(Sender: TObject);
begin
fee_invoice_view(t_ch_Pay);
end;
procedure Tfra_fee.bsSkinDBEdit17Change(Sender: TObject);
var s:string;
begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit17.font.Color:=clRed
else
bsSkinDBEdit17.font.Color:=clBlue;
end;
procedure Tfra_fee.bsSkinDBEdit8Change(Sender: TObject);
var s:string;
begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit8.font.Color:=clRed
else
bsSkinDBEdit8.font.Color:=clBlue;
end;
procedure Tfra_fee.bsSkinButton8Click(Sender: TObject);
begin
try
if not if_open('281') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if not assigned(frm_ch_invoice_shen) then
frm_ch_invoice_shen:=tfrm_ch_invoice_shen.Create (self);
frm_ch_invoice_shen.ManualDock(frm_main.SearchTabs('frm_ch_invoice_shen',frm_ch_invoice_shen.caption,'411'),nil,alClient);
frm_ch_invoice_shen.MblNo:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring;
frm_ch_invoice_shen.show;
frm_ch_invoice_shen.bsSkinButton1Click(Sender);
finally
end;
end;
procedure Tfra_fee.bsSkinButton19Click(Sender: TObject);
begin
CancelApply('022','055','073','081',t_ch_accept);
end;
procedure Tfra_fee.wwDBGrid2KeyPress(Sender: TObject; var Key: Char);
var s:string;
begin
if t_ch_pay1.DataSet.DataSource.DataSet.FindField('<27><>װ<EFBFBD><D7B0>')=nil then exit;
s:=trim(t_ch_pay1.DataSet.DataSource.DataSet.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString);
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC>״̬' then
begin
if (Pos(' ',s)>0) and (wwDBGrid2.SelectedField.FieldName='<27><><EFBFBD><EFBFBD>') then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if t_ch_pay1.DataSet.fieldbyname('<27><>׼').asstring<>'<27><>Ʊ' then
begin
try
if not ASSIGNED(frm_fee_calc) then
frm_fee_calc:=Tfrm_fee_calc.Create(application);
frm_fee_calc.t_ch_fee1:=t_ch_pay1;
frm_fee_calc.t_op_ctn_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_pay1.DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_fee_calc.t_op_ctn_sum.Open;
frm_fee_calc.ShowModal;
finally
frm_fee_calc.Free;
frm_fee_calc:=nil;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBGrid1KeyPress(Sender: TObject; var Key: Char);
var s:string;
begin
if t_ch_accept1.DataSet.DataSource.DataSet.FindField('<27><>װ<EFBFBD><D7B0>')=nil then exit;
s:=trim(t_ch_accept1.DataSet.DataSource.DataSet.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString);
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='¼<><C2BC>״̬' then
begin
if (Pos(' ',s)>0) and (wwDBGrid1.SelectedField.FieldName='<27><><EFBFBD><EFBFBD>') then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
if frm_data_share.t_code_fee.fieldbyname('<27><>׼').asstring='<27><><EFBFBD><EFBFBD>' then
begin
if t_ch_accept1.DataSet.fieldbyname('<27><>׼').asstring<>'<27><>Ʊ' then
begin
try
if not ASSIGNED(frm_fee_calc) then
frm_fee_calc:=Tfrm_fee_calc.Create(application);
frm_fee_calc.t_ch_fee1:=t_ch_accept1;
frm_fee_calc.t_op_ctn_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_ch_accept1.DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_fee_calc.t_op_ctn_sum.Open;
frm_fee_calc.ShowModal;
finally
frm_fee_calc.Free;
frm_fee_calc:=nil;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.UpdateFeePrint(Adofee:TadoQuery);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;Sql.Clear;
SQL.Add('Update t_ch_fee set <20><>ӡ= case <20><>ӡ when 1 then 0 else 1 end ');
SQL.Add('where ch_id=:ch_id');
Parameters.ParamByName('ch_id').Value:=Adofee.FieldByName('ch_id').AsInteger;
ExecSQL;
finally
Adofee.Refresh;
Free;
end;
end;
procedure Tfra_fee.bsSkinButton20Click(Sender: TObject);
begin
UpdateFeePrint(t_ch_accept);
end;
procedure Tfra_fee.bsSkinButton21Click(Sender: TObject);
begin
UpdateFeePrint(t_ch_pay);
end;
procedure Tfra_fee.bsSkinComboBox1Change(Sender: TObject);
var
inifile1:Tinifile;
begin
case bsSkinComboBox1.ItemIndex of
1:
begin
getsumstr_cw;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
0:
begin
getsumstr_vat;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
2:
begin
getsumstr_op;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end
else
begin
getsumstr_vat;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
end;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
inifile1.WriteInteger('FEE','FEEVAT',bsSkinComboBox1.ItemIndex);
inifile1.free;
{ case bsSkinComboBox1.ItemIndex of
0:
begin
getsumstr;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
1:
begin
getsumstr_op;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='<27><><EFBFBD><EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD><EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
2:
begin
getsumstr_cw;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
3:
begin
getsumstr_vat;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end
else
begin
getsumstr;
if bsSkinDBEdit6.DataSource.DataSet.Active then
begin
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
///
if bsSkinDBEdit11.DataSource.DataSet.Active then
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit13.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit18.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
end;
end;
end;
}
end;
end.