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.

4472 lines
151 KiB
Plaintext

This file contains ambiguous Unicode characters!

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

{$INCLUDE t_main.inc}
unit u_ch_balance_accept;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
ADODB, dxDBTLCl, dxGrClms, u_ch_delete_do, u_ch_add_do, bsdbctrls,
RxLookup, StdCtrls, Mask, DBCtrls, wwdbedit, Wwdotdot, Wwdbcomb, Menus,
XPMenu, ComCtrls, bsSkinTabs, ExtCtrls, wwdbdatetimepicker, sncCurrency,
sncDBCurrency, ToolEdit, CurrEdit, RXDBCtrl, DBCtrlsEh, AAFont, AACtrls,
RxMemDS;
type
Tfrm_ch_balance_accept = class(TForm)
t_ch_balance: TADOQuery;
t_ch_balance1: TDataSource;
t_ch_fee_do_detail: TADOQuery;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
XPMenu1: TXPMenu;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
DBEdit2: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Label25: TLabel;
Label17: TLabel;
Label12: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
DBEdit14: TDBEdit;
DBEdit1: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBMemo1: TDBMemo;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
bsSkinPanel4: TbsSkinPanel;
bsSkinPanel5: TbsSkinPanel;
Label11: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
DBEdit3: TDBEdit;
DBEdit7: TDBEdit;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBComboBox2: TwwDBComboBox;
RxDBLookupCombo5: TRxDBLookupCombo;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
RxDBLookupCombo6: TRxDBLookupCombo;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBMemo2: TDBMemo;
RxDBLookupCombo7: TRxDBLookupCombo;
DBEdit18: TDBEdit;
bsSkinPageControl2: TbsSkinPageControl;
bsSkinTabSheet3: TbsSkinTabSheet;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
bsSkinTabSheet4: TbsSkinTabSheet;
dxDBGrid3: TdxDBGrid;
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
dxDBGridDateColumn3: TdxDBGridDateColumn;
dxDBGridDateColumn4: TdxDBGridDateColumn;
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
dxDBGridDateColumn5: TdxDBGridDateColumn;
dxDBGridDateColumn6: TdxDBGridDateColumn;
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
bsSkinTabSheet6: TbsSkinTabSheet;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
dxDBGridDateColumn7: TdxDBGridDateColumn;
dxDBGridDateColumn8: TdxDBGridDateColumn;
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridColumn16: TdxDBGridColumn;
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
fra_ch_delete_do1: Tfra_ch_delete_do;
fra_ch_add_do1: Tfra_ch_add_do;
t_ch_invoice_shen: TADOQuery;
t_ch_invoice_shen1: TDataSource;
v_fee_do_seae: TADOQuery;
v_fee_do_seae1: TDataSource;
v_fee_do_seai: TADOQuery;
v_fee_do_seai1: TDataSource;
v_fee_do_aire: TADOQuery;
v_fee_do_aire1: TDataSource;
v_fee_do_airi: TADOQuery;
v_fee_do_airi1: TDataSource;
bsSkinPanel6: TbsSkinPanel;
bsSkinPageControl3: TbsSkinPageControl;
bsSkinTabSheet7: TbsSkinTabSheet;
dxDBGrid6: TdxDBGrid;
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
dxDBGridMaskColumn58: TdxDBGridMaskColumn;
dxDBGridMaskColumn59: TdxDBGridMaskColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridMaskColumn60: TdxDBGridMaskColumn;
dxDBGridDateColumn9: TdxDBGridDateColumn;
dxDBGridDateColumn10: TdxDBGridDateColumn;
dxDBGridMaskColumn61: TdxDBGridMaskColumn;
dxDBGridMaskColumn62: TdxDBGridMaskColumn;
dxDBGridMaskColumn63: TdxDBGridMaskColumn;
dxDBGridMaskColumn64: TdxDBGridMaskColumn;
dxDBGridMaskColumn65: TdxDBGridMaskColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridMaskColumn66: TdxDBGridMaskColumn;
dxDBGridMaskColumn67: TdxDBGridMaskColumn;
dxDBGridMaskColumn68: TdxDBGridMaskColumn;
dxDBGridMaskColumn69: TdxDBGridMaskColumn;
bsSkinTabSheet8: TbsSkinTabSheet;
dxDBGrid7: TdxDBGrid;
dxDBGridMaskColumn70: TdxDBGridMaskColumn;
dxDBGridMaskColumn71: TdxDBGridMaskColumn;
dxDBGridMaskColumn72: TdxDBGridMaskColumn;
dxDBGridMaskColumn73: TdxDBGridMaskColumn;
dxDBGridMaskColumn74: TdxDBGridMaskColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridMaskColumn75: TdxDBGridMaskColumn;
dxDBGridDateColumn11: TdxDBGridDateColumn;
dxDBGridDateColumn12: TdxDBGridDateColumn;
dxDBGridMaskColumn76: TdxDBGridMaskColumn;
dxDBGridMaskColumn77: TdxDBGridMaskColumn;
dxDBGridMaskColumn78: TdxDBGridMaskColumn;
dxDBGridMaskColumn79: TdxDBGridMaskColumn;
dxDBGridMaskColumn80: TdxDBGridMaskColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridMaskColumn81: TdxDBGridMaskColumn;
dxDBGridMaskColumn82: TdxDBGridMaskColumn;
dxDBGridMaskColumn83: TdxDBGridMaskColumn;
dxDBGridMaskColumn84: TdxDBGridMaskColumn;
bsSkinTabSheet9: TbsSkinTabSheet;
dxDBGrid8: TdxDBGrid;
dxDBGridMaskColumn85: TdxDBGridMaskColumn;
dxDBGridMaskColumn86: TdxDBGridMaskColumn;
dxDBGridMaskColumn87: TdxDBGridMaskColumn;
dxDBGridMaskColumn88: TdxDBGridMaskColumn;
dxDBGridMaskColumn89: TdxDBGridMaskColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGridColumn26: TdxDBGridColumn;
dxDBGridMaskColumn90: TdxDBGridMaskColumn;
dxDBGridDateColumn13: TdxDBGridDateColumn;
dxDBGridDateColumn14: TdxDBGridDateColumn;
dxDBGridMaskColumn91: TdxDBGridMaskColumn;
dxDBGridMaskColumn92: TdxDBGridMaskColumn;
dxDBGridMaskColumn93: TdxDBGridMaskColumn;
dxDBGridColumn27: TdxDBGridColumn;
dxDBGridColumn28: TdxDBGridColumn;
dxDBGridMaskColumn94: TdxDBGridMaskColumn;
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
dxDBGridMaskColumn96: TdxDBGridMaskColumn;
bsSkinTabSheet10: TbsSkinTabSheet;
dxDBGrid9: TdxDBGrid;
dxDBGridMaskColumn97: TdxDBGridMaskColumn;
dxDBGridMaskColumn98: TdxDBGridMaskColumn;
dxDBGridMaskColumn99: TdxDBGridMaskColumn;
dxDBGridMaskColumn100: TdxDBGridMaskColumn;
dxDBGridMaskColumn101: TdxDBGridMaskColumn;
dxDBGridColumn29: TdxDBGridColumn;
dxDBGridColumn30: TdxDBGridColumn;
dxDBGridMaskColumn102: TdxDBGridMaskColumn;
dxDBGridDateColumn15: TdxDBGridDateColumn;
dxDBGridDateColumn16: TdxDBGridDateColumn;
dxDBGridMaskColumn103: TdxDBGridMaskColumn;
dxDBGridMaskColumn104: TdxDBGridMaskColumn;
dxDBGridMaskColumn105: TdxDBGridMaskColumn;
dxDBGridColumn31: TdxDBGridColumn;
dxDBGridColumn32: TdxDBGridColumn;
dxDBGridMaskColumn106: TdxDBGridMaskColumn;
dxDBGridMaskColumn107: TdxDBGridMaskColumn;
dxDBGridMaskColumn108: TdxDBGridMaskColumn;
dxDBGrid10: TdxDBGrid;
dxDBGridMaskColumn109: TdxDBGridMaskColumn;
dxDBGridMaskColumn110: TdxDBGridMaskColumn;
dxDBGridMaskColumn111: TdxDBGridMaskColumn;
dxDBGridMaskColumn112: TdxDBGridMaskColumn;
dxDBGridColumn33: TdxDBGridColumn;
dxDBGridColumn34: TdxDBGridColumn;
dxDBGridColumn35: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridDateColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridDateColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridDateColumn;
bsSkinPanel7: TbsSkinPanel;
bsSkinPanel8: TbsSkinPanel;
bsSkinButton21: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
Label29: TLabel;
DBEdit19: TDBEdit;
Label30: TLabel;
DBEdit20: TDBEdit;
Label31: TLabel;
DBEdit21: TDBEdit;
Label32: TLabel;
DBEdit22: TDBEdit;
Label33: TLabel;
DBEdit23: TDBEdit;
Label34: TLabel;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
Label35: TLabel;
DBEdit26: TDBEdit;
Label36: TLabel;
DBEdit27: TDBEdit;
Label37: TLabel;
Label38: TLabel;
DBEdit28: TDBEdit;
Label39: TLabel;
DBEdit29: TDBEdit;
Label41: TLabel;
DBEdit31: TDBEdit;
Label42: TLabel;
DBMemo3: TDBMemo;
Label43: TLabel;
DBMemo4: TDBMemo;
t_ch_fee_do_invoice: TADOQuery;
v_fee_do_seae_sum: TADOQuery;
v_fee_do_seae_sum1: TDataSource;
v_fee_do_seai_sum1: TDataSource;
v_fee_do_seai_sum: TADOQuery;
v_fee_do_aire_sum: TADOQuery;
v_fee_do_aire_sum1: TDataSource;
v_fee_do_airi_sum: TADOQuery;
v_fee_do_airi_sum1: TDataSource;
bsSkinButton12: TbsSkinButton;
dxDBGrid2Column22: TdxDBGridColumn;
dxDBGrid3Column22: TdxDBGridColumn;
dxDBGrid4Column19: TdxDBGridColumn;
dxDBGrid5Column19: TdxDBGridColumn;
dxDBGrid6Column22: TdxDBGridColumn;
dxDBGrid7Column22: TdxDBGridColumn;
dxDBGrid8Column19: TdxDBGridColumn;
dxDBGrid9Column19: TdxDBGridColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGrid3Column23: TdxDBGridColumn;
dxDBGrid4Column20: TdxDBGridColumn;
dxDBGrid5Column20: TdxDBGridColumn;
dxDBGrid11: TdxDBGrid;
dxDBGrid5Column4: TdxDBGridColumn;
dxDBGrid5Column1: TdxDBGridMaskColumn;
dxDBGrid5Column2: TdxDBGridColumn;
dxDBGrid5Column5: TdxDBGridColumn;
dxDBGrid5Column6: TdxDBGridColumn;
dxDBGrid5Column3: TdxDBGridColumn;
dxDBGrid12: TdxDBGrid;
dxDBGrid6Column4: TdxDBGridColumn;
dxDBGridMaskColumn113: TdxDBGridMaskColumn;
dxDBGridColumn36: TdxDBGridColumn;
dxDBGrid6Column5: TdxDBGridColumn;
dxDBGrid6Column6: TdxDBGridColumn;
dxDBGridColumn43: TdxDBGridColumn;
dxDBGrid13: TdxDBGrid;
dxDBGrid7Column4: TdxDBGridColumn;
dxDBGridMaskColumn114: TdxDBGridMaskColumn;
dxDBGridColumn37: TdxDBGridColumn;
dxDBGrid7Column5: TdxDBGridColumn;
dxDBGrid7Column6: TdxDBGridColumn;
dxDBGridColumn44: TdxDBGridColumn;
dxDBGrid14: TdxDBGrid;
dxDBGrid8Column4: TdxDBGridColumn;
dxDBGridMaskColumn115: TdxDBGridMaskColumn;
dxDBGridColumn38: TdxDBGridColumn;
dxDBGrid8Column5: TdxDBGridColumn;
dxDBGrid8Column6: TdxDBGridColumn;
dxDBGridColumn45: TdxDBGridColumn;
dxDBGrid15: TdxDBGrid;
dxDBGridColumn39: TdxDBGridColumn;
dxDBGridMaskColumn116: TdxDBGridMaskColumn;
dxDBGridColumn46: TdxDBGridColumn;
dxDBGridColumn47: TdxDBGridColumn;
dxDBGridColumn48: TdxDBGridColumn;
dxDBGridColumn49: TdxDBGridColumn;
dxDBGrid16: TdxDBGrid;
dxDBGridColumn40: TdxDBGridColumn;
dxDBGridMaskColumn117: TdxDBGridMaskColumn;
dxDBGridColumn50: TdxDBGridColumn;
dxDBGridColumn51: TdxDBGridColumn;
dxDBGridColumn52: TdxDBGridColumn;
dxDBGridColumn53: TdxDBGridColumn;
dxDBGrid17: TdxDBGrid;
dxDBGridColumn41: TdxDBGridColumn;
dxDBGridMaskColumn118: TdxDBGridMaskColumn;
dxDBGridColumn54: TdxDBGridColumn;
dxDBGridColumn55: TdxDBGridColumn;
dxDBGridColumn56: TdxDBGridColumn;
dxDBGridColumn57: TdxDBGridColumn;
dxDBGrid18: TdxDBGrid;
dxDBGridColumn42: TdxDBGridColumn;
dxDBGridMaskColumn119: TdxDBGridMaskColumn;
dxDBGridColumn58: TdxDBGridColumn;
dxDBGridColumn59: TdxDBGridColumn;
dxDBGridColumn60: TdxDBGridColumn;
dxDBGridColumn61: TdxDBGridColumn;
bsSkinTabSheet111: TbsSkinTabSheet;
Panel1: TPanel;
dxDBGrid19: TdxDBGrid;
dxDBGridMaskColumn120: TdxDBGridMaskColumn;
dxDBGridMaskColumn121: TdxDBGridMaskColumn;
dxDBGrid2Column12: TdxDBGridColumn;
dxDBGridMaskColumn122: TdxDBGridMaskColumn;
dxDBGridMaskColumn123: TdxDBGridMaskColumn;
dxDBGridColumn62: TdxDBGridColumn;
dxDBGridColumn63: TdxDBGridColumn;
dxDBGridColumn64: TdxDBGridColumn;
dxDBGridMaskColumn124: TdxDBGridMaskColumn;
dxDBGridDateColumn17: TdxDBGridDateColumn;
dxDBGridMaskColumn125: TdxDBGridMaskColumn;
dxDBGridDateColumn18: TdxDBGridDateColumn;
bsSkinPanel9: TbsSkinPanel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label50: TLabel;
Label51: TLabel;
Label52: TLabel;
Label53: TLabel;
Label54: TLabel;
Label55: TLabel;
Label56: TLabel;
Label58: TLabel;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
DBEdit35: TDBEdit;
DBEdit36: TDBEdit;
DBMemo5: TDBMemo;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
DBEdit39: TDBEdit;
DBEdit40: TDBEdit;
bsSkinPanel10: TbsSkinPanel;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
DBEdit41: TDBEdit;
DBEdit43: TDBEdit;
DBEdit44: TDBEdit;
DBEdit46: TDBEdit;
bsSkinPageControl4: TbsSkinPageControl;
bsSkinTabSheet11: TbsSkinTabSheet;
dxDBGrid20: TdxDBGrid;
dxDBGridMaskColumn126: TdxDBGridMaskColumn;
dxDBGridMaskColumn127: TdxDBGridMaskColumn;
dxDBGridMaskColumn128: TdxDBGridMaskColumn;
dxDBGridMaskColumn129: TdxDBGridMaskColumn;
dxDBGridMaskColumn130: TdxDBGridMaskColumn;
dxDBGridColumn65: TdxDBGridColumn;
dxDBGridColumn66: TdxDBGridColumn;
dxDBGridMaskColumn131: TdxDBGridMaskColumn;
dxDBGridColumn67: TdxDBGridColumn;
dxDBGridDateColumn19: TdxDBGridDateColumn;
dxDBGridDateColumn20: TdxDBGridDateColumn;
dxDBGridMaskColumn132: TdxDBGridMaskColumn;
dxDBGridMaskColumn133: TdxDBGridMaskColumn;
dxDBGridMaskColumn134: TdxDBGridMaskColumn;
dxDBGridMaskColumn135: TdxDBGridMaskColumn;
dxDBGridMaskColumn136: TdxDBGridMaskColumn;
dxDBGridColumn68: TdxDBGridColumn;
dxDBGridColumn69: TdxDBGridColumn;
dxDBGridMaskColumn137: TdxDBGridMaskColumn;
dxDBGridMaskColumn138: TdxDBGridMaskColumn;
dxDBGridMaskColumn139: TdxDBGridMaskColumn;
dxDBGridMaskColumn140: TdxDBGridMaskColumn;
dxDBGrid21: TdxDBGrid;
dxDBGridColumn70: TdxDBGridColumn;
dxDBGridMaskColumn141: TdxDBGridMaskColumn;
dxDBGridColumn71: TdxDBGridColumn;
dxDBGridColumn72: TdxDBGridColumn;
dxDBGridColumn73: TdxDBGridColumn;
dxDBGridColumn74: TdxDBGridColumn;
bsSkinTabSheet12: TbsSkinTabSheet;
dxDBGrid22: TdxDBGrid;
dxDBGridMaskColumn142: TdxDBGridMaskColumn;
dxDBGridMaskColumn143: TdxDBGridMaskColumn;
dxDBGridMaskColumn144: TdxDBGridMaskColumn;
dxDBGridMaskColumn145: TdxDBGridMaskColumn;
dxDBGridMaskColumn146: TdxDBGridMaskColumn;
dxDBGridColumn75: TdxDBGridColumn;
dxDBGridColumn76: TdxDBGridColumn;
dxDBGridMaskColumn147: TdxDBGridMaskColumn;
dxDBGridColumn77: TdxDBGridColumn;
dxDBGridDateColumn21: TdxDBGridDateColumn;
dxDBGridDateColumn22: TdxDBGridDateColumn;
dxDBGridMaskColumn148: TdxDBGridMaskColumn;
dxDBGridMaskColumn149: TdxDBGridMaskColumn;
dxDBGridMaskColumn150: TdxDBGridMaskColumn;
dxDBGridMaskColumn151: TdxDBGridMaskColumn;
dxDBGridMaskColumn152: TdxDBGridMaskColumn;
dxDBGridColumn78: TdxDBGridColumn;
dxDBGridColumn79: TdxDBGridColumn;
dxDBGridMaskColumn153: TdxDBGridMaskColumn;
dxDBGridMaskColumn154: TdxDBGridMaskColumn;
dxDBGridMaskColumn155: TdxDBGridMaskColumn;
dxDBGridMaskColumn156: TdxDBGridMaskColumn;
dxDBGrid23: TdxDBGrid;
dxDBGridColumn80: TdxDBGridColumn;
dxDBGridMaskColumn157: TdxDBGridMaskColumn;
dxDBGridColumn81: TdxDBGridColumn;
dxDBGridColumn82: TdxDBGridColumn;
dxDBGridColumn83: TdxDBGridColumn;
dxDBGridColumn84: TdxDBGridColumn;
bsSkinTabSheet13: TbsSkinTabSheet;
dxDBGrid24: TdxDBGrid;
dxDBGridMaskColumn158: TdxDBGridMaskColumn;
dxDBGridMaskColumn159: TdxDBGridMaskColumn;
dxDBGridMaskColumn160: TdxDBGridMaskColumn;
dxDBGridMaskColumn161: TdxDBGridMaskColumn;
dxDBGridMaskColumn162: TdxDBGridMaskColumn;
dxDBGridColumn85: TdxDBGridColumn;
dxDBGridColumn86: TdxDBGridColumn;
dxDBGridMaskColumn163: TdxDBGridMaskColumn;
dxDBGridColumn87: TdxDBGridColumn;
dxDBGridDateColumn23: TdxDBGridDateColumn;
dxDBGridDateColumn24: TdxDBGridDateColumn;
dxDBGridMaskColumn164: TdxDBGridMaskColumn;
dxDBGridMaskColumn165: TdxDBGridMaskColumn;
dxDBGridMaskColumn166: TdxDBGridMaskColumn;
dxDBGridColumn88: TdxDBGridColumn;
dxDBGridColumn89: TdxDBGridColumn;
dxDBGridMaskColumn167: TdxDBGridMaskColumn;
dxDBGridMaskColumn168: TdxDBGridMaskColumn;
dxDBGridMaskColumn169: TdxDBGridMaskColumn;
dxDBGrid25: TdxDBGrid;
dxDBGridColumn90: TdxDBGridColumn;
dxDBGridMaskColumn170: TdxDBGridMaskColumn;
dxDBGridColumn91: TdxDBGridColumn;
dxDBGridColumn92: TdxDBGridColumn;
dxDBGridColumn93: TdxDBGridColumn;
dxDBGridColumn94: TdxDBGridColumn;
bsSkinTabSheet14: TbsSkinTabSheet;
dxDBGrid26: TdxDBGrid;
dxDBGridMaskColumn171: TdxDBGridMaskColumn;
dxDBGridMaskColumn172: TdxDBGridMaskColumn;
dxDBGridMaskColumn173: TdxDBGridMaskColumn;
dxDBGridMaskColumn174: TdxDBGridMaskColumn;
dxDBGridMaskColumn175: TdxDBGridMaskColumn;
dxDBGridColumn95: TdxDBGridColumn;
dxDBGridColumn96: TdxDBGridColumn;
dxDBGridMaskColumn176: TdxDBGridMaskColumn;
dxDBGridColumn97: TdxDBGridColumn;
dxDBGridDateColumn25: TdxDBGridDateColumn;
dxDBGridDateColumn26: TdxDBGridDateColumn;
dxDBGridMaskColumn177: TdxDBGridMaskColumn;
dxDBGridMaskColumn178: TdxDBGridMaskColumn;
dxDBGridMaskColumn179: TdxDBGridMaskColumn;
dxDBGridColumn98: TdxDBGridColumn;
dxDBGridColumn99: TdxDBGridColumn;
dxDBGridMaskColumn180: TdxDBGridMaskColumn;
dxDBGridMaskColumn181: TdxDBGridMaskColumn;
dxDBGridMaskColumn182: TdxDBGridMaskColumn;
dxDBGrid27: TdxDBGrid;
dxDBGridColumn100: TdxDBGridColumn;
dxDBGridMaskColumn183: TdxDBGridMaskColumn;
dxDBGridColumn101: TdxDBGridColumn;
dxDBGridColumn102: TdxDBGridColumn;
dxDBGridColumn103: TdxDBGridColumn;
dxDBGridColumn104: TdxDBGridColumn;
t_ch_accept_shen: TADOQuery;
acceptv_fee_do_airi_sum1: TDataSource;
acceptv_fee_do_airi_sum: TADOQuery;
Acceptv_fee_do_airi1: TDataSource;
Acceptv_fee_do_airi: TADOQuery;
t_ch_accept_shen1: TDataSource;
acceptv_fee_do_aire: TADOQuery;
acceptv_fee_do_aire1: TDataSource;
acceptv_fee_do_aire_sum: TADOQuery;
acceptv_fee_do_aire_sum1: TDataSource;
acceptv_fee_do_seai: TADOQuery;
acceptv_fee_do_seai1: TDataSource;
acceptv_fee_do_seai_sum: TADOQuery;
acceptv_fee_do_seai_sum1: TDataSource;
acceptv_fee_do_seae: TADOQuery;
acceptv_fee_do_seae1: TDataSource;
acceptv_fee_do_seae_sum: TADOQuery;
acceptv_fee_do_seae_sum1: TDataSource;
t_ch_fee_do_accept: TADOQuery;
bsSkinButton16: TbsSkinButton;
dxDBGrid19Column13: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
dxDBGrid1Column26: TdxDBGridColumn;
bsSkinPanel11: TbsSkinPanel;
Label57: TLabel;
Label59: TLabel;
Label60: TLabel;
Label61: TLabel;
Label62: TLabel;
Label63: TLabel;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Label69: TLabel;
Label70: TLabel;
Label71: TLabel;
DBEdit42: TDBEdit;
DBEdit45: TDBEdit;
DBEdit47: TDBEdit;
DBEdit48: TDBEdit;
DBEdit49: TDBEdit;
DBMemo6: TDBMemo;
DBEdit50: TDBEdit;
DBEdit51: TDBEdit;
DBEdit52: TDBEdit;
DBEdit53: TDBEdit;
DBEdit54: TDBEdit;
DBEdit55: TDBEdit;
DBEdit56: TDBEdit;
DBEdit57: TDBEdit;
dxDBGrid19Column14: TdxDBGridColumn;
dxDBGrid19Column15: TdxDBGridColumn;
bsSkinPanel12: TbsSkinPanel;
Label72: TLabel;
Label73: TLabel;
Label74: TLabel;
Label75: TLabel;
Label77: TLabel;
Label78: TLabel;
Label79: TLabel;
Label80: TLabel;
Label81: TLabel;
Label82: TLabel;
Label83: TLabel;
Label84: TLabel;
Label85: TLabel;
Label86: TLabel;
DBEdit58: TDBEdit;
DBEdit59: TDBEdit;
RxDBLookupCombo8: TRxDBLookupCombo;
wwDBComboBox3: TwwDBComboBox;
RxDBLookupCombo9: TRxDBLookupCombo;
DBEdit60: TDBEdit;
DBEdit61: TDBEdit;
DBEdit62: TDBEdit;
RxDBLookupCombo10: TRxDBLookupCombo;
DBEdit63: TDBEdit;
DBEdit64: TDBEdit;
DBEdit65: TDBEdit;
DBMemo7: TDBMemo;
RxDBLookupCombo11: TRxDBLookupCombo;
DBEdit66: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
DBEdit67: TDBEdit;
Label87: TLabel;
dxDBGrid1Column27: TdxDBGridColumn;
dxDBGrid1Column28: TdxDBGridColumn;
dxDBGrid6Column23: TdxDBGridColumn;
dxDBGrid7Column23: TdxDBGridColumn;
dxDBGrid8Column20: TdxDBGridColumn;
dxDBGrid9Column20: TdxDBGridColumn;
bsSkinButton38: TbsSkinButton;
RxDBLookupCombo3: TRxDBLookupCombo;
RxDBLookupCombo17: TRxDBLookupCombo;
bsSkinPanel13: TbsSkinPanel;
Label88: TLabel;
Label89: TLabel;
Label90: TLabel;
Label91: TLabel;
Label92: TLabel;
Label93: TLabel;
Label95: TLabel;
Label96: TLabel;
Label97: TLabel;
Label98: TLabel;
Label99: TLabel;
Label94: TLabel;
Label100: TLabel;
DBEdit68: TDBEdit;
DBEdit69: TDBEdit;
RxDBLookupCombo12: TRxDBLookupCombo;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
DBEdit70: TDBEdit;
DBEdit71: TDBEdit;
DBEdit72: TDBEdit;
DBEdit73: TDBEdit;
DBEdit74: TDBEdit;
DBMemo8: TDBMemo;
wwDBComboBox4: TwwDBComboBox;
RxDBLookupCombo14: TRxDBLookupCombo;
wwDBDateTimePicker2: TwwDBDateTimePicker;
DBEdit75: TDBEdit;
RxDBLookupCombo13: TRxDBLookupCombo;
RxDBLookupCombo15: TRxDBLookupCombo;
RxDBLookupCombo16: TRxDBLookupCombo;
p_update: TADOStoredProc;
tab5: TbsSkinTabSheet;
dxDBGrid28: TdxDBGrid;
dxDBGridColumn105: TdxDBGridColumn;
dxDBGridMaskColumn184: TdxDBGridMaskColumn;
dxDBGridColumn106: TdxDBGridColumn;
dxDBGridColumn107: TdxDBGridColumn;
dxDBGridColumn108: TdxDBGridColumn;
dxDBGridColumn109: TdxDBGridColumn;
dxDBGrid29: TdxDBGrid;
dxDBGridColumn110: TdxDBGridColumn;
dxDBGridMaskColumn185: TdxDBGridMaskColumn;
dxDBGridMaskColumn186: TdxDBGridMaskColumn;
dxDBGridMaskColumn187: TdxDBGridMaskColumn;
dxDBGridMaskColumn188: TdxDBGridMaskColumn;
dxDBGridMaskColumn189: TdxDBGridMaskColumn;
dxDBGridColumn111: TdxDBGridColumn;
dxDBGridColumn112: TdxDBGridColumn;
dxDBGridMaskColumn190: TdxDBGridMaskColumn;
dxDBGridColumn113: TdxDBGridColumn;
dxDBGrid9Column24: TdxDBGridColumn;
dxDBGridDateColumn27: TdxDBGridDateColumn;
dxDBGridDateColumn28: TdxDBGridDateColumn;
dxDBGridMaskColumn191: TdxDBGridMaskColumn;
dxDBGridMaskColumn192: TdxDBGridMaskColumn;
dxDBGridMaskColumn193: TdxDBGridMaskColumn;
dxDBGridMaskColumn194: TdxDBGridMaskColumn;
dxDBGridMaskColumn195: TdxDBGridMaskColumn;
dxDBGridColumn114: TdxDBGridColumn;
dxDBGridColumn115: TdxDBGridColumn;
dxDBGridMaskColumn196: TdxDBGridMaskColumn;
dxDBGridMaskColumn197: TdxDBGridMaskColumn;
dxDBGridMaskColumn198: TdxDBGridMaskColumn;
dxDBGridMaskColumn199: TdxDBGridMaskColumn;
Label101: TLabel;
DBEdit76: TDBEdit;
bskntbshtTbs3: TbsSkinTabSheet;
t_ch_jinzhang: TADOQuery;
t_ch_jinzhangDSDesigner: TStringField;
t_ch_jinzhangDSDesigner13: TStringField;
t_ch_jinzhangDSDesigner14: TStringField;
t_ch_jinzhangDSDesigner2: TDateTimeField;
t_ch_jinzhangDSDesigner3: TStringField;
t_ch_jinzhangDSDesigner4: TStringField;
t_ch_jinzhangDSDesigner5: TStringField;
t_ch_jinzhangDSDesigner6: TStringField;
t_ch_jinzhangDSDesigner7: TStringField;
t_ch_jinzhangDSDesigner8: TStringField;
t_ch_jinzhangDSDesigner9: TStringField;
t_ch_jinzhangDSDesigner10: TBCDField;
t_ch_jinzhangDSDesigner11: TStringField;
t_ch_jinzhangDSDesigner12: TStringField;
t_ch_jinzhangDSDesigner15: TStringField;
t_ch_jinzhangDSDesigner16: TBooleanField;
t_ch_jinzhangDSDesigner17: TStringField;
t_ch_jinzhangDSDesigner18: TDateTimeField;
t_ch_jinzhangDSDesigner19: TStringField;
t_ch_jinzhangDSDesigner20: TBooleanField;
t_ch_jinzhangDSDesigner21: TStringField;
t_ch_jinzhangDSDesigner22: TBooleanField;
t_ch_jinzhangDSDesigner23: TStringField;
t_ch_jinzhangDSDesigner24: TDateTimeField;
t_ch_jinzhangDSDesigner25: TStringField;
t_ch_jinzhangDSDesigner26: TDateTimeField;
t_ch_jinzhangDSDesigner27: TStringField;
t_ch_jinzhangDSDesigner28: TStringField;
t_ch_jinzhangDSDesigner29: TStringField;
t_ch_jinzhangDSDesigner30: TStringField;
t_ch_jinzhangDSDesigner31: TStringField;
t_ch_jinzhangDSDesigner32: TStringField;
t_ch_jinzhangDSDesigner33: TStringField;
t_ch_jinzhangDSDesigner34: TStringField;
t_ch_jinzhangDSDesigner35: TStringField;
t_ch_jinzhangDSDesigner36: TStringField;
t_ch_jinzhangDSDesigner37: TStringField;
t_ch_jinzhangDSDesigner38: TStringField;
t_ch_jinzhangDSDesigner39: TStringField;
t_ch_jinzhangDSDesigner40: TStringField;
t_ch_jinzhangDSDesigner41: TStringField;
t_ch_jinzhangDSDesigner42: TStringField;
t_ch_jinzhangDSDesigner43: TStringField;
t_ch_jinzhangJZ_ID: TAutoIncField;
t_ch_jinzhangDSDesigner44: TStringField;
t_ch_jinzhangDSDesigner45: TStringField;
t_ch_jinzhangDSDesigner46: TStringField;
t_ch_jinzhang1: TDataSource;
bsSkinPageControl5: TbsSkinPageControl;
bsSkinTabSheet15: TbsSkinTabSheet;
bsSkinPanel14: TbsSkinPanel;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinButton22: TbsSkinButton;
bsSkinButton23: TbsSkinButton;
bsSkinButton26: TbsSkinButton;
bsSkinButton27: TbsSkinButton;
dxDBGrid30: TdxDBGrid;
dxDBGridMaskColumn200: TdxDBGridMaskColumn;
dxDBGridMaskColumn201: TdxDBGridMaskColumn;
dxDBGridMaskColumn202: TdxDBGridMaskColumn;
dxDBGridColumn116: TdxDBGridColumn;
dxDBGridDateColumn29: TdxDBGridDateColumn;
dxDBGridMaskColumn203: TdxDBGridMaskColumn;
dxDBGridCheckColumn1: TdxDBGridCheckColumn;
dxDBGridMaskColumn204: TdxDBGridMaskColumn;
dxDBGridDateColumn30: TdxDBGridDateColumn;
dxDBGridMaskColumn205: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridCheckColumn;
dxDBGrid1Column29: TdxDBGridCheckColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridDateColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridDateColumn;
bsSkinTabSheet16: TbsSkinTabSheet;
bsSkinPanel15: TbsSkinPanel;
bsSkinButton28: TbsSkinButton;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
bsSkinButton33: TbsSkinButton;
bsSkinButton34: TbsSkinButton;
bsSkinButton35: TbsSkinButton;
bsSkinButton36: TbsSkinButton;
ScrollBox1: TScrollBox;
Label40: TLabel;
Label102: TLabel;
Label103: TLabel;
Label104: TLabel;
Shape3: TShape;
AALabel2: TAALabel;
Label105: TLabel;
Label106: TLabel;
Label107: TLabel;
Label108: TLabel;
Label109: TLabel;
Label110: TLabel;
Label111: TLabel;
Label112: TLabel;
Shape4: TShape;
Label113: TLabel;
sncCurrencyLabel2: TsncCurrencyLabel;
Label114: TLabel;
Label115: TLabel;
DBText5: TDBText;
DBText6: TDBText;
DBText7: TDBText;
DBText8: TDBText;
Label116: TLabel;
Label117: TLabel;
Label118: TLabel;
Label119: TLabel;
Label120: TLabel;
Label121: TLabel;
bsSkinPanel16: TbsSkinPanel;
Label122: TLabel;
Label123: TLabel;
DBEdit30: TDBEdit;
DBEdit77: TDBEdit;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
DBDateTimeEditEh1: TDBDateTimeEditEh;
RxDBCalcEdit1: TRxDBCalcEdit;
sncDBCurrencyEdit1: TsncDBCurrencyEdit;
DBEdit78: TDBEdit;
DBComboBox1: TDBComboBox;
DBEdit79: TDBEdit;
DBEdit80: TDBEdit;
DBEdit81: TDBEdit;
DBEdit82: TDBEdit;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N20: TMenuItem;
Label124: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
dxDBGrid1Column37: TdxDBGridColumn;
dxDBGrid1Column38: TdxDBGridColumn;
dxDBGrid1Column39: TdxDBGridColumn;
Label125: TLabel;
RxDBLookupCombo21: TRxDBLookupCombo;
DBEdit83: TDBEdit;
DBEdit84: TDBEdit;
t_ch_jinzhangDSDesigner47: TStringField;
RxDBLookupCombo18: TRxDBLookupCombo;
PopupMenu3: TPopupMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
Label126: TLabel;
tab6: TbsSkinTabSheet;
bsSkinGroupBox2: TbsSkinGroupBox;
dxDBGrid31: TdxDBGrid;
dxDBGridMaskColumn206: TdxDBGridMaskColumn;
dxDBGridMaskColumn207: TdxDBGridMaskColumn;
dxDBGridMaskColumn208: TdxDBGridMaskColumn;
dxDBGridMaskColumn209: TdxDBGridMaskColumn;
dxDBGridColumn117: TdxDBGridColumn;
dxDBGrid12Column6: TdxDBGridColumn;
dxDBGrid12Column7: TdxDBGridColumn;
bs_text: TEdit;
bsSkinGroupBox1: TbsSkinGroupBox;
dxDBGrid32: TdxDBGrid;
dxDBGrid11Column1: TdxDBGridColumn;
dxDBGrid11Column4: TdxDBGridColumn;
dxDBGrid11Column2: TdxDBGridColumn;
dxDBGrid11Column3: TdxDBGridColumn;
t_ch_cust_befbal: TADOQuery;
t_ch_cust_befbal1: TDataSource;
t_ch_cust_befbalnew: TADOQuery;
t_ch_cust_befbal_sum1: TDataSource;
t_ch_cust_befbal_sum: TADOQuery;
t_rate: TRxMemoryData;
PopupMenu4: TPopupMenu;
MenuItem4: TMenuItem;
PopupMenu5: TPopupMenu;
N7: TMenuItem;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
bsSkinPageControl6: TbsSkinPageControl;
tab1: TbsSkinTabSheet;
tab2: TbsSkinTabSheet;
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;
Label127: TLabel;
DBEdit86: TDBEdit;
dxDBGrid1Column40: TdxDBGridColumn;
DBEdit85: TDBEdit;
PopupMenu6: TPopupMenu;
N5: TMenuItem;
N6: TMenuItem;
N8: TMenuItem;
bsSkinButton37: TbsSkinButton;
dxDBGrid34Column5: TdxDBGridColumn;
dxDBGrid33Column8: TdxDBGridColumn;
dxDBGrid19Column16: TdxDBGridColumn;
dbedt1: TDBEdit;
lbl1: TLabel;
dxdbgrdclmnDBGrid30Column19: TdxDBGridColumn;
bsSkinTabSheet17: TbsSkinTabSheet;
v_fee_do_bsCard: TADOQuery;
v_fee_do_bsCard1: TDataSource;
v_fee_do_bsCard_sum: TADOQuery;
v_fee_do_bsCard_sum1: TDataSource;
dxDBGrid35: TdxDBGrid;
dxDBGridColumn125: TdxDBGridColumn;
dxDBGridMaskColumn214: TdxDBGridMaskColumn;
dxDBGridColumn126: TdxDBGridColumn;
dxDBGridColumn127: TdxDBGridColumn;
dxDBGridColumn128: TdxDBGridColumn;
dxDBGridColumn129: TdxDBGridColumn;
dxDBGrid36: TdxDBGrid;
dxDBGridMaskColumn215: TdxDBGridMaskColumn;
dxDBGridMaskColumn216: TdxDBGridMaskColumn;
dxDBGridMaskColumn217: TdxDBGridMaskColumn;
dxDBGridMaskColumn218: TdxDBGridMaskColumn;
dxDBGridMaskColumn219: TdxDBGridMaskColumn;
dxDBGridColumn130: TdxDBGridColumn;
dxDBGridColumn131: TdxDBGridColumn;
dxDBGridMaskColumn220: TdxDBGridMaskColumn;
dxDBGridColumn132: TdxDBGridColumn;
dxDBGridDateColumn31: TdxDBGridDateColumn;
dxDBGridDateColumn32: TdxDBGridDateColumn;
dxDBGridMaskColumn221: TdxDBGridMaskColumn;
dxDBGridMaskColumn222: TdxDBGridMaskColumn;
dxDBGridMaskColumn223: TdxDBGridMaskColumn;
dxDBGridColumn133: TdxDBGridColumn;
dxDBGridColumn134: TdxDBGridColumn;
dxDBGridMaskColumn224: TdxDBGridMaskColumn;
dxDBGridMaskColumn225: TdxDBGridMaskColumn;
dxDBGridMaskColumn226: TdxDBGridMaskColumn;
dxDBGridColumn135: TdxDBGridColumn;
bsSkinTabSheet18: TbsSkinTabSheet;
dxDBGrid37: TdxDBGrid;
dxDBGridColumn136: TdxDBGridColumn;
dxDBGridMaskColumn227: TdxDBGridMaskColumn;
dxDBGridColumn137: TdxDBGridColumn;
dxDBGridColumn138: TdxDBGridColumn;
dxDBGridColumn139: TdxDBGridColumn;
dxDBGridColumn140: TdxDBGridColumn;
dxDBGrid38: TdxDBGrid;
dxDBGridMaskColumn228: TdxDBGridMaskColumn;
dxDBGridMaskColumn229: TdxDBGridMaskColumn;
dxDBGridMaskColumn230: TdxDBGridMaskColumn;
dxDBGridMaskColumn231: TdxDBGridMaskColumn;
dxDBGridMaskColumn232: TdxDBGridMaskColumn;
dxDBGridColumn141: TdxDBGridColumn;
dxDBGridColumn142: TdxDBGridColumn;
dxDBGridMaskColumn233: TdxDBGridMaskColumn;
dxDBGridColumn143: TdxDBGridColumn;
dxDBGridDateColumn33: TdxDBGridDateColumn;
dxDBGridDateColumn34: TdxDBGridDateColumn;
dxDBGridMaskColumn234: TdxDBGridMaskColumn;
dxDBGridMaskColumn235: TdxDBGridMaskColumn;
dxDBGridMaskColumn236: TdxDBGridMaskColumn;
dxDBGridMaskColumn237: TdxDBGridMaskColumn;
dxDBGridMaskColumn238: TdxDBGridMaskColumn;
dxDBGridColumn144: TdxDBGridColumn;
dxDBGridColumn145: TdxDBGridColumn;
dxDBGridMaskColumn239: TdxDBGridMaskColumn;
dxDBGridMaskColumn240: TdxDBGridMaskColumn;
dxDBGridMaskColumn241: TdxDBGridMaskColumn;
dxDBGridMaskColumn242: TdxDBGridMaskColumn;
dxDBGrid36Column21: TdxDBGridColumn;
dxDBGrid38Column23: TdxDBGridColumn;
dxDBGrid36Column22: TdxDBGridColumn;
dxDBGrid38Column24: TdxDBGridColumn;
dxDBGrid1Column41: TdxDBGridColumn;
Label128: TLabel;
DBMemo9: TDBMemo;
Panel2: TPanel;
Label129: TLabel;
Panel3: TPanel;
Label130: TLabel;
Label131: TLabel;
DBEdit87: TDBEdit;
Label132: TLabel;
DBEdit88: TDBEdit;
bsSkinButton39: 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_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;
t_ch_balanceField: TFloatField;
t_ch_balanceField2: TFloatField;
dxDBGrid36Column23: TdxDBGridColumn;
dxDBGrid36Column24: TdxDBGridColumn;
bsSkinButton40: TbsSkinButton;
t_ch_balanceDSDesigner18: TStringField;
bsSkinButton41: TbsSkinButton;
dxDBGrid1Column42: TdxDBGridColumn;
t_ch_balanceDSDesigner34: TStringField;
v_fee_do_bsCard_sum_ttl: TADOQuery;
v_fee_do_bsCard_sum_ttl1: TDataSource;
bsotherfee: TbsSkinTabSheet;
Label133: TLabel;
RxDBLookupCombo19: TRxDBLookupCombo;
Label134: TLabel;
DBEdit89: TDBEdit;
Label135: TLabel;
DBEdit90: TDBEdit;
Label136: TLabel;
DBEdit91: TDBEdit;
t_ch_balanceDSDesigner35: TStringField;
t_ch_balanceDSDesigner36: TBCDField;
t_ch_balanceDSDesigner37: TBCDField;
t_ch_balanceDSDesigner38: TBCDField;
dxDBGrid1Column43: TdxDBGridColumn;
dxDBGrid1Column44: TdxDBGridColumn;
dxDBGrid1Column45: TdxDBGridColumn;
Label137: TLabel;
DBEdit92: TDBEdit;
Label138: TLabel;
DBEdit93: TDBEdit;
RxDBLookupCombo22: TRxDBLookupCombo;
Label139: TLabel;
Label140: TLabel;
Label141: TLabel;
Label142: TLabel;
RxDBLookupCombo24: TRxDBLookupCombo;
Label143: TLabel;
Label144: TLabel;
DBEdit96: TDBEdit;
t_ch_balanceDSDesigner39: TStringField;
Label145: TLabel;
DBMemo10: TDBMemo;
dxDBGrid1Column46: TdxDBGridColumn;
DBMemo11: TDBMemo;
Label146: TLabel;
pm1: TPopupMenu;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
t_ch_balanceSel: TADOQuery;
t_ch_balanceSel1: TDataSource;
lbl2: TLabel;
dbmmo1: TDBMemo;
lbl3: TLabel;
t_ch_balanceDSDesigner40: TStringField;
dxdbgrdclmnDBGrid1Column47: 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 bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_ch_balanceBeforePost(DataSet: TDataSet);
procedure DBEdit4Enter(Sender: TObject);
procedure t_ch_balanceBeforeEdit(DataSet: TDataSet);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure DBEdit1Change(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure t_ch_balanceAfterPost(DataSet: TDataSet);
procedure t_ch_balanceAfterDelete(DataSet: TDataSet);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure DBEdit2Change(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure t_ch_balanceCalcFields(DataSet: TDataSet);
procedure bsSkinButton38Click(Sender: TObject);
procedure RxDBLookupCombo15Change(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure RxDBLookupCombo15Exit(Sender: TObject);
procedure RxDBLookupCombo15Enter(Sender: TObject);
procedure t_ch_balanceBeforeDelete(DataSet: TDataSet);
procedure dxDBGrid6DblClick(Sender: TObject);
procedure dxDBGrid7DblClick(Sender: TObject);
procedure dxDBGrid8DblClick(Sender: TObject);
procedure dxDBGrid9DblClick(Sender: TObject);
procedure t_ch_jinzhangAfterInsert(DataSet: TDataSet);
procedure t_ch_jinzhangBeforePost(DataSet: TDataSet);
procedure N1Click(Sender: TObject);
procedure bsSkinButton33Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure dxDBGrid30DblClick(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure bsSkinButton34Click(Sender: TObject);
procedure bsSkinButton35Click(Sender: TObject);
procedure bsSkinButton36Click(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure t_ch_jinzhangAfterOpen(DataSet: TDataSet);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure RxDBLookupCombo3Change(Sender: TObject);
procedure RxDBLookupCombo10Change(Sender: TObject);
procedure RxDBLookupCombo6Change(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem3Click(Sender: TObject);
procedure t_ch_jinzhangAfterScroll(DataSet: TDataSet);
procedure MenuItem4Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure MenuItem6Click(Sender: TObject);
procedure t_ch_cust_befbal_sumAfterOpen(DataSet: TDataSet);
procedure N5Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure bsSkinButton37Click(Sender: TObject);
procedure bsSkinNotebook1PageChanged(Sender: TObject);
procedure fra_ch_add_do1MenuItem1Click(Sender: TObject);
procedure dxDBGrid10SelectedCountChange(Sender: TObject);
procedure dxDBGrid19SelectedCountChange(Sender: TObject);
procedure bsSkinButton39Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton40Click(Sender: TObject);
procedure dxDBGrid29DblClick(Sender: TObject);
procedure dxDBGrid36DblClick(Sender: TObject);
procedure dxDBGrid38DblClick(Sender: TObject);
procedure RxDBLookupCombo19Change(Sender: TObject);
procedure DBEdit89Exit(Sender: TObject);
procedure MenuItem7Click(Sender: TObject);
procedure MenuItem9Click(Sender: TObject);
procedure RxDBLookupCombo24Change(Sender: TObject);
private
shench,isjinzhang,ischangecur:boolean;
procedure jinzhangnumchange(sender:TField);
procedure jinzhangdatechange(sender:TField);
procedure jinzhangbankchange(sender:TField);
procedure jinzhangcustchange(sender:TField);
procedure jinzhangcurrchange(sender:TField);
procedure getdetail(balno:string);
procedure closedetail;
{ Private declarations }
public
{ Public declarations }
end;
var
ch_balance_accept_open,notdetail:boolean;
frm_ch_balance_accept: Tfrm_ch_balance_accept;
implementation
uses u_main, my_sys_function, u_ch_balance_query, u_data_share,
u_ch_invoice_do, u_ch_shen_query{$IFDEF SFLIUCHENG},u_ch_accept_do,
u_ch_invoice_query, u_select_curr, u_ch_zhipiao_query,
u_fee_do_fen, u_sys_progress, u_cw_pingzheng, dmAccu{$ENDIF};
{$R *.dfm}
procedure Tfrm_ch_balance_accept.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_accept.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ch_balance_accept_open:=false;
savereggrid(dxdbgrid1,caption+'1');
savereggrid(dxdbgrid10,caption+'10');
savereggrid(dxdbgrid6,caption+'6');
savereggrid(dxdbgrid7,caption+'7');
savereggrid(dxdbgrid8,caption+'8');
savereggrid(dxdbgrid9,caption+'9');
savereggrid(dxdbgrid30,caption+'30');
savereggrid(dxdbgrid35,caption+'35');
savereggrid(dxdbgrid36,caption+'36');
savereggrid(fra_ch_delete_do1.dxDBGrid9,caption+'9');
savereggrid(fra_ch_add_do1.dxDBGrid19,caption+'19');
savereggrid(fra_ch_add_do1.dxDBGrid17,caption+'17');
frm_ch_balance_accept.Hide;
frm_ch_balance_accept.ManualFloat(frm_ch_balance_accept.BoundsRect );
frm_main.freeTabs('frm_ch_balance_accept');
action:=cafree;
frm_ch_balance_accept:=nil;
end;
procedure Tfrm_ch_balance_accept.FormResize(Sender: TObject);
var
i:integer;
begin
if not isjinzhang then
begin
bsSkinButton12.Visible:=false;
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;
bsSkinButton37.Width:=i;
bsSkinButton39.Width:=i;
end else begin
bsSkinButton12.Visible:=true;
i:=round(bsSkinPanel2.Width/14);
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;
bsSkinButton37.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton39.Width:=i;
end;
end;
procedure Tfrm_ch_balance_accept.FormShow(Sender: TObject);
var
i:integer;
aQuery:TAdoQuery;
rangstr:string;
begin
bsSkinNotebook1.PageIndex:=0;
if if_reg(449) and (not vold) then
isjinzhang:=true
else
isjinzhang:=false;
ischangecur:=true;
if not isjinzhang then
bskntbshtTBS3.TabVisible:=false;
shench:=false;
if not isjinzhang then begin
bsSkinButton12.Visible:=false;
i:=round(bsSkinPanel2.Width/14);
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;
bsSkinButton37.Width:=i;
bsSkinButton1.Width:=i;
end else begin
bsSkinButton12.Visible:=true;
i:=round(bsSkinPanel2.Width/15);
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;
bsSkinButton12.Width:=i;
bsSkinButton37.Width:=i;
bsSkinButton1.Width:=i;
end;
ch_balance_accept_open:=true;
notdetail:=true;
t_ch_balance.Close;
t_ch_balance.SQL.clear;
t_ch_balance.SQL.Add('select top 100 * from t_ch_balance where <20>ʵ<EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''
+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and '+open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')
+' order by <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> desc');
t_ch_balance.open;
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.Clear;
t_ch_invoice_shen.sql.Add('SELECT * FROM t_ch_invoice where 1=1 ');
t_ch_invoice_shen.sql.Add(' and (<28>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD> is null) and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>'''' ');
rangstr:=open_data('1001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>Ƶ<EFBFBD><C6B5><EFBFBD>','no','no','no');
if (rangstr<>'') then
t_ch_invoice_shen.sql.Add(' and '+rangstr );
t_ch_invoice_shen.sql.Add(' and not EXISTS (select 1 from t_ch_fee_do left JOIN t_ch_fee ON t_ch_fee.CH_ID = t_ch_fee_do.CH_ID ');
t_ch_invoice_shen.sql.Add(' where t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t_ch_invoice.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add(' 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>)');
t_ch_invoice_shen.sql.Add('AND t_ch_fee_do.<2E><><EFBFBD><EFBFBD> in (''1'', ''7''))');
t_ch_invoice_shen.sql.Add(' and EXISTS (select 1 from t_ch_fee_do ');
t_ch_invoice_shen.sql.Add(' where t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t_ch_invoice.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('AND t_ch_fee_do.<2E><><EFBFBD><EFBFBD> in (''1'', ''7''))');
t_ch_invoice_shen.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
{
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.Clear;
t_ch_invoice_shen.sql.Add('SELECT DISTINCT COL1 = T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> INTO #TEMP1');
t_ch_invoice_shen.sql.Add(' FROM t_ch_fee_do T_CH_FEE_DO1');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD> in (''1'', ''7'') ');
t_ch_invoice_shen.sql.Add('GROUP BY T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('SELECT t_ch_invoice.* ');
t_ch_invoice_shen.sql.Add('FROM #TEMP1');
t_ch_invoice_shen.sql.Add('left join t_ch_invoice on (<28>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD> is null) and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = #TEMP1.COL1');
t_ch_invoice_shen.sql.Add('where 1 = 1');
rangstr:=open_data('1001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>Ƶ<EFBFBD><C6B5><EFBFBD>','no','no','no');
if (rangstr<>'') then
t_ch_invoice_shen.sql.Add(' and '+rangstr );
t_ch_invoice_shen.sql.Add('and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOT IN (SELECT DISTINCT T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('FROM t_ch_fee_do T_CH_FEE_DO2');
t_ch_invoice_shen.sql.Add('left JOIN t_ch_fee ON t_ch_fee.CH_ID = T_CH_FEE_DO2.CH_ID');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO2.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> > (t_ch_fee.<2E><><EFBFBD><EFBFBD> - t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
t_ch_invoice_shen.sql.Add('AND T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD> in (''1'', ''7''))');
t_ch_invoice_shen.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('DROP TABLE #TEMP1');
}
{ t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.Clear;
t_ch_invoice_shen.sql.Add('SELECT DISTINCT COL1 = T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> INTO #TEMP1');
t_ch_invoice_shen.sql.Add(' FROM t_ch_fee_do T_CH_FEE_DO1');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD> in (''1'', ''7'') ');
t_ch_invoice_shen.sql.Add('GROUP BY T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('SELECT t_ch_invoice.* FROM #TEMP1,t_ch_invoice');
t_ch_invoice_shen.sql.Add('where 1 = 1 and (<28>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD> is null) and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = #TEMP1.COL1');
t_ch_invoice_shen.sql.Add('and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOT IN (SELECT DISTINCT T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('FROM t_ch_fee_do T_CH_FEE_DO2');
t_ch_invoice_shen.sql.Add('left JOIN t_ch_fee ON t_ch_fee.CH_ID = T_CH_FEE_DO2.CH_ID');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO2.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> > (t_ch_fee.<2E><><EFBFBD><EFBFBD> - t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
t_ch_invoice_shen.sql.Add('AND T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD> in (''1'', ''7''))');
t_ch_invoice_shen.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('DROP TABLE #TEMP1');
}
// t_ch_invoice_shen.open;
{
t_ch_fee_do_invoice.open;
v_fee_do_seae.Open;
v_fee_do_seai.open;
v_fee_do_aire.open;
v_fee_do_airi.open;
v_fee_do_seae_sum.Open;
v_fee_do_seai_sum.open;
v_fee_do_aire_sum.open;
v_fee_do_airi_sum.open;
}
t_ch_accept_shen.close;
t_ch_accept_shen.sql.Clear;
t_ch_accept_shen.sql.Add('SELECT * FROM t_ch_accept where ');
t_ch_accept_shen.sql.Add(open_data('1003','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no'));
t_ch_accept_shen.sql.Add(' and (<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_accept_shen.sql.Add('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_accept_shen.sql.Add('t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = ''6'')) AND (<28><><EFBFBD><EFBFBD>״̬ = ''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'') ');
t_ch_accept_shen.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
// t_ch_accept_shen.open;
{
t_ch_fee_do_accept.open;
acceptv_fee_do_seae.Open;
acceptv_fee_do_seai.open;
acceptv_fee_do_aire.open;
acceptv_fee_do_airi.open;
acceptv_fee_do_seae_sum.Open;
acceptv_fee_do_seai_sum.open;
acceptv_fee_do_aire_sum.open;
acceptv_fee_do_airi_sum.open;
}
{
fra_ch_add_do1.bsSkinTabSheet1.Visible:=false;
fra_ch_add_do1.bsSkinTabSheet2.Visible:=false;
fra_ch_add_do1.bsSkinTabSheet3.Visible:=false;
fra_ch_add_do1.bsSkinTabSheet4.Visible:=false;
}
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:='<27>շѽ<D5B7><D1BD><EFBFBD>';
// fra_ch_add_do1.bsSkinButton11.Visible:=True;
// fra_ch_add_do1.bsSkinCheckRadioBox7.Visible:=True;
fra_ch_add_do1.do_ban_fee1.DataSet:=fra_ch_delete_do1.v_fee_do_bscard;
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;
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_add_do1.bsSkinCheckRadioBox7.Visible:=True;
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;
fra_ch_add_do1.do_ban_fee1.DataSet:=fra_ch_delete_do1.v_fee_do_seae;
end;
fra_ch_add_do1.do_ban1.DataSet:=t_ch_balance;
fra_ch_add_do1.bs_text.text:='3';
fra_ch_add_do1.wwDBComboBox31.text:='<27><>';
fra_ch_add_do1.t_ch_fee_do.open;
if StrToBool(get_parameters_value(85,'false'))
then
begin
bsSkinTabSheet6.TabVisible:=false;
bsSkinTabSheet5.TabVisible:=false;
bsSkinTabSheet4.TabVisible:=false;
bsSkinTabSheet3.TabVisible:=false;
bsSkinPageControl2.ActivePage:=Tab5;
Tab5.TabVisible:=true;
end else begin
bsSkinPageControl2.ActivePage:=bsSkinTabSheet3;
bsSkinTabSheet3.TabVisible:=true;
bsSkinTabSheet4.TabVisible:=true;
bsSkinTabSheet5.TabVisible:=true;
bsSkinTabSheet6.TabVisible:=true;
Tab5.TabVisible:=false;
end;
{
if StrToBool(get_parameters_value(85,'false')) then begin
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>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_bscard.Open;
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>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_bscard_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_bscard_sum.Open;
end else begin
fra_ch_delete_do1.v_fee_do_seae.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae.sql.add('select * from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seae.Open;
fra_ch_delete_do1.v_fee_do_seai.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai.sql.add('select * from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seai.Open;
fra_ch_delete_do1.v_fee_do_aire.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire.sql.add('select * from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_aire.Open;
fra_ch_delete_do1.v_fee_do_airi.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi.sql.add('select * from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_airi.Open;
fra_ch_delete_do1.v_fee_do_seae_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seae_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seae '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seae_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seae_sum.Open;
fra_ch_delete_do1.v_fee_do_seai_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_seai_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_seai '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_seai_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_seai_sum.Open;
fra_ch_delete_do1.v_fee_do_aire_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_aire_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_aire '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_aire_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_aire_sum.Open;
fra_ch_delete_do1.v_fee_do_airi_sum.SQL.clear;
fra_ch_delete_do1.v_fee_do_airi_sum.sql.add('select <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD>,sum(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) as ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from v_fee_do_airi '
+'where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<D4AD>ұ<EFBFBD> '
+'order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7),ԭʼ<D4AD>ұ<EFBFBD>');
fra_ch_delete_do1.v_fee_do_airi_sum.DataSource:=t_ch_balance1;
fra_ch_delete_do1.v_fee_do_airi_sum.Open;
end;
}
fra_ch_delete_do1.bs_text.Text:='3';
fra_ch_delete_do1.do_ban1.DataSet:=t_ch_balance;
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_sys_bank.requery;
loadreggrid(dxdbgrid1,false,caption+'1');
loadreggrid(dxdbgrid10,false,caption+'10');
loadreggrid(dxdbgrid6,false,caption+'6');
loadreggrid(dxdbgrid7,false,caption+'7');
loadreggrid(dxdbgrid8,false,caption+'8');
loadreggrid(dxdbgrid9,false,caption+'9');
loadreggrid(dxdbgrid30,false,caption+'30');
loadreggrid(dxDBGrid35,false,caption+'35');
loadreggrid(dxDBGrid36,false,caption+'36');
loadreggrid(fra_ch_delete_do1.dxDBGrid9,false,caption+'9');
loadreggrid(fra_ch_add_do1.dxDBGrid19,false,caption+'19');
loadreggrid(fra_ch_add_do1.dxDBGrid17,false,caption+'17');
if StrToBool(get_parameters_value(83,'false')) 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;
dxdbgrid19.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid19.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=false;
dxdbgrid19.ColumnByFieldName('<27><EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=False;
dxdbgrid19.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid19.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;
fra_ch_add_do1.bsSkinPanel12.Visible:=true;
bsSkinPanel11.Visible:=True;
bsSkinPanel12.Visible:=TRUE;
bsSkinPanel13.Visible:=TRUE;
bsotherfee.TabVisible:=False;
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>').Visible:=False;
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
dxdbgrid19.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid19.ColumnByFieldName('ʵ<>ʽ<EFBFBD><CABD><EFBFBD>').Visible:=True;
dxdbgrid19.ColumnByFieldName('<27><EFBFBD><E9BFAA><EFBFBD><EFBFBD>').Visible:=True;
dxdbgrid19.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=false;
dxdbgrid19.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
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;
fra_ch_add_do1.bsSkinPanel12.Visible:=false;
bsSkinPanel11.Visible:=False;
bsSkinPanel12.Visible:=False;
bsSkinPanel13.Visible:=False;
bsotherfee.TabVisible:=true;
end;
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
wwDBDateTimePicker2.MinDate:=Logininfo.endday+1;
with frm_data_share.t_code_stlmode do begin
wwDBComboBox1.Items.Clear;
wwDBComboBox2.Items.Clear;
wwDBComboBox3.Items.Clear;
wwDBComboBox4.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);
wwDBComboBox4.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;
// tab2.TabVisible:=true;
// tab6.TabVisible:=true;
// bsSkinButton1.Enabled:=not t_ch_balance.FieldByName('ƾ֤').AsBoolean;
{$IFDEF SFLIUCHENG}
{$ELSE}
bsSkinTabSheet111.TabVisible:=false;
{$ENDIF}
{ // <20><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>
if not if_open('215') then begin
bsSkinButton1.Enabled:=false;
bsSkinButton12.Enabled:=false;
bsSkinButton2.Enabled:=false;
bsSkinButton4.Enabled:=false;
bsSkinButton3.Enabled:=false;
bsSkinButton11.Enabled:=false;
bsSkinButton6.Enabled:=false;
bsSkinButton8.Enabled:=false;
bsSkinButton25.Enabled:=false;
end;
}
// v_fee_do_bsCard_sum_ttl.Close;
//v_fee_do_bsCard_sum_ttl.Open;
if bsSkinNotebook1.PageIndex<>0 then
getdetail(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
if t_ch_balance.IsEmpty then
exit;
if DBEdit2.text='<27><><EFBFBD><EFBFBD>'then
begin
bsSkinNotebook1.PageIndex:=1;
end
else
begin
bsSkinNotebook1.PageIndex:=2;
end;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
if (t_ch_balance.State=dsinsert)or(t_ch_balance.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_ch_balance.post;
end;
if answer=mrNo then
begin
t_ch_balance.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
bsSkinNotebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterInsert(
DataSet: TDataSet);
var
sdate:tdate;
balno:string;
begin
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
sdate:=EncodeDate(Logininfo.offyear,Logininfo.offmonth,1);
if sdate>now then
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=sdate
else
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
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['Ԥ<><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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD>ʽ']:='֧Ʊ';
{
balno:=get_no(date,'BA');
t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=balno;
getdetail(balno);
}
end;
procedure Tfrm_ch_balance_accept.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton4Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if (t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>')then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then
begin
showmessage('<27><>ǰ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>ƾ֤<C6BE><D6A4>ɾ<EFBFBD><C9BE>');
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
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_accept set <20><><EFBFBD><EFBFBD>״̬='
+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+',<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;
end;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>Ʊ')then
begin
p_update.Parameters.ParamByName('SQLStr').value:='update t_ch_invoice set <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0'
+',<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;
end;
if trim(t_ch_balance.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring)<>'' then
UpdateInvoiceStatus(trim(t_ch_balance.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring),0);
delete_ch(3,t_ch_balance);
t_ch_fee_do_detail.close;
t_ch_fee_do_detail.sql.text:='select * from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_ch_fee_do_detail.open;
frm_sys_progress.bsSkinGauge1.MaxValue:=t_ch_fee_do_detail.RecordCount+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
while not t_ch_fee_do_detail.eof do
begin
Setfee(1,t_ch_fee_do_detail.fieldbyname('CH_ID').AsInteger,t_ch_fee_do_detail.fieldbyname('ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>').AsCurrency);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_ch_fee_do_detail.delete;
end;
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;
t_ch_fee_do_detail.close;
t_ch_balance.Delete;
if bsSkinNotebook1.PageIndex<>0 then
getdetail(t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString);
if t_ch_invoice_shen.active then begin
t_ch_invoice_shen.close;
t_ch_invoice_shen.open;
end;
if t_ch_accept_shen.Active then
t_ch_accept_shen.requery;
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_accept.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceBeforePost(DataSet: TDataSet);
var aAdoQuery:TAdoQuery;
s,swt:string;
begin
table_before_post(t_ch_balance,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
if not StrToBool(get_parameters_value(83,'false')) 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['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_balance['Ԥ<><D4A4><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
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,'BA');
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>'];
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
close;
SQL.clear;
sql.add('select top 2 ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD><EFBFBD><E1B5A5>');
sql.Add('from v_fee_do_bscard ');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_ch_balance.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
Open;First;
while not Eof do begin
s:=FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString+' '+FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
swt:=swt+FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString+' ';
next;
end;
t_ch_balance.FieldByName('ҵ<><D2B5><EFBFBD>ο<EFBFBD><CEBF><EFBFBD>').value:=s;
t_ch_balance.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').value:=swt;
finally
Free;
end;
end;
procedure Tfrm_ch_balance_accept.DBEdit4Enter(Sender: TObject);
begin
if bsSkinDBCheckRadioBox1.Checked then
DBEdit4.ReadOnly:=true
else
DBEdit4.ReadOnly:=false;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceBeforeEdit(DataSet: TDataSet);
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;
sdate:=Logininfo.endday+1;
if not t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
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;
end;
procedure Tfrm_ch_balance_accept.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;
RxDBLookupCombo12.ReadOnly:=false;
end
else
begin
RxDBLookupCombo1.ReadOnly:=true;
RxDBLookupCombo2.ReadOnly:=true;
RxDBLookupCombo12.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;
RxDBLookupCombo12.ReadOnly:=false;
end
else
begin
RxDBLookupCombo1.ReadOnly:=true;
RxDBLookupCombo2.ReadOnly:=true;
RxDBLookupCombo12.ReadOnly:=true;
end;
end;
end;
procedure Tfrm_ch_balance_accept.dxDBGrid1Column2CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if (ANode.strings[dxDBGrid1Column2.Index]='¼<><C2BC>״̬') then
AColor :=clwhite
else if (ANode.strings[dxDBGrid1Column2.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
AColor :=$00DDF21C;
AFont.Color:=clblack;
end;
procedure Tfrm_ch_balance_accept.DBEdit1Change(Sender: TObject);
begin
if (DBEdit1.Text='') or (DBEdit1.Text='¼<><C2BC>״̬')then
DBEdit1.Color:=clwhite
else if (DBEdit1.Text='<27><>׼<EFBFBD><D7BC>Ʊ') or (DBEdit1.Text='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
DBEdit1.Color:=$00DDF21C;
end;
procedure Tfrm_ch_balance_accept.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_ch_balance);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
pm1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept.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_accept.bsSkinButton8Click(Sender: TObject);
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not if_open('255') 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
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>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance.post;
modify_all:=false;
except
shench:=false;
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton10Click(Sender: TObject);
begin
try
frm_ch_balance_query:=tfrm_ch_balance_query.Create (self);
balance_query_type:=3;
frm_ch_balance_query.ShowModal;
bsSkinNotebook1.PageIndex:=0;
finally
frm_ch_balance_query.Free;
end;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterPost(DataSet: TDataSet);
begin
t_ch_balance.Refresh;
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_delete_do1.v_fee_do_bscard.Active 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;
end;
// fra_ch_add_do1.t_ch_fee.Requery();
// fra_ch_add_do1.t_ch_fee_sum.Requery();
delete_do_type_num:=0;
if_ch_delete_do:=false;
// t_ch_balance.Refresh;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceAfterDelete(
DataSet: TDataSet);
begin
if StrToBool(get_parameters_value(85,'false')) then begin
if fra_ch_add_do1.v_op_bscard.Active then
fra_ch_add_do1.v_op_bscard.Requery();
end else begin
if fra_ch_add_do1.t_op_seae.Active then
fra_ch_add_do1.t_op_seae.Requery();
if fra_ch_add_do1.t_op_seai.Active then
fra_ch_add_do1.t_op_seai.Requery();
if fra_ch_add_do1.t_op_aire.Active then
fra_ch_add_do1.t_op_aire.Requery();
if fra_ch_add_do1.t_op_airi.Active then
fra_ch_add_do1.t_op_airi.Requery();
end;
end;
procedure Tfrm_ch_balance_accept.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit1);
end;
procedure Tfrm_ch_balance_accept.DBEdit1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox1);
end;
procedure Tfrm_ch_balance_accept.wwDBComboBox1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_ch_balance_accept.DBEdit4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_ch_balance_accept.DBEdit5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_ch_balance_accept.DBEdit6KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
end;
procedure Tfrm_ch_balance_accept.bsSkinDBCheckRadioBox1KeyPress(
Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo3);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_ch_balance_accept.DBEdit8KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_ch_balance_accept.DBEdit9KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_ch_balance_accept.DBEdit10KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_ch_balance_accept.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,2);
end;
procedure Tfrm_ch_balance_accept.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_ch_balance,'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo2Change(Sender: TObject);
begin
if (t_ch_balance.state=dsinsert)or(t_ch_balance1.state=dsedit)then
begin
if RxDBLookupCombo2.DisplayValues[0]<>''then
begin
if frm_data_share.t_sys_bank.Locate('<27>ұ<EFBFBD>',RxDBLookupCombo2.DisplayValues[0],[])then
begin
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
end;
procedure Tfrm_ch_balance_accept.DBEdit2Change(Sender: TObject);
begin
if bsSkinNotebook1.PageIndex<>0 then
begin
if DBEdit2.text='<27><><EFBFBD><EFBFBD>'then
begin
bsSkinNotebook1.PageIndex:=1;
end
else
begin
bsSkinNotebook1.PageIndex:=2;
end;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton7Click(Sender: TObject);
begin
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.Clear;
t_ch_invoice_shen.sql.Add('SELECT DISTINCT COL1 = T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> INTO #TEMP1');
t_ch_invoice_shen.sql.Add(' FROM t_ch_fee_do T_CH_FEE_DO1');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD> in (''1'', ''7'') ');
t_ch_invoice_shen.sql.Add('GROUP BY T_CH_FEE_DO1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('SELECT t_ch_invoice.* FROM #TEMP1,t_ch_invoice');
t_ch_invoice_shen.sql.Add('where 1 = 1 and (<28>Ƿ<EFBFBD><C7B7>շ<EFBFBD>=0 or <20>Ƿ<EFBFBD><C7B7>շ<EFBFBD> is null) and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = #TEMP1.COL1');
t_ch_invoice_shen.sql.Add('and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOT IN (SELECT DISTINCT T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('FROM t_ch_fee_do T_CH_FEE_DO2');
t_ch_invoice_shen.sql.Add('left JOIN t_ch_fee ON t_ch_fee.CH_ID = T_CH_FEE_DO2.CH_ID');
t_ch_invoice_shen.sql.Add('where T_CH_FEE_DO2.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> > (t_ch_fee.<2E><><EFBFBD><EFBFBD> - t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
t_ch_invoice_shen.sql.Add('AND T_CH_FEE_DO2.<2E><><EFBFBD><EFBFBD> in (''1'', ''7''))');
t_ch_invoice_shen.sql.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.sql.Add('DROP TABLE #TEMP1');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton21Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton25Click(Sender: TObject);
var
sdate:tdate;
aList:TStringList;
i:integer;
Invnos,billnos:string;
begin
if t_ch_invoice_shen.IsEmpty then
exit;
{
if (t_ch_invoice_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>շѣ<D5B7><D1A3><EFBFBD>');
exit;
end;
}
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;
aList.Clear;
Invnos:='';
billnos:='';
try
t_ch_invoice_shen.DisableControls;
t_ch_fee_do_invoice.DisableControls;
if dxDBGrid10.SelectedCount>0 then
begin
for i:=0 to dxDBGrid10.SelectedCount-1 do
begin
t_ch_invoice_shen.GotoBookmark(pointer(dxDBGrid10.selectedrows[i]));
if aList.IndexOf(t_ch_invoice_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'])<0 then
aList.Add(t_ch_invoice_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if Invnos='' then Invnos:=t_ch_invoice_shen.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring
else Invnos:=Invnos+','+t_ch_invoice_shen.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring;
if billnos='' then billnos:=t_ch_invoice_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_invoice_shen.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
aList.Add(t_ch_invoice_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if Invnos='' then Invnos:=t_ch_invoice_shen.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring
else Invnos:=Invnos+','+t_ch_invoice_shen.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').asstring;
if billnos='' then billnos:=t_ch_invoice_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_invoice_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if aList.Count>1 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_invoice_shen.EnableControls;
t_ch_fee_do_invoice.EnableControls;
end;
try
frm_ch_invoice_do:=tfrm_ch_invoice_do.Create (self);
frm_ch_invoice_do.Memo1.text:='<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>:'+Invnos+',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+billnos+' '+t_ch_invoice_shen.fieldbyname('<27><>ע').asstring;
frm_ch_invoice_do.ShowModal;
finally
frm_ch_invoice_do.Free;
frm_ch_invoice_do:=nil;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton24Click(Sender: TObject);
begin
try
frm_ch_invoice_query:=tfrm_ch_invoice_query.Create (self);
inv_query_type:=7;
inv_query_limited:='1003';
inv_query_op_limited:='no';
frm_ch_invoice_query.ShowModal;
frm_ch_invoice_query.shen_query_limited:='1001';
finally
frm_ch_invoice_query.Free;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton12Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
t_ch_jinzhang.close;
t_ch_jinzhang.sql.clear;
t_ch_jinzhang.sql.add('select top 50 * from t_ch_jinzhang order by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> desc');
t_ch_jinzhang.open;
if StrToBool(get_parameters_value(83,'false')) 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_jinzhang.Insert;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>'];
t_ch_jinzhang['<27>ұ<EFBFBD>']:='RMB';
t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
t_ch_jinzhang.Post;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
end else begin
t_ch_jinzhang.Insert;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>'];
t_ch_jinzhang['<27>ұ<EFBFBD>']:='USD';
t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet15;
t_ch_jinzhang.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_jinzhang.Insert;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>'];
t_ch_jinzhang['<27>ұ<EFBFBD>']:='USD';
t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><>Ԫ<EFBFBD><D4AA><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
t_ch_jinzhang.Post;
end else if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat<>0) then begin
t_ch_jinzhang.Insert;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>'];
t_ch_jinzhang['<27>ұ<EFBFBD>']:='RMB';
t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
t_ch_jinzhang.Post;
end;
end else begin
t_ch_jinzhang.Insert;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_jinzhang['<27>ұ<EFBFBD>']:=t_ch_balance['<27>ұ<EFBFBD>'];
t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'] ;
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=t_ch_balance['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'] ;
bsSkinPageControl1.ActivePage:=bskntbshtTBS3;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
t_ch_jinzhang.Post;
end;
{
if t_ch_balance.IsEmpty then
exit;
try
afield := vararraycreate([0,t_ch_balance.fieldcount-1],varvariant);
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
afield[i] :=t_ch_balance.fields[i].value ;
end;
t_ch_balance.insert;
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
if t_ch_balance.fields[i].FieldName<>'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'then
t_ch_balance.fields[i].value := afield[i] ;
end;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_balance['<27>Զ<EFBFBD>']:=1;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><>Ԫ<EFBFBD><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><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance['<27><>ע']:='';
t_ch_balance['<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
bsSkinNotebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
except
if t_ch_balance.state=dsinsert then
t_ch_balance.cancel;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
}
end;
procedure Tfrm_ch_balance_accept.bsSkinButton14Click(Sender: TObject);
begin
try
frm_ch_shen_query:=tfrm_ch_shen_query.Create (self);
shen_query_type:=9;
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_accept.bsSkinButton15Click(Sender: TObject);
var
sdate:tdate;
aList:TStringList;
i:integer;
billnos:string;
begin
{$IFDEF SFLIUCHENG}
if t_ch_accept_shen.IsEmpty then
exit;
if (t_ch_accept_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>շѣ<D5B7><D1A3><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;
billnos:='';
try
t_ch_accept_shen.DisableControls;
t_ch_fee_do_accept.DisableControls;
aList.Clear;
if dxDBGrid19.SelectedCount>0 then
begin
for i:=0 to dxDBGrid19.SelectedCount-1 do
begin
t_ch_accept_shen.GotoBookmark(pointer(dxDBGrid19.selectedrows[i]));
if aList.IndexOf(t_ch_accept_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'])<0 then
aList.Add(t_ch_accept_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if billnos='' then billnos:=t_ch_accept_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_accept_shen.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
aList.Add(t_ch_accept_shen['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if billnos='' then billnos:=t_ch_accept_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
else billnos:=billnos+','+t_ch_accept_shen.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if aList.Count>1 then
begin
showmessage('û<><C3BB><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ');
exit;
end;
end;
finally
t_ch_accept_shen.EnableControls;
t_ch_fee_do_accept.EnableControls;
aList.free;
end;
try
frm_ch_accept_do:=tfrm_ch_accept_do.Create (self);
frm_ch_accept_do.Memo1.text:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+billnos;
frm_ch_accept_do.ShowModal;
finally
frm_ch_accept_do.Free;
frm_ch_accept_do:=nil;
end;
{$ENDIF}
end;
procedure Tfrm_ch_balance_accept.bsSkinButton17Click(Sender: TObject);
begin
t_ch_invoice_shen.close;
t_ch_invoice_shen.sql.clear;
t_ch_invoice_shen.sql.add('SELECT * FROM t_ch_invoice_shen '
+'WHERE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NOT IN (SELECT DISTINCT t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' FROM t_ch_fee_do INNER JOIN t_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID AND'
+' t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> >(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AND'
+' t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'1'+''''+')) AND (<28><><EFBFBD><EFBFBD>״̬ = '+''''
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ'+''''+')'
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_invoice_shen.open;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton16Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if t_ch_accept_shen.IsEmpty then
exit;
if (t_ch_accept_shen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
t_ch_accept_shen.edit;
t_ch_accept_shen['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>';
t_ch_accept_shen.Post;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>״̬ from t_op_seae where <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD>տ<EFBFBD>'' and <20><><EFBFBD><EFBFBD> in (select DISTINCT ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_accept_shen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+''')');
Open;
if not IsEmpty then begin
First;
while not eof do begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>';
Post;
Next;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_accept_shen.Requery;
end;
procedure Tfrm_ch_balance_accept.t_ch_balanceCalcFields(DataSet: TDataSet);
begin
if not StrToBool(get_parameters_value(83,'false')) then 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;
end;
end;
procedure Tfrm_ch_balance_accept.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;
end;
procedure Tfrm_ch_balance_accept.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_accept.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_accept.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_accept.RxDBLookupCombo16Exit(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo15Exit(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo15Enter(Sender: TObject);
begin
frm_data_share.t_sys_bank.Filtered:=false;
if StrToBool(get_parameters_value(83,'false')) 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_accept.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_accept.dxDBGrid6DblClick(Sender: TObject);
begin
fee_view(v_fee_do_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid7DblClick(Sender: TObject);
begin
fee_view(v_fee_do_seai.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid8DblClick(Sender: TObject);
begin
fee_view(v_fee_do_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid9DblClick(Sender: TObject);
begin
fee_view(v_fee_do_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.t_ch_jinzhangAfterInsert(
DataSet: TDataSet);
begin
t_ch_jinzhang['<27>Ƶ<EFBFBD><C6B5><EFBFBD>']:=employee;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=date;
t_ch_jinzhang['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']:=0;
t_ch_jinzhang['Ʊ<><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='֧Ʊ';
t_ch_jinzhang['<27>ұ<EFBFBD>']:='RMB';
t_ch_jinzhang['<27><><EFBFBD><EFBFBD>״̬']:=0;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=0;
sncDBCurrencyEdit1.CurrencySymbol:='<27><>';
end;
procedure Tfrm_ch_balance_accept.t_ch_jinzhangBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_ch_jinzhang,'Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>');
table_before_post(t_ch_jinzhang,'<27>ұ<EFBFBD>');
end;
procedure Tfrm_ch_balance_accept.N1Click(Sender: TObject);
begin
if t_ch_jinzhang.IsEmpty then
exit;
if t_ch_jinzhang.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_jinzhang.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
t_ch_jinzhang.Edit;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=1;
t_ch_jinzhang.post;
end;
sys_print('<27><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ӡ',TMenuItem(sender).tag,t_ch_jinzhang1,nil,nil,nil,nil,nil,nil,nil,t_ch_jinzhang1,nil,nil);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton33Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton33.ClientToScreen(Point(0,bsSkinButton33.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton18Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton18.ClientToScreen(Point(0,bsSkinButton18.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton22Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton22.ClientToScreen(Point(0,bsSkinButton22.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton23Click(Sender: TObject);
begin
table_post(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton27Click(Sender: TObject);
begin
table_cancel(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton20Click(Sender: TObject);
begin
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
end;
procedure Tfrm_ch_balance_accept.dxDBGrid30DblClick(Sender: TObject);
begin
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton29Click(Sender: TObject);
begin
table_post(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton31Click(Sender: TObject);
begin
table_cancel(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton34Click(Sender: TObject);
begin
bsSkinPageControl5.ActivePage:=bsSkinTabSheet15;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton35Click(Sender: TObject);
begin
table_Prior(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton36Click(Sender: TObject);
begin
table_next(t_ch_jinzhang);
end;
procedure Tfrm_ch_balance_accept.jinzhangbankchange(sender: TField);
begin
try
if (t_ch_jinzhang.state=dsinsert) or (t_ch_jinzhang.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_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>'],[])then begin
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_jinzhang['<27>ұ<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27>ұ<EFBFBD>').asstring;
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[])then
if t_ch_jinzhang['<27>ұ<EFBFBD>']='RMB' then begin
if frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>RMB').asstring;
end else begin
if frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>USD').asstring;
end;
ischangecur:=false;
try
finally
ischangecur:=true;
end;
end;
end;
except
;
end;
end;
procedure Tfrm_ch_balance_accept.jinzhangcustchange(sender: TField);
begin
if (t_ch_jinzhang.state=dsinsert) or (t_ch_jinzhang.state=dsedit) then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[])then
if t_ch_jinzhang['<27>ұ<EFBFBD>']='RMB' then begin
if frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>RMB').asstring;
end else begin
if frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>USD').asstring;
end;
end;
end;
procedure Tfrm_ch_balance_accept.jinzhangdatechange(sender: TField);
begin
t_ch_jinzhang['<27><>']:=my_strtoyear(t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
t_ch_jinzhang['<27><>']:=my_strtomonth(t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
t_ch_jinzhang['<27><>']:=my_strtodday(t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
t_ch_jinzhang['<27><>С']:=formatdatetime('yyyy',t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
t_ch_jinzhang['<27><>С']:=formatdatetime('m',t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
t_ch_jinzhang['<27><>С']:=formatdatetime('d',t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']);
end;
procedure Tfrm_ch_balance_accept.jinzhangnumchange(sender: TField);
var
lowamont:String;
lenlowamont,i,J:Integer;
upword:array[0..12] of string[4];
begin
if Sender.DataSet['<27>ұ<EFBFBD>']='' then exit;
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['Ʊ<>ݽ<EFBFBD><DDBD><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><>';
Label80.Visible:=false;
Label85.Visible:=True;
sncDBCurrencyEdit1.CurrencySymbol:='<27><>';
// Sender.DataSet['<27><><EFBFBD><EFBFBD>Сд']:=FloatToStr(Sender.DataSet['֧Ʊ<D6A7><C6B1><EFBFBD><EFBFBD>']);
Sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZH(FloatToStr(Sender.DataSet['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']))
end else begin
lowamont:=formatfloat('0.00',Sender.DataSet['Ʊ<>ݽ<EFBFBD><DDBD><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';
sncDBCurrencyEdit1.CurrencySymbol:='$';
Sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=DXZHUSD(FloatToStr(Sender.DataSet['Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>']));
Label80.Visible:=True;
Label85.Visible:=false;
end;
end;
procedure Tfrm_ch_balance_accept.jinzhangcurrchange(sender: TField);
begin
if ischangecur then begin
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',t_ch_jinzhang.fieldbyname('<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_sys_bank['<27>ұ<EFBFBD>']<>t_ch_jinzhang['<27>ұ<EFBFBD>'] then begin
if frm_data_share.t_sys_bank.Locate('<27>ұ<EFBFBD>',t_ch_jinzhang['<27>ұ<EFBFBD>'],[]) then begin
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_jinzhang['<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_jinzhang['<27>ұ<EFBFBD>'],[]) then begin
t_ch_jinzhang['<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>').asstring;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_bank.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
end;
///
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_jinzhang['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],[])then
if t_ch_jinzhang['<27>ұ<EFBFBD>']='RMB' then begin
if frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RMB').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>RMB').asstring;
end else begin
if frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring='' then
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring
else
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1>λ']:=frm_data_share.t_crm_client.fieldbyname('<27><>Ԫ֧Ʊ̧ͷ').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>USD').asstring;
t_ch_jinzhang['<27><>Ʊ<EFBFBD>ʺ<EFBFBD>']:=frm_data_share.t_crm_client.fieldbyname('<27>ʺ<EFBFBD>USD').asstring;
end;
end;
if not t_ch_jinzhang.FieldByName('Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>').IsNull then
jinzhangnumchange(sender)
else begin
if t_ch_jinzhang['<27>ұ<EFBFBD>']='RMB' then begin
sncDBCurrencyEdit1.CurrencySymbol:='<27><>';
Label113.Visible:=false;
Label118.Visible:=True;
end else begin
sncDBCurrencyEdit1.CurrencySymbol:='$';
Label113.Visible:=true;
Label118.Visible:=false;
end;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinPageControl1Change(Sender: TObject);
begin
if not ch_balance_accept_open then exit;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet2 then begin
t_ch_invoice_shen.Close;
if not t_ch_invoice_shen.active then
begin
if StrToBool(get_parameters_value(85,'false')) then
begin
t_ch_invoice_shen.open;
t_ch_fee_do_invoice.open;
v_fee_do_seae.Close;
v_fee_do_seai.Close;
v_fee_do_aire.Close;
v_fee_do_airi.Close;
v_fee_do_bsCard.Close;
v_fee_do_bsCard.DataSource:=t_ch_invoice_shen1;
v_fee_do_bsCard.open;
v_fee_do_seae_sum.Close;
v_fee_do_seai_sum.Close;
v_fee_do_aire_sum.Close;
v_fee_do_airi_sum.Close;
v_fee_do_bsCard_sum.Close;
v_fee_do_bsCard_sum.DataSource:=t_ch_invoice_shen1;
v_fee_do_bsCard_sum.open;
bsSkinTabSheet7.TabVisible:=false;
bsSkinTabSheet8.TabVisible:=false;
bsSkinTabSheet9.TabVisible:=false;
bsSkinTabSheet10.TabVisible:=false;
bsSkinTabSheet17.TabVisible:=true;
end
else
begin
t_ch_invoice_shen.open;
t_ch_fee_do_invoice.open;
v_fee_do_seae.Open;
v_fee_do_seai.open;
v_fee_do_aire.open;
v_fee_do_airi.open;
v_fee_do_bsCard.Close;
v_fee_do_seae_sum.Open;
v_fee_do_seai_sum.open;
v_fee_do_aire_sum.open;
v_fee_do_airi_sum.open;
v_fee_do_bsCard_sum.Close;
bsSkinTabSheet7.TabVisible:=true;
bsSkinTabSheet8.TabVisible:=true;
bsSkinTabSheet9.TabVisible:=true;
bsSkinTabSheet10.TabVisible:=true;
bsSkinTabSheet17.TabVisible:=false;
end;
end;
end else if bsSkinPageControl1.ActivePage=bsSkinTabSheet111 then
begin
t_ch_accept_shen.Close;
if not t_ch_accept_shen.active then
begin
if StrToBool(get_parameters_value(85,'false')) then
begin
t_ch_accept_shen.open;
t_ch_fee_do_accept.open;
v_fee_do_bsCard.DataSource:=t_ch_accept_shen1;
v_fee_do_bsCard.Close;
v_fee_do_bsCard.open;
acceptv_fee_do_seae.close;
acceptv_fee_do_seai.close;
acceptv_fee_do_aire.close;
acceptv_fee_do_airi.close;
acceptv_fee_do_seae_sum.close;
acceptv_fee_do_seai_sum.close;
acceptv_fee_do_aire_sum.close;
acceptv_fee_do_airi_sum.close;
v_fee_do_bsCard_sum.Close;
v_fee_do_bsCard_sum.DataSource:=t_ch_accept_shen1;
v_fee_do_bsCard_sum.open;
bsSkinTabSheet11.TabVisible:=false;
bsSkinTabSheet12.TabVisible:=false;
bsSkinTabSheet13.TabVisible:=false;
bsSkinTabSheet14.TabVisible:=false;
bsSkinTabSheet18.TabVisible:=true;
end
else
begin
t_ch_accept_shen.open;
t_ch_fee_do_accept.open;
acceptv_fee_do_seae.Open;
acceptv_fee_do_seai.open;
acceptv_fee_do_aire.open;
acceptv_fee_do_airi.open;
v_fee_do_bsCard.Close;
acceptv_fee_do_seae_sum.Open;
acceptv_fee_do_seai_sum.open;
acceptv_fee_do_aire_sum.open;
acceptv_fee_do_airi_sum.open;
v_fee_do_bsCard_sum.Close;
bsSkinTabSheet11.TabVisible:=true;
bsSkinTabSheet12.TabVisible:=true;
bsSkinTabSheet13.TabVisible:=true;
bsSkinTabSheet14.TabVisible:=true;
bsSkinTabSheet18.TabVisible:=false;
end;
end;
end;
if bsSkinPageControl1.ActivePage=bskntbshtTBS3 then begin
if t_ch_jinzhang.Active then exit;
t_ch_jinzhang.close;
t_ch_jinzhang.sql.clear;
t_ch_jinzhang.sql.add('select top 50 * from t_ch_jinzhang order by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> desc');
t_ch_jinzhang.open;
end else begin
t_ch_jinzhang.close;
end;
end;
procedure Tfrm_ch_balance_accept.t_ch_jinzhangAfterOpen(DataSet: TDataSet);
begin
t_ch_jinzhang.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=jinzhangcustchange;
t_ch_jinzhang.fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').OnChange:=jinzhangdatechange;
t_ch_jinzhang.fieldbyname('Ʊ<>ݽ<EFBFBD><DDBD><EFBFBD>').OnChange:=jinzhangnumchange;
t_ch_jinzhang.fieldbyname('<27>ұ<EFBFBD>').OnChange:=jinzhangCurrchange;
t_ch_jinzhang.fieldbyname('<27><><EFBFBD>д<EFBFBD><D0B4><EFBFBD>').OnChange:=jinzhangbankchange;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton30Click(Sender: TObject);
var
str:widestring;
if_shen:string;
in_id:integer;
begin
if t_ch_jinzhang.IsEmpty then
exit;
if t_ch_jinzhang.FieldByName('<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>').asboolean then
begin
showmessage('֧Ʊ<D6A7>Ѿ<EFBFBD><D1BE>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_ch_jinzhang.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ').asboolean then
begin
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>', '<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
if str=''then
begin
showmessage('<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3>ϳ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end
else if str=''then
begin
exit;
end;
in_id:=t_ch_jinzhang.FieldByName('JZ_ID').asinteger;
t_ch_jinzhang.Refresh;
if not t_ch_jinzhang.locate('JZ_ID',in_id,[]) then
exit;
try
modify_all:=true;
t_ch_jinzhang.Edit;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=1;
t_ch_jinzhang['<27>ϳ<EFBFBD>ԭ<EFBFBD><D4AD>']:=str;
t_ch_jinzhang['<27>ϳ<EFBFBD><CFB3><EFBFBD>']:=employee;
t_ch_jinzhang['<27>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_jinzhang.post;
modify_all:=false;
except
modify_all:=false;
showmessage('<27>ϳ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
end
else
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_jinzhang.delete
else
exit;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton19Click(Sender: TObject);
begin
try
frm_ch_zhipiao_query:=tfrm_ch_zhipiao_query.Create (self);
zhipiao_query_type:=2;
frm_ch_zhipiao_query.ShowModal;
finally
frm_ch_zhipiao_query.Free;
end;
end;
procedure Tfrm_ch_balance_accept.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_accept.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_accept.RxDBLookupCombo6Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo6.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_accept.bsSkinButton28Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton28.ClientToScreen(Point(0,bsSkinButton28.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_balance_accept.MenuItem1Click(Sender: TObject);
begin
t_ch_jinzhang.Insert;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
end;
procedure Tfrm_ch_balance_accept.MenuItem3Click(Sender: TObject);
var
afield,afieldfee : variant;
i:integer;
begin
if t_ch_jinzhang.IsEmpty then begin
exit;
MessageDlg('û<>и<EFBFBD><D0B8>Ƶ<EFBFBD><C6B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>',mtWarning,[mbok],0);
end;
afield := vararraycreate([0,t_ch_jinzhang.fieldcount-1],varvariant);
for i := 0 to (t_ch_jinzhang.fieldcount-1) do
begin
afield[i] :=t_ch_jinzhang.fields[i].value ;
end;
t_ch_jinzhang.append;
for i := 0 to (t_ch_jinzhang.fieldcount-1) do
begin
if t_ch_jinzhang.fields[i].FieldName<>'JZ_ID' then
t_ch_jinzhang.fields[i].value := afield[i] ;
end;
t_ch_jinzhang['Ʊ<>ݺ<EFBFBD><DDBA><EFBFBD>']:='';
t_ch_jinzhang['<27>Ƶ<EFBFBD><C6B5><EFBFBD>']:=employee;
t_ch_jinzhang['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=date;
t_ch_jinzhang['<27><><EFBFBD><EFBFBD>״̬']:=0;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
t_ch_jinzhang['<27>Ƿ<EFBFBD><C7B7>ϳ<EFBFBD>']:=0;
t_ch_jinzhang.Post;
bsSkinPageControl5.ActivePage:=bsSkinTabSheet16;
end;
procedure Tfrm_ch_balance_accept.t_ch_jinzhangAfterScroll(
DataSet: TDataSet);
begin
if t_ch_jinzhang['<27>ұ<EFBFBD>']='RMB' then begin
sncDBCurrencyEdit1.CurrencySymbol:='<27><>';
Label113.Visible:=false;
Label118.Visible:=True;
end else begin
sncDBCurrencyEdit1.CurrencySymbol:='$';
Label113.Visible:=true;
Label118.Visible:=false;
end;
end;
procedure Tfrm_ch_balance_accept.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_accept.N7Click(Sender: TObject);
var
do_num:real;
i:integer;
jia_num:real;
rate_num:real;
if_hexiao:boolean;
begin
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;
// t_ch_balance.edit;
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 Trim(t_ch_balance.FieldByName('<27>ұ<EFBFBD>').asstring)=Trim(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.edit;
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.edit;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+jia_num;
// t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=jia_num; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
t_ch_balance.post;
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
end;
procedure Tfrm_ch_balance_accept.MenuItem6Click(Sender: TObject);
var
can_do_num,do_num:real;
rate_num,jia_num:real;
if_hexiao:boolean;
str1,str2:Tstringlist;
bk:TBookmark;
begin
begin
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;
end;
if t_ch_cust_befbal_sum.IsEmpty then
exit;
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.Edit;
t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+jia_num;
// t_ch_balance['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=jia_num; <20><><EFBFBD><EFBFBD><E3B7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
t_ch_balance.post;
t_ch_cust_befbal.Requery();
t_ch_cust_befbal_sum.Requery();
end;
procedure Tfrm_ch_balance_accept.t_ch_cust_befbal_sumAfterOpen(
DataSet: TDataSet);
begin
if not t_ch_cust_befbal_sum.IsEmpty then begin
Label126.Font.Color:=clred;
Label127.Font.Color:=clred;
end else begin
Label126.Font.Color:=clBlack;
Label127.Font.Color:=clBlack;
end;
end;
procedure Tfrm_ch_balance_accept.N5Click(Sender: TObject);
var str_feeValid:string;
begin
if t_ch_balance.IsEmpty then
exit;
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
showmessage('<27><>ǰ<EFBFBD>ʵ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if not if_open('033') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if t_ch_balance.FieldByName('<27>ʵ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'then
begin
showmessage('<27>ʵ<EFBFBD><CAB5>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>');
end
else
begin
try
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;
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;
t_ch_balance.post;
modify_all:=false;
shench:=false;
except
modify_all:=false;
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
shench:=false;
end;
t_ch_balance.Refresh;
end;
end;
procedure Tfrm_ch_balance_accept.N8Click(Sender: TObject);
var str_feeValid:string;
begin
if t_ch_balance.IsEmpty then
exit;
if not if_open('033') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
t_ch_balance.first;
while not t_ch_balance.eof do begin
if (t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD>')then
begin
end else begin
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
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;
modify_all:=false;
shench:=false;
except
on e: Exception do
begin
modify_all:=false;
shench:=false;
// showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>'+e.Message);
end;
end;
t_ch_balance.Refresh;
end;
end;
t_ch_balance.Next;
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton37Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_balance.IsEmpty then
exit;
try
afield := vararraycreate([0,t_ch_balance.fieldcount-1],varvariant);
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
afield[i] :=t_ch_balance.fields[i].value ;
end;
t_ch_balance.insert;
for i := 0 to (t_ch_balance.fieldcount-1) do
begin
if t_ch_balance.fields[i].FieldName<>'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'then
t_ch_balance.fields[i].value := afield[i] ;
end;
t_ch_balance['<27>ʵ<EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
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><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_balance['<27><>ע']:='';
t_ch_balance['<27><><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>']:='';
t_ch_balance['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_balance['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
// t_ch_balance['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=get_no(date,'BA');
{
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_accept.getdetail(balno:string);
begin
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>='''+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_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_accept.closedetail;
begin
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;
procedure Tfrm_ch_balance_accept.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_accept.fra_ch_add_do1MenuItem1Click(
Sender: TObject);
begin
fra_ch_add_do1.MenuItem1Click(Sender);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid10SelectedCountChange(
Sender: TObject);
var i:integer;
amt,usdAmt:Double;
begin
if t_ch_invoice_shen.IsEmpty then
exit;
if dxDBGrid10.SelectedCount>=1 then
begin
amt:=0;
usdAmt:=0;
for i:=0 to dxDBGrid10.SelectedCount-1 do
begin
t_ch_invoice_shen.GotoBookmark(pointer(dxDBGrid10.selectedrows[i]));
if t_ch_invoice_shen.fieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
amt:=amt+t_ch_invoice_shen.fieldByName('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat
else usdAmt:=usdAmt+t_ch_invoice_shen.fieldByName('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
end;
end
else
begin
amt:=0;
usdAmt:=0;
if t_ch_invoice_shen.fieldByName('<27>ұ<EFBFBD>').AsString='RMB' then
amt:=amt+t_ch_invoice_shen.fieldByName('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat
else usdAmt:=usdAmt+t_ch_invoice_shen.fieldByName('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
end;
Label129.Caption:='<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>'+inttostr(dxDBGrid10.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_accept.dxDBGrid19SelectedCountChange(
Sender: TObject);
var i:integer;
amt:Double;
begin
if t_ch_accept_shen.IsEmpty then
exit;
if dxDBGrid19.SelectedCount>=1 then
begin
for i:=0 to dxDBGrid19.SelectedCount-1 do
begin
t_ch_accept_shen.GotoBookmark(pointer(dxDBGrid19.selectedrows[i]));
amt:=amt+t_ch_accept_shen.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
end
else
begin
amt:=t_ch_accept_shen.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
Label130.Caption:='<27><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>'+inttostr(dxDBGrid19.SelectedCount)+'Ʊҵ<C6B1><D2B5>,'+'<27><><EFBFBD><EFBFBD>:'+FormatFloat('#,##,0.00;-0.00',amt);
end;
procedure Tfrm_ch_balance_accept.bsSkinButton39Click(Sender: TObject);
begin
t_ch_balance.insert;
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;
bsSkinPageControl6.ActivePage:=tab1;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton1Click(Sender: TObject);
var t_cw_design,aQuery:TAdoQuery;
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(t_ch_balance.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').AsString)<>'' then
begin
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>ƾ֤');
Exit;
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>ƾ֤ where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>=:<3A>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
dmacc:=TdmAcc.Create(self);
NewDCVou(t_ch_balance,dmacc.AdotblVou,dmacc.AdotblVouItems,t_cw_design,employee
,StrToDate(formatDateTime('YYYY-MM-DD',t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime)),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.ExecSQL;
finally
t_ch_balance.Requery();
t_cw_design.Free;
aQuery.Free;
freeAndNil(dmacc);
end;
end;
procedure Tfrm_ch_balance_accept.bsSkinButton40Click(Sender: TObject);
var aAdoQuery:TAdoQuery;
mblnos,PONos,feenames,Empls:string;
begin
//
mblnos:='';
feenames:='';
Empls:='';
PONos:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
close;SQL.Clear;
sql.Add('select distinct <20><><EFBFBD><EFBFBD><E1B5A5> from v_fee_do_bscard');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><E1B5A5><>''''');
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 mblnos='' then mblnos:=mblnos+FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString
else mblnos:=mblnos+','+FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
next;
end;
close;SQL.Clear;
sql.Add('select distinct ί<>б<EFBFBD><D0B1><EFBFBD> from v_fee_do_bscard');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and ί<>б<EFBFBD><D0B1><EFBFBD><>''''');
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 PONos='' then PONos:=PONos+FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString
else PONos:=PONos+','+FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
next;
end;
close;SQL.Clear;
sql.Add('select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_fee_do_bscard');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><E1B5A5><>''''');
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 feenames='' then feenames:=feenames+FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString
else feenames:=feenames+','+FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
next;
end;
close;SQL.Clear;
sql.Add('select distinct <20><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD> ¼<><C2BC><EFBFBD><EFBFBD> from v_fee_do_bscard');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><E1B5A5><>''''');
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 Empls='' then Empls:=Empls+FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString
else Empls:=Empls+','+FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').AsString;
next;
end;
t_ch_balance.Edit;
if Trim(t_ch_balance.FieldByName('<27><>ע').AsString)='' then
begin
t_ch_balance.FieldByName('<27><>ע').AsString:=Empls+','+t_ch_balance.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+#13#10+mblnos+','+feenames+' '+PONos;
end;
t_ch_balance.Post;
finally
end;
end;
procedure Tfrm_ch_balance_accept.dxDBGrid29DblClick(Sender: TObject);
begin
fee_view(fra_ch_delete_do1.v_fee_do_bscard1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid36DblClick(Sender: TObject);
begin
fee_view(v_fee_do_bsCard1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.dxDBGrid38DblClick(Sender: TObject);
begin
fee_view(v_fee_do_bsCard1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo19Change(Sender: TObject);
begin
t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=getUsdExRate(FormatDateTime('YYYY-MM-DD',t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime),t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>').AsString); ///
end;
procedure Tfrm_ch_balance_accept.DBEdit89Exit(Sender: TObject);
begin
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>').AsString=t_ch_balance.FieldByName('<27>ұ<EFBFBD>').AsString then
begin
if t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>').AsString='RMB' then
begin
if t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat<t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat then
begin
t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat-t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat;
end
else
begin
t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat-t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat;
end;
end
else
begin
if t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat<t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat then
begin
t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat-t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat)*t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
end
else
begin
t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=(t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat-t_ch_balance.FieldByName('<27><><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>').AsFloat)*t_ch_balance.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
end;
end;
end
else
begin
end;
end;
procedure Tfrm_ch_balance_accept.MenuItem7Click(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('Ӧ<>շ<EFBFBD><D5B7>ý<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('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>',2,t_ch_balance1,nil,nil,nil,
fra_ch_delete_do1.v_fee_do_seae1,fra_ch_delete_do1.v_fee_do_seai1,
fra_ch_delete_do1.v_fee_do_aire1,fra_ch_delete_do1.v_fee_do_airi1,
t_ch_balance1,fra_ch_delete_do1.v_fee_do_seae_sum1,fra_ch_delete_do1.v_fee_do_seai_sum1);
end;
end;
procedure Tfrm_ch_balance_accept.MenuItem9Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_balance.IsEmpty then
exit;
if dxDBGrid1.SelectedCount>=0 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
t_ch_balance.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if i=0 then
str:='('+''''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+''''
else
str:=str+','+''''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
end else begin
str:='('+''''+t_ch_balance.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
str:=str+')';
t_ch_balanceSel.close;
t_ch_balanceSel.sql.clear;
t_ch_balanceSel.sql.add('select * from t_ch_balance '
+'where <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> in '+str);
t_ch_balanceSel.open;
sys_print('Ӧ<>շ<EFBFBD><D5B7>ý<EFBFBD><C3BD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ӡ',2,t_ch_balanceSel1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_ch_balance_accept.RxDBLookupCombo24Change(Sender: TObject);
begin
if not frm_data_share.t_sys_bank.IsEmpty then
if frm_data_share.t_sys_bank.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo24.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;
end.