|
|
|
|
unit u_rp_no_selfno;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, ComCtrls, bsSkinTabs, DB, ADODB,DateUtils,
|
|
|
|
|
dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner,
|
|
|
|
|
kbmMemTable, kbmMemBinaryStreamFormat, Menus, StdCtrls,
|
|
|
|
|
wwdbdatetimepicker;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_rp_no_selfno = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
p_total_client1: TDataSource;
|
|
|
|
|
p_total_client: TADOStoredProc;
|
|
|
|
|
p_total_sales: TADOStoredProc;
|
|
|
|
|
p_total_sales1: TDataSource;
|
|
|
|
|
SaveDialog: TSaveDialog;
|
|
|
|
|
bsSkinPageControl4: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGridColumn19: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn22: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn25: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
|
|
dxDBGrid3Column22: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn59: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn60: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn61: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn62: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn63: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn64: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn65: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn66: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn67: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn68: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn69: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn70: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn71: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn72: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn73: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn74: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn75: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn76: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn77: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn78: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn79: TdxDBGridColumn;
|
|
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
|
|
p_accept_bill: TADOStoredProc;
|
|
|
|
|
p_accept_bill1: TDataSource;
|
|
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column54: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column65: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column66: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1USD: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1RMB: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column12: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column63: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column21: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column22: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid17: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid18: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid19: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid110: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column50: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1TEU: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column52: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column53: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column55: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column56: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column57: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column58: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column59: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column60: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column61: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column62: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column68: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column69: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column59: TdxDBGridColumn;
|
|
|
|
|
kbmBinaryStreamFormat1: TkbmBinaryStreamFormat;
|
|
|
|
|
kbmThreadDataSet1: TkbmThreadDataSet;
|
|
|
|
|
memtblrpt_total: TkbmMemTable;
|
|
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
N1: TMenuItem;
|
|
|
|
|
N2: TMenuItem;
|
|
|
|
|
N1101: TMenuItem;
|
|
|
|
|
Label10: TLabel;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
|
|
memtblrpt_total1: TDataSource;
|
|
|
|
|
dxDBGrid5Column58: TdxDBGridColumn;
|
|
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
|
|
dxDBGrid5Column60: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column61: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column62: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column63: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid5Column64: TdxDBGridColumn;
|
|
|
|
|
memtblDetail: TkbmMemTable;
|
|
|
|
|
memtblDetailField: TStringField;
|
|
|
|
|
StringField1: TStringField;
|
|
|
|
|
memtblDetailField2: TIntegerField;
|
|
|
|
|
memtblDetailUSD3: TFloatField;
|
|
|
|
|
memtblDetailRMB3: TFloatField;
|
|
|
|
|
memtblDetailField3: TFloatField;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure Panel1Resize(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid2ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure dxDBGrid5DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid6DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid7DblClick(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid8DblClick(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1Column65CustomDraw(Sender: TObject;
|
|
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean;
|
|
|
|
|
var ADone: Boolean);
|
|
|
|
|
private
|
|
|
|
|
procedure do_1(str_bill:widestring);
|
|
|
|
|
procedure GetNoFee;
|
|
|
|
|
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_rp_no_selfno: Tfrm_rp_no_selfno;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, u_rp_no_seae_query,my_sys_function, u_rp_total_query,
|
|
|
|
|
u_rp_no_total, u_sys_progress;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.do_1(str_bill:widestring);
|
|
|
|
|
begin
|
|
|
|
|
p_accept_bill.close;
|
|
|
|
|
p_accept_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+'v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, v_op_bscard.ί<>б<EFBFBD><D0B1><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.ί<>е<EFBFBD>λ,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.װ<><D7B0><EFBFBD><EFBFBD>, v_op_bscard.ж<><D0B6><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>1, v_op_bscard.<2E><><EFBFBD><EFBFBD>2, v_op_bscard.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>4, v_op_bscard.<2E><><EFBFBD><EFBFBD>5, v_op_bscard.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>7, v_op_bscard.<2E><><EFBFBD><EFBFBD>8, v_op_bscard.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>10, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.<2E><>TEU, v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E>ͷ<EFBFBD>Ա,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end) as <20>ƷѶ<C6B7>,DATEDIFF([day],v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_crm_client '
|
|
|
|
|
+' on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill
|
|
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, v_op_bscard.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
|
|
+'v_op_bscard.ί<>е<EFBFBD>λ, '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.װ<><D7B0><EFBFBD><EFBFBD>, v_op_bscard.ж<><D0B6><EFBFBD><EFBFBD>, '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>1, v_op_bscard.<2E><><EFBFBD><EFBFBD>2, v_op_bscard.<2E><><EFBFBD><EFBFBD>3,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>4, v_op_bscard.<2E><><EFBFBD><EFBFBD>5, v_op_bscard.<2E><><EFBFBD><EFBFBD>6,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>7, v_op_bscard.<2E><><EFBFBD><EFBFBD>8, v_op_bscard.<2E><><EFBFBD><EFBFBD>9,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>10,v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'v_op_bscard.<2E><>TEU, v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E>ͷ<EFBFBD>Ա, '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
|
|
|
|
|
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
|
|
|
|
|
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4) else '
|
|
|
|
|
+'1 end),DATEDIFF([day],v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()),'
|
|
|
|
|
+' DATEDIFF([day],v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
|
|
+' DATEDIFF([day],v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0),'
|
|
|
|
|
+'t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
+'order by v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> ';
|
|
|
|
|
|
|
|
|
|
p_accept_bill.Open;
|
|
|
|
|
{
|
|
|
|
|
p_total_client.close;
|
|
|
|
|
p_total_client.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_total_client.Open;
|
|
|
|
|
|
|
|
|
|
p_total_sales.close;
|
|
|
|
|
p_total_sales.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill+' GROUP BY v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
p_total_sales.Open;
|
|
|
|
|
|
|
|
|
|
p_total.close;
|
|
|
|
|
p_total.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
|
|
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
|
|
+str_bill;
|
|
|
|
|
p_total.Open;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
frm_rp_no_selfno.Hide;
|
|
|
|
|
frm_rp_no_selfno.ManualFloat(frm_rp_no_selfno.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_rp_no_selfno');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_rp_no_selfno:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.Panel1Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round(bsSkinPanel2.Width/7);
|
|
|
|
|
bsSkinCheckRadioBox1.Width:=i;
|
|
|
|
|
bsSkinButton10.Width:=i;
|
|
|
|
|
bsSkinButton9.Width:=i;
|
|
|
|
|
bsSkinButton1.Width:=i;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
frm_rp_total_query:=tfrm_rp_total_query.Create (self);
|
|
|
|
|
rp_seae_query_num:=1;
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
|
|
rp_seae_query_type:=1;
|
|
|
|
|
rp_seae_query_limited:='0033';
|
|
|
|
|
rp_seae_query_str:='ҵ<><D2B5><EFBFBD>ۺ<EFBFBD>Ƿ<EFBFBD><C7B7>';
|
|
|
|
|
frm_rp_total_query.ShowModal;
|
|
|
|
|
finally
|
|
|
|
|
frm_rp_total_query.Free;
|
|
|
|
|
end;
|
|
|
|
|
GetNoFee;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
with SaveDialog do
|
|
|
|
|
begin
|
|
|
|
|
DefaultExt :='xls';
|
|
|
|
|
Filter := '(*.xls)|*.xls';
|
|
|
|
|
if Execute then
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinTabSheet1.Showing then
|
|
|
|
|
dxDBGrid1.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet3.Showing then
|
|
|
|
|
dxDBGrid3.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet4.Showing then
|
|
|
|
|
dxDBGrid5.SaveToXLS(FileName,true)
|
|
|
|
|
{
|
|
|
|
|
else if bsSkinTabSheet5.Showing then
|
|
|
|
|
dxDBGrid6.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet6.Showing then
|
|
|
|
|
dxDBGrid7.SaveToXLS(FileName,true)
|
|
|
|
|
else if bsSkinTabSheet7.Showing then
|
|
|
|
|
dxDBGrid8.SaveToXLS(FileName,true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('ҵ<><D2B5><EFBFBD>ۺ<EFBFBD>Ƿ<EFBFBD><C7B7>',2,nil,nil,nil,nil,p_accept_bill1,nil,nil,nil,p_total_client1,p_total_sales1,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_total_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid2ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort_pro(Column,p_total_sales,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid3ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
// Column_sort_pro(Column,p_total,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid5DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fee_view(p_accept_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid6DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
// fee_view(p_accept_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid7DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
// fee_view(p_pay_bill.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid8DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
// fee_view(p_pay_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton13Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
Pnt:Tpoint;
|
|
|
|
|
begin
|
|
|
|
|
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
|
|
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.bsSkinButton15Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str_bill:widestring;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker3.Text='' then begin
|
|
|
|
|
MessageDlg('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ֵ',mtWarning,[mbYes],0);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
if wwDBDateTimePicker4.Text='' then begin
|
|
|
|
|
MessageDlg('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD>ֵ',mtWarning,[mbYes],0);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
str_bill:='';
|
|
|
|
|
str_bill:=query_tiaojian(1,str_bill,'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker1.text);
|
|
|
|
|
str_bill:=query_tiaojian(1,str_bill,'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker2.text);
|
|
|
|
|
|
|
|
|
|
if trim(str_bill)='' then
|
|
|
|
|
begin
|
|
|
|
|
str_bill:='where '+open_data('0033','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա','v_op_bscard.<2E>ͷ<EFBFBD>Ա','v_op_bscard.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
str_bill:=str_bill+' and '+open_data('0033','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա','v_op_bscard.<2E>ͷ<EFBFBD>Ա','v_op_bscard.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if str_bill='' then
|
|
|
|
|
str_bill:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
|
|
else
|
|
|
|
|
str_bill:=str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ';
|
|
|
|
|
|
|
|
|
|
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker4.text);
|
|
|
|
|
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker3.text);
|
|
|
|
|
|
|
|
|
|
do_1(str_bill);
|
|
|
|
|
GetNoFee;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.GetNoFee;
|
|
|
|
|
var
|
|
|
|
|
aQuery,aQuery2:TAdoQuery;
|
|
|
|
|
sumbal:Double;
|
|
|
|
|
hvcg:Boolean;
|
|
|
|
|
aYear,aMonth,aDay,bDay:word;
|
|
|
|
|
begin
|
|
|
|
|
if not p_accept_bill.Active then Exit;
|
|
|
|
|
if p_accept_bill.IsEmpty then Exit;
|
|
|
|
|
|
|
|
|
|
memtblrpt_total.DisableControls;
|
|
|
|
|
memtblrpt_total.LoadFromDataSet(p_accept_bill,[mtcpostructure,mtcpoProperties,mtcpoFieldIndex]);
|
|
|
|
|
p_accept_bill.Close;
|
|
|
|
|
|
|
|
|
|
memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').ReadOnly:=false;
|
|
|
|
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
if memtblrpt_total.IsEmpty then exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
memtblrpt_total.First;
|
|
|
|
|
|
|
|
|
|
with memtblrpt_total do begin
|
|
|
|
|
while not memtblrpt_total.eof do begin
|
|
|
|
|
|
|
|
|
|
if (memtblrpt_total.FieldByName('Ӧ<>պϼ<D5BA>').AsFloat=0.00) or memtblrpt_total.FieldByName('Ӧ<>պϼ<D5BA>').IsNull then begin
|
|
|
|
|
memtblrpt_total.Delete;
|
|
|
|
|
end;
|
|
|
|
|
memtblrpt_total.Next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
memtblDetail.Open;
|
|
|
|
|
memtblDetail.First;
|
|
|
|
|
while not memtblDetail.eof do begin
|
|
|
|
|
memtblDetail.Delete;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(application);
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=memtblrpt_total.RecordCount;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
frm_sys_progress.Update;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
memtblrpt_total.First;
|
|
|
|
|
with memtblrpt_total do begin
|
|
|
|
|
while not eof do begin
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
edit;
|
|
|
|
|
memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=MonthsBetween(memtblrpt_total.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime,now);
|
|
|
|
|
post;
|
|
|
|
|
if memtblDetail.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',VarArrayOf([memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,memtblrpt_total.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsStRING,memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger]),[]) THEN begin
|
|
|
|
|
memtblDetail.edit;
|
|
|
|
|
memtblDetail.FieldByName('δ<><CEB4>USD').AsFloat:=memtblDetail.FieldByName('δ<><CEB4>USD').AsFloat+memtblrpt_total.FieldByName('δ<><CEB4>USD').AsFloat;
|
|
|
|
|
memtblDetail.FieldByName('δ<><CEB4>RMB').AsFloat:=memtblDetail.FieldByName('δ<><CEB4>RMB').AsFloat+memtblrpt_total.FieldByName('δ<><CEB4>RMB').AsFloat;
|
|
|
|
|
memtblDetail.FieldByName('δ<>պϼ<D5BA>').AsFloat:=memtblDetail.FieldByName('δ<>պϼ<D5BA>').AsFloat+memtblrpt_total.FieldByName('δ<>պϼ<D5BA>').AsFloat;
|
|
|
|
|
memtblDetail.Post;
|
|
|
|
|
end else begin
|
|
|
|
|
memtblDetail.Insert;
|
|
|
|
|
memtblDetail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
memtblDetail.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=memtblrpt_total.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
memtblDetail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=memtblrpt_total.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
|
|
|
|
|
memtblDetail.FieldByName('δ<><CEB4>USD').AsFloat:=memtblDetail.FieldByName('δ<><CEB4>USD').AsFloat+memtblrpt_total.FieldByName('δ<><CEB4>USD').AsFloat;
|
|
|
|
|
memtblDetail.FieldByName('δ<><CEB4>RMB').AsFloat:=memtblDetail.FieldByName('δ<><CEB4>RMB').AsFloat+memtblrpt_total.FieldByName('δ<><CEB4>RMB').AsFloat;
|
|
|
|
|
memtblDetail.FieldByName('δ<>պϼ<D5BA>').AsFloat:=memtblDetail.FieldByName('δ<>պϼ<D5BA>').AsFloat+memtblrpt_total.FieldByName('δ<>պϼ<D5BA>').AsFloat;
|
|
|
|
|
memtblDetail.Post;
|
|
|
|
|
end;
|
|
|
|
|
next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
{
|
|
|
|
|
memtblrpt_total.Filtered:=False;
|
|
|
|
|
if wwDBDateTimePicker4.Text<>'' then
|
|
|
|
|
memtblrpt_total.Filter:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+wwDBDateTimePicker4.Text+''' and Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='''+wwDBDateTimePicker3.Text+''''
|
|
|
|
|
else
|
|
|
|
|
memtblrpt_total.Filter:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='''+wwDBDateTimePicker3.Text+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
memtblrpt_total.Filtered:=True;
|
|
|
|
|
}
|
|
|
|
|
memtblrpt_total.SortOn('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',[]);
|
|
|
|
|
memtblDetail.SortOn('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',[mtcoDescending]);
|
|
|
|
|
finally
|
|
|
|
|
freeAndNil(aQuery);
|
|
|
|
|
freeAndNil(aQuery2);
|
|
|
|
|
freeAndNil(frm_sys_progress);
|
|
|
|
|
memtblrpt_total.EnableControls;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_no_selfno.dxDBGrid1Column65CustomDraw(Sender: TObject;
|
|
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
|
|
var
|
|
|
|
|
aday:Integer;
|
|
|
|
|
begin
|
|
|
|
|
aday:=StrToIntDef(ANode.Strings[dxDBGrid1Column66.Index],0);
|
|
|
|
|
if aDay>180 then
|
|
|
|
|
AFont.Color:=clBtnFace;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|