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.

1058 lines
30 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_ch_zhipiao;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, bsSkinTabs, bsSkinCtrls, DB, ADODB, dxExEdtr,
dxCntner, dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, wwdblook,
StdCtrls, DBCtrls, RxLookup, bsdbctrls, Mask, wwdbdatetimepicker,
ExtCtrls, Menus, XPMenu, sncCurrency, sncDBCurrency, ToolEdit, AAFont,
AACtrls, CurrEdit, RXDBCtrl, DBCtrlsEh;
type
Tfrm_ch_zhipiao = class(TForm)
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
t_ch_invoice_shen: TADOQuery;
t_ch_invoice_shen1: TDataSource;
v_fee_do_seae: TADOQuery;
v_fee_do_seae1: TDataSource;
t_ch_invoice: TADOQuery;
t_ch_invoice1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridDateColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridCheckColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridDateColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridCheckColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridCheckColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridDateColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridDateColumn;
bsSkinButton2: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton4: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinPanel7: TbsSkinPanel;
Label54: TLabel;
DBEdit16: TDBEdit;
s_invoice: TScrollBox;
Label56: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label21: TLabel;
DBEdit12: TDBEdit;
Label57: TLabel;
DBEdit17: TDBEdit;
Label59: TLabel;
DBEdit18: TDBEdit;
Label63: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
PopupMenu2: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N20: TMenuItem;
XPMenu1: TXPMenu;
v_fee_do_seai: TADOQuery;
v_fee_do_seai1: TDataSource;
N3: TMenuItem;
N4: TMenuItem;
v_fee_do_aire: TADOQuery;
v_fee_do_aire1: TDataSource;
v_fee_do_airi: TADOQuery;
v_fee_do_airi1: TDataSource;
PopupMenu1: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel6: TbsSkinPanel;
Label22: TLabel;
Label23: TLabel;
DBEdit13: TDBEdit;
DBEdit15: TDBEdit;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
ADOQuery2: TADOQuery;
DataSource2: TDataSource;
ADOQuery3: TADOQuery;
DataSource3: TDataSource;
ADOQuery4: TADOQuery;
DataSource4: TDataSource;
t_ch_invoice_head: TADOQuery;
t_ch_invoice_head1: TDataSource;
Label26: TLabel;
Label27: TLabel;
csj: TDBDateTimeEditEh;
rxdbj: TRxDBCalcEdit;
Label28: TLabel;
Shape1: TShape;
AALabel1: TAALabel;
Label29: TLabel;
lblYEAR: TLabel;
Label30: TLabel;
lblMonth: TLabel;
Label31: TLabel;
lblDay: TLabel;
Label32: TLabel;
Label33: TLabel;
Shape2: TShape;
Label34: TLabel;
sncCurrencyLabel1: TsncCurrencyLabel;
snccy: TsncDBCurrencyEdit;
Label35: TLabel;
czphm: TDBEdit;
Label36: TLabel;
Label38: TLabel;
Label39: TLabel;
DBEdit19: TDBEdit;
DBText1: TDBText;
DBComboBox1: TDBComboBox;
DBText2: TDBText;
DBText3: TDBText;
DBText4: TDBText;
Label1: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
DBComboBox2: TDBComboBox;
Label2: TLabel;
DBComboBox3: TDBComboBox;
t_ch_invoiceDSDesigner: TStringField;
t_ch_invoiceDSDesigner2: TStringField;
t_ch_invoiceDSDesigner3: TStringField;
t_ch_invoiceDSDesigner4: TStringField;
t_ch_invoiceDSDesigner5: TDateTimeField;
t_ch_invoiceDSDesigner6: TStringField;
t_ch_invoiceDSDesigner7: TStringField;
t_ch_invoiceDSDesigner8: TBCDField;
t_ch_invoiceDSDesigner9: TStringField;
t_ch_invoiceDSDesigner10: TStringField;
t_ch_invoiceDSDesigner11: TStringField;
t_ch_invoiceDSDesigner12: TStringField;
t_ch_invoiceDSDesigner13: TStringField;
t_ch_invoiceDSDesigner14: TBooleanField;
t_ch_invoiceDSDesigner15: TStringField;
t_ch_invoiceDSDesigner16: TDateTimeField;
t_ch_invoiceDSDesigner17: TStringField;
t_ch_invoiceDSDesigner18: TBooleanField;
t_ch_invoiceDSDesigner19: TStringField;
t_ch_invoiceDSDesigner20: TBooleanField;
t_ch_invoiceDSDesigner21: TStringField;
t_ch_invoiceDSDesigner22: TDateTimeField;
t_ch_invoiceDSDesigner23: TStringField;
t_ch_invoiceDSDesigner24: TDateTimeField;
t_ch_invoiceDSDesigner25: TStringField;
t_ch_invoiceDSDesigner26: TStringField;
t_ch_invoiceDSDesigner27: TStringField;
t_ch_invoiceDSDesigner28: TStringField;
Label3: TLabel;
DBEdit1: TDBEdit;
t_ch_invoiceDSDesigner29: TStringField;
t_ch_invoiceDSDesigner30: TStringField;
t_ch_invoiceDSDesigner31: TStringField;
t_ch_invoiceDSDesigner32: TStringField;
t_ch_invoiceDSDesigner33: TStringField;
t_ch_invoiceDSDesigner34: TStringField;
t_ch_invoiceDSDesigner35: TStringField;
t_ch_invoiceDSDesigner36: TStringField;
t_ch_invoiceDSDesigner37: TStringField;
t_ch_invoiceDSDesigner38: TStringField;
t_ch_invoiceDSDesigner39: TStringField;
t_ch_invoiceDSDesigner40: TStringField;
t_ch_invoiceDSDesigner41: TStringField;
t_ch_invoiceDSDesigner42: TStringField;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure bsSkinPanel3Resize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure t_ch_invoiceAfterInsert(DataSet: TDataSet);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure t_ch_invoiceBeforeInsert(DataSet: TDataSet);
procedure t_ch_invoiceBeforePost(DataSet: TDataSet);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure t_ch_invoiceBeforeEdit(DataSet: TDataSet);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure RxDBLookupCombo3Enter(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
procedure t_ch_invoiceAfterPost(DataSet: TDataSet);
procedure t_ch_invoiceDSDesigner11Change(Sender: TField);
procedure t_ch_invoiceDSDesigner5Change(Sender: TField);
procedure DBComboBox3Change(Sender: TObject);
procedure RxDBLookupCombo3Change(Sender: TObject);
procedure t_ch_invoice1DataChange(Sender: TObject; Field: TField);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_ch_zhipiao: Tfrm_ch_zhipiao;
implementation
uses u_main, my_sys_function, u_data_share, u_ch_invoice_add,
u_ch_shen_query, u_ch_invoice_query, u_ch_invoice;
{$R *.dfm}
procedure Tfrm_ch_zhipiao.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption+'1');
frm_ch_zhipiao.Hide;
frm_ch_zhipiao.ManualFloat(frm_ch_zhipiao.BoundsRect );
frm_main.freeTabs('frm_ch_zhipiao');
action:=cafree;
frm_ch_zhipiao:=nil;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_zhipiao.FormResize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/9);
bsSkinButton9.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton3.Width:=i;
end;
procedure Tfrm_ch_zhipiao.bsSkinPanel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel1.Width/11);
bsSkinButton16.Width:=i;
bsSkinButton17.Width:=i;
bsSkinButton15.Width:=i;
bsSkinButton20.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton18.Width:=i;
bsSkinButton19.Width:=i;
end;
procedure Tfrm_ch_zhipiao.bsSkinPanel3Resize(Sender: TObject);
var
i:integer;
begin
{
if strtobool(get_parameters_value(1,'false'))then
begin
bsSkinButton25.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
bsSkinButton22.Visible:=false;
bsSkinButton27.Visible:=false;
i:=round(bsSkinPanel3.Width/9);
bsSkinButton23.Width:=i;
bsSkinButton24.Width:=i;
bsSkinButton28.Width:=i;
bsSkinButton29.Width:=i;
bsSkinButton30.Width:=i;
bsSkinButton25.Width:=i;
bsSkinButton26.Width:=i;
bsSkinButton31.Width:=i;
end
else
begin
bsSkinButton25.Caption:='<27><>׼<EFBFBD><D7BC>Ʊ';
bsSkinButton22.Visible:=true;
bsSkinButton27.Visible:=true;
i:=round(bsSkinPanel3.Width/11);
bsSkinButton23.Width:=i;
bsSkinButton24.Width:=i;
bsSkinButton28.Width:=i;
bsSkinButton29.Width:=i;
bsSkinButton30.Width:=i;
bsSkinButton25.Width:=i;
bsSkinButton26.Width:=i;
bsSkinButton31.Width:=i;
bsSkinButton22.Width:=i;
bsSkinButton27.Width:=i;
end;
bsSkinButton32.Left:=dxDBGrid2.Width-bsSkinButton32.Width-20;
}
end;
procedure Tfrm_ch_zhipiao.FormShow(Sender: TObject);
begin
t_ch_invoice.close;
t_ch_invoice.sql.clear;
t_ch_invoice.sql.add('select top 50 * from t_ch_zhipiao order by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> desc');
t_ch_invoice.open;
{
ADOQuery1.open;
ADOQuery2.open;
ADOQuery3.open;
ADOQuery4.open;
t_ch_invoice_head.open;
if strtobool(get_parameters_value(1,'false'))then
begin
t_ch_invoice_shen.open;
end
else
begin
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.clear;
t_ch_invoice_shen.sql.add('select * from t_ch_invoice_shen ');
t_ch_invoice_shen.sql.add('where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><>׼<EFBFBD><D7BC>Ʊ'+''''+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''
+','+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+')');
t_ch_invoice_shen.sql.add(' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.Open;
end;
v_fee_do_seae.open;
v_fee_do_seai.open;
v_fee_do_aire.open;
v_fee_do_airi.open;
loadreggrid(dxdbgrid1,false,caption+'1');
loadreggrid(dxdbgrid2,false,caption+'2');
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_sys_bank.requery;
}
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceAfterInsert(DataSet: TDataSet);
begin
t_ch_invoice['<27>Ƶ<EFBFBD><C6B5><EFBFBD>']:=employee;
t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=date;
t_ch_invoice['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_invoice['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:='ת<><D7AA>֧Ʊ';
t_ch_invoice['<27>ұ<EFBFBD>']:='RMB';
t_ch_invoice['<27><>']:=my_strtoyear(date);
t_ch_invoice['<27><>']:=my_strtomonth(Date);
t_ch_invoice['<27><>']:=my_strtodday(Date);
t_ch_invoice['<27><><EFBFBD><EFBFBD>״̬']:=0;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=0;
// snccy.CurrencySymbol:='<27><>';
end;
procedure Tfrm_ch_zhipiao.bsSkinButton4Click(Sender: TObject);
begin
{
if strtobool(get_parameters_value(5,'FALSE'))then
begin
try
frm_ch_invoice_add:=tfrm_ch_invoice_add.Create (self);
frm_ch_invoice_add.bsSkinCheckRadioBox1.enabled:=false;
if t_ch_invoice.IsEmpty then
frm_ch_invoice_add.bsSkinCheckRadioBox8.enabled:=false;
frm_ch_invoice_add.ShowModal;
finally
frm_ch_invoice_add.Free;
end;
end
else
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɷ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
end;
}
t_ch_invoice.Insert;
bsSkinPageControl1.ActivePageIndex:=1;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_ch_invoice);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton13Click(Sender: TObject);
begin
table_cancel(t_ch_invoice);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton15Click(Sender: TObject);
begin
table_Prior(t_ch_invoice);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton20Click(Sender: TObject);
begin
table_next(t_ch_invoice);
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceBeforeInsert(DataSet: TDataSet);
begin
{
if not modify_all then
abort;
}
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_invoice,'֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
table_before_post(t_ch_invoice,'<27>ұ<EFBFBD>');
table_before_post(t_ch_invoice,'֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_zhipiao.bsSkinButton18Click(Sender: TObject);
begin
bsSkinTabSheet1.Show;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton1Click(Sender: TObject);
begin
bsSkinTabSheet2.Show;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu2.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton16Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton16.ClientToScreen(Point(0,bsSkinButton16.Height));
PopupMenu2.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_zhipiao.N1Click(Sender: TObject);
begin
if t_ch_invoice.IsEmpty then
exit;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
exit;
end;
if not t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
t_ch_invoice.Edit;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_invoice.post;
end;
sys_print('ҵ<><D2B5>֧Ʊ<D6A7><C6B1>ӡ',1,t_ch_invoice1,nil,nil,nil,DataSource1,DataSource2,DataSource3,DataSource4,t_ch_invoice1,nil,nil);
end;
procedure Tfrm_ch_zhipiao.N20Click(Sender: TObject);
begin
if t_ch_invoice.IsEmpty then
exit;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
exit;
end;
if not t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
t_ch_invoice.Edit;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_invoice.post;
end;
sys_print('ҵ<><D2B5>֧Ʊ<D6A7><C6B1>ӡ',2,t_ch_invoice1,nil,nil,nil,DataSource1,DataSource2,DataSource3,DataSource4,t_ch_invoice1,nil,nil);
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceBeforeEdit(DataSet: TDataSet);
begin
if not modify_all then
begin
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
abort;
end;
end;
end;
procedure Tfrm_ch_zhipiao.RxDBLookupCombo2Change(Sender: TObject);
begin
try
if (t_ch_invoice.state=dsinsert) or (t_ch_invoice.state=dsedit) then
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo2.DisplayValues[0],[])then
t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
end;
except
;
end;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton17Click(Sender: TObject);
begin
if t_ch_invoice.IsEmpty then
exit;
if not if_open('031') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫȡ<D2AA><C8A1><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
begin
try
modify_all:=true;
t_ch_invoice.Edit;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_invoice.post;
finally
modify_all:=false;
end;
end;
end;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton12Click(Sender: TObject);
var
str:widestring;
if_shen:string;
in_id:integer;
begin
if t_ch_invoice.IsEmpty then
exit;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>', '<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
if str=''then
begin
showmessage('<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3>ϳ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end
else if str=''then
begin
exit;
end;
in_id:=t_ch_invoice.FieldByName('ZP_ID').asinteger;
t_ch_invoice.Refresh;
if not t_ch_invoice.locate('ZP_ID',in_id,[]) then
exit;
try
modify_all:=true;
t_ch_invoice.Edit;
t_ch_invoice['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=1;
t_ch_invoice['<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
t_ch_invoice['<27>ϳ<EFBFBD><CFB3><EFBFBD>']:=employee;
t_ch_invoice['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_invoice.post;
modify_all:=false;
except
modify_all:=false;
showmessage('<27>ϳ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
end
else
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_invoice.delete
else
exit;
end;
t_ch_invoice_shen.requery;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton30Click(Sender: TObject);
begin
{
if bsSkinButton30.Caption='<27><>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>' then
begin
if t_ch_invoice_shen.IsEmpty then
exit;
bsSkinTabSheet22.show;
bsSkinButton30.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
bsSkinTabSheet11.show;
bsSkinButton30.Caption:='<27><>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD>';
end;
}
end;
procedure Tfrm_ch_zhipiao.bsSkinButton25Click(Sender: TObject);
begin
{
if t_ch_invoice_shen.IsEmpty then
exit;
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>'ʵ<>ʿ<EFBFBD>Ʊ')then
begin
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')or
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')or
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>׼<EFBFBD><D7BC>Ʊ')or
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><>ֹ<EFBFBD>޸<EFBFBD>')then
begin
t_ch_invoice_shen.Edit;
t_ch_invoice_shen['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_invoice_shen.post;
t_ch_invoice_shen.Refresh;
end
else
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
end;
end
else
begin
if bsSkinButton25.Caption='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ' then
begin
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>׼<EFBFBD><D7BC>Ʊ') and
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
exit;
end;
end
else
begin
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>׼<EFBFBD><D7BC>Ʊ') and
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>') and
(t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
exit;
end;
end;
try
frm_ch_invoice_add:=tfrm_ch_invoice_add.Create (self);
frm_ch_invoice_add.bsSkinCheckRadioBox1.checked:=true;
frm_ch_invoice_add.bsSkinCheckRadioBox7.enabled:=false;
frm_ch_invoice_add.bsSkinCheckRadioBox8.enabled:=false;
frm_ch_invoice_add.wwDBLookupCombo6.Text:=t_ch_invoice_shen.fieldbyname('<27>ұ<EFBFBD>').asstring;
frm_ch_invoice_add.wwDBLookupCombo6.ReadOnly:=true;
frm_ch_invoice_add.edit2.text:=t_ch_invoice_shen.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
frm_ch_invoice_add.edit2.Visible:=true;
frm_ch_invoice_add.RxDBLookupCombo3.Visible:=false;
if t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
begin
if (date-t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>7 then
begin
showmessage('<27><><EFBFBD><EFBFBD><E6A3BA>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD><DAB3><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>7<EFBFBD><37><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>');
end;
end;
frm_ch_invoice_add.ShowModal;
finally
frm_ch_invoice_add.Free;
end;
end;
}
end;
procedure Tfrm_ch_zhipiao.RxDBLookupCombo3Enter(Sender: TObject);
begin
if DBEdit12.text='<27><><EFBFBD>뷢Ʊ' then
begin
RxDBLookupCombo3.ReadOnly:=true;
{DBEdit19.ReadOnly:=true;
DE_ShipName.ReadOnly:=true;
DE_BLNO.ReadOnly:=true;
wwDBDateTimePicker2.ReadOnly:=true;
wwDBLookupCombo10.ReadOnly:=true;
wwDBLookupCombo11.ReadOnly:=true;
wwDBLookupCombo12.ReadOnly:=true;
DM_ChaCon.ReadOnly:=true;
DM_CostType.ReadOnly:=true;
DM_Money.ReadOnly:=true;
DE_SumUpper.ReadOnly:=true;
DBSumLower.ReadOnly:=true; }
// wwDBLookupCombo6.ReadOnly:=true;
end
else
begin
// RxDBLookupCombo3.ReadOnly:=false;
{DBEdit19.ReadOnly:=false;
DE_ShipName.ReadOnly:=false;
DE_BLNO.ReadOnly:=false;
wwDBDateTimePicker2.ReadOnly:=false;
wwDBLookupCombo10.ReadOnly:=false;
wwDBLookupCombo11.ReadOnly:=false;
wwDBLookupCombo12.ReadOnly:=false;
DM_ChaCon.ReadOnly:=false;
DM_CostType.ReadOnly:=false;
DM_Money.ReadOnly:=false;
DE_SumUpper.ReadOnly:=false;
DBSumLower.ReadOnly:=false; }
// wwDBLookupCombo6.ReadOnly:=false;
end;
end;
procedure Tfrm_ch_zhipiao.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_ch_invoice);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton24Click(Sender: TObject);
begin
try
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
shen_query_type:=3;
shen_query_limited:='no';
shen_query_op_limited:='no';
frm_ch_shen_query.ShowModal;
finally
frm_ch_shen_query.Free;
end;
end;
procedure Tfrm_ch_zhipiao.bsSkinButton3Click(Sender: TObject);
begin
{
if t_ch_invoice.IsEmpty then
exit;
if t_ch_invoice.FieldByName('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring<>'<27><><EFBFBD>뷢Ʊ'then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷢Ʊ<EBB7A2><C6B1><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_invoice.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not t_ch_invoice_shen.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_invoice.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[])then
begin
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.clear;
t_ch_invoice_shen.sql.add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='
+''''+t_ch_invoice.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''');
t_ch_invoice_shen.open;
end;
bsSkinTabSheet22.Show;
}
end;
procedure Tfrm_ch_zhipiao.DBEdit12KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit16);
end;
procedure Tfrm_ch_zhipiao.DBEdit16KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit17);
end;
procedure Tfrm_ch_zhipiao.DBEdit17KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit18);
end;
procedure Tfrm_ch_zhipiao.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo3);
end;
procedure Tfrm_ch_zhipiao.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton10Click(Sender: TObject);
begin
try
frm_ch_invoice_query:=tfrm_ch_invoice_query.Create (self);
frm_ch_invoice_query.ShowModal;
finally
frm_ch_invoice_query.Free;
end;
end;
procedure Tfrm_ch_zhipiao.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1)
end;
procedure Tfrm_ch_zhipiao.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,7)
end;
procedure Tfrm_ch_zhipiao.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1)
end;
procedure Tfrm_ch_zhipiao.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_ch_invoice,'֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_zhipiao.bsSkinButton22Click(Sender: TObject);
begin
shen_modify_ok(t_ch_invoice_shen);
end;
procedure Tfrm_ch_zhipiao.bsSkinButton27Click(Sender: TObject);
begin
shen_modify_back(t_ch_invoice_shen);
end;
procedure Tfrm_ch_zhipiao.N17Click(Sender: TObject);
begin
t_ch_invoice_shen.Close;
t_ch_invoice_shen.SQL.clear;
t_ch_invoice_shen.SQL.Add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD>뿪Ʊ'+''''
+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_zhipiao.N34Click(Sender: TObject);
begin
t_ch_invoice_shen.Close;
t_ch_invoice_shen.SQL.clear;
t_ch_invoice_shen.SQL.Add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_zhipiao.N36Click(Sender: TObject);
begin
t_ch_invoice_shen.Close;
t_ch_invoice_shen.SQL.clear;
t_ch_invoice_shen.SQL.Add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_zhipiao.N6Click(Sender: TObject);
begin
t_ch_invoice_shen.Close;
t_ch_invoice_shen.SQL.clear;
t_ch_invoice_shen.SQL.Add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><>׼<EFBFBD><D7BC>Ʊ'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_zhipiao.MenuItem2Click(Sender: TObject);
begin
t_ch_invoice_shen.Close;
t_ch_invoice_shen.SQL.clear;
t_ch_invoice_shen.SQL.Add('select * from t_ch_invoice_shen where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceAfterPost(DataSet: TDataSet);
begin
t_ch_invoice_head.Requery();
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceDSDesigner11Change(Sender: TField);
var
lowamont:String;
lenlowamont,i,J:Integer;
upword:array[0..12] of string[4];
begin
upword[0]:='<27><>';upword[1]:='<27><>';upword[2]:='Ԫ';upword[3]:='ʮ';upword[4]:='<27><>';
upword[5]:='ǧ';upword[6]:='<27><>';upword[7]:='ʮ<><CAAE>';upword[8]:='<27><><EFBFBD><EFBFBD>';upword[9]:='ǧ<><C7A7>';
upword[10]:='<27><>';upword[11]:='ʮ<><CAAE>';upword[12]:='<27><><EFBFBD><EFBFBD>';
if Sender.DataSet['<27>ұ<EFBFBD>']='RMB' then begin
lowamont:=formatfloat('0.00',Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']);
lenlowamont:=length(lowamont);
delete(lowamont,lenlowamont-2,1);
lenlowamont:=length(lowamont);
J:=0;
for i:=0 to 12 do begin
Sender.DataSet[upword[i]]:='';
end;
for i:=lenlowamont downto 1 do begin
Sender.DataSet[upword[j]]:=lowamont[i];
J:=J+1;
end;
Sender.DataSet[upword[lenlowamont]]:='<27><>';
// Sender.DataSet['<27><><EFBFBD><EFBFBD>Сд']:=FloatToStr(Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']);
Sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZH(FloatToStr(Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']))
end else begin
lowamont:=formatfloat('0.00',Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']);
lenlowamont:=length(lowamont);
delete(lowamont,lenlowamont-2,1);
lenlowamont:=length(lowamont);
for i:=0 to 12 do begin
Sender.DataSet[upword[i]]:='';
end;
J:=0;
for i:=lenlowamont downto 1 do begin
Sender.DataSet[upword[j]]:=lowamont[i];
J:=J+1;
end;
Sender.DataSet[upword[lenlowamont]]:='D';
Sender.DataSet[upword[lenlowamont+1]]:='S';
Sender.DataSet[upword[lenlowamont+2]]:='U';
Sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZHUSD(FloatToStr(Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']));
end;
end;
procedure Tfrm_ch_zhipiao.t_ch_invoiceDSDesigner5Change(Sender: TField);
begin
t_ch_invoice['<27><>']:=my_strtoyear(Sender.AsDateTime);
t_ch_invoice['<27><>']:=my_strtomonth(Sender.AsDateTime);
t_ch_invoice['<27><>']:=my_strtodday(Sender.AsDateTime);
end;
procedure Tfrm_ch_zhipiao.DBComboBox3Change(Sender: TObject);
begin
if DBComboBox3.Text='RMB' then
t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZH(FloatToStr(t_ch_invoice['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']))
else
t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZHUSD(FloatToStr(t_ch_invoice['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']));
end;
procedure Tfrm_ch_zhipiao.RxDBLookupCombo3Change(Sender: TObject);
begin
try
if (t_ch_invoice.state=dsinsert) or (t_ch_invoice.state=dsedit) then
begin
if not frm_data_share.t_crm_client.IsEmpty then
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo3.DisplayValues[0],[])then
if DBComboBox3.Text='RMB' then
t_ch_invoice['<27>տλ']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring
else
t_ch_invoice['<27>տλ']:=frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring;
end;
except
;
end;
end;
procedure Tfrm_ch_zhipiao.t_ch_invoice1DataChange(Sender: TObject;
Field: TField);
begin
if t_ch_invoice['<27>ұ<EFBFBD>']='RMB' then begin
snccy.CurrencySymbol:='<27><>';
Label34.Visible:=false;
Label3.Visible:=True;
end else begin
snccy.CurrencySymbol:='$';
Label34.Visible:=true;
Label3.Visible:=false;
end;
end;
end.