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.

4180 lines
140 KiB
Plaintext

12 months ago
{$INCLUDE t_main.inc}
unit u_ch_balance_pay;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, u_ch_add_do, u_ch_delete_do, wwdbedit,
Wwdotdot, Wwdbcomb, StdCtrls, DBCtrls, bsSkinCtrls, bsdbctrls, RxLookup,
Mask, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner, Menus,
XPMenu, ComCtrls, bsSkinTabs, ExtCtrls, wwdbdatetimepicker, sncCurrency,
sncDBCurrency, ToolEdit, CurrEdit, RXDBCtrl, DBCtrlsEh, AAFont, AACtrls,
RxMemDS, bsSkinGrids, bsDBGrids, cxStyles, cxCustomData, cxGraphics,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, cxCurrencyEdit, cxContainer, cxTextEdit,
cxMaskEdit, cxDropDownEdit, cxCalc, cxDBEdit;
type
Tfrm_ch_balance_pay = class(TForm)
t_ch_balance: TADOQuery;
t_ch_balance1: TDataSource;
t_ch_fee_do: TADOQuery;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinNotebook1: TbsSkinNotebook;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
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;
fra_ch_delete_do1: Tfra_ch_delete_do;
fra_ch_add_do1: Tfra_ch_add_do;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
t_ch_check1: TDataSource;
t_ch_check: TADOQuery;
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_airi: TADOQuery;
v_fee_do_airi1: TDataSource;
v_fee_do_aire1: TDataSource;
Panel1: TPanel;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
bsSkinPanel4: TbsSkinPanel;
Label11: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label18: TLabel;
Label20: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label26: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit7: TDBEdit;
DBEdit11: TDBEdit;
DBEdit13: TDBEdit;
DBMemo2: TDBMemo;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBEdit18: TDBEdit;
DBEdit12: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
bsSkinButton21: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
DBEdit15: TDBEdit;
bsSkinPanel6: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label38: TLabel;
DBEdit27: TDBEdit;
Label39: TLabel;
DBEdit28: TDBEdit;
Label40: TLabel;
DBEdit29: TDBEdit;
Label41: TLabel;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
Label42: TLabel;
DBEdit32: TDBEdit;
Label43: TLabel;
Label44: TLabel;
DBEdit33: TDBEdit;
Label45: TLabel;
DBEdit34: TDBEdit;
DBEdit35: TDBEdit;
Label46: TLabel;
DBEdit36: TDBEdit;
Label47: TLabel;
Label48: TLabel;
DBMemo4: TDBMemo;
bsSkinGroupBox2: TbsSkinGroupBox;
Label19: TLabel;
DBEdit19: TDBEdit;
Label21: TLabel;
DBEdit20: TDBEdit;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
DBEdit22: TDBEdit;
Label31: TLabel;
DBEdit21: TDBEdit;
Label30: TLabel;
Label32: TLabel;
DBEdit23: TDBEdit;
Label33: TLabel;
Label34: TLabel;
DBEdit26: TDBEdit;
Label36: TLabel;
DBEdit25: TDBEdit;
Label35: TLabel;
Label37: TLabel;
DBMemo3: TDBMemo;
DBEdit37: TDBEdit;
Label49: TLabel;
DBEdit39: TDBEdit;
t_ch_check_detail: TADOQuery;
t_ch_check_detail1: TDataSource;
DBEdit40: TDBEdit;
DBEdit41: TDBEdit;
bsSkinPanel7: TbsSkinPanel;
DBEdit42: TDBEdit;
p_update: TADOStoredProc;
t_ch_fee_do_check: TADOQuery;
bsSkinButton7: TbsSkinButton;
dxDBGrid2Column12: TdxDBGridColumn;
Label50: TLabel;
DBEdit43: TDBEdit;
Label51: TLabel;
DBEdit44: TDBEdit;
bsSkinButton12: TbsSkinButton;
Label52: TLabel;
DBEdit45: TDBEdit;
Label53: TLabel;
DBEdit46: TDBEdit;
PopupMenu3: TPopupMenu;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N1: TMenuItem;
N6: TMenuItem;
N5: TMenuItem;
N4: TMenuItem;
Label54: TLabel;
DBEdit47: TDBEdit;
Label55: TLabel;
DBEdit48: TDBEdit;
bsSkinButton13: TbsSkinButton;
dxDBGrid1Column16: TdxDBGridColumn;
v_fee_do_seae_sum: TADOQuery;
v_fee_do_seae_sum1: TDataSource;
v_fee_do_seai_sum: TADOQuery;
v_fee_do_seai_sum1: TDataSource;
v_fee_do_aire_sum: TADOQuery;
v_fee_do_aire_sum1: TDataSource;
v_fee_do_airi_sum: TADOQuery;
v_fee_do_airi_sum1: TDataSource;
bsSkinPageControl2: TbsSkinPageControl;
bsSkinTabSheet3: TbsSkinTabSheet;
dxDBGrid6: TdxDBGrid;
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
dxDBGrid6Column22: TdxDBGridColumn;
dxDBGridDateColumn9: TdxDBGridDateColumn;
dxDBGridDateColumn10: TdxDBGridDateColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
dxDBGrid11: TdxDBGrid;
dxDBGrid5Column4: TdxDBGridColumn;
dxDBGrid5Column1: TdxDBGridMaskColumn;
dxDBGrid5Column2: TdxDBGridColumn;
dxDBGrid5Column5: TdxDBGridColumn;
dxDBGrid5Column6: TdxDBGridColumn;
dxDBGrid5Column3: TdxDBGridColumn;
bsSkinTabSheet4: TbsSkinTabSheet;
dxDBGrid3: TdxDBGrid;
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridDateColumn3: TdxDBGridDateColumn;
dxDBGridDateColumn4: TdxDBGridDateColumn;
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
dxDBGrid12: TdxDBGrid;
dxDBGrid6Column4: TdxDBGridColumn;
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
dxDBGridColumn36: TdxDBGridColumn;
dxDBGrid6Column5: TdxDBGridColumn;
dxDBGrid6Column6: TdxDBGridColumn;
dxDBGridColumn43: TdxDBGridColumn;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
dxDBGrid8Column19: TdxDBGridColumn;
dxDBGridDateColumn5: TdxDBGridDateColumn;
dxDBGridDateColumn6: TdxDBGridDateColumn;
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
dxDBGrid13: TdxDBGrid;
dxDBGrid7Column4: TdxDBGridColumn;
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
dxDBGridColumn37: TdxDBGridColumn;
dxDBGrid7Column5: TdxDBGridColumn;
dxDBGrid7Column6: TdxDBGridColumn;
dxDBGridColumn44: TdxDBGridColumn;
bsSkinTabSheet6: TbsSkinTabSheet;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
dxDBGridColumn16: TdxDBGridColumn;
dxDBGridDateColumn7: TdxDBGridDateColumn;
dxDBGridDateColumn8: TdxDBGridDateColumn;
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
dxDBGridColumn38: TdxDBGridColumn;
dxDBGridColumn45: TdxDBGridColumn;
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
dxDBGridMaskColumn115: TdxDBGridMaskColumn;
dxDBGridMaskColumn116: TdxDBGridMaskColumn;
dxDBGrid14: TdxDBGrid;
dxDBGrid8Column4: TdxDBGridColumn;
dxDBGridMaskColumn117: TdxDBGridMaskColumn;
dxDBGridColumn46: TdxDBGridColumn;
dxDBGrid8Column5: TdxDBGridColumn;
dxDBGrid8Column6: TdxDBGridColumn;
dxDBGridColumn47: TdxDBGridColumn;
bsSkinPageControl3: TbsSkinPageControl;
bsSkinTabSheet7: TbsSkinTabSheet;
dxDBGrid7: TdxDBGrid;
dxDBGrid2Column22: TdxDBGridColumn;
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
dxDBGridMaskColumn65: TdxDBGridMaskColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridMaskColumn66: TdxDBGridMaskColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGridDateColumn11: TdxDBGridDateColumn;
dxDBGridDateColumn12: TdxDBGridDateColumn;
dxDBGridMaskColumn67: TdxDBGridMaskColumn;
dxDBGridMaskColumn68: TdxDBGridMaskColumn;
dxDBGridMaskColumn69: TdxDBGridMaskColumn;
dxDBGridMaskColumn70: TdxDBGridMaskColumn;
dxDBGridMaskColumn71: TdxDBGridMaskColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridMaskColumn72: TdxDBGridMaskColumn;
dxDBGridMaskColumn73: TdxDBGridMaskColumn;
dxDBGridMaskColumn74: TdxDBGridMaskColumn;
dxDBGridMaskColumn75: TdxDBGridMaskColumn;
dxDBGrid15: TdxDBGrid;
dxDBGridColumn39: TdxDBGridColumn;
dxDBGridMaskColumn76: TdxDBGridMaskColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGridColumn48: TdxDBGridColumn;
dxDBGridColumn49: TdxDBGridColumn;
bsSkinTabSheet8: TbsSkinTabSheet;
dxDBGrid8: TdxDBGrid;
dxDBGrid3Column22: TdxDBGridColumn;
dxDBGridMaskColumn77: TdxDBGridMaskColumn;
dxDBGridMaskColumn78: TdxDBGridMaskColumn;
dxDBGridMaskColumn79: TdxDBGridMaskColumn;
dxDBGridMaskColumn80: TdxDBGridMaskColumn;
dxDBGridMaskColumn81: TdxDBGridMaskColumn;
dxDBGridColumn26: TdxDBGridColumn;
dxDBGridColumn27: TdxDBGridColumn;
dxDBGridMaskColumn82: TdxDBGridMaskColumn;
dxDBGrid3Column23: TdxDBGridColumn;
dxDBGridDateColumn13: TdxDBGridDateColumn;
dxDBGridDateColumn14: TdxDBGridDateColumn;
dxDBGridMaskColumn83: TdxDBGridMaskColumn;
dxDBGridMaskColumn84: TdxDBGridMaskColumn;
dxDBGridMaskColumn85: TdxDBGridMaskColumn;
dxDBGridMaskColumn86: TdxDBGridMaskColumn;
dxDBGridMaskColumn87: TdxDBGridMaskColumn;
dxDBGridColumn28: TdxDBGridColumn;
dxDBGridColumn29: TdxDBGridColumn;
dxDBGridMaskColumn88: TdxDBGridMaskColumn;
dxDBGridMaskColumn89: TdxDBGridMaskColumn;
dxDBGridMaskColumn90: TdxDBGridMaskColumn;
dxDBGridMaskColumn91: TdxDBGridMaskColumn;
dxDBGrid16: TdxDBGrid;
dxDBGridColumn40: TdxDBGridColumn;
dxDBGridMaskColumn92: TdxDBGridMaskColumn;
dxDBGridColumn50: TdxDBGridColumn;
dxDBGridColumn51: TdxDBGridColumn;
dxDBGridColumn52: TdxDBGridColumn;
dxDBGridColumn53: TdxDBGridColumn;
bsSkinTabSheet9: TbsSkinTabSheet;
dxDBGrid9: TdxDBGrid;
dxDBGrid4Column19: TdxDBGridColumn;
dxDBGridMaskColumn93: TdxDBGridMaskColumn;
dxDBGridMaskColumn94: TdxDBGridMaskColumn;
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
dxDBGridMaskColumn96: TdxDBGridMaskColumn;
dxDBGridMaskColumn97: TdxDBGridMaskColumn;
dxDBGridColumn30: TdxDBGridColumn;
dxDBGridColumn31: TdxDBGridColumn;
dxDBGridMaskColumn98: TdxDBGridMaskColumn;
dxDBGrid4Column20: TdxDBGridColumn;
dxDBGridDateColumn15: TdxDBGridDateColumn;
dxDBGridDateColumn16: TdxDBGridDateColumn;
dxDBGridMaskColumn99: TdxDBGridMaskColumn;
dxDBGridMaskColumn100: TdxDBGridMaskColumn;
dxDBGridMaskColumn101: TdxDBGridMaskColumn;
dxDBGridColumn32: TdxDBGridColumn;
dxDBGridColumn33: TdxDBGridColumn;
dxDBGridMaskColumn102: TdxDBGridMaskColumn;
dxDBGridMaskColumn103: TdxDBGridMaskColumn;
dxDBGridMaskColumn104: TdxDBGridMaskColumn;
dxDBGrid17: TdxDBGrid;
dxDBGridColumn41: TdxDBGridColumn;
dxDBGridMaskColumn118: TdxDBGridMaskColumn;
dxDBGridColumn54: TdxDBGridColumn;
dxDBGridColumn55: TdxDBGridColumn;
dxDBGridColumn56: TdxDBGridColumn;
dxDBGridColumn57: TdxDBGridColumn;
bsSkinTabSheet10: TbsSkinTabSheet;
dxDBGrid10: TdxDBGrid;
dxDBGrid5Column19: TdxDBGridColumn;
dxDBGridMaskColumn105: TdxDBGridMaskColumn;
dxDBGridMaskColumn106: TdxDBGridMaskColumn;
dxDBGridMaskColumn107: TdxDBGridMaskColumn;
dxDBGridMaskColumn108: TdxDBGridMaskColumn;
dxDBGridMaskColumn109: TdxDBGridMaskColumn;
dxDBGridColumn34: TdxDBGridColumn;
dxDBGridColumn35: TdxDBGridColumn;
dxDBGridMaskColumn110: TdxDBGridMaskColumn;
dxDBGrid5Column20: TdxDBGridColumn;
dxDBGridDateColumn17: TdxDBGridDateColumn;
dxDBGridDateColumn18: TdxDBGridDateColumn;
dxDBGridMaskColumn111: TdxDBGridMaskColumn;
dxDBGridMaskColumn112: TdxDBGridMaskColumn;
dxDBGridMaskColumn113: TdxDBGridMaskColumn;
dxDBGridColumn42: TdxDBGridColumn;
dxDBGridColumn58: TdxDBGridColumn;
dxDBGridMaskColumn114: TdxDBGridMaskColumn;
dxDBGridMaskColumn119: TdxDBGridMaskColumn;
dxDBGridMaskColumn120: TdxDBGridMaskColumn;
dxDBGrid18: TdxDBGrid;
dxDBGridColumn59: TdxDBGridColumn;
dxDBGridMaskColumn121: TdxDBGridMaskColumn;
dxDBGridColumn60: TdxDBGridColumn;
dxDBGridColumn61: TdxDBGridColumn;
dxDBGridColumn62: TdxDBGridColumn;
dxDBGridColumn63: TdxDBGridColumn;
dxDBGrid6Column23: TdxDBGridColumn;
dxDBGrid3Column24: TdxDBGridColumn;
dxDBGrid4Column21: TdxDBGridColumn;
dxDBGrid5Column21: TdxDBGridColumn;
dxDBGrid7Column24: TdxDBGridColumn;
dxDBGrid8Column24: TdxDBGridColumn;
dxDBGrid9Column21: TdxDBGridColumn;
dxDBGrid10Column21: TdxDBGridColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridColumn;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column14: TdxDBGridColumn;
Label69: TLabel;
DBEdit57: TDBEdit;
Label70: TLabel;
DBEdit58: TDBEdit;
Label71: TLabel;
DBEdit59: TDBEdit;
Label72: TLabel;
DBEdit60: TDBEdit;
bsSkinPanel9: TbsSkinPanel;
Label73: TLabel;
Label74: TLabel;
Label75: TLabel;
Label77: TLabel;
Label78: TLabel;
Label80: TLabel;
Label81: TLabel;
Label82: TLabel;
Label84: TLabel;
Label85: TLabel;
Label86: TLabel;
Label87: TLabel;
DBEdit61: TDBEdit;
DBEdit62: TDBEdit;
DBEdit63: TDBEdit;
DBEdit64: TDBEdit;
DBMemo6: TDBMemo;
DBEdit66: TDBEdit;
DBEdit67: TDBEdit;
DBEdit68: TDBEdit;
DBEdit69: TDBEdit;
DBEdit71: TDBEdit;
DBEdit72: TDBEdit;
DBEdit73: TDBEdit;
DBEdit74: TDBEdit;
Label83: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinPanel10: TbsSkinPanel;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column20: TdxDBGridColumn;
bsSkinButton38: TbsSkinButton;
wwDBDateTimePicker3: TwwDBDateTimePicker;
bstab5: TbsSkinTabSheet;
dxDBGrid19: TdxDBGrid;
dxDBGridColumn64: TdxDBGridColumn;
dxDBGridMaskColumn122: TdxDBGridMaskColumn;
dxDBGridColumn65: TdxDBGridColumn;
dxDBGridColumn66: TdxDBGridColumn;
dxDBGridColumn67: TdxDBGridColumn;
dxDBGridColumn68: TdxDBGridColumn;
dxDBGrid20: TdxDBGrid;
dxDBGridColumn69: TdxDBGridColumn;
dxDBGridMaskColumn123: TdxDBGridMaskColumn;
dxDBGridMaskColumn124: TdxDBGridMaskColumn;
dxDBGridMaskColumn125: TdxDBGridMaskColumn;
dxDBGridMaskColumn126: TdxDBGridMaskColumn;
dxDBGridMaskColumn127: TdxDBGridMaskColumn;
dxDBGridColumn70: TdxDBGridColumn;
dxDBGridColumn71: TdxDBGridColumn;
dxDBGridMaskColumn128: TdxDBGridMaskColumn;
dxDBGridColumn72: TdxDBGridColumn;
dxDBGrid9Column24: TdxDBGridColumn;
dxDBGridDateColumn19: TdxDBGridDateColumn;
dxDBGridDateColumn20: TdxDBGridDateColumn;
dxDBGridMaskColumn129: TdxDBGridMaskColumn;
dxDBGridMaskColumn130: TdxDBGridMaskColumn;
dxDBGridMaskColumn131: TdxDBGridMaskColumn;
dxDBGridMaskColumn132: TdxDBGridMaskColumn;
dxDBGridMaskColumn133: TdxDBGridMaskColumn;
dxDBGridColumn73: TdxDBGridColumn;
dxDBGridColumn74: TdxDBGridColumn;
dxDBGridMaskColumn134: TdxDBGridMaskColumn;
dxDBGridMaskColumn135: TdxDBGridMaskColumn;
dxDBGridMaskColumn136: TdxDBGridMaskColumn;
dxDBGridMaskColumn137: TdxDBGridMaskColumn;
Label64: TLabel;
dxDBGrid1Column22: TdxDBGridColumn;
Label79: TLabel;
DBEdit70: TDBEdit;
dxDBGrid1Column23: TdxDBGridColumn;
t_ch_zhipiao1: TDataSource;
t_ch_zhipiao: TADOQuery;
bskntbshtTBS3: TbsSkinTabSheet;
bsSkinPageControl4: TbsSkinPageControl;
bsSkinTabSheet11: TbsSkinTabSheet;
bsSkinPanel11: TbsSkinPanel;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinButton22: TbsSkinButton;
bsSkinButton23: TbsSkinButton;
dxDBGrid21: TdxDBGrid;
dxDBGridMaskColumn138: TdxDBGridMaskColumn;
dxDBGridMaskColumn139: TdxDBGridMaskColumn;
dxDBGridMaskColumn140: TdxDBGridMaskColumn;
dxDBGridMaskColumn141: TdxDBGridMaskColumn;
dxDBGridColumn75: TdxDBGridColumn;
dxDBGridDateColumn21: TdxDBGridDateColumn;
dxDBGridMaskColumn142: TdxDBGridMaskColumn;
dxDBGridMaskColumn143: TdxDBGridMaskColumn;
dxDBGridMaskColumn144: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridCheckColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridDateColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridCheckColumn;
dxDBGrid1Column29: TdxDBGridCheckColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridDateColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridDateColumn;
bsSkinTabSheet12: TbsSkinTabSheet;
bsSkinPanel12: TbsSkinPanel;
bsSkinButton26: TbsSkinButton;
bsSkinButton27: TbsSkinButton;
bsSkinButton28: TbsSkinButton;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinButton33: TbsSkinButton;
bsSkinButton35: TbsSkinButton;
bsSkinButton36: TbsSkinButton;
bsSkinPanel13: TbsSkinPanel;
Label88: TLabel;
Label89: TLabel;
Label90: TLabel;
Label91: TLabel;
Label92: TLabel;
DBEdit75: TDBEdit;
DBEdit76: TDBEdit;
DBEdit77: TDBEdit;
DBEdit78: TDBEdit;
RxDBLookupCombo6: TRxDBLookupCombo;
s_invoice: TScrollBox;
Label93: TLabel;
Label94: TLabel;
Label96: TLabel;
Label97: TLabel;
Shape1: TShape;
AALabel1: TAALabel;
Label98: TLabel;
lblYEAR: TLabel;
Label99: TLabel;
lblMonth: TLabel;
Label101: TLabel;
lblDay: TLabel;
Label102: TLabel;
Label103: TLabel;
Shape2: TShape;
Label104: TLabel;
sncCurrencyLabel1: TsncCurrencyLabel;
Label105: TLabel;
Label106: TLabel;
Label107: TLabel;
Label108: TLabel;
DBText1: TDBText;
DBText2: TDBText;
DBText3: TDBText;
DBText4: TDBText;
Label109: TLabel;
Label110: TLabel;
Label111: TLabel;
Shape3: TShape;
Label112: TLabel;
Label113: TLabel;
lbl1: TLabel;
lbl2: TLabel;
bsSkinPanel14: TbsSkinPanel;
Label114: TLabel;
Label115: TLabel;
DBEdit79: TDBEdit;
DBEdit80: TDBEdit;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
csj: TDBDateTimeEditEh;
rxdbj: TRxDBCalcEdit;
snccy: TsncDBCurrencyEdit;
czphm: TDBEdit;
DBEdit81: TDBEdit;
DBComboBox1: TDBComboBox;
DBComboBox2: TDBComboBox;
DBEdit82: TDBEdit;
DBEdit83: TDBEdit;
dbedt1: TDBEdit;
dbedt2: TDBEdit;
PopupMenu1: TPopupMenu;
MenuItem1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
MenuItem2: TMenuItem;
N20: TMenuItem;
tab5: TbsSkinTabSheet;
dxDBGrid22: TdxDBGrid;
dxDBGridColumn76: TdxDBGridColumn;
dxDBGridMaskColumn145: TdxDBGridMaskColumn;
dxDBGridColumn77: TdxDBGridColumn;
dxDBGridColumn78: TdxDBGridColumn;
dxDBGridColumn79: TdxDBGridColumn;
dxDBGridColumn80: TdxDBGridColumn;
dxDBGrid23: TdxDBGrid;
dxDBGridMaskColumn146: TdxDBGridMaskColumn;
dxDBGridMaskColumn147: TdxDBGridMaskColumn;
dxDBGridMaskColumn148: TdxDBGridMaskColumn;
dxDBGridMaskColumn149: TdxDBGridMaskColumn;
dxDBGridMaskColumn150: TdxDBGridMaskColumn;
dxDBGridColumn81: TdxDBGridColumn;
dxDBGridColumn82: TdxDBGridColumn;
dxDBGridColumn83: TdxDBGridColumn;
dxDBGridMaskColumn151: TdxDBGridMaskColumn;
dxDBGridColumn84: TdxDBGridColumn;
dxDBGridDateColumn22: TdxDBGridDateColumn;
dxDBGridDateColumn23: TdxDBGridDateColumn;
dxDBGridMaskColumn152: TdxDBGridMaskColumn;
dxDBGridMaskColumn153: TdxDBGridMaskColumn;
dxDBGridMaskColumn154: TdxDBGridMaskColumn;
dxDBGridMaskColumn155: TdxDBGridMaskColumn;
dxDBGridMaskColumn156: TdxDBGridMaskColumn;
dxDBGridColumn85: TdxDBGridColumn;
dxDBGridColumn86: TdxDBGridColumn;
dxDBGridMaskColumn157: TdxDBGridMaskColumn;
dxDBGridMaskColumn158: TdxDBGridMaskColumn;
dxDBGridMaskColumn159: TdxDBGridMaskColumn;
dxDBGridMaskColumn160: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column37: TdxDBGridColumn;
RxDBLookupCombo10: TRxDBLookupCombo;
RxDBLookupCombo11: TRxDBLookupCombo;
wwDBComboBox3: TwwDBComboBox;
RxDBLookupCombo21: TRxDBLookupCombo;
DBEdit24: TDBEdit;
DBEdit84: TDBEdit;
Label116: TLabel;
RxDBLookupCombo18: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
RxDBLookupCombo7: TRxDBLookupCombo;
bsSkinPanel8: TbsSkinPanel;
Label56: TLabel;
Label57: TLabel;
Label58: TLabel;
Label59: TLabel;
Label60: TLabel;
Label61: TLabel;
Label62: TLabel;
Label63: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Label95: TLabel;
Label100: TLabel;
Label76: TLabel;
DBEdit49: TDBEdit;
DBEdit50: TDBEdit;
RxDBLookupCombo4: TRxDBLookupCombo;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
DBEdit51: TDBEdit;
DBEdit52: TDBEdit;
DBEdit53: TDBEdit;
DBEdit54: TDBEdit;
DBEdit55: TDBEdit;
DBEdit56: TDBEdit;
DBMemo5: TDBMemo;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBComboBox2: TwwDBComboBox;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo15: TRxDBLookupCombo;
RxDBLookupCombo14: TRxDBLookupCombo;
RxDBLookupCombo13: TRxDBLookupCombo;
RxDBLookupCombo16: TRxDBLookupCombo;
DBEdit65: TDBEdit;
bsSkinPageControl5: TbsSkinPageControl;
tab1: TbsSkinTabSheet;
tab2: TbsSkinTabSheet;
t_rate: TRxMemoryData;
t_ch_cust_befbal1: TDataSource;
t_ch_cust_befbal: TADOQuery;
t_ch_cust_befbal_sum1: TDataSource;
t_ch_cust_befbal_sum: TADOQuery;
t_ch_cust_befbalnew: TADOQuery;
PopupMenu5: TPopupMenu;
N7: TMenuItem;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
PopupMenu4: TPopupMenu;
MenuItem4: TMenuItem;
bsSkinGroupBox3: TbsSkinGroupBox;
dxDBGrid33: TdxDBGrid;
dxDBGridMaskColumn210: TdxDBGridMaskColumn;
dxDBGridMaskColumn211: TdxDBGridMaskColumn;
dxDBGridMaskColumn212: TdxDBGridMaskColumn;
dxDBGridMaskColumn213: TdxDBGridMaskColumn;
dxDBGridColumn118: TdxDBGridColumn;
dxDBGridColumn119: TdxDBGridColumn;
dxDBGridColumn120: TdxDBGridColumn;
Edit1: TEdit;
bsSkinGroupBox4: TbsSkinGroupBox;
dxDBGrid34: TdxDBGrid;
dxDBGridColumn121: TdxDBGridColumn;
dxDBGridColumn122: TdxDBGridColumn;
dxDBGridColumn123: TdxDBGridColumn;
dxDBGridColumn124: TdxDBGridColumn;
bsSkinGroupBox5: TbsSkinGroupBox;
dxDBGrid24: TdxDBGrid;
dxDBGridMaskColumn161: TdxDBGridMaskColumn;
dxDBGridMaskColumn162: TdxDBGridMaskColumn;
dxDBGridMaskColumn163: TdxDBGridMaskColumn;
dxDBGridMaskColumn164: TdxDBGridMaskColumn;
dxDBGridColumn87: TdxDBGridColumn;
dxDBGridColumn88: TdxDBGridColumn;
dxDBGridColumn89: TdxDBGridColumn;
Edit2: TEdit;
bsSkinGroupBox6: TbsSkinGroupBox;
dxDBGrid25: TdxDBGrid;
dxDBGridColumn90: TdxDBGridColumn;
dxDBGridColumn91: TdxDBGridColumn;
dxDBGridColumn92: TdxDBGridColumn;
dxDBGridColumn93: TdxDBGridColumn;
tab6: TbsSkinTabSheet;
DBEdit38: TDBEdit;
Label117: TLabel;
Label118: TLabel;
DBEdit85: TDBEdit;
t_ch_fee_do_detail: TADOQuery;
dxDBGrid1Column38: TdxDBGridColumn;
PopupMenu6: TPopupMenu;
N8: TMenuItem;
dxDBGrid2Column15: TdxDBGridColumn;
Label119: TLabel;
DBEdit86: TDBEdit;
bsSkinButton17: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
dxDBGrid20Column25: TdxDBGridColumn;
dxDBGrid20Column26: TdxDBGridColumn;
dxDBGrid33Column8: TdxDBGridColumn;
dxDBGrid34Column5: TdxDBGridColumn;
bsSkinTabSheet14: TbsSkinTabSheet;
dxDBGrid26: TdxDBGrid;
dxDBGridColumn94: TdxDBGridColumn;
dxDBGridMaskColumn165: TdxDBGridMaskColumn;
dxDBGridColumn95: TdxDBGridColumn;
dxDBGridColumn96: TdxDBGridColumn;
dxDBGridColumn97: TdxDBGridColumn;
dxDBGridColumn98: TdxDBGridColumn;
dxDBGrid27: TdxDBGrid;
dxDBGridMaskColumn166: TdxDBGridMaskColumn;
dxDBGridMaskColumn167: TdxDBGridMaskColumn;
dxDBGridMaskColumn168: TdxDBGridMaskColumn;
dxDBGridMaskColumn169: TdxDBGridMaskColumn;
dxDBGridMaskColumn170: TdxDBGridMaskColumn;
dxDBGridColumn99: TdxDBGridColumn;
dxDBGridColumn100: TdxDBGridColumn;
dxDBGridMaskColumn171: TdxDBGridMaskColumn;
dxDBGridColumn101: TdxDBGridColumn;
dxDBGridDateColumn24: TdxDBGridDateColumn;
dxDBGridMaskColumn172: TdxDBGridMaskColumn;
dxDBGridMaskColumn173: TdxDBGridMaskColumn;
dxDBGridColumn102: TdxDBGridColumn;
dxDBGridMaskColumn174: TdxDBGridMaskColumn;
dxDBGridMaskColumn175: TdxDBGridMaskColumn;
dxDBGridMaskColumn176: TdxDBGridMaskColumn;
v_fee_do_airtruck: TADOQuery;
v_fee_do_airtruck1: TDataSource;
v_fee_do_airtruck_sum: TADOQuery;
v_fee_do_airtruck_sum1: TDataSource;
v_fee_do_railway: TADOQuery;
v_fee_do_railway1: TDataSource;
v_fee_do_railway_sum: TADOQuery;
v_fee_do_railway_sum1: TDataSource;
Label120: TLabel;
DBEdit87: TDBEdit;
Label121: TLabel;
DBEdit88: TDBEdit;
Label122: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label123: TLabel;
Label124: TLabel;
Label125: TLabel;
Label126: TLabel;
DBEdit89: TDBEdit;
DBEdit90: TDBEdit;
DBEdit91: TDBEdit;
wwDBDateTimePicker5: TwwDBDateTimePicker;
DBEdit92: TDBEdit;
Label127: TLabel;
Label128: TLabel;
DBEdit93: TDBEdit;
Label129: TLabel;
DBEdit94: TDBEdit;
bsSkinScrollBar1: TbsSkinScrollBar;
cxGrid1DBTableView1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
cxGrid1DBTableView1DBColumn1: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn2: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn3: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn4: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn5: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn6: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn7: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn8: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn9: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn10: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn11: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn12: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn13: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn14: TcxGridDBColumn;
dxDBGrid1Column39: TdxDBGridColumn;
Panel2: TPanel;
Label130: TLabel;
bsSkinButton37: TbsSkinButton;
t_ch_balanceDSDesigner: TStringField;
t_ch_balanceDSDesigner2: TStringField;
t_ch_balanceDSDesigner3: TStringField;
t_ch_balanceDSDesigner4: TStringField;
t_ch_balanceDSDesigner5: TStringField;
t_ch_balanceDSDesigner6: TStringField;
t_ch_balanceDSDesigner7: TBCDField;
t_ch_balanceDSDesigner8: TBCDField;
t_ch_balanceDSDesigner9: TBCDField;
t_ch_balanceDSDesigner10: TStringField;
t_ch_balanceDSDesigner11: TStringField;
t_ch_balanceDSDesigner12: TStringField;
t_ch_balanceDSDesigner13: TDateTimeField;
t_ch_balanceDSDesigner14: TBooleanField;
t_ch_balanceDSDesigner15: TStringField;
t_ch_balanceDSDesigner16: TStringField;
t_ch_balanceDSDesigner17: TDateTimeField;
t_ch_balanceDSDesigner18: TStringField;
t_ch_balanceDSDesigner19: TStringField;
t_ch_balanceDSDesigner20: TDateTimeField;
t_ch_balanceDSDesigner21: TStringField;
t_ch_balanceDSDesigner22: TBooleanField;
t_ch_balanceDSDesigner23: TStringField;
t_ch_balanceDSDesigner24: TBCDField;
t_ch_balanceDSDesigner25: TBCDField;
t_ch_balanceDSDesigner26: TStringField;
t_ch_balanceDSDesigner27: TStringField;
t_ch_balanceDSDesigner28: TStringField;
t_ch_balanceDSDesigner29: TStringField;
t_ch_balanceDSDesigner30: TBCDField;
t_ch_balanceDSDesigner31: TStringField;
t_ch_balanceDSDesigner32: TStringField;
t_ch_balanceDSDesigner33: TStringField;
dxDBGrid1Column40: TdxDBGridColumn;
dxDBGrid1Column41: TdxDBGridColumn;
Label133: TLabel;
cxDBCalcEdit1: TcxDBCalcEdit;
t_ch_balanceDSDesigner34: TDateTimeField;
t_ch_balanceDSDesigner35: TSmallintField;
t_ch_balanceField: TStringField;
t_ch_balanceField2: TFloatField;
t_ch_balanceField3: TFloatField;
dxDBGrid1Column42: TdxDBGridColumn;
Label131: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
t_ch_balanceField4: TStringField;
dxDBGrid1Column43: TdxDBGridColumn;
t_ch_balanceField5: TStringField;
dxDBGrid1Column44: 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 DBEdit42Change(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinPageControl1Changing(Sender: TObject;
var AllowChange: Boolean);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinPanel5Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure RxDBLookupCombo4Enter(Sender: TObject);
procedure DBEdit51Enter(Sender: TObject);
procedure t_ch_balanceCalcFields(DataSet: TDataSet);
procedure bsSkinButton38Click(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo15Change(Sender: TObject);
procedure RxDBLookupCombo15Enter(Sender: TObject);
procedure RxDBLookupCombo15Exit(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure t_ch_balanceBeforeDelete(DataSet: TDataSet);
procedure bsSkinNotebook1PageChanged(Sender: TObject);
procedure dxDBGrid6DblClick(Sender: TObject);
procedure dxDBGrid3DblClick(Sender: TObject);
procedure dxDBGrid4DblClick(Sender: TObject);
procedure dxDBGrid5DblClick(Sender: TObject);
procedure dxDBGrid20DblClick(Sender: TObject);
procedure t_ch_zhipiaoAfterInsert(DataSet: TDataSet);
procedure t_ch_zhipiaoBeforeEdit(DataSet: TDataSet);
procedure t_ch_zhipiaoBeforePost(DataSet: TDataSet);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton33Click(Sender: TObject);
procedure bsSkinButton35Click(Sender: TObject);
procedure bsSkinButton36Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure t_ch_zhipiaoAfterOpen(DataSet: TDataSet);
procedure dxDBGrid21DblClick(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure RxDBLookupCombo3Change(Sender: TObject);
procedure RxDBLookupCombo10Change(Sender: TObject);
procedure RxDBLookupCombo11Change(Sender: TObject);
procedure t_ch_zhipiaoAfterScroll(DataSet: TDataSet);
procedure MenuItem4Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure MenuItem6Click(Sender: TObject);
procedure t_ch_cust_befbal_sumAfterOpen(DataSet: TDataSet);
procedure MenuItem3Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton34Click(Sender: TObject);
procedure dxDBGrid20Column25CustomDraw(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 dxDBGrid20Column26CustomDraw(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 fra_ch_add_do1bsSkinButton8Click(Sender: TObject);
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
procedure dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure dxDBGrid2SelectedCountChange(Sender: TObject);
procedure dxDBGrid1CustomDraw(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 bsSkinButton37Click(Sender: TObject);
private
shench,iszhipiao,ischangecur:boolean;
procedure zhipiaobankchange(sender:TField);
procedure zhipiaocustchange(sender:TField);
procedure zhipiaoCurrencychange(sender:TField);
procedure zhipiaodatechange(sender:TField);
procedure zhipiaonumchange(sender:TField);
procedure getdetail(balno:string);
procedure closedetail;
{ Private declarations }
public
{ Public declarations }
procedure SelectAddVouchers;
procedure AddVouchers;
end;
var
frm_ch_balance_pay: Tfrm_ch_balance_pay;
ch_balance_pay_open,ch_balance_pay_post,sbpay,notdetail:boolean;
implementation
uses my_sys_function, u_main, u_ch_balance_query, u_data_share,
{$IFDEF FFLIUCHENG}u_ch_check_do,{$ENDIF} u_ch_shen_query, u_select_curr,
7 months ago
u_ch_zhipiao_query, u_fee_do_fen, u_sys_progress, u_cw_pingzheng, dmAccu,
u_cw_pingzheng_jku8, u_cw_pingzheng_u8;
12 months ago
{$R *.dfm}
procedure Tfrm_ch_balance_pay.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_pay.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ch_balance_pay_open:=false;
savereggrid(dxdbgrid1,caption+'1');
savereggrid(dxdbgrid2,caption+'2');
savereggrid(dxdbgrid3,caption+'3');
savereggrid(dxdbgrid4,caption+'4');
savereggrid(dxdbgrid5,caption+'5');
savereggrid(dxdbgrid6,caption+'6');
savereggrid(dxdbgrid21,caption+'21');
savereggrid(fra_ch_add_do1.dxDBGrid19,caption+'19');
savereggrid(fra_ch_delete_do1.dxDBGrid9,caption+'d9');
savecxgridview(cxGrid1DBTableView1,'cx'+caption+'1');
frm_ch_balance_pay.Hide;
frm_ch_balance_pay.ManualFloat(frm_ch_balance_pay.BoundsRect );
frm_main.freeTabs('frm_ch_balance_pay');
ch_balance_pay_open:=false;
action:=cafree;
frm_ch_balance_pay:=nil;
end;
procedure Tfrm_ch_balance_pay.FormResize(Sender: TObject);
var
i:integer;
begin
//<2F><><EFBFBD>㰴ť<E3B0B4><C5A5><EFBFBD><EFBFBD>
if not iszhipiao then begin
bsSkinButton13.Visible:=false;
i:=round(bsSkinPanel2.Width/12);
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;
bsSkinButton38.Width:=i;
// bsSkinButton34.Width:=i;
bsSkinButton37.Width:=i;
bsSkinButton5.Width:=i;
end else begin
bsSkinButton13.Visible:=true;
i:=round(bsSkinPanel2.Width/13);
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;
bsSkinButton38.Width:=i;
bsSkinButton13.Width:=i;
// bsSkinButton34.Width:=i;
bsSkinButton37.Width:=i;
bsSkinButton5.Width:=i;
end;
end;
procedure Tfrm_ch_balance_pay.FormShow(Sender: TObject);
var
i:integer;
begin
bsSkinPageControl1.ActivePageIndex:=0;
if if_reg(461) and (not vold) then
begin
iszhipiao:=true
end
else
begin
iszhipiao:=false;
end;
ischangecur:=true;
{
if not iszhipiao then
bskntbshtTBS3.TabVisible:=false;
}
if not iszhipiao then begin
bsSkinButton13.Visible:=false;
i:=round(bsSkinPanel2.Width/12);
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;
bsSkinButton38.Width:=i;
// bsSkinButton34.Width:=i;
bsSkinButton37.Width:=i;
bsSkinButton5.Width:=i;
end else begin
bsSkinButton13.Visible:=true;
i:=round(bsSkinPanel2.Width/13);
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;
bsSkinButton38.Width:=i;
bsSkinButton13.Width:=i;
// bsSkinButton34.Width:=i;
bsSkinButton37.Width:=i;
bsSkinButton5.Width:=i;
end;
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select top 600 * from t_ch_balance where <20><><EFBFBD><EFBFBD>=0 and <20>ʵ<EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''
+' and '+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
// t_ch_fee_do.open;
t_ch_check_detail.open;
// t_no.open;
ch_balance_pay_open:=true;
ch_balance_pay_post:=true;
notdetail:=true;
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ϲ<EFBFBD><CFB2>ж<EFBFBD>
if StrToBool(get_parameters_value(85,'false')) then begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=False;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.TabIndex:=0;
// fra_ch_add_do1.bsSkinButton11.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
fra_ch_add_do1.bsSkinButton11.Visible:=True;
fra_ch_add_do1.bsSkinCheckRadioBox7.Visible:=True;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=false;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=True;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet5;
bsSkinTabSheet7.TabVisible:=false;
bsSkinTabSheet8.TabVisible:=false;
bsSkinTabSheet9.TabVisible:=false;
bsSkinTabSheet10.TabVisible:=false;
bstab5.TabVisible:=true;
bsSkinPageControl3.ActivePage:=bstab5;
end else begin
fra_ch_add_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_add_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_add_do1.bsSkinPageControl1.ActivePage:=fra_ch_add_do1.bsSkinTabSheet1;
fra_ch_add_do1.bsSkinTabSheet5.TabVisible:=False;
fra_ch_delete_do1.bsSkinTabSheet1.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet2.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet3.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet4.TabVisible:=True;
fra_ch_delete_do1.bsSkinTabSheet5.TabVisible:=false;
fra_ch_delete_do1.bsSkinPageControl1.ActivePage:=fra_ch_delete_do1.bsSkinTabSheet1;
bsSkinTabSheet7.TabVisible:=true;
bsSkinTabSheet8.TabVisible:=true;
bsSkinTabSheet9.TabVisible:=true;
bsSkinTabSheet10.TabVisible:=true;
bstab5.TabVisible:=false;
bsSkinPageControl3.ActivePage:=bsSkinTabSheet7;
end;
fra_ch_add_do1.do_ban1.DataSet:=t_ch_balance;
fra_ch_add_do1.bs_text.text:='4';
fra_ch_add_do1.wwDBComboBox31.text:='<27><>';
fra_ch_add_do1.t_ch_fee_do.open;
// getdetail;
{
if StrToBool(get_parameters_value(85,'false')) then begin
fra_ch_delete_do1.v_fee_do_bscard.close;
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard.Open;
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard_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_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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_bscard_sum.Open;
end else begin
fra_ch_delete_do1.v_fee_do_seae.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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.open;
end;
}
fra_ch_delete_do1.bs_text.Text:='4';
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_balance;
loadreggrid(dxdbgrid1,false,caption+'1');
loadreggrid(dxdbgrid2,false,caption+'2');
loadreggrid(dxdbgrid3,false,caption+'3');
loadreggrid(dxdbgrid4,false,caption+'4');
loadreggrid(dxdbgrid5,false,caption+'5');
loadreggrid(dxdbgrid6,false,caption+'6');
loadreggrid(dxdbgrid21,false,caption+'21');
loadcxgridview(cxGrid1DBTableView1,'cx'+caption+'1');
loadreggrid(fra_ch_add_do1.dxDBGrid19,false,caption+'19');
loadreggrid(fra_ch_delete_do1.dxDBGrid9,false,caption+'d9');
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ񵥱ұ<F1B5A5B1><D2B1>ж<EFBFBD>
sbpay:=StrToBool(get_parameters_value(83,'false'));
if sbpay then begin
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid1.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>').Visible:=true;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>').Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>';
bsSkinPanel8.Visible:=true;
bsSkinPanel9.Visible:=true;
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid2.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=false;
dxdbgrid2.ColumnByFieldName('<27><EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid2.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
fra_ch_add_do1.bsSkinPanel12.Visible:=true;
Label69.Visible:=true;
Label70.Visible:=true;
DBEdit57.Visible:=true;
DBEdit58.Visible:=true;
Label64.visible:=true;
RxDBLookupCombo11.Visible:=true;
dxDBGrid1Column22.Visible:=false;
Label79.Visible:=true;
DBEdit70.Visible:=true;
Label29.Visible:=false;
Label30.Visible:=false;
DBEdit37.Visible:=false;
DBEdit21.Visible:=false;
Label31.Visible:=false;
Label32.Visible:=false;
DBEdit22.Visible:=false;
DBEdit23.Visible:=false;
Label117.Visible:=false;
DBEdit38.Visible:=false;
RxDBLookupCombo10.Width:=325;
end else begin
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=true;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=true;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>').Visible:=false;
bsSkinPanel8.Visible:=False;
bsSkinPanel9.Visible:=False;
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid2.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=True;
dxdbgrid2.ColumnByFieldName('<27><EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid2.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
fra_ch_add_do1.bsSkinPanel12.Visible:=false;
Label69.Visible:=false;
Label70.Visible:=false;
DBEdit57.Visible:=false;
DBEdit58.Visible:=false;
Label64.visible:=false;
RxDBLookupCombo11.Visible:=false;
dxDBGrid1Column22.Visible:=true;
Label79.Visible:=false;
DBEdit70.Visible:=false;
Label49.Caption:='<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>';
Label29.Visible:=true;
Label30.Visible:=true;
DBEdit37.Visible:=true;
DBEdit21.Visible:=true;
Label31.Visible:=true;
Label32.Visible:=true;
DBEdit22.Visible:=true;
DBEdit23.Visible:=true;
Label117.Visible:=true;
DBEdit38.Visible:=true;
RxDBLookupCombo10.Width:=165;
end;
shench:=false;
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
wwDBDateTimePicker2.MinDate:=Logininfo.endday+1;
wwDBDateTimePicker3.MinDate:=Logininfo.endday+1;
with frm_data_share.t_code_stlmode do begin
wwDBComboBox1.Items.Clear;
wwDBComboBox2.Items.Clear;
wwDBComboBox3.Items.Clear;
first;
while not eof do begin
wwDBComboBox1.Items.Add(fieldbyname('<27><><EFBFBD>ʽ').AsString);
wwDBComboBox2.Items.Add(fieldbyname('<27><><EFBFBD>ʽ').AsString);
wwDBComboBox3.Items.Add(fieldbyname('<27><><EFBFBD>ʽ').AsString);
next;
end;
end;
if not if_reg(494) then begin
tab2.TabVisible:=false;
tab6.TabVisible:=false;
end else begin
if if_open('344') then
begin
t_ch_cust_befbal.Open;
t_ch_cust_befbal_sum.Open;
end else begin
tab2.TabVisible:=false;
tab6.TabVisible:=false;
end;
end;
// bsSkinButton37.Enabled:=not t_ch_balance.FieldByName('ƾ֤').AsBoolean;
// frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_sys_bank.requery;
{$IFDEF FFLIUCHENG}
bsSkinTabSheet2.tabvisible:=true;
{$ELSE}
bsSkinTabSheet2.tabvisible:=false;
{$ENDIF}
// t_ch_balance.AfterScroll:=getdetail;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
if t_ch_balance.IsEmpty then
exit;
if DBEdit42.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_pay.t_ch_balanceAfterInsert(DataSet: TDataSet);
var
balno:string;
begin
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
if Logininfo.endday+1>now then
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Logininfo.endday+1
else
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['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD>ʽ']:='֧Ʊ';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=1;
{
balno:=get_no(date,'BP');
t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=balno;
getdetail(balno);
}
end;
procedure Tfrm_ch_balance_pay.bsSkinButton1Click(Sender: TObject);
begin
t_ch_balance.insert;
// if bsSkinNotebook1.PageIndex<>0 then
getdetail(t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring);
notdetail:=false;
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
notdetail:=true;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_balance);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton4Click(Sender: TObject);
begin
//ɾ<><C9BE><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>ϸ
if t_ch_balance.IsEmpty then
exit;
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 trim(GetBalanceVou(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString))<>'' then
begin
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>');
exit;
end;
{
if trim(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>ƾ֤').asstring)<>''then
begin
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><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
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_main.db.BeginTrans;
try
delete_ch(4,t_ch_balance);
t_ch_fee_do.open;
frm_sys_progress.bsSkinGauge1.MaxValue:=t_ch_fee_do.RecordCount+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
t_ch_fee_do.first;
while not t_ch_fee_do.eof do
begin
Setfee(1,t_ch_fee_do.fieldbyname('CH_ID').AsInteger,t_ch_fee_do.fieldbyname('ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>').AsCurrency);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_ch_fee_do.delete;
end;
t_ch_fee_do.close;
t_ch_fee_do_detail.close;
t_ch_fee_do_detail.sql.text:='select * from t_ch_cust_befbal where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_ch_fee_do_detail.open;
while not t_ch_fee_do_detail.eof do
t_ch_fee_do_detail.delete;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>'<27><><EFBFBD><EFBFBD>'then
begin
p_update.Parameters.ParamByName('SQLStr').value:='update t_ch_check set <20><><EFBFBD><EFBFBD>״̬='
+''''+'<27><>׼֧<D7BC><D6A7>'+''''+',<2C>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>='+''''+''''
+' where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>='+''''
+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
p_update.ExecProc;
if t_ch_check.Active then
t_ch_check.requery;
end;
t_ch_balance.Delete;
if bsSkinNotebook1.PageIndex<>0 then
getdetail(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
7 months ago
p_update.Parameters.ParamByName('SQLStr').value:='update t_ch_dui_auto set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=null'
+',<2C>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>='+''''+''''
+' where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>='+''''
+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
p_update.ExecProc;
12 months ago
frm_main.db.CommitTrans;
finally
frm_sys_progress.Close;
frm_sys_progress.Free;
frm_sys_progress:=nil;
if frm_main.db.InTransaction then begin
ShowMessage('ɾ<><C9BE><EFBFBD>˵<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>');
frm_main.db.RollbackTrans;
end;
end;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_balance);
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_balance,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
if not sbpay then
table_before_post(t_ch_balance,'<27>ұ<EFBFBD>');
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']);
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><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>']-t_ch_balance['Ԥ<><D4A4><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><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEB2BB>С<EFBFBD><D0A1>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEA3A1>');
abort;
end; }
end;
if (t_ch_balance.state=dsinsert) and (trim(t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString)='') then
begin
t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'BP');
getdetail(t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']);
end;
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['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
{
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.active then
fra_ch_delete_do1.v_fee_do_bscard.close;
if fra_ch_delete_do1.v_fee_do_bscard_sum.active then
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
end else begin
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
end;
}
end;
procedure Tfrm_ch_balance_pay.DBEdit4Enter(Sender: TObject);
begin
if bsSkinDBCheckRadioBox1.Checked then
DBEdit4.ReadOnly:=true
else
DBEdit4.ReadOnly:=false;
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceBeforeEdit(DataSet: TDataSet);
var
sdate:tdate;
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;
if Trim(t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').AsString)<>'' then
begin
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤');
abort;
end;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
{
sdate:=Logininfo.endday+1;
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
if (sdate>t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']) and (not shench) then begin
MessageDlg('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><E3B5A5><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ˣ<EFBFBD>',mtError,[mbok],0);
abort;
end;
}
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo1Enter(Sender: TObject);
begin
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.IsEmpty then
begin
RxDBLookupCombo1.ReadOnly:=false;
RxDBLookupCombo2.ReadOnly:=false;
end
else
begin
RxDBLookupCombo1.ReadOnly:=true;
RxDBLookupCombo2.ReadOnly:=true;
end;
end else 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;
end;
procedure Tfrm_ch_balance_pay.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_pay.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_pay.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_ch_balance);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton9Click(Sender: TObject);
begin
if bsSkinNotebook1.PageIndex=0 then
getdetail(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString);
if StrToBool(get_parameters_value(85,'false')) then begin
sys_print('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>',2,t_ch_balance1,nil,
nil,nil,fra_ch_delete_do1.v_fee_do_bscard1,nil,
nil,nil,
t_ch_balance1,fra_ch_delete_do1.v_fee_do_bscard_sum1,nil);
end else begin
sys_print('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>ý<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;
// if bsSkinNotebook1.PageIndex=0 then
// closedetail;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton6Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton6.ClientToScreen(Point(0,bsSkinButton6.Height));
PopupMenu6.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton8Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if not if_open('256') 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;
shench:=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;
shench:=false;
modify_all:=false;
except
shench:=false;
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton10Click(Sender: TObject);
begin
ch_balance_pay_open:=false;
try
frm_ch_balance_query:=tfrm_ch_balance_query.Create (self);
balance_query_type:=4;
frm_ch_balance_query.bsSkinGroupBox2.Visible:=true;
frm_ch_balance_query.ShowModal;
bsSkinNotebook1.PageIndex:=0;
finally
frm_ch_balance_query.Free;
ch_balance_pay_open:=true;
end;
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceAfterPost(DataSet: TDataSet);
begin
t_ch_balance.Refresh;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>
if not ch_balance_pay_post then exit;
if StrToBool(get_parameters_value(85,'false')) then begin
if bsSkinNotebook1.PageIndex=1 then begin
fra_ch_delete_do1.v_fee_do_bscard.DisableControls;
fra_ch_delete_do1.v_fee_do_bscard_sum.DisableControls;
fra_ch_delete_do1.v_fee_do_bscard.Requery;
fra_ch_delete_do1.v_fee_do_bscard_sum.Requery;
fra_ch_delete_do1.v_fee_do_bscard.EnableControls;
fra_ch_delete_do1.v_fee_do_bscard_sum.EnableControls;
end;
end else begin
if fra_ch_delete_do1.v_fee_do_seae.active then begin
fra_ch_delete_do1.v_fee_do_seae.Requery;
fra_ch_delete_do1.v_fee_do_seae_sum.Requery;
end;
if fra_ch_delete_do1.v_fee_do_seai.active then begin
fra_ch_delete_do1.v_fee_do_seai.Requery;
fra_ch_delete_do1.v_fee_do_seai_sum.Requery;
end;
if fra_ch_delete_do1.v_fee_do_aire.active then begin
fra_ch_delete_do1.v_fee_do_aire.Requery;
fra_ch_delete_do1.v_fee_do_aire_sum.Requery;
end;
if fra_ch_delete_do1.v_fee_do_airi.active then begin
fra_ch_delete_do1.v_fee_do_airi.Requery;
fra_ch_delete_do1.v_fee_do_airi_sum.Requery;
end;
if if_ch_delete_do then
begin
case delete_do_type_num of
1,2,3,4,5:
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;
end;
{
case delete_do_type_num of
1,2,3,4:
begin
check_do_sum(4,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;
}
delete_do_type_num:=0;
if_ch_delete_do:=false;
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceAfterDelete(DataSet: TDataSet);
begin
if fra_ch_add_do1.v_op_bscard.Active then
fra_ch_add_do1.v_op_bscard.Requery();
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_pay.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit1);
end;
procedure Tfrm_ch_balance_pay.DBEdit1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox1);
end;
procedure Tfrm_ch_balance_pay.wwDBComboBox1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_ch_balance_pay.DBEdit4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_ch_balance_pay.DBEdit5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_ch_balance_pay.DBEdit6KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
end;
procedure Tfrm_ch_balance_pay.bsSkinDBCheckRadioBox1KeyPress(
Sender: TObject; var Key: Char);
begin
// key_RxDBLookupCombo(Key,RxDBLookupCombo3);
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_ch_balance_pay.DBEdit8KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_ch_balance_pay.DBEdit9KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_ch_balance_pay.DBEdit10KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_ch_balance_pay.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_ch_balance_pay.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_ch_balance_pay.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,3);
end;
procedure Tfrm_ch_balance_pay.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_ch_balance_pay.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_pay.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_pay.DBEdit42Change(Sender: TObject);
begin
if bsSkinNotebook1.PageIndex<>0 then
begin
if DBEdit42.text='<27><><EFBFBD><EFBFBD>'then
begin
bsSkinNotebook1.PageIndex:=1;
end
else
begin
bsSkinNotebook1.PageIndex:=2;
end;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton21Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton25Click(Sender: TObject);
var
sdate:TDate;
aList:TStringList;
i:integer;
billnos:string;
Current,bm: TBookmarkStr;
begin
{$IFDEF FFLIUCHENG}
if t_ch_check.IsEmpty then
exit;
if (t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>׼֧<D7BC><D6A7>') and
(t_ch_check.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD>޸<EFBFBD>') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sdate:=EncodeDate(Logininfo.offyear,Logininfo.offmonth,1);
if sdate>now then
begin
if MessageDlg('<27><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD>Ϊ'+datetostr(sdate)+',ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)<>mryes then
exit;
end;
aList:=TStringList.create;
try
t_ch_check.DisableControls;
t_ch_fee_do_check.DisableControls;
if dxDBGrid2.SelectedCount>0 then
begin
billnos:='';
aList.Clear;
for i:=0 to dxDBGrid2.SelectedCount-1 do
begin
t_ch_check.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
if aList.IndexOf(t_ch_check['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'])<0 then
aList.Add(t_ch_check['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if billnos='' then billnos:=t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
if aList.Count>1 then begin
showmessage('<27><><EFBFBD><EFBFBD>ͬ<EFBFBD>Ŀͻ<C4BF><CDBB><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>:'+#13#10+aList.Text);
exit;
end;
end
else
begin
billnos:='';
aList.Clear;
aList.Add(t_ch_check['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if billnos='' then billnos:=t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_check.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if aList.Count=0 then begin
showmessage('û<><C3BB><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ:'+#13#10+aList.Text);
exit;
end;
end;
finally
aList.free;
t_ch_check.EnableControls;
t_ch_fee_do_check.EnableControls;
end;
try
frm_ch_check_do:=tfrm_ch_check_do.Create (self);
frm_ch_check_do.Edit1.text:=t_ch_check.fieldbyname('<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>').asstring;
frm_ch_check_do.Memo1.text:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+billnos;
frm_ch_check_do.ShowModal;
finally
frm_ch_check_do.Free;
frm_ch_check_do:=nil;
end;
{$ENDIF}
end;
procedure Tfrm_ch_balance_pay.bsSkinPageControl1Changing(Sender: TObject;
var AllowChange: Boolean);
begin
if ch_balance_pay_open then
begin
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit) then
BEGIN
if application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_balance.post
else
t_ch_balance.cancel;
END;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton24Click(Sender: TObject);
begin
try
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
shen_query_type:=6;
shen_query_limited:='1003';
shen_query_op_limited:='no';
frm_ch_shen_query.ShowModal;
finally
frm_ch_shen_query.Free;
frm_ch_shen_query:=nil;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton12Click(Sender: TObject);
begin
t_ch_check.close;
t_ch_check.sql.clear;
t_ch_check.sql.add('select * from t_ch_check ');
t_ch_check.sql.add('where <20><><EFBFBD><EFBFBD>״̬ in (''<27><>׼֧<D7BC><D6A7>'',''<27><>ֹ<EFBFBD>޸<EFBFBD>'')');
t_ch_check.sql.add('AND Ҫ<><D2AA>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>:Date1 and Ҫ<><D2AA>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><:Date2');
t_ch_check.Parameters.ParamByName('Date1').Value:=Date-1;
t_ch_check.Parameters.ParamByName('Date2').Value:=Date+1;
t_ch_check.sql.add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_check.open;
end;
procedure Tfrm_ch_balance_pay.bsSkinPanel5Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel5.width/5);
bsSkinButton24.width:=i;
bsSkinButton12.width:=i;
bsSkinButton7.width:=i;
bsSkinButton25.width:=i;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton7Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton7.ClientToScreen(Point(0,bsSkinButton7.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_pay.N17Click(Sender: TObject);
begin
t_ch_check.Close;
t_ch_check.SQL.clear;
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>'+''''
+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_check.open;
end;
procedure Tfrm_ch_balance_pay.N34Click(Sender: TObject);
begin
t_ch_check.Close;
t_ch_check.SQL.clear;
t_ch_check.SQL.Add('select * from t_ch_check 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_check.open;
end;
procedure Tfrm_ch_balance_pay.N36Click(Sender: TObject);
begin
t_ch_check.Close;
t_ch_check.SQL.clear;
t_ch_check.SQL.Add('select * from t_ch_check 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_check.open;
end;
procedure Tfrm_ch_balance_pay.N6Click(Sender: TObject);
begin
t_ch_check.Close;
t_ch_check.SQL.clear;
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><>׼֧<D7BC><D6A7>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_check.open;
end;
procedure Tfrm_ch_balance_pay.N4Click(Sender: TObject);
begin
t_ch_check.Close;
t_ch_check.SQL.clear;
t_ch_check.SQL.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'֧<><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+') '
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_check.open;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton13Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
//<2F><><EFBFBD><EFBFBD>֧Ʊ
t_ch_zhipiao.close;
t_ch_zhipiao.sql.clear;
t_ch_zhipiao.sql.add('select top 50 * from t_ch_zhipiao order by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> desc');
t_ch_zhipiao.open;
if sbpay then begin
if (t_ch_balance.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat<>0) and (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat<>0) then begin
frm_select_curr:=Tfrm_select_curr.Create(self);
try
if frm_select_curr.ShowModal=mrok then begin
if frm_select_curr.bsSkinRadioGroup1.ItemIndex=0 then begin
t_ch_zhipiao.Insert;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>'];
t_ch_zhipiao['<27>ұ<EFBFBD>']:='RMB';
t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl4.ActivePage:=bsSkinTabSheet12;
t_ch_zhipiao.Post;
end else begin
t_ch_zhipiao.Insert;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>'];
t_ch_zhipiao['<27>ұ<EFBFBD>']:='USD';
t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl4.ActivePage:=bsSkinTabSheet12;
t_ch_zhipiao.Post;
end;
end;
finally
freeandnil(frm_select_curr);
end;
end else if (t_ch_balance.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat<>0) then begin
t_ch_zhipiao.Insert;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>'];
t_ch_zhipiao['<27>ұ<EFBFBD>']:='USD';
t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl4.ActivePage:=bsSkinTabSheet12;
t_ch_zhipiao.Post;
end else if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat<>0) then begin
t_ch_zhipiao.Insert;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>'];
t_ch_zhipiao['<27>ұ<EFBFBD>']:='RMB';
t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl4.ActivePage:=bsSkinTabSheet12;
t_ch_zhipiao.Post;
end;
end else begin
t_ch_zhipiao.Insert;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_zhipiao['<27>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl4.ActivePage:=bsSkinTabSheet12;
t_ch_zhipiao.Post;
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo4Enter(Sender: TObject);
begin
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.IsEmpty then
begin
RxDBLookupCombo4.ReadOnly:=false;
end
else
begin
RxDBLookupCombo4.ReadOnly:=true;
end;
end else 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
RxDBLookupCombo4.ReadOnly:=false;
end
else
begin
RxDBLookupCombo4.ReadOnly:=true;
end;
end;
end;
procedure Tfrm_ch_balance_pay.DBEdit51Enter(Sender: TObject);
begin
if bsSkinDBCheckRadioBox2.Checked then
DBEdit51.ReadOnly:=true
else
DBEdit51.ReadOnly:=false;
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceCalcFields(DataSet: TDataSet);
begin
if dataset.FieldByName('<27>ұ<EFBFBD>').AsString='USD' then begin
dataset.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
end else begin
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
dataset.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
end;
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_balance.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,[])then begin
t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_balance.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
if t_ch_balance.IsEmpty then
exit;
if bsSkinNotebook1.PageIndex=0 then
begin
book1:=t_ch_balance.GetBookmark;
t_ch_balance.Requery;
t_ch_balance.GotoBookmark(book1);
end
else
begin
book1:=t_ch_balance.GetBookmark;
t_ch_balance.Refresh;
t_ch_balance.GotoBookmark(book1);
end;
{
if t_ch_balance=nil then
exit;
book1:=t_ch_balance.GetBookmark;
t_ch_balance.Refresh;
t_ch_balance.GotoBookmark(book1);
}
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo16Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo16.DisplayValues[0],[])then begin
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end else begin
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:='';
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo15Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo15.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 else begin
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='';
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo15Enter(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
if sbpay then begin
frm_data_share.t_sys_bank.Filter:='<27>ұ<EFBFBD>=''RMB''';
frm_data_share.t_sys_bank.Filtered:=true;
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo15Exit(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo16Enter(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
frm_data_share.t_sys_bank.Filter:='<27>ұ<EFBFBD>=''USD''';
frm_data_share.t_sys_bank.Filtered:=true;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo16Exit(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
end;
procedure Tfrm_ch_balance_pay.t_ch_balanceBeforeDelete(DataSet: TDataSet);
var
sdate:tdate;
begin
{
sdate:=Logininfo.endday+1;
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
if sdate>t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] then begin
MessageDlg('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><E3B5A5><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ˣ<EFBFBD>',mtError,[mbok],0);
abort;
end;
}
end;
procedure Tfrm_ch_balance_pay.bsSkinNotebook1PageChanged(Sender: TObject);
begin
if not notdetail then exit;
getdetail(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid6DblClick(Sender: TObject);
begin
fee_view(v_fee_do_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid3DblClick(Sender: TObject);
begin
fee_view(v_fee_do_seai.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid4DblClick(Sender: TObject);
begin
fee_view(v_fee_do_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid5DblClick(Sender: TObject);
begin
fee_view(v_fee_do_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid20DblClick(Sender: TObject);
begin
fee_view(fra_ch_delete_do1.v_fee_do_bscard.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_balance_pay.t_ch_zhipiaoAfterInsert(DataSet: TDataSet);
begin
t_ch_zhipiao['<27>Ƶ<EFBFBD><C6B5><EFBFBD>']:=employee;
t_ch_zhipiao['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=date;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_zhipiao['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']:='ת<><D7AA>֧Ʊ';
t_ch_zhipiao['<27>ұ<EFBFBD>']:='RMB';
t_ch_zhipiao['<27><>']:=my_strtoyear(date);
t_ch_zhipiao['<27><>']:=my_strtomonth(Date);
t_ch_zhipiao['<27><>']:=my_strtodday(Date);
t_ch_zhipiao['<27><><EFBFBD><EFBFBD>״̬']:=0;
t_ch_zhipiao['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_zhipiao['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=0;
end;
procedure Tfrm_ch_balance_pay.t_ch_zhipiaoBeforeEdit(DataSet: TDataSet);
begin
if not modify_all then
begin
if t_ch_zhipiao.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_zhipiao.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_balance_pay.t_ch_zhipiaoBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_zhipiao,'֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
table_before_post(t_ch_zhipiao,'<27>ұ<EFBFBD>');
// table_before_post(t_ch_zhipiao,'֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_balance_pay.bsSkinPageControl1Change(Sender: TObject);
begin
if not ch_balance_pay_open then exit;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet2 then begin
if not t_ch_check.Active then begin
t_ch_check.close;
t_ch_check.sql.Clear;
t_ch_check.sql.Add('select * from t_ch_check where <20><><EFBFBD><EFBFBD>״̬ in (''<27><>׼֧<D7BC><D6A7>'',''<27><>ֹ<EFBFBD>޸<EFBFBD>'') ');
t_ch_check.sql.Add(' and '+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no'));
t_ch_check.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_check.open;
v_fee_do_seae.open;
v_fee_do_seai.open;
v_fee_do_aire.open;
v_fee_do_airi.open;
v_fee_do_airtruck.open;
v_fee_do_railway.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;
t_ch_fee_do_check.open;
v_fee_do_airtruck_sum.open;
v_fee_do_railway_sum.open;
end;
end;
if bsSkinPageControl1.ActivePage=bskntbshtTBS3 then begin
if t_ch_zhipiao.Active then exit;
t_ch_zhipiao.close;
t_ch_zhipiao.sql.clear;
t_ch_zhipiao.sql.add('select top 50 * from t_ch_zhipiao order by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> desc');
t_ch_zhipiao.open;
end else begin
t_ch_zhipiao.close;
end;
end;
procedure Tfrm_ch_balance_pay.zhipiaobankchange(sender: TField);
begin
try
if (t_ch_zhipiao.state=dsinsert) or (t_ch_zhipiao.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>',t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'],[])then
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
ischangecur:=false;
try
t_ch_zhipiao['<27>ұ<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27>ұ<EFBFBD>').asstring;
finally
ischangecur:=true;
end;
end;
except
;
end;
end;
procedure Tfrm_ch_balance_pay.zhipiaoCurrencychange(sender: TField);
begin
//֧Ʊ<D6A7>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>
if ischangecur then begin
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',t_ch_zhipiao.fieldbyname('<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_sys_bank['<27>ұ<EFBFBD>']<>t_ch_zhipiao['<27>ұ<EFBFBD>'] then begin
if frm_data_share.t_sys_bank.Locate('<27>ұ<EFBFBD>',t_ch_zhipiao['<27>ұ<EFBFBD>'],[]) then begin
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
end else begin
if frm_data_share.t_sys_bank.Locate('<27>ұ<EFBFBD>',t_ch_zhipiao['<27>ұ<EFBFBD>'],[]) then begin
t_ch_zhipiao['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
if not t_ch_zhipiao.fieldbyname('֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>').IsNull then
zhipiaonumchange(sender)
else begin
if t_ch_zhipiao['<27>ұ<EFBFBD>']='RMB' then begin
snccy.CurrencySymbol:='<27><>';
Label104.Visible:=false;
Label111.Visible:=True;
end else begin
snccy.CurrencySymbol:='$';
Label104.Visible:=true;
Label111.Visible:=false;
end;
end;
end;
procedure Tfrm_ch_balance_pay.zhipiaocustchange(sender: TField);
begin
//֧Ʊ<D6A7><C6B1><EFBFBD>Ŀͻ<C4BF><CDBB><EFBFBD><EFBFBD><EFBFBD>
try
if (t_ch_zhipiao.state=dsinsert) or (t_ch_zhipiao.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>',t_ch_zhipiao['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[])then
if t_ch_zhipiao['<27>ұ<EFBFBD>']='RMB' then begin
t_ch_zhipiao['<27>տλ']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB').asstring;
t_ch_zhipiao['<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>RMB').asstring;
end else begin
t_ch_zhipiao['<27>տλ']:=frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD').asstring;
t_ch_zhipiao['<27>տ<EFBFBD><D5BF><EFBFBD><EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>USD').asstring;
end;
end;
except
;
end;
end;
procedure Tfrm_ch_balance_pay.zhipiaodatechange(sender: TField);
begin
t_ch_zhipiao['<27><>']:=my_strtoyear(Sender.AsDateTime);
t_ch_zhipiao['<27><>']:=my_strtomonth(Sender.AsDateTime);
t_ch_zhipiao['<27><>']:=my_strtodday(Sender.AsDateTime);
t_ch_zhipiao['<27><>С']:=FormatDateTime('YY',Sender.AsDateTime);
t_ch_zhipiao['<27><>С']:=FormatDateTime('MM',Sender.AsDateTime);
t_ch_zhipiao['<27><>С']:=FormatDateTime('DD',Sender.AsDateTime);
end;
procedure Tfrm_ch_balance_pay.zhipiaonumchange(sender: TField);
var
lowamont:String;
lenlowamont,i,J:Integer;
upword:array[0..12] of string[4];
begin
//֧Ʊ<D6A7><C6B1>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
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_balance_pay.bsSkinButton15Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton15.ClientToScreen(Point(0,bsSkinButton15.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_pay.MenuItem1Click(Sender: TObject);
begin
if t_ch_zhipiao.IsEmpty then
exit;
if t_ch_zhipiao.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_zhipiao.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
t_ch_zhipiao.Edit;
t_ch_zhipiao['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_zhipiao.post;
end;
sys_print('ҵ<><D2B5>֧Ʊ<D6A7><C6B1>ӡ',TMenuItem(sender).tag,t_ch_zhipiao1,nil,nil,nil,nil,nil,nil,nil,t_ch_zhipiao1,nil,nil);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton31Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton31.ClientToScreen(Point(0,bsSkinButton31.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton19Click(Sender: TObject);
begin
t_ch_zhipiao.Insert;
bsSkinPageControl4.ActivePageIndex:=1;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton20Click(Sender: TObject);
begin
table_post(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton27Click(Sender: TObject);
begin
table_post(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton23Click(Sender: TObject);
begin
table_cancel(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton29Click(Sender: TObject);
begin
table_cancel(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton22Click(Sender: TObject);
var
str:widestring;
if_shen:string;
in_id:integer;
begin
if t_ch_zhipiao.IsEmpty then
exit;
if t_ch_zhipiao.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
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_zhipiao.FieldByName('ZP_ID').asinteger;
t_ch_zhipiao.Refresh;
if not t_ch_zhipiao.locate('ZP_ID',in_id,[]) then
exit;
try
modify_all:=true;
t_ch_zhipiao.Edit;
t_ch_zhipiao['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=1;
t_ch_zhipiao['<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
t_ch_zhipiao['<27>ϳ<EFBFBD><CFB3><EFBFBD>']:=employee;
t_ch_zhipiao['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_zhipiao['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_zhipiao.post;
modify_all:=false;
except
modify_all:=false;
showmessage('<27>ϳ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton33Click(Sender: TObject);
begin
bsSkinTabSheet11.Show;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton35Click(Sender: TObject);
begin
table_Prior(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton36Click(Sender: TObject);
begin
table_next(t_ch_zhipiao);
end;
procedure Tfrm_ch_balance_pay.bsSkinButton18Click(Sender: TObject);
begin
bsSkinTabSheet12.Show;
end;
procedure Tfrm_ch_balance_pay.t_ch_zhipiaoAfterOpen(DataSet: TDataSet);
begin
t_ch_zhipiao.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=zhipiaocustchange;
t_ch_zhipiao.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').OnChange:=zhipiaodatechange;
t_ch_zhipiao.fieldbyname('֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>').OnChange:=zhipiaonumchange;
t_ch_zhipiao.fieldbyname('<27>ұ<EFBFBD>').OnChange:=zhipiaoCurrencychange;
t_ch_zhipiao.fieldbyname('<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').OnChange:=zhipiaobankchange;
end;
procedure Tfrm_ch_balance_pay.dxDBGrid21DblClick(Sender: TObject);
begin
bsSkinTabSheet12.Show;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton16Click(Sender: TObject);
begin
try
frm_ch_zhipiao_query:=tfrm_ch_zhipiao_query.Create (self);
zhipiao_query_type:=1;
frm_ch_zhipiao_query.ShowModal;
finally
frm_ch_zhipiao_query.Free;
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo3Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo3.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 else begin
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='';
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo10Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo10.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 else begin
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='';
end;
end;
procedure Tfrm_ch_balance_pay.RxDBLookupCombo11Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo11.DisplayValues[0],[])then begin
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end else begin
t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>']:='';
end;
end;
procedure Tfrm_ch_balance_pay.t_ch_zhipiaoAfterScroll(DataSet: TDataSet);
begin
if t_ch_zhipiao['<27>ұ<EFBFBD>']='RMB' then begin
snccy.CurrencySymbol:='<27><>';
Label104.Visible:=false;
Label111.Visible:=True;
end else begin
snccy.CurrencySymbol:='$';
Label104.Visible:=true;
Label111.Visible:=false;
end;
end;
procedure Tfrm_ch_balance_pay.MenuItem4Click(Sender: TObject);
var
i:integer;
delete_num:real;
usddelete_num:real;
rmbdelete_num:real;
RE:Boolean;
begin
RE:=TRUE;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>') then begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
t_ch_balance.Edit;
delete_num:=0;
if t_ch_cust_befbal.IsEmpty then
exit;
if_ch_delete_do:=true;
delete_do_type_num:=1;
delete_num:=delete_num+t_ch_cust_befbal.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_cust_befbal.Delete;
if (delete_num<>0) then
begin
t_ch_balance.edit;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']-delete_num;
t_ch_balance.post;
end;
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
end;
procedure Tfrm_ch_balance_pay.N7Click(Sender: TObject);
var
do_num:real;
i:integer;
jia_num:real;
rate_num:real;
if_hexiao:boolean;
begin
//Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>
if t_ch_cust_befbal_sum.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if_hexiao:=true;
end
else
if_hexiao:=false;
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>');
exit;
end;
{
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
if Logininfo.endday>t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime then begin
MessageDlg('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><E3B5A5><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>޸Ļ<DEB8>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ˣ<EFBFBD>',mtError,[mbok],0);
exit;
end;
}
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit)then
begin
end else begin
t_ch_balance.edit;
end;
jia_num:=0;
if not t_ch_cust_befbalnew.Active then t_ch_cust_befbalnew.Open;
t_rate.open;
t_ch_cust_befbalnew.Insert;
t_ch_cust_befbalnew['<27><>ʽ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_cust_befbalnew['״̬']:='¼<><C2BC>״̬';
t_ch_cust_befbalnew['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_cust_befbalnew['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD>ʽ']:=t_ch_balance['<27><><EFBFBD>ʽ'];
t_ch_cust_befbalnew['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD>']:=t_ch_cust_befbal_sum['<27><><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
if t_ch_balance.FieldByName('<27>ұ<EFBFBD>').asstring=t_ch_cust_befbal_sum.fieldbyname('<27>ұ<EFBFBD>').asstring then
begin
t_ch_cust_befbalnew['<27>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=-t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='<27><>' then
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat
else
jia_num:=jia_num-t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat
end else
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat
else
jia_num:=jia_num-t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
end;
end
else
begin
rate_num:=get_zh_cur(t_rate,t_ch_cust_befbal_sum.fieldbyname('<27>ұ<EFBFBD>').asstring,t_ch_balance.FieldByName('<27>ұ<EFBFBD>').asstring);
if rate_num=-1 then
begin
t_ch_cust_befbalnew.Cancel;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=jia_num;
t_ch_balance.post;
// update_table(bs_text,do_ban1,nil,t_ch_fee,t_ch_fee_sum,2,jia_num,str1,str2,add_fee,add_bill);
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
exit;
end
else
begin
t_ch_cust_befbalnew['<27>ұ<EFBFBD>']:=t_ch_cust_befbal_sum['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=-t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat*rate_num);
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='<27><>' then
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+s_w(strtoint(apointnum),t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat*rate_num)
else
jia_num:=jia_num-s_w(strtoint(apointnum),t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat*rate_num);
end else
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+s_w(strtoint(apointnum),t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat*rate_num)
else
jia_num:=jia_num-s_w(strtoint(apointnum),t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat*rate_num);
end;
end;
end;
t_ch_cust_befbalnew['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_cust_befbal_sum.fieldbyname('<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_cust_befbalnew.post;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=jia_num;
t_ch_balance.post;
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
end;
procedure Tfrm_ch_balance_pay.MenuItem6Click(Sender: TObject);
var
can_do_num,do_num:real;
rate_num,jia_num:real;
if_hexiao:boolean;
str1,str2:Tstringlist;
bk:TBookmark;
begin
//Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2>ּ<EFBFBD><D6BC><EFBFBD>
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring<>'ȷ<>Ϻ<EFBFBD><CFBA><EFBFBD>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if_hexiao:=true;
end
else
if_hexiao:=false;
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>');
exit;
end;
{
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
if Logininfo.endday>t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime then begin
MessageDlg('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><E3B5A5><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>޸Ļ<DEB8>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ˣ<EFBFBD>',mtError,[mbok],0);
exit;
end;
}
if t_ch_cust_befbal_sum.IsEmpty then
exit;
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit)then
begin
end else begin
t_ch_balance.edit;
end;
jia_num:=0;
if not t_ch_cust_befbalnew.Active then t_ch_cust_befbalnew.Open;
t_rate.open;
t_ch_cust_befbalnew.Insert;
t_ch_cust_befbalnew['<27><>ʽ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_ch_cust_befbalnew['״̬']:='¼<><C2BC>״̬';
t_ch_cust_befbalnew['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_cust_befbalnew['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD>ʽ']:=t_ch_balance['<27><><EFBFBD>ʽ'];
t_ch_cust_befbalnew['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD>']:=t_ch_cust_befbal_sum['<27><><EFBFBD><EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
if t_ch_balance.FieldByName('<27>ұ<EFBFBD>').asstring=t_ch_cust_befbal_sum.fieldbyname('<27>ұ<EFBFBD>').asstring then
begin
try
frm_fee_do_fen:=Tfrm_fee_do_fen.Create(application);
if not t_ch_balance.FieldByName('<27>Զ<EFBFBD>').asboolean then
begin
if can_do_num>t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat then
frm_fee_do_fen.Edit2.text:=floattostr(t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)
else
frm_fee_do_fen.Edit2.text:=floattostr(can_do_num);
end
else
frm_fee_do_fen.Edit2.text:=floattostr(t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat);
frm_fee_do_fen.ShowModal;
if frm_fee_do_fen.ModalResult = mrOk then
begin
do_num:=strtofloat(frm_fee_do_fen.Edit1.text);
end
else
begin
do_num:=0;
end;
finally
frm_fee_do_fen.Free;
frm_fee_do_fen:=nil;
end;
if do_num=0 then
begin
t_ch_cust_befbalnew.Cancel;
exit;
end;
if ((t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0) and(do_num>t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)) or ((t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat<0) and(do_num<t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)) then
begin
showmessage('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĽ<D0B5><C4BD>');
t_ch_cust_befbalnew.Cancel;
exit;
end;
t_ch_cust_befbalnew['<27>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=-do_num;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=do_num;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='<27><>' then
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+do_num
else
jia_num:=jia_num-do_num;
end else
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+do_num
else
jia_num:=jia_num-do_num;
end;
end
else
begin
rate_num:=get_zh_cur(t_rate,t_ch_cust_befbal_sum.fieldbyname('<27>ұ<EFBFBD>').asstring,t_ch_balance.FieldByName('<27>ұ<EFBFBD>').asstring);
if rate_num=-1 then
begin
t_ch_cust_befbalnew.Cancel;
exit;
end
else
begin
try
frm_fee_do_fen:=Tfrm_fee_do_fen.Create(application);
if not t_ch_balance.FieldByName('<27>Զ<EFBFBD>').asboolean then
begin
if can_do_num/rate_num>t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat then
frm_fee_do_fen.Edit2.text:=floattostr(t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)
else
frm_fee_do_fen.Edit2.text:=floattostr(can_do_num/rate_num);
end
else
frm_fee_do_fen.Edit2.text:=floattostr(t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat);
frm_fee_do_fen.ShowModal;
if frm_fee_do_fen.ModalResult = mrOk then
begin
do_num:=strtofloat(frm_fee_do_fen.Edit1.text);
end
else
begin
do_num:=0;
end;
finally
frm_fee_do_fen.Free;
frm_fee_do_fen:=nil;
end;
if do_num=0 then
begin
t_ch_cust_befbalnew.Cancel;
exit;
end;
if ((t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0) and(do_num>t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)) or ((t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat<0) and(do_num<t_ch_cust_befbal_sum.fieldbyname('Ԥ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat)) then
begin
showmessage('<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĽ<D0B5><C4BD>');
t_ch_cust_befbalnew.Cancel;
exit;
end;
t_ch_cust_befbalnew['<27>ұ<EFBFBD>']:=t_ch_cust_befbal_sum['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_cust_befbalnew['Ԥ<>ս<EFBFBD><D5BD><EFBFBD>']:=-do_num;
t_ch_cust_befbalnew['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=do_num*rate_num;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='<27><>' then
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+do_num*rate_num
else
jia_num:=jia_num-do_num*rate_num;
end else
begin
if t_ch_cust_befbal_sum.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='<27><>'then
jia_num:=jia_num+do_num*rate_num
else
jia_num:=jia_num-do_num*rate_num;
end;
end;
end;
t_ch_cust_befbalnew['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_cust_befbal_sum.fieldbyname('<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_cust_befbalnew.Post;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=jia_num;
t_ch_balance.post;
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
end;
procedure Tfrm_ch_balance_pay.t_ch_cust_befbal_sumAfterOpen(
DataSet: TDataSet);
begin
if not t_ch_cust_befbal_sum.IsEmpty then begin
Label118.Font.Color:=clred;
Label117.Font.Color:=clred;
end else begin
Label118.Font.Color:=clBlack;
Label117.Font.Color:=clBlack;
end;
end;
procedure Tfrm_ch_balance_pay.MenuItem3Click(Sender: TObject);
var strBillNo,str_feeValid:string;
begin
if t_ch_balance.IsEmpty then begin
Showmessage('û<><C3BB><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
strBillNo:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
if not if_open('035') 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
if t_ch_balance.State in [dsedit,dsinsert] then t_ch_balance.post;
t_ch_balance.Refresh;
modify_all:=true;
shench:=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;
str_feeValid:=SetfeeValid(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring);
if trim(str_feeValid) <>'' then
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD>'+#13#10+str_feeValid);
end;
shench:=false;
modify_all:=false;
except
shench:=false;
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_pay.N8Click(Sender: TObject);
var aAdoQuery,bAdoQuery:TAdoQuery;
s,s1:string;
i:Integer;
begin
if t_ch_balance.IsEmpty then
exit;
if dxDBGrid1.SelectedCount<1 then
begin
exit;
end;
s:='';
try
aAdoQuery:=CreateAdoQuery;
bAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;sql.Clear;
sql.Add('select ');
sql.Add('sum(case <20>ұ<EFBFBD> when ''USD'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as USDAMT');
sql.Add(',sum(case <20>ұ<EFBFBD> when ''RMB'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as RMBAMT');
sql.Add('From t_ch_fee_do');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
end;
with bAdoQuery do
begin
Close;sql.Clear;
sql.Add('select do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>,count(*)');
sql.Add('from t_ch_fee_do do');
sql.Add('left join V_op_bscard_All v on do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=v.<2E><><EFBFBD><EFBFBD>');
sql.Add('where do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
sql.Add('group by do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>');
sql.Add('having count(*)>1');
end;
t_ch_balance.DisableControls;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_ch_balance.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
aAdoQuery.close;
aAdoQuery.Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
aAdoQuery.open;
bAdoQuery.close;
bAdoQuery.Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
bAdoQuery.open;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Value<> aAdoQuery.FieldByName('RMBAMT').Value)
or (t_ch_balance.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Value<> aAdoQuery.FieldByName('USDAMT').Value) then
begin
if s='' then s:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+':USD'+FormatFloat('0;0;0',aAdoQuery.FieldByName('USDAMT').AsFloat)+' RMB:'+FormatFloat('0;0;0',aAdoQuery.FieldByName('RMBAMT').AsFloat)
else s:=s+#13#10+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+':USD'+FormatFloat('0;0;0',aAdoQuery.FieldByName('USDAMT').AsFloat)+' RMB:'+FormatFloat('0;0;0',aAdoQuery.FieldByName('RMBAMT').AsFloat);
end;
if not bAdoQuery.IsEmpty then
begin
if s1='' then s1:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString
else s1:=s1+#13#10+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
end;
end;
finally
aAdoQuery.Free;
bAdoQuery.Free;
t_ch_balance.EnableControls;
t_ch_balance.Refresh;
if s<>'' then
ShowMessage(s);
if s1<>'' then
ShowMessage(s1);
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton17Click(Sender: TObject);
begin
if t_ch_zhipiao.IsEmpty then
exit;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_zhipiao.delete;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton34Click(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><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
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><D4AA><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>']:='<27><>';
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>ƾ֤']:='';
// t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'BP');
{
if bsSkinNotebook1.PageIndex<>0 then
getdetail;
}
notdetail:=false;
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
notdetail:=true;
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;
procedure Tfrm_ch_balance_pay.dxDBGrid20Column25CustomDraw(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
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid20Column25.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_ch_balance_pay.dxDBGrid20Column26CustomDraw(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
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid20Column26.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_ch_balance_pay.getdetail(balno:string);
begin
//<2F><><EFBFBD>ӷ<EFBFBD><D3B7>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>
if StrToBool(get_parameters_value(85,'false')) then begin
fra_ch_delete_do1.v_fee_do_bscard.close;
fra_ch_delete_do1.v_fee_do_bscard.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard.sql.add('select * from v_fee_do_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+balno+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard.Open;
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
fra_ch_delete_do1.v_fee_do_bscard_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_bscard_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_bscard '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+balno+''' 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_bscard_sum.Open;
end else begin
fra_ch_delete_do1.v_fee_do_seae.close;
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>='''+balno+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.close;
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>='''+balno+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.close;
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>='''+balno+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.close;
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>='''+balno+''' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.close;
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>='''+balno+''' 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.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.close;
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>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+''' 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.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.close;
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>='''+balno+''' 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.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.close;
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>='''+balno+''' 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.open;
end;
end;
procedure Tfrm_ch_balance_pay.closedetail;
begin
//<2F>ر<EFBFBD><D8B1><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
if StrToBool(get_parameters_value(85,'false')) then begin
fra_ch_delete_do1.v_fee_do_bscard.close;
fra_ch_delete_do1.v_fee_do_bscard_sum.close;
end else begin
fra_ch_delete_do1.v_fee_do_seae.close;
fra_ch_delete_do1.v_fee_do_seai.close;
fra_ch_delete_do1.v_fee_do_aire.close;
fra_ch_delete_do1.v_fee_do_airi.close;
fra_ch_delete_do1.v_fee_do_seae_sum.close;
fra_ch_delete_do1.v_fee_do_seai_sum.close;
fra_ch_delete_do1.v_fee_do_aire_sum.close;
fra_ch_delete_do1.v_fee_do_airi_sum.close;
end;
end;
{
SELECT *
FROM ch_check
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> = '3')) and (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>'')
order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
procedure Tfrm_ch_balance_pay.fra_ch_add_do1bsSkinButton8Click(
Sender: TObject);
begin
fra_ch_add_do1.bsSkinButton8Click(Sender);
end;
procedure Tfrm_ch_balance_pay.fra_ch_add_do1MenuItem1Click(
Sender: TObject);
begin
fra_ch_add_do1.MenuItem1Click(Sender);
end;
procedure Tfrm_ch_balance_pay.dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_ch_balance,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_balance_pay.dxDBGrid2SelectedCountChange(
Sender: TObject);
var i:integer;
amt,usdAmt:Double;
begin
if t_ch_check.IsEmpty then
exit;
if dxDBGrid2.SelectedCount>=1 then
begin
amt:=0;
usdAmt:=0;
for i:=0 to dxDBGrid2.SelectedCount-1 do
begin
t_ch_check.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
if t_ch_check.fieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
amt:=amt+t_ch_check.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
else usdAmt:=usdAmt+t_ch_check.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
end
else
begin
amt:=0;
usdAmt:=0;
if t_ch_check.fieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
amt:=amt+t_ch_check.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat
else usdAmt:=usdAmt+t_ch_check.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
Label130.Caption:='<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>'+inttostr(dxDBGrid2.SelectedCount)+'Ʊҵ<C6B1><D2B5>,'+'RMB<4D><42><EFBFBD><EFBFBD>:'+FormatFloat('#,##,0.00;-0.00',amt)+' <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>:'+FormatFloat('#,##,0.00;-0.00',usdAmt);
end;
procedure Tfrm_ch_balance_pay.SelectAddVouchers;
var t_cw_design,aQuery,bQuery,aAdoQueryCheck:TAdoQuery;
s_error:string;
i:integer;
begin
if not if_open('185') and not if_open('523') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
try
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=dxDBGrid1.SelectedCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
t_ch_balance.DisableControls;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_ch_balance.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if trim(GetBalanceVou(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString))<>'' then
begin
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD><CEAA>');
Exit;
end;
if t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=0 then
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB8BD><EFBFBD><EFBFBD>');
Exit;
end;
if Trim(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='' then
begin
ShowMessage(t_ch_balance.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+' û<>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
Exit;
end;
if Trim(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)<>employee then
begin
ShowMessage('<27>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>:'+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+', <20><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>Ա<EFBFBD><D4B1>');
end;
s_error:='';
aAdoQueryCheck:=CreateAdoQuery;
with aAdoQueryCheck do
try
close;sql.Clear;
sql.Add('select v.<2E><><EFBFBD><EFBFBD><E1B5A5>,v.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee fee');
sql.Add('left JOIN t_ch_fee_do do on fee.<2E><><EFBFBD><EFBFBD>=do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and fee.ch_id=do.ch_id');
sql.Add('left join V_op_bscard_All v on fee.<2E><><EFBFBD><EFBFBD>=v.<2E><><EFBFBD><EFBFBD>');
sql.Add('where do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and ((fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0 and fee.<2E><><EFBFBD><EFBFBD><>0) or (fee.<2E><><EFBFBD><EFBFBD>>0 and fee.<2E><><EFBFBD><EFBFBD><fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) or (fee.<2E><><EFBFBD><EFBFBD><0 and fee.<2E><><EFBFBD><EFBFBD>>fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>))');
sql.Add('and do.<2E><><EFBFBD><EFBFBD> in (3,4) ');
sql.Add('');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
Open;First;
while not Eof do
begin
if Trim(s_error)='' then
s_error:=fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else s_error:=s_error+#13#10+fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
Next;
end;
if Trim(s_error)<>'' then
begin
ShowMessage(s_error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><ECB3A3><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
s_error:='';
Close;sql.Clear;
sql.Add('select ');
sql.Add('sum(case <20>ұ<EFBFBD> when ''USD'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as USDAMT');
sql.Add(',sum(case <20>ұ<EFBFBD> when ''RMB'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as RMBAMT');
sql.Add('From t_ch_fee_do');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
open;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Value<> FieldByName('RMBAMT').Value)
or (t_ch_balance.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Value<> FieldByName('USDAMT').Value) then
begin
s_error:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+':USD'+FormatFloat('0;0;0',FieldByName('USDAMT').AsFloat)+' RMB:'+FormatFloat('0;0;0',FieldByName('RMBAMT').AsFloat);
end;
if Trim(s_error)<>'' then
begin
ShowMessage(s_error+#13#10+'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
finally
free;
end;
try
s_error:='';
bQuery:=CreateAdoQuery;
with bQuery do
begin
Close;sql.Clear;
sql.Add('select do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>,count(*)');
sql.Add('from t_ch_fee_do do');
sql.Add('left join V_op_bscard_All v on do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=v.<2E><><EFBFBD><EFBFBD>');
sql.Add('where do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
sql.Add('group by do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>');
sql.Add('having count(*)>1');
Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
open;
end;
if not bQuery.IsEmpty then
begin
if s_error='' then s_error:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString
else s_error:=s_error+#13#10+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
ShowMessage(s_error+#13#10+'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
finally
bQuery.Free;
end;
end
finally
t_ch_balance.EnableControls;
frm_sys_progress.Close;
frm_sys_progress.Free;
frm_sys_progress:=nil;
end;
try
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=dxDBGrid1.SelectedCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
t_cw_design:=CreateAdoQuery;
with t_cw_design do
begin
Close;Sql.Clear;
SQL.Add('select * from t_cw_design');
Open;
end;
aQuery:=CreateAdoQuery;
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_ch_balance set <20><><EFBFBD><EFBFBD>=1,<2C><><EFBFBD><EFBFBD>ƾ֤=:<3A><><EFBFBD><EFBFBD>ƾ֤,ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>=:ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD> where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
dmacc:=TdmAcc.Create(self);
t_ch_balance.DisableControls;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_ch_balance.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
NewDCVou(t_ch_balance,dmacc.AdotblVou,dmacc.AdotblVouItems,t_cw_design,employee
,Logininfo.bsDate,6.25,6.3,True);
{
if not assigned(frm_cw_pingzheng) then
frm_cw_pingzheng:=tfrm_cw_pingzheng.Create (self);
frm_cw_pingzheng.ManualDock(frm_main.SearchTabs('frm_cw_pingzheng',frm_cw_pingzheng.caption),nil,alClient);
frm_cw_pingzheng.EditOrdNoFrm.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng.EditOrdNoTo.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng.show;
}
aQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>ƾ֤').Value:=dmacc.ADOTblVou.fieldbyname('ordno').AsString;
aQuery.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
aQuery.Parameters.ParamByName('ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>').Value:=Logininfo.bsDate;
// aQuery.Parameters.ParamByName('ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value);
aQuery.ExecSQL;
end;
// bsSkinButton1.OnClick(bsSkinButton1);
finally
frm_sys_progress.Close;
frm_sys_progress.Free;
frm_sys_progress:=nil;
t_ch_balance.EnableControls;
t_ch_balance.Requery();
t_cw_design.Free;
aQuery.Free;
freeAndNil(dmacc);
end;
end;
procedure Tfrm_ch_balance_pay.AddVouchers;
var t_cw_design,aQuery,bQuery,aAdoQueryCheck:TAdoQuery;
s_error:string;
i:integer;
begin
if not if_open('185') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if trim(GetBalanceVou(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString))<>'' then
begin
showmessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD><CEAA>');
Exit;
end;
if t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=0 then
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB8BD><EFBFBD><EFBFBD>');
Exit;
end;
if Trim(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='' then
begin
ShowMessage(t_ch_balance.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+' û<>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
Exit;
end;
if Trim(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)<>employee then
begin
ShowMessage('<27>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>:'+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+', <20><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>Ա<EFBFBD><D4B1>');
end;
s_error:='';
aAdoQueryCheck:=CreateAdoQuery;
with aAdoQueryCheck do
try
close;sql.Clear;
sql.Add('select v.<2E><><EFBFBD><EFBFBD><E1B5A5>,v.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD>,fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee fee');
sql.Add('left JOIN t_ch_fee_do do on fee.<2E><><EFBFBD><EFBFBD>=do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and fee.ch_id=do.ch_id');
sql.Add('left join V_op_bscard_All v on fee.<2E><><EFBFBD><EFBFBD>=v.<2E><><EFBFBD><EFBFBD>');
sql.Add('where do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and ((fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0 and fee.<2E><><EFBFBD><EFBFBD><>0) or (fee.<2E><><EFBFBD><EFBFBD>>0 and fee.<2E><><EFBFBD><EFBFBD><fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) or (fee.<2E><><EFBFBD><EFBFBD><0 and fee.<2E><><EFBFBD><EFBFBD>>fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>))');
sql.Add('and do.<2E><><EFBFBD><EFBFBD> in (3,4) ');
sql.Add('');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
Open;First;
while not Eof do
begin
if Trim(s_error)='' then
s_error:=fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else s_error:=s_error+#13#10+fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'/'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
Next;
end;
if Trim(s_error)<>'' then
begin
ShowMessage(s_error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><ECB3A3><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
s_error:='';
Close;sql.Clear;
sql.Add('select ');
sql.Add('sum(case <20>ұ<EFBFBD> when ''USD'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as USDAMT');
sql.Add(',sum(case <20>ұ<EFBFBD> when ''RMB'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as RMBAMT');
sql.Add('From t_ch_fee_do');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
open;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Value<> FieldByName('RMBAMT').Value)
or (t_ch_balance.FieldByName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Value<> FieldByName('USDAMT').Value) then
begin
s_error:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+':USD'+FormatFloat('0;0;0',FieldByName('USDAMT').AsFloat)+' RMB:'+FormatFloat('0;0;0',FieldByName('RMBAMT').AsFloat);
end;
if Trim(s_error)<>'' then
begin
ShowMessage(s_error+#13#10+'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
finally
free;
end;
try
s_error:='';
bQuery:=CreateAdoQuery;
with bQuery do
begin
Close;sql.Clear;
sql.Add('select do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>,count(*)');
sql.Add('from t_ch_fee_do do');
sql.Add('left join V_op_bscard_All v on do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=v.<2E><><EFBFBD><EFBFBD>');
sql.Add('where do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bsno');
sql.Add('group by do.ch_id,v.<2E><><EFBFBD><EFBFBD><E1B5A5>');
sql.Add('having count(*)>1');
Parameters.ParamByName('bsno').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value;
open;
end;
if not bQuery.IsEmpty then
begin
if s_error='' then s_error:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString
else s_error:=s_error+#13#10+t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value+' <20><><EFBFBD><EFBFBD><E1B5A5>:' +bQuery.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
ShowMessage(s_error+#13#10+'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>˶<EFBFBD><CBB6>ʵ<EFBFBD>');
Exit;
end;
finally
bQuery.Free;
end;
try
t_cw_design:=CreateAdoQuery;
with t_cw_design do
begin
Close;Sql.Clear;
SQL.Add('select * from t_cw_design');
Open;
end;
aQuery:=CreateAdoQuery;
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.add('update t_ch_balance set <20><><EFBFBD><EFBFBD>=1,<2C><><EFBFBD><EFBFBD>ƾ֤=:<3A><><EFBFBD><EFBFBD>ƾ֤,ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>=:ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD> where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
dmacc:=TdmAcc.Create(self);
t_ch_balance.DisableControls;
NewDCVou(t_ch_balance,dmacc.AdotblVou,dmacc.AdotblVouItems,t_cw_design,employee ,Logininfo.bsDate,6.25,6.3,false);
if frm_data_share.t_sys_company.FieldByName('<27><>Ʊ̧ͷ').AsString='' then begin
if not assigned(frm_cw_pingzheng_jku8) then
frm_cw_pingzheng_jku8:=tfrm_cw_pingzheng_jku8.Create (self);
frm_cw_pingzheng_jku8.ManualDock(frm_main.SearchTabs('frm_cw_pingzheng_jku8',frm_cw_pingzheng_jku8.caption),nil,alClient);
frm_cw_pingzheng_jku8.EditOrdNoFrm.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng_jku8.EditOrdNoTo.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng_jku8.show;
aQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>ƾ֤').Value:=dmacc.ADOTblVou.fieldbyname('ordno').AsString;
aQuery.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
aQuery.Parameters.ParamByName('ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>').Value:=Logininfo.bsDate;
end else begin
if not assigned(frm_cw_pingzheng_u8) then
frm_cw_pingzheng_u8:=tfrm_cw_pingzheng_u8.Create (self);
frm_cw_pingzheng_u8.ManualDock(frm_main.SearchTabs('frm_cw_pingzheng_u8',frm_cw_pingzheng_u8.caption),nil,alClient);
frm_cw_pingzheng_u8.EditOrdNoFrm.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng_u8.EditOrdNoTo.Text:=dmacc.AdotblVou.FieldByName('ORDNO').AsString;
frm_cw_pingzheng_u8.show;
aQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>ƾ֤').Value:=dmacc.ADOTblVou.fieldbyname('ordno').AsString;
aQuery.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
aQuery.Parameters.ParamByName('ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>').Value:=Logininfo.bsDate;
end;
// aQuery.Parameters.ParamByName('ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value);
aQuery.ExecSQL;
// bsSkinButton1.OnClick(bsSkinButton1);
finally
t_ch_balance.EnableControls;
t_ch_balance.Requery();
t_cw_design.Free;
aQuery.Free;
freeAndNil(dmacc);
end;
end;
procedure Tfrm_ch_balance_pay.dxDBGrid1CustomDraw(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 uppercase(ANode.Strings[dxDBGrid1Column40.Index])='TRUE' then begin
AFont.Color:=clMoneyGreen;
end;
end;
procedure Tfrm_ch_balance_pay.bsSkinButton37Click(Sender: TObject);
begin
if bsSkinNotebook1.PageIndex=0 then
SelectAddVouchers
else AddVouchers;
end;
end.