-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathURecibo.pas
148 lines (136 loc) · 4.34 KB
/
URecibo.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
unit URecibo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RLReport, FMTBcd, RLFilters, RLPDFFilter, DB, Provider, DBClient,
SqlExpr;
type
TfrmRecibo = class(TForm)
RLReport1: TRLReport;
RLBand1: TRLBand;
RLLabel1: TRLLabel;
RLLabel2: TRLLabel;
RLLabel3: TRLLabel;
RLLabel4: TRLLabel;
RLLabel5: TRLLabel;
RLLabel6: TRLLabel;
RLLabel7: TRLLabel;
RLLabel8: TRLLabel;
RLLabel9: TRLLabel;
sqlTab: TSQLQuery;
cdsTab: TClientDataSet;
dspTab: TDataSetProvider;
dsTab: TDataSource;
RLPDFFilter1: TRLPDFFilter;
RLDBText2: TRLDBText;
RLSystemInfo1: TRLSystemInfo;
txtQuantia: TRLLabel;
txtQuantiaExtenso: TRLLabel;
txtParcelas: TRLLabel;
RLLogo: TRLImage;
cdsTabCOD_LOJA: TSmallintField;
cdsTabRAZAO_SOCIAL: TStringField;
cdsTabNOME_FANTASIA: TStringField;
cdsTabCNPJ: TStringField;
cdsTabINSC_ESTADUAL: TStringField;
cdsTabENDERECO: TStringField;
cdsTabCOMPLEMENTO: TStringField;
cdsTabBAIRRO: TStringField;
cdsTabPROCESSO_BANCO: TStringField;
cdsTabUSA_TERMOGARANTIA: TStringField;
cdsTabUSA_RECIBO: TStringField;
cdsTabUSA_SENHAESPECIAL: TStringField;
cdsTabCIDADE: TStringField;
cdsTabESTADO: TStringField;
cdsTabTELEFONE: TStringField;
cdsTabFAX: TStringField;
cdsTabEMAIL: TStringField;
cdsTabUSA_ALTERAPRECOPA: TStringField;
cdsTabUSA_CARNE: TStringField;
cdsTabWEB_PAGE: TStringField;
cdsTabUSA_ALTERAPRECOPDV: TStringField;
cdsTabUSA_IMPRIMIRPV: TStringField;
cdsTabLOGOTIPO: TBlobField;
cdsTabTX_RECCT: TStringField;
cdsTabUSA_CONTRATO: TStringField;
cdsTabTX_CHEQUE: TStringField;
cdsTabUSA_ALTERACREC: TStringField;
cdsTabPRZ_PADRAO: TIntegerField;
cdsTabUSA_REGRELATORIO: TFMTBCDField;
cdsTabPRZ_PD_CHEQUE: TSmallintField;
cdsTabDESC_MAXIMO: TStringField;
cdsTabMSG_VENDA: TStringField;
cdsTabCOMP_VENDA: TSmallintField;
cdsTabDIAS_CAR: TFMTBCDField;
cdsTabTP_CARNE: TSmallintField;
cdsTabDIAS_ORCAMENTO: TIntegerField;
cdsTabPROCESSO: TStringField;
cdsTabNR_CAIXA: TIntegerField;
cdsTabNCAIXA: TIntegerField;
cdsTabU_ACESSO: TDateField;
cdsTabIMP_COMP: TStringField;
cdsTabBASE: TStringField;
cdsTabP_EXCLUSAO: TStringField;
cdsTabSA: TStringField;
cdsTabSU: TStringField;
cdsTabDIAS_REL: TIntegerField;
cdsTabCLASSE_A: TStringField;
cdsTabCLASSE_B: TStringField;
cdsTabCLASSE_C: TStringField;
cdsTabEXEC: TStringField;
cdsTabMENSAL: TDateField;
cdsTabSEMANAL: TDateField;
cdsTabACAIXA: TStringField;
cdsTabULT_REDU: TDateField;
cdsTabHORA_REDU: TTimeField;
cdsTabCEP: TStringField;
cdsTabCONTA_ANA: TIntegerField;
cdsTabBAIXA_ESTOQUE_TA: TStringField;
cdsTabUSAR_EMBALAGEM: TStringField;
cdsTabUSA_AVISO_C_COBRANCAO: TStringField;
cdsTabUSA_ATUALIZA_ESTOQUE_CADASTRO: TStringField;
cdsTabUSA_TRAVA_MUDAR_CLIENTE_PDV: TStringField;
cdsTabCONTA_CAIXA_LOCAL: TIntegerField;
cdsTabUSA_IMP_CLIENTE_COMP: TStringField;
cdsTabUSA_PERNOITE: TStringField;
cdsTabUSA_CONT_QUANTIDADE: TStringField;
cdsTabCOD_GPRS_PRC: TStringField;
txtNome: TRLLabel;
procedure RLReport1BeforePrint(Sender: TObject; var PrintIt: Boolean);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure RLBand1BeforePrint(Sender: TObject; var PrintIt: Boolean);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Parcelas : String;
vParc : Double;
end;
var
frmRecibo: TfrmRecibo;
implementation
uses UFuncoes, UDados;
{$R *.dfm}
procedure TfrmRecibo.FormClose(Sender: TObject; var Action: TCloseAction);
begin
cdsTab.Close;
Release;
end;
procedure TfrmRecibo.FormCreate(Sender: TObject);
begin
Dados.cdsParam.Open;
end;
procedure TfrmRecibo.RLBand1BeforePrint(Sender: TObject; var PrintIt: Boolean);
begin
if ((dados.cdsParamLOGOTIPO.IsNull) or (Dados.cdsParamLOGOTIPO.BlobSize > 0)) then begin
ObtemFotoRel(dados.cdsParamLOGOTIPO, RLLogo);
end;
end;
procedure TfrmRecibo.RLReport1BeforePrint(Sender: TObject; var PrintIt: Boolean);
begin
txtQuantia.Caption := FormatCurr('R$ #,##0.00', vParc);
txtQuantiaExtenso.Caption := UpperCase(ValorPorExtenso(vParc));
txtParcelas.Caption := Parcelas;
end;
end.