-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathufrmVistaRapidaFacturas.pas
83 lines (68 loc) · 2.48 KB
/
ufrmVistaRapidaFacturas.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
unit ufrmVistaRapidaFacturas;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ufrmTemplateModal, Vcl.StdCtrls,
DBGridEhGrouping, ToolCtrlsEh, DBGridEhToolCtrls, DynVarsEh, Data.DB,
IBCustomDataSet, IBQuery, EhLibVCL, GridsEh, DBAxisGridsEh, DBGridEh,
dr2gcomponentes;
type
TfrmVistaFacturas = class(TfrmMensaje)
grid1: TDBGridEh;
qryVenta: TIBQuery;
dsVenta: TDataSource;
lbl9: TLabel;
qryVentaID: TLargeintField;
qryVentaFECHA: TDateTimeField;
qryVentaRUC: TIBStringField;
qryVentaRAZON_SOCIAL: TIBStringField;
qryVentaCONDICION: TIBStringField;
qryVentaDIRECCION: TIBStringField;
qryVentaTELEFONO: TIBStringField;
qryVentaNOTA_REMISION: TIBStringField;
qryVentaOBSERVACION: TIBStringField;
qryVentaPRECIO_MAYORISTA: TSmallintField;
qryVentaESTADO: TIBStringField;
qryVentaNUMERO: TIBStringField;
lbl1: TLabel;
procedure grid1Columns1AdvDrawDataCell(Sender: TCustomDBGridEh; Cell,
AreaCell: TGridCoord; Column: TColumnEh; const ARect: TRect;
var Params: TColCellParamsEh; var Processed: Boolean);
procedure grid1Columns2AdvDrawDataCell(Sender: TCustomDBGridEh; Cell,
AreaCell: TGridCoord; Column: TColumnEh; const ARect: TRect;
var Params: TColCellParamsEh; var Processed: Boolean);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmVistaFacturas: TfrmVistaFacturas;
implementation
uses
datos;
{$R *.dfm}
procedure TfrmVistaFacturas.FormCreate(Sender: TObject);
begin
inherited;
qryVenta.Open ;
end;
procedure TfrmVistaFacturas.grid1Columns1AdvDrawDataCell(
Sender: TCustomDBGridEh; Cell, AreaCell: TGridCoord; Column: TColumnEh;
const ARect: TRect; var Params: TColCellParamsEh; var Processed: Boolean);
begin
inherited;
if Column.Field.Value = 'GENE' then Params.Background := $00D5FFAA;
if Column.Field.Value = 'IMPR' then Params.Background := $00E8FFFF;
if Column.Field.Value = 'ANUL' then Params.Background := $00C6C6FF;
end;
procedure TfrmVistaFacturas.grid1Columns2AdvDrawDataCell(
Sender: TCustomDBGridEh; Cell, AreaCell: TGridCoord; Column: TColumnEh;
const ARect: TRect; var Params: TColCellParamsEh; var Processed: Boolean);
begin
inherited;
if column.Field.Value = 'CONT' then params.Background := $00D5FFAA;
if column.Field.Value = 'CRED' then params.Background := $00E8FFFF;
end;
end.