|
|
|
|
unit u_ch_invoice_add;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, BusinessSkinForm, StdCtrls, wwdblook, RxLookup, bsSkinCtrls, DB,
|
|
|
|
|
ADODB;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_ch_invoice_add = class(TForm)
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
Label48: TLabel;
|
|
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
|
|
Label63: TLabel;
|
|
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox8: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
p_invoice_no: TADOStoredProc;
|
|
|
|
|
Edit2: TEdit;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
|
|
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
|
|
|
|
|
Memo1: TMemo;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
BsNO:String;
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_ch_invoice_add: Tfrm_ch_invoice_add;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_data_share, u_ch_invoice, u_main, my_sys_function, my_sys_chat;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_invoice_add.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
afield : variant;
|
|
|
|
|
i: Integer;
|
|
|
|
|
aQuery,bQuery,aAdoQuery:TAdoQuery;
|
|
|
|
|
FeeList,AmtList,alistBsNo:TStringList;
|
|
|
|
|
Amt :Double;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
if trim(Edit1.Text)='' then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinCheckRadioBox7.Checked or bsSkinCheckRadioBox8.Checked then
|
|
|
|
|
begin
|
|
|
|
|
if trim(wwDBLookupCombo6.Text)='' then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27><>Ʊ<EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
if RxDBLookupCombo3.DisplayValue='' then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
with aQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;sql.Clear;
|
|
|
|
|
SQL.Add('Select <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> from t_ch_invoice');
|
|
|
|
|
SQL.Add('where <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>=:invno');
|
|
|
|
|
Parameters.ParamByName('invno').Value:=trim(Edit1.Text);
|
|
|
|
|
Open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage(trim(Edit1.Text)+' <20>÷<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.Insert;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ɷ<EFBFBD>Ʊ';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=trim(Edit1.Text);
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']:=wwDBLookupCombo6.Text;
|
|
|
|
|
if RxDBLookupCombo1.DisplayValues[0]<>'' then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
|
|
|
|
|
if frm_data_share.t_code_subcomp.locate('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[0],[]) then
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD>̵ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('<27><><EFBFBD>̵ǼǺ<C7BC>').AsString;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['˰<><CBB0><EFBFBD>ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('˰<><CBB0><EFBFBD>ǼǺ<C7BC>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>;<3B>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',vararrayof([frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],subcomp]),[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end else begin
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end else begin
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>'' then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo3.DisplayValues[1];
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']='USD' then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:=get_parameters_value(7,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD>')
|
|
|
|
|
else
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:=get_parameters_value(147,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD>');
|
|
|
|
|
}
|
|
|
|
|
if not frm_data_share.t_crm_client_all.IsEmpty then
|
|
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>'' then
|
|
|
|
|
if frm_data_share.t_crm_client_all.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo3.DisplayValues[1],[]) then
|
|
|
|
|
begin
|
|
|
|
|
if trim(frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring)<>''then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.post;
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice.State=dsinsert then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.cancel;
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
showmessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet2.show;
|
|
|
|
|
close;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox8.Checked then
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
afield := vararraycreate([0,frm_ch_invoice.t_ch_invoice.fieldcount-1],varvariant);
|
|
|
|
|
for i := 0 to (frm_ch_invoice.t_ch_invoice.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
afield[i] :=frm_ch_invoice.t_ch_invoice.fields[i].value ;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.append;
|
|
|
|
|
for i := 0 to (frm_ch_invoice.t_ch_invoice.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice.fields[i].FieldName<>'IN_ID'then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.fields[i].value := afield[i] ;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ɷ<EFBFBD>Ʊ';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=trim(Edit1.Text);
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']:=wwDBLookupCombo6.Text;
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>Ƿ<EFBFBD><C7B7>շ<EFBFBD>']:=0;
|
|
|
|
|
if Application.MessageBox('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>','<27><>ʾ',MB_YESNO+ MB_ICONINFORMATION)=IDYES then begin
|
|
|
|
|
end else begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>ע']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=0;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ϼƽ<CFBC><C6BD><EFBFBD>']:=0;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo1.DisplayValues[0]<>'' then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
|
|
|
|
|
if frm_data_share.t_code_subcomp.locate('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[0],[]) then
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD>̵ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('<27><><EFBFBD>̵ǼǺ<C7BC>').AsString;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['˰<><CBB0><EFBFBD>ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('˰<><CBB0><EFBFBD>ǼǺ<C7BC>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>;<3B>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',vararrayof([frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],subcomp]),[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end else begin
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>'' then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo3.DisplayValues[1];
|
|
|
|
|
if not frm_data_share.t_crm_client_all.IsEmpty then
|
|
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>'' then
|
|
|
|
|
if frm_data_share.t_crm_client_all.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo3.DisplayValues[1],[]) then
|
|
|
|
|
begin
|
|
|
|
|
if trim(frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring)<>''then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>Ƶ<EFBFBD><C6B5><EFBFBD>']:=employee;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=0;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ϳ<EFBFBD><CFB3><EFBFBD>']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.post;
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
except
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice.State=dsinsert then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.cancel;
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
showmessage('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet2.show;
|
|
|
|
|
close;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.Insert;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='<27><>ϸ<EFBFBD><CFB8>Ʊ';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=trim(Edit1.Text);
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']:=wwDBLookupCombo6.Text;
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo1.DisplayValues[0]<>'' then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
|
|
|
|
|
if frm_data_share.t_code_subcomp.locate('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[0],[]) then
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD>̵ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('<27><><EFBFBD>̵ǼǺ<C7BC>').value;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['˰<><CBB0><EFBFBD>ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('˰<><CBB0><EFBFBD>ǼǺ<C7BC>').value;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo3.DisplayValues[1];
|
|
|
|
|
if not frm_data_share.t_crm_client_all.IsEmpty then
|
|
|
|
|
if frm_data_share.t_crm_client_all.locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo3.DisplayValues[1],[]) then
|
|
|
|
|
begin
|
|
|
|
|
if trim(frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring)<>''then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ̧ͷ']:=frm_data_share.t_crm_client_all.fieldbyname('<27><>Ʊ̧ͷ').asstring;
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
// frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.post;
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
|
|
|
|
|
except
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice.State=dsinsert then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.cancel;
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊʧ<C6B1>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet2.show;
|
|
|
|
|
Close;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
|
|
begin
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
try
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.Insert;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:='<27><><EFBFBD>뷢Ʊ';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=trim(Edit1.Text);
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']:=wwDBLookupCombo6.Text;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=edit2.text;
|
|
|
|
|
if RxDBLookupCombo1.DisplayValues[0]<>'' then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
|
|
|
|
|
if frm_data_share.t_code_subcomp.locate('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[0],[]) then
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD>̵ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('<27><><EFBFBD>̵ǼǺ<C7BC>').AsString;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['˰<><CBB0><EFBFBD>ǼǺ<C7BC>']:=frm_data_share.t_code_subcomp.fieldbyname('˰<><CBB0><EFBFBD>ǼǺ<C7BC>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>;<3B>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',vararrayof([frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],subcomp]),[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end else begin
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end else begin
|
|
|
|
|
if frm_ch_invoice.t_sys_bank.Locate('<27>ұ<EFBFBD>',frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>'],[]) then begin
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_ch_invoice.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ̧ͷ']:=frm_ch_invoice.t_ch_invoice_shen['<27><>Ʊ̧ͷ'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ᵥ<EFBFBD><E1B5A5>']:=frm_ch_invoice.t_ch_invoice_shen['<27>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['ί<>б<EFBFBD><D0B1><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['ί<>б<EFBFBD><D0B1><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD>˸<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD>˸<EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['ж<><D0B6><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['ж<><D0B6><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['Ŀ<>ĸ<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['Ŀ<>ĸ<EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>ע']:=frm_ch_invoice.t_ch_invoice_shen['<27><>ע'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ϼƽ<CFBC><C6BD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['ʵ<>ʽ<EFBFBD><CABD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27>鿪<EFBFBD><E9BFAA><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27>ұ<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27>ұ<EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>˰<EFBFBD><CBB0>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><>˰<EFBFBD><CBB0>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>ַ<EFBFBD>绰']:=frm_ch_invoice.t_ch_invoice_shen['<27><>ַ<EFBFBD>绰'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>˺<EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>˺<EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><><EFBFBD><EFBFBD>']:=frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>Ʊ']:=frm_ch_invoice.t_ch_invoice_shen['<27><>Ʊ'];
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['˰<><CBB0>']:=frm_ch_invoice.t_ch_invoice_shen['˰<><CBB0>'];
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
if not frm_ch_invoice.t_ch_invoice.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice['<27><>ע']:=frm_ch_invoice.t_ch_invoice.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asString+#13#10+frm_ch_invoice.t_ch_invoice.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').asString+#13#10+frm_ch_invoice.t_ch_invoice.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').asString+#13#10+frm_ch_invoice.t_ch_invoice.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asString
|
|
|
|
|
else frm_ch_invoice.t_ch_invoice['<27><>ע']:=frm_ch_invoice.t_ch_invoice.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asString+#13#10+frm_ch_invoice.t_ch_invoice.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').asString+#13#10+frm_ch_invoice.t_ch_invoice.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').asString;
|
|
|
|
|
}
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.post;
|
|
|
|
|
|
|
|
|
|
alistBsNo:=TStringList.Create;
|
|
|
|
|
alistBsNo.Clear;
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.Add('select * from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'''');
|
|
|
|
|
open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
first;
|
|
|
|
|
while not eof do
|
|
|
|
|
begin
|
|
|
|
|
if alistBsNo.IndexOf(fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring)<0 then
|
|
|
|
|
alistBsNo.Add(fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring);
|
|
|
|
|
next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
if alistBsNo.Count>=1 then
|
|
|
|
|
begin
|
|
|
|
|
for i :=0 to alistBsNo.Count-1 do
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
UpdateInviceRemarks(alistBsNo[i],'t_op_seae');
|
|
|
|
|
UpdateInviceRemarks(alistBsNo[i],'t_op_Aire');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
alistBsNo.Free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.Add('select * from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+'''');
|
|
|
|
|
open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
first;
|
|
|
|
|
while not eof do
|
|
|
|
|
begin
|
|
|
|
|
edit;
|
|
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').Asstring:='1';
|
|
|
|
|
post;
|
|
|
|
|
next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if StrToBool(get_parameters_value(321,'false')) then
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.Add('select ch_id,<2C><><EFBFBD><EFBFBD>״̬,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee where ch_id in ( select ch_id from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+''''+') and <20><><EFBFBD><EFBFBD>״̬=''<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
|
|
|
|
|
open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
first;
|
|
|
|
|
while not eof do
|
|
|
|
|
begin
|
|
|
|
|
if fieldbyname('<27><><EFBFBD><EFBFBD>״̬').Asstring='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
edit;
|
|
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>״̬').Asstring:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
|
|
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=now;
|
|
|
|
|
post;
|
|
|
|
|
end;
|
|
|
|
|
next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
bQuery:=CreateAdoQuery;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
with bQuery do
|
|
|
|
|
begin
|
|
|
|
|
Close;sql.Clear;
|
|
|
|
|
SQL.Add('Insert into t_ch_invoice_item ( IN_ID, <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>,<2C><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, ˰<><CBB0> ,˰<><CBB0> ,<2C>ۿ<EFBFBD>,<2C><>ע,<2C><>˰<EFBFBD>۱<EFBFBD>־ )');
|
|
|
|
|
SQL.Add('values (:IN_ID,:<3A><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>, :˰<><CBB0>,:˰<><CBB0>,:<3A>ۿ<EFBFBD>,:<3A><>ע,:<3A><>˰<EFBFBD>۱<EFBFBD>־)');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
close;sql.clear;
|
|
|
|
|
sql.Add('select * from t_ch_invoice_shen_item where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=frm_ch_invoice.t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
first;
|
|
|
|
|
while not eof do
|
|
|
|
|
begin
|
|
|
|
|
bQuery.close;
|
|
|
|
|
bQuery.Parameters.ParamByName('IN_ID').Value:=frm_ch_invoice.t_ch_invoice.FieldByName('IN_ID').AsInteger;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>').Value:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>').AsString;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ').Value:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ').AsString;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('˰<><CBB0>').Value:=fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('˰<><CBB0>').Value:=fieldbyname('˰<><CBB0>').AsFloat;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27>ۿ<EFBFBD>').Value:=0;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><>ע').Value:=frm_ch_invoice.t_ch_invoice_shen.fieldbyname('<27><>ע').AsString;;
|
|
|
|
|
bQuery.Parameters.ParamByName('<27><>˰<EFBFBD>۱<EFBFBD>־').Value:=0;
|
|
|
|
|
bQuery.ExecSQL;
|
|
|
|
|
next;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
FeeList:=TStringList.Create;
|
|
|
|
|
FeeList.Clear;
|
|
|
|
|
AmtList:=TStringList.Create;
|
|
|
|
|
|
|
|
|
|
AmtList.Clear;
|
|
|
|
|
FeeList.Text:=Trim(frm_ch_invoice.t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').AsString);
|
|
|
|
|
AmtList.Text:=Trim(frm_ch_invoice.t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>').AsString);
|
|
|
|
|
if FeeList.Count=AmtList.Count then
|
|
|
|
|
begin
|
|
|
|
|
if (FeeList.Count>=1) and (AmtList.Count>=1) then
|
|
|
|
|
begin
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;sql.Clear;
|
|
|
|
|
SQL.Add('Delete from t_ch_invoice_item');
|
|
|
|
|
SQL.Add('where IN_ID=:IN_ID');
|
|
|
|
|
Parameters.ParamByName('IN_ID').Value:=frm_ch_invoice.t_ch_invoice.FieldByName('IN_ID').asinteger;
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if FeeList.Count>=1 then
|
|
|
|
|
begin
|
|
|
|
|
for i :=0 to FeeList.Count-1 do
|
|
|
|
|
begin
|
|
|
|
|
Amt:=0;
|
|
|
|
|
Close;sql.Clear;
|
|
|
|
|
SQL.Add('Insert into t_ch_invoice_item ( IN_ID, <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>,<2C><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, ˰<><CBB0> ,˰<><CBB0> ,<2C>ۿ<EFBFBD>,<2C><>ע,<2C><>˰<EFBFBD>۱<EFBFBD>־ )');
|
|
|
|
|
SQL.Add('values (:IN_ID,:<3A><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>, :˰<><CBB0>,:˰<><CBB0>,:<3A>ۿ<EFBFBD>,:<3A><>ע,:<3A><>˰<EFBFBD>۱<EFBFBD>־)');
|
|
|
|
|
Parameters.ParamByName('IN_ID').Value:=frm_ch_invoice.t_ch_invoice.FieldByName('IN_ID').asinteger;
|
|
|
|
|
if pos('<27><><EFBFBD><EFBFBD>',FeeList[i])>0 then
|
|
|
|
|
Parameters.ParamByName('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').Value:=FeeList[i]
|
|
|
|
|
else Parameters.ParamByName('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').Value:='<27><><EFBFBD><EFBFBD>'+FeeList[i];
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD>').Value:='0';
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ').Value:='Ʊ';
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=1;
|
|
|
|
|
Amt:=StrToFloat(AmtList[i]);
|
|
|
|
|
Parameters.ParamByName('˰<><CBB0>').Value:=(Amt/(1+frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat/100))*frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat/100;
|
|
|
|
|
Parameters.ParamByName('<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').Value:=Amt;
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=Amt-Parameters.ParamByName('˰<><CBB0>').Value;
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=Amt-Parameters.ParamByName('˰<><CBB0>').Value;
|
|
|
|
|
Parameters.ParamByName('˰<><CBB0>').Value:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat/100;
|
|
|
|
|
Parameters.ParamByName('<27>ۿ<EFBFBD>').Value:=0;
|
|
|
|
|
Parameters.ParamByName('<27><>ע').Value:=frm_ch_invoice.t_ch_invoice.FieldByName('<27><>ע').asString;
|
|
|
|
|
Parameters.ParamByName('<27><>˰<EFBFBD>۱<EFBFBD>־').Value:=0;
|
|
|
|
|
ExecSQL;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD>Ŀ');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
finally
|
|
|
|
|
FeeList.Free;
|
|
|
|
|
AmtList.Free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
FreeAndNil(bQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.Open;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.Refresh;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen.Edit;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=trim(Edit1.Text);
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_shen.post;
|
|
|
|
|
modify_all:=false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
|
|
finally
|
|
|
|
|
if frm_main.db.InTransaction then
|
|
|
|
|
begin
|
|
|
|
|
if frm_ch_invoice.t_ch_invoice.State=dsinsert then
|
|
|
|
|
frm_ch_invoice.t_ch_invoice.cancel;
|
|
|
|
|
modify_all:=true;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊʧ<C6B1>ܣ<EFBFBD><DCA3><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
if modify_all then
|
|
|
|
|
Send_invocie_check_check('<27><><EFBFBD>뷢Ʊ<EBB7A2><C6B1><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+frm_ch_invoice.t_ch_invoice_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
|
|
|
|
|
+',<2C>ͻ<EFBFBD>:'+frm_ch_invoice.t_ch_invoice_shen.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,frm_ch_invoice.t_ch_invoice_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'25');
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet2.show;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.Close;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.Open;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.FieldByName('<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').OnChange:=frm_ch_invoice.t_ch_invoice_itemvatPriceFieldChange;
|
|
|
|
|
frm_ch_invoice.t_ch_invoice_item.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=frm_ch_invoice.t_ch_invoice_itemvatPriceFieldChange;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if StrToBool(get_parameters_value(85,'false')) then
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet8.TabVisible:=false;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet9.TabVisible:=false;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet10.TabVisible:=false;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet12.TabVisible:=false;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet13.TabVisible:=true;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.v_fee_do_bscard.Close;
|
|
|
|
|
frm_ch_invoice.v_fee_do_bscard.DataSource:=frm_ch_invoice.t_ch_invoice1;
|
|
|
|
|
frm_ch_invoice.v_fee_do_bscard.Open;
|
|
|
|
|
frm_ch_invoice.ADOQuery1.Close;
|
|
|
|
|
frm_ch_invoice.ADOQuery2.Close;
|
|
|
|
|
frm_ch_invoice.ADOQuery3.Close;
|
|
|
|
|
frm_ch_invoice. ADOQuery4.Close;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet8.TabVisible:=true;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet9.TabVisible:=true;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet10.TabVisible:=true;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet12.TabVisible:=true;
|
|
|
|
|
frm_ch_invoice.bsSkinTabSheet13.TabVisible:=false;
|
|
|
|
|
|
|
|
|
|
frm_ch_invoice.ADOQuery1.open;
|
|
|
|
|
frm_ch_invoice.ADOQuery2.open;
|
|
|
|
|
frm_ch_invoice.ADOQuery3.open;
|
|
|
|
|
frm_ch_invoice.ADOQuery4.open;
|
|
|
|
|
frm_ch_invoice.v_fee_do_bscard.Close;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
|
|
frm_ch_invoice.bsSkinButton35.OnClick(nil);
|
|
|
|
|
close;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_invoice_add.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_invoice_add.FormShow(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
aQuery:TAdoQuery;
|
|
|
|
|
begin
|
|
|
|
|
if not if_reg(417) then bsSkinCheckRadioBox2.Visible:=false;
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('select <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> from t_ch_invoice where IN_ID=(select max(IN_ID) from t_ch_invoice where <20>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>='''+subComp+''')');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('select <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> from t_ch_invoice where IN_ID=(select max(IN_ID) from t_ch_invoice)');
|
|
|
|
|
Open;
|
|
|
|
|
end;
|
|
|
|
|
try
|
|
|
|
|
i:=strtoint(aQuery.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
Edit1.Text:=inttostr(i+1);
|
|
|
|
|
except
|
|
|
|
|
;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
RxDBLookupCombo1.DisplayValue:=subComp;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
'select @inv_no=()'
|
|
|
|
|
p_invoice_no.ExecProc;
|
|
|
|
|
try
|
|
|
|
|
i:=strtoint(p_invoice_no.Parameters[1].value);
|
|
|
|
|
Edit1.Text:=inttostr(i+1);
|
|
|
|
|
except
|
|
|
|
|
;
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_invoice_add.Edit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
frm_ch_invoice_add.bsSkinButton1Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|