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.

1208 lines
40 KiB
Plaintext

11 months ago
unit u_ch_balance_accept;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
ADODB, dxDBTLCl, dxGrClms, u_ch_delete_do, u_ch_add_do, bsdbctrls,
RxLookup, StdCtrls, Mask, DBCtrls, wwdbedit, Wwdotdot, Wwdbcomb, Menus,
XPMenu, ComCtrls, bsSkinTabs;
type
Tfrm_ch_balance_accept = class(TForm)
t_ch_balance: TADOQuery;
t_ch_balance1: TDataSource;
t_ch_fee_do: TADOQuery;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
XPMenu1: TXPMenu;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
DBEdit2: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Label25: TLabel;
Label17: TLabel;
Label12: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
DBEdit14: TDBEdit;
DBEdit1: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBMemo1: TDBMemo;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
RxDBLookupCombo3: TRxDBLookupCombo;
bsSkinPanel4: TbsSkinPanel;
bsSkinPanel5: TbsSkinPanel;
Label11: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
DBEdit3: TDBEdit;
DBEdit7: TDBEdit;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBComboBox2: TwwDBComboBox;
RxDBLookupCombo5: TRxDBLookupCombo;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
RxDBLookupCombo6: TRxDBLookupCombo;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBMemo2: TDBMemo;
RxDBLookupCombo7: TRxDBLookupCombo;
DBEdit18: TDBEdit;
bsSkinPageControl2: TbsSkinPageControl;
bsSkinTabSheet3: TbsSkinTabSheet;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
bsSkinTabSheet4: TbsSkinTabSheet;
dxDBGrid3: TdxDBGrid;
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
dxDBGridDateColumn3: TdxDBGridDateColumn;
dxDBGridDateColumn4: TdxDBGridDateColumn;
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
dxDBGridDateColumn5: TdxDBGridDateColumn;
dxDBGridDateColumn6: TdxDBGridDateColumn;
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
bsSkinTabSheet6: TbsSkinTabSheet;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
dxDBGridDateColumn7: TdxDBGridDateColumn;
dxDBGridDateColumn8: TdxDBGridDateColumn;
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridColumn16: TdxDBGridColumn;
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
fra_ch_delete_do1: Tfra_ch_delete_do;
fra_ch_add_do1: Tfra_ch_add_do;
t_ch_invoice_shen: TADOQuery;
t_ch_invoice_shen1: TDataSource;
v_fee_do_seae: TADOQuery;
v_fee_do_seae1: TDataSource;
v_fee_do_seai: TADOQuery;
v_fee_do_seai1: TDataSource;
v_fee_do_aire: TADOQuery;
v_fee_do_aire1: TDataSource;
v_fee_do_airi: TADOQuery;
v_fee_do_airi1: TDataSource;
bsSkinPanel6: TbsSkinPanel;
bsSkinPageControl3: TbsSkinPageControl;
bsSkinTabSheet7: TbsSkinTabSheet;
dxDBGrid6: TdxDBGrid;
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
dxDBGridDateColumn9: TdxDBGridDateColumn;
dxDBGridDateColumn10: TdxDBGridDateColumn;
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
dxDBGridMaskColumn65: TdxDBGridMaskColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridMaskColumn66: TdxDBGridMaskColumn;
dxDBGridMaskColumn67: TdxDBGridMaskColumn;
dxDBGridMaskColumn68: TdxDBGridMaskColumn;
dxDBGridMaskColumn69: TdxDBGridMaskColumn;
bsSkinTabSheet8: TbsSkinTabSheet;
dxDBGrid7: TdxDBGrid;
dxDBGridMaskColumn70: TdxDBGridMaskColumn;
dxDBGridMaskColumn71: TdxDBGridMaskColumn;
dxDBGridMaskColumn72: TdxDBGridMaskColumn;
dxDBGridMaskColumn73: TdxDBGridMaskColumn;
dxDBGridMaskColumn74: TdxDBGridMaskColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridMaskColumn75: TdxDBGridMaskColumn;
dxDBGridDateColumn11: TdxDBGridDateColumn;
dxDBGridDateColumn12: TdxDBGridDateColumn;
dxDBGridMaskColumn76: TdxDBGridMaskColumn;
dxDBGridMaskColumn77: TdxDBGridMaskColumn;
dxDBGridMaskColumn78: TdxDBGridMaskColumn;
dxDBGridMaskColumn79: TdxDBGridMaskColumn;
dxDBGridMaskColumn80: TdxDBGridMaskColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridMaskColumn81: TdxDBGridMaskColumn;
dxDBGridMaskColumn82: TdxDBGridMaskColumn;
dxDBGridMaskColumn83: TdxDBGridMaskColumn;
dxDBGridMaskColumn84: TdxDBGridMaskColumn;
bsSkinTabSheet9: TbsSkinTabSheet;
dxDBGrid8: TdxDBGrid;
dxDBGridMaskColumn85: TdxDBGridMaskColumn;
dxDBGridMaskColumn86: TdxDBGridMaskColumn;
dxDBGridMaskColumn87: TdxDBGridMaskColumn;
dxDBGridMaskColumn88: TdxDBGridMaskColumn;
dxDBGridMaskColumn89: TdxDBGridMaskColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGridColumn26: TdxDBGridColumn;
dxDBGridMaskColumn90: TdxDBGridMaskColumn;
dxDBGridDateColumn13: TdxDBGridDateColumn;
dxDBGridDateColumn14: TdxDBGridDateColumn;
dxDBGridMaskColumn91: TdxDBGridMaskColumn;
dxDBGridMaskColumn92: TdxDBGridMaskColumn;
dxDBGridMaskColumn93: TdxDBGridMaskColumn;
dxDBGridColumn27: TdxDBGridColumn;
dxDBGridColumn28: TdxDBGridColumn;
dxDBGridMaskColumn94: TdxDBGridMaskColumn;
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
dxDBGridMaskColumn96: TdxDBGridMaskColumn;
bsSkinTabSheet10: TbsSkinTabSheet;
dxDBGrid9: TdxDBGrid;
dxDBGridMaskColumn97: TdxDBGridMaskColumn;
dxDBGridMaskColumn98: TdxDBGridMaskColumn;
dxDBGridMaskColumn99: TdxDBGridMaskColumn;
dxDBGridMaskColumn100: TdxDBGridMaskColumn;
dxDBGridMaskColumn101: TdxDBGridMaskColumn;
dxDBGridColumn29: TdxDBGridColumn;
dxDBGridColumn30: TdxDBGridColumn;
dxDBGridMaskColumn102: TdxDBGridMaskColumn;
dxDBGridDateColumn15: TdxDBGridDateColumn;
dxDBGridDateColumn16: TdxDBGridDateColumn;
dxDBGridMaskColumn103: TdxDBGridMaskColumn;
dxDBGridMaskColumn104: TdxDBGridMaskColumn;
dxDBGridMaskColumn105: TdxDBGridMaskColumn;
dxDBGridColumn31: TdxDBGridColumn;
dxDBGridColumn32: TdxDBGridColumn;
dxDBGridMaskColumn106: TdxDBGridMaskColumn;
dxDBGridMaskColumn107: TdxDBGridMaskColumn;
dxDBGridMaskColumn108: TdxDBGridMaskColumn;
dxDBGrid10: TdxDBGrid;
dxDBGridMaskColumn109: TdxDBGridMaskColumn;
dxDBGridMaskColumn110: TdxDBGridMaskColumn;
dxDBGridMaskColumn111: TdxDBGridMaskColumn;
dxDBGridMaskColumn112: TdxDBGridMaskColumn;
dxDBGridColumn33: TdxDBGridColumn;
dxDBGridColumn34: TdxDBGridColumn;
dxDBGridColumn35: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridDateColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridDateColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridDateColumn;
bsSkinPanel7: TbsSkinPanel;
bsSkinPanel8: TbsSkinPanel;
bsSkinButton21: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
Label29: TLabel;
DBEdit19: TDBEdit;
Label30: TLabel;
DBEdit20: TDBEdit;
Label31: TLabel;
DBEdit21: TDBEdit;
Label32: TLabel;
DBEdit22: TDBEdit;
Label33: TLabel;
DBEdit23: TDBEdit;
Label34: TLabel;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
Label35: TLabel;
DBEdit26: TDBEdit;
Label36: TLabel;
DBEdit27: TDBEdit;
Label37: TLabel;
Label38: TLabel;
DBEdit28: TDBEdit;
Label39: TLabel;
DBEdit29: TDBEdit;
Label40: TLabel;
DBEdit30: TDBEdit;
Label41: TLabel;
DBEdit31: TDBEdit;
Label42: TLabel;
DBMemo3: TDBMemo;
Label43: TLabel;
DBMemo4: TDBMemo;
t_ch_fee_do_invoice: TADOQuery;
v_fee_do_seae_sum: TADOQuery;
v_fee_do_seae_sum1: TDataSource;
v_fee_do_seai_sum1: TDataSource;
v_fee_do_seai_sum: TADOQuery;
v_fee_do_aire_sum: TADOQuery;
v_fee_do_aire_sum1: TDataSource;
v_fee_do_airi_sum: TADOQuery;
v_fee_do_airi_sum1: TDataSource;
bsSkinButton12: TbsSkinButton;
dxDBGrid2Column22: TdxDBGridColumn;
dxDBGrid3Column22: TdxDBGridColumn;
dxDBGrid4Column19: TdxDBGridColumn;
dxDBGrid5Column19: TdxDBGridColumn;
dxDBGrid6Column22: TdxDBGridColumn;
dxDBGrid7Column22: TdxDBGridColumn;
dxDBGrid8Column19: TdxDBGridColumn;
dxDBGrid9Column19: TdxDBGridColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGrid3Column23: TdxDBGridColumn;
dxDBGrid4Column20: TdxDBGridColumn;
dxDBGrid5Column20: TdxDBGridColumn;
dxDBGrid11: TdxDBGrid;
dxDBGrid5Column4: TdxDBGridColumn;
dxDBGrid5Column1: TdxDBGridMaskColumn;
dxDBGrid5Column2: TdxDBGridColumn;
dxDBGrid5Column5: TdxDBGridColumn;
dxDBGrid5Column6: TdxDBGridColumn;
dxDBGrid5Column3: TdxDBGridColumn;
dxDBGrid12: TdxDBGrid;
dxDBGrid6Column4: TdxDBGridColumn;
dxDBGridMaskColumn113: TdxDBGridMaskColumn;
dxDBGridColumn36: TdxDBGridColumn;
dxDBGrid6Column5: TdxDBGridColumn;
dxDBGrid6Column6: TdxDBGridColumn;
dxDBGridColumn43: TdxDBGridColumn;
dxDBGrid13: TdxDBGrid;
dxDBGrid7Column4: TdxDBGridColumn;
dxDBGridMaskColumn114: TdxDBGridMaskColumn;
dxDBGridColumn37: TdxDBGridColumn;
dxDBGrid7Column5: TdxDBGridColumn;
dxDBGrid7Column6: TdxDBGridColumn;
dxDBGridColumn44: TdxDBGridColumn;
dxDBGrid14: TdxDBGrid;
dxDBGrid8Column4: TdxDBGridColumn;
dxDBGridMaskColumn115: TdxDBGridMaskColumn;
dxDBGridColumn38: TdxDBGridColumn;
dxDBGrid8Column5: TdxDBGridColumn;
dxDBGrid8Column6: TdxDBGridColumn;
dxDBGridColumn45: TdxDBGridColumn;
dxDBGrid15: TdxDBGrid;
dxDBGridColumn39: TdxDBGridColumn;
dxDBGridMaskColumn116: TdxDBGridMaskColumn;
dxDBGridColumn46: TdxDBGridColumn;
dxDBGridColumn47: TdxDBGridColumn;
dxDBGridColumn48: TdxDBGridColumn;
dxDBGridColumn49: TdxDBGridColumn;
dxDBGrid16: TdxDBGrid;
dxDBGridColumn40: TdxDBGridColumn;
dxDBGridMaskColumn117: TdxDBGridMaskColumn;
dxDBGridColumn50: TdxDBGridColumn;
dxDBGridColumn51: TdxDBGridColumn;
dxDBGridColumn52: TdxDBGridColumn;
dxDBGridColumn53: TdxDBGridColumn;
dxDBGrid17: TdxDBGrid;
dxDBGridColumn41: TdxDBGridColumn;
dxDBGridMaskColumn118: TdxDBGridMaskColumn;
dxDBGridColumn54: TdxDBGridColumn;
dxDBGridColumn55: TdxDBGridColumn;
dxDBGridColumn56: TdxDBGridColumn;
dxDBGridColumn57: TdxDBGridColumn;
dxDBGrid18: TdxDBGrid;
dxDBGridColumn42: TdxDBGridColumn;
dxDBGridMaskColumn119: TdxDBGridMaskColumn;
dxDBGridColumn58: TdxDBGridColumn;
dxDBGridColumn59: TdxDBGridColumn;
dxDBGridColumn60: TdxDBGridColumn;
dxDBGridColumn61: TdxDBGridColumn;
Label44: TLabel;
DBEdit32: TDBEdit;
dxDBGrid2Column24: TdxDBGridColumn;
dxDBGrid3Column24: TdxDBGridColumn;
dxDBGrid4Column21: TdxDBGridColumn;
dxDBGrid5Column21: TdxDBGridColumn;
dxDBGrid6Column23: TdxDBGridColumn;
dxDBGrid7Column23: TdxDBGridColumn;
dxDBGrid8Column20: TdxDBGridColumn;
dxDBGrid9Column20: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure t_ch_balanceAfterInsert(DataSet: TDataSet);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_ch_balanceBeforePost(DataSet: TDataSet);
procedure DBEdit4Enter(Sender: TObject);
procedure t_ch_balanceBeforeEdit(DataSet: TDataSet);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure DBEdit1Change(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure t_ch_balanceAfterPost(DataSet: TDataSet);
procedure t_ch_balanceAfterDelete(DataSet: TDataSet);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure DBEdit2Change(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_ch_balance_accept: Tfrm_ch_balance_accept;
implementation
uses u_main, my_sys_function, u_ch_balance_query, u_data_share,
u_ch_invoice_do, u_ch_shen_query;
{$R *.dfm}
procedure Tfrm_ch_balance_accept.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_accept.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_ch_balance_accept.Hide;
frm_ch_balance_accept.ManualFloat(frm_ch_balance_accept.BoundsRect );
frm_main.freeTabs('frm_ch_balance_accept');
action:=cafree;
frm_ch_balance_accept:=nil;
end;
procedure Tfrm_ch_balance_accept.FormResize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/11);
bsSkinButton10.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton12.Width:=i;
end;
procedure Tfrm_ch_balance_accept.FormShow(Sender: TObject);
begin
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select * from t_ch_balance where <20>ʵ<EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD><EFBFBD>'+''''+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
t_ch_fee_do.open;
t_ch_invoice_shen.open;
t_ch_fee_do_invoice.open;
v_fee_do_seae.Open;
v_fee_do_seai.open;
v_fee_do_aire.open;
v_fee_do_airi.open;
v_fee_do_seae_sum.Open;
v_fee_do_seai_sum.open;
v_fee_do_aire_sum.open;
v_fee_do_airi_sum.open;
fra_ch_add_do1.do_ban1.DataSet:=t_ch_balance;
fra_ch_add_do1.bs_text.text:='3';
fra_ch_add_do1.t_ch_fee_do.open;
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
fra_ch_delete_do1.bs_text.Text:='3';
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_balance;
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_sys_bank.requery;
loadreggrid(dxdbgrid1,false,caption);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
if t_ch_balance.IsEmpty then
exit;
if DBEdit2.text='<27><><EFBFBD><EFBFBD>'then
begin
bsSkinNotebook1.PageIndex:=1;
end
else
begin
bsSkinNotebook1.PageIndex:=2;
end;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_ch_balance.post;
end;
if answer=mrNo then
begin
t_ch_balance.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
bsSkinNotebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterInsert(
DataSet: TDataSet);
begin
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27>Զ<EFBFBD>']:=1;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton1Click(Sender: TObject);
begin
t_ch_balance.insert;
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end;
procedure Tfrm_ch_balance_accept.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton4Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
begin
t_ch_fee_do.requery;
while not t_ch_fee_do.eof do
t_ch_fee_do.delete;
t_ch_balance.Delete;
t_ch_invoice_shen.requery;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_balance,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_balance,'<27>ұ<EFBFBD>');
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if t_ch_balance.FieldByName('<27>Զ<EFBFBD>').asboolean then
begin
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end
else
begin
{if t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']<>t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then
begin
showmessage('<27>ʵ<EFBFBD><CAB5>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEB2BB><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEA3A1>');
abort;
end; }
end;
if t_ch_balance.state=dsinsert then
t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'BA');
t_ch_balance['<27>ʵ<EFBFBD>״̬']:=t_ch_balance['<27>ʵ<EFBFBD>״̬'];
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_ch_balance_accept.DBEdit4Enter(Sender: TObject);
begin
if bsSkinDBCheckRadioBox1.Checked then
DBEdit4.ReadOnly:=true
else
DBEdit4.ReadOnly:=false;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceBeforeEdit(DataSet: TDataSet);
begin
if not modify_all then
begin
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo1Enter(Sender: TObject);
begin
if fra_ch_delete_do1.v_fee_do_seae.IsEmpty and fra_ch_delete_do1.v_fee_do_seai.IsEmpty
and fra_ch_delete_do1.v_fee_do_aire.IsEmpty and fra_ch_delete_do1.v_fee_do_airi.IsEmpty then
begin
RxDBLookupCombo1.ReadOnly:=false;
RxDBLookupCombo2.ReadOnly:=false;
end
else
begin
RxDBLookupCombo1.ReadOnly:=true;
RxDBLookupCombo2.ReadOnly:=true;
end;
end;
procedure Tfrm_ch_balance_accept.dxDBGrid1Column2CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if (ANode.strings[dxDBGrid1Column2.Index]='¼<><C2BC>״̬') then
AColor :=clwhite
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
AColor :=$00DDF21C;
AFont.Color:=clblack;
end;
procedure Tfrm_ch_balance_accept.DBEdit1Change(Sender: TObject);
begin
if (DBEdit1.Text='') or (DBEdit1.Text='¼<><C2BC>״̬')then
DBEdit1.Color:=clwhite
else if (DBEdit1.Text='<27><>׼<EFBFBD><D7BC>Ʊ') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
DBEdit1.Color:=$00DDF21C;
end;
procedure Tfrm_ch_balance_accept.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton9Click(Sender: TObject);
begin
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,t_ch_balance1,nil,nil,nil,
fra_ch_delete_do1.v_fee_do_seae1,fra_ch_delete_do1.v_fee_do_seai1,
fra_ch_delete_do1.v_fee_do_aire1,fra_ch_delete_do1.v_fee_do_airi1,
t_ch_balance1,fra_ch_delete_do1.v_fee_do_seae_sum1,fra_ch_delete_do1.v_fee_do_seai_sum1);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton6Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not if_open('033') 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_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'then
begin
showmessage('<27>ʵ<EFBFBD><CAB5>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
end
else
begin
try
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance.post;
modify_all:=false;
except
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton8Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not if_open('033') 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_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='¼<><C2BC>״̬'then
begin
showmessage('<27>ʵ<EFBFBD>û<EFBFBD>б<EFBFBD>Ҫȡ<D2AA><C8A1><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
end
else
begin
try
modify_all:=true;
t_ch_balance.edit;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance.post;
modify_all:=false;
except
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton10Click(Sender: TObject);
begin
try
frm_ch_balance_query:=tfrm_ch_balance_query.Create (self);
balance_query_type:=3;
frm_ch_balance_query.ShowModal;
finally
frm_ch_balance_query.Free;
end;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterPost(DataSet: TDataSet);
begin
case delete_do_type_num of
1:
begin
fra_ch_delete_do1.v_fee_do_seae.Requery;
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
end;
2:
begin
fra_ch_delete_do1.v_fee_do_seai.Requery;
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
end;
3:
begin
fra_ch_delete_do1.v_fee_do_aire.Requery;
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
end;
4:
begin
fra_ch_delete_do1.v_fee_do_airi.Requery;
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
end;
end;
{
case delete_do_type_num of
1,2,3,4:
begin
check_do_sum(3,t_ch_balance,
fra_ch_delete_do1.v_fee_do_seae_sum,fra_ch_delete_do1.v_fee_do_seai_sum,
fra_ch_delete_do1.v_fee_do_aire_sum,fra_ch_delete_do1.v_fee_do_airi_sum);
end;
end;
}
if if_ch_delete_do then
begin
case delete_do_type_num of
1,2,3,4:
begin
if fra_ch_add_do1.t_op_seae.Active then
begin
fra_ch_add_do1.t_ch_fee.Requery();
fra_ch_add_do1.t_ch_fee_sum.Requery();
end;
end;
end;
end;
delete_do_type_num:=0;
if_ch_delete_do:=false;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterDelete(
DataSet: TDataSet);
begin
if fra_ch_add_do1.t_op_seae.Active then
fra_ch_add_do1.t_op_seae.Requery();
if fra_ch_add_do1.t_op_seai.Active then
fra_ch_add_do1.t_op_seai.Requery();
if fra_ch_add_do1.t_op_aire.Active then
fra_ch_add_do1.t_op_aire.Requery();
if fra_ch_add_do1.t_op_airi.Active then
fra_ch_add_do1.t_op_airi.Requery();
end;
procedure Tfrm_ch_balance_accept.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit1);
end;
procedure Tfrm_ch_balance_accept.DBEdit1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox1);
end;
procedure Tfrm_ch_balance_accept.wwDBComboBox1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_ch_balance_accept.DBEdit4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_ch_balance_accept.DBEdit5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_ch_balance_accept.DBEdit6KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
end;
procedure Tfrm_ch_balance_accept.bsSkinDBCheckRadioBox1KeyPress(
Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo3);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_ch_balance_accept.DBEdit8KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_ch_balance_accept.DBEdit9KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_ch_balance_accept.DBEdit10KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_ch_balance_accept.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,2);
end;
procedure Tfrm_ch_balance_accept.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_ch_balance,'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo2Change(Sender: TObject);
begin
if (t_ch_balance.state=dsinsert)or(t_ch_balance1.state=dsedit)then
begin
if RxDBLookupCombo2.DisplayValues[0]<>''then
begin
if frm_data_share.t_sys_bank.Locate('<27>ұ<EFBFBD>',RxDBLookupCombo2.DisplayValues[0],[])then
begin
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
end;
procedure Tfrm_ch_balance_accept.DBEdit2Change(Sender: TObject);
begin
if bsSkinNotebook1.PageIndex<>0 then
begin
if DBEdit2.text='<27><><EFBFBD><EFBFBD>'then
begin
bsSkinNotebook1.PageIndex:=1;
end
else
begin
bsSkinNotebook1.PageIndex:=2;
end;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton7Click(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 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOT IN (SELECT DISTINCT t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' FROM t_ch_fee_do INNER JOIN t_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID AND'
+' t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> >(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AND'
+' t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'1'+''''+')) AND (<28><><EFBFBD><EFBFBD>״̬ = '+''''
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ'+''''+')'
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton21Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton25Click(Sender: TObject);
begin
if t_ch_invoice_shen.IsEmpty then
exit;
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>շѣ<D5B7><D1A3><EFBFBD>');
exit;
end;
try
frm_ch_invoice_do:=tfrm_ch_invoice_do.Create (self);
frm_ch_invoice_do.Memo1.text:='<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>:'+t_ch_invoice_shen.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring;
frm_ch_invoice_do.ShowModal;
finally
frm_ch_invoice_do.Free;
frm_ch_invoice_do:=nil;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton24Click(Sender: TObject);
begin
try
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
shen_query_type:=7;
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_balance_accept.bsSkinButton12Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_balance.IsEmpty then
exit;
try
afield := vararraycreate([0,t_ch_balance.fieldcount-1],varvariant);
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
afield[i] :=t_ch_balance.fields[i].value ;
end;
t_ch_balance.insert;
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
if t_ch_balance.fields[i].FieldName<>'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'then
t_ch_balance.fields[i].value := afield[i] ;
end;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27>Զ<EFBFBD>']:=1;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance['<27><>ע']:='';
t_ch_balance['<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
except
if t_ch_balance.state=dsinsert then
t_ch_balance.cancel;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end.