-
Notifications
You must be signed in to change notification settings - Fork 0
/
Backup of invoice.rep
386 lines (344 loc) · 12.4 KB
/
Backup of invoice.rep
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
** END HEADER -- do not remove this line
//
// Generated on 09/06/2021
//
local r
r = new INVOICEREPORT()
r.render()
class INVOICEREPORT of BASECREPORT from :DT_Custom:base.crp
set procedure to :ReportControls:report.cc additive
set procedure to :DT_Custom:CustomReportControls.cc additive
set procedure to final_code\InvoiceRep.dmd additive
with (this)
title = "Invoice"
endwith
this.INVOICEREPDATAMODULE1 = new INVOICEREPDATAMODULE()
this.INVOICEREPDATAMODULE1.parent = this
with (this.INVOICEREPDATAMODULE1)
left = 6.0
top = 0.0
width = 0.0
height = 0.0
endwith
this.STREAMSOURCE1.GROUP1 = new GROUP(this.STREAMSOURCE1)
with (this.STREAMSOURCE1.GROUP1)
groupBy = "Invoice ID"
endwith
this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDHEADINGTEXT1 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.footerBand)
with (this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDHEADINGTEXT1)
height = 0.2083
left = 3.0313
top = 0.0834
width = 1.75
fontBold = true
text = "Total Mugs at $10.00 Each:"
endwith
this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDTEXT1 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.footerBand)
with (this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDTEXT1)
height = 0.2083
left = 4.927
top = 0.0834
width = 0.4633
alignHorizontal = 2 // Right
fontBold = true
text = {||this.parent.parent.agSum({||this.parent.rowset.parent.parent.lineitem1.rowset.fields["qty"].value})}
endwith
this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDHEADINGTEXT2 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.footerBand)
with (this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDHEADINGTEXT2)
height = 0.2083
left = 3.5625
top = 0.4063
width = 0.9688
text = "Invoice Total:"
endwith
this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDTEXT2 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.footerBand)
with (this.STREAMSOURCE1.GROUP1.footerBand.MYFIELDTEXT2)
height = 0.2083
left = 4.8021
top = 0.4063
width = 0.63
text = {||"$ "+(this.parent.parent.agSum( {||this.parent.rowset.parent.parent.lineitem1.rowset.fields[ "qty"].value}))*10.00}
endwith
with (this.STREAMSOURCE1.GROUP1.headerBand)
beginNewFrame = true
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT1 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT1)
height = 0.2083
left = 0.1875
top = 0.1243
width = 0.9479
fontSize = 12.0
text = {||"Invoice #: "+form.streamsource1.rowset.fields["Invoice ID"].value}
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT2 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT2)
height = 0.2083
left = 0.1875
top = 0.416
width = 1.8125
fontSize = 12.0
text = {||"Order Date: "+form.streamsource1.rowset.fields["Order Date"].value}
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYRECTANGLESHAPE1 = new MYRECTANGLESHAPE(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYRECTANGLESHAPE1)
left = 0.7604
top = 0.8014
width = 6.0
height = 0.84
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT1 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT1)
height = 0.2083
left = 0.7604
top = 0.8014
width = 0.7
fontBold = true
text = "Customer"
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT2 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT2)
height = 0.2083
left = 1.0
top = 1.0
width = 0.5
fontBold = true
text = "Name:"
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT3 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT3)
canRender = class::MYFIELDTEXT3_CANRENDER
height = 0.2083
left = 1.5833
top = 0.9993
width = 2.0416
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT3 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT3)
height = 0.2083
left = 3.8958
top = 0.9792
width = 0.6
fontBold = true
text = "Address:"
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT4 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT4)
canRender = class::MYFIELDTEXT4_CANRENDER
height = 0.2083
left = 4.5937
top = 0.9681
width = 2.0
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYRECTANGLESHAPE2 = new MYRECTANGLESHAPE(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYRECTANGLESHAPE2)
left = 0.76
top = 1.8
width = 6.0
height = 0.84
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT4 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDHEADINGTEXT4)
height = 0.2083
left = 0.76
top = 1.8
width = 0.6354
fontBold = true
text = "Payment"
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT5 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT5)
canRender = class::MYFIELDTEXT5_CANRENDER
height = 0.2083
left = 1.01
top = 1.9771
width = 2.3021
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT6 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT6)
canRender = class::MYFIELDTEXT6_CANRENDER
height = 0.2083
left = 3.9371
top = 1.9771
width = 1.4479
endwith
this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT7 = new MYFIELDTEXT(this.STREAMSOURCE1.GROUP1.headerBand)
with (this.STREAMSOURCE1.GROUP1.headerBand.MYFIELDTEXT7)
canRender = class::MYFIELDTEXT7_CANRENDER
height = 0.2083
left = 1.01
top = 2.2792
width = 2.2709
endwith
with (this.STREAMSOURCE1.detailBand)
height = 0.0
endwith
this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT1 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT1)
canRender = {||this.parent.firstOnFrame}
height = 0.21
left = 1.2188
top = 0.1
width = 0.4688
suppressIfBlank = true
fontBold = true
fontUnderline = true
text = "Item ID"
endwith
this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT2 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT2)
canRender = {||this.parent.firstOnFrame}
height = 0.21
left = 2.125
top = 0.1
width = 0.7917
alignHorizontal = 0 // Left
suppressIfBlank = true
fontBold = true
fontUnderline = true
text = "Description"
endwith
this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT3 = new MYFIELDHEADINGTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDHEADINGTEXT3)
canRender = {||this.parent.firstOnFrame}
height = 0.2083
left = 4.7813
top = 0.1
width = 0.6063
suppressIfBlank = true
fontBold = true
fontUnderline = true
text = "Quantity"
endwith
this.STREAMSOURCE1.detailBand.MYFIELDTEXT1 = new MYFIELDTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDTEXT1)
height = 0.2083
left = 2.1354
top = 0.4063
width = 2.1979
text = {||form.InvoiceRepDataModule1.lineitem1.rowset.fields["Item ID"].value}
endwith
this.STREAMSOURCE1.detailBand.MYFIELDTEXT2 = new MYFIELDTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDTEXT2)
height = 0.2083
left = 1.1562
top = 0.4118
width = 0.5313
alignHorizontal = 2 // Right
text = {||form.InvoiceRepDataModule1.lineitem1.rowset.fields["Item ID"].lookupRowset.fields[1].value}
endwith
this.STREAMSOURCE1.detailBand.MYFIELDTEXT3 = new MYFIELDTEXT(this.STREAMSOURCE1.detailBand)
with (this.STREAMSOURCE1.detailBand.MYFIELDTEXT3)
height = 0.2083
left = 4.7813
top = 0.4118
width = 0.625
alignHorizontal = 2 // Right
picture = "999"
text = {||form.InvoiceRepDataModule1.lineitem1.rowset.fields["Qty"].value}
endwith
with (this.PAGETEMPLATE1)
height = 11.0
endwith
with (this.PAGETEMPLATE1.STREAMFRAME1)
height = 8.4192
left = 0.0
top = 0.7304
width = 7.5
form.STREAMFRAME1 = form.pagetemplate1.streamframe1
endwith
with (this.PAGETEMPLATE1.MYREPORTTITLETEXT1)
text = "Invoice"
form.MYREPORTTITLETEXT1 = form.pagetemplate1.myreporttitletext1
endwith
with (this.PAGETEMPLATE1.MYDATETEXT1)
height = 0.2083
left = 2.9375
top = 0.3438
width = 1.6354
text = {||"Date Printed: "+date()}
form.MYDATETEXT1 = form.pagetemplate1.mydatetext1
endwith
form.PAGENUMBER1 = form.pagetemplate1.pagenumber1
with (this.printer)
duplex = 1 // None
orientation = 1 // Portrait
paperSource = 15
paperSize = 1
resolution = 0 // Default
color = 2 // Color
trueTypeFonts = 3 // Substitute
endwith
this.firstPageTemplate = this.form.pagetemplate1
this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
this.form.pagetemplate1.streamframe1.streamSource = this.form.streamsource1
this.form.streamsource1.rowset = this.form.invoicerepdatamodule1.invoice1.rowset
function MYFIELDTEXT3_canRender()
local f
f = form.InvoiceRepDataModule1.customer1.rowset.fields
this.text := new string( trim( f["first name"].value ) )
this.text += " "
this.text += new string( f["last name"].value )
return true
function MYFIELDTEXT4_canRender()
// This one's going to be a bit more complicated,
// but it will solve some issues in getting
// everything to "lay out" properly:
local f
f = form.InvoiceRepDataModule1.customer1.rowset.fields
this.text := new string( f["street1"].value )
if not empty( f["street2"].value )
this.text += "<br /> " + new string( f["street2"].value )
endif
if not empty( f["city"].value )
this.text += "<br /> " + ;
new string( trim( f["city"].value ) ) + ", " +;
f["state id"].value.rightTrim() + " " + ;
new string( f["postal"].value )
if not f["country id"].value.rightTrim() == "United States"
this.text := this.text.rightTrim()
this.text += " <b>"+f["country id"].value+"</b>"
endif
endif
return true
function MYFIELDTEXT5_canRender()
local f
f = form.streamSource1.rowset.fields
do case
case f["pay type"].value == "CH"
this.text := "Check: "
this.text += f["check number"].value
case f["pay type"].value == "VI"
this.text := "Visa: "
this.text += right( trim( f["card number"].value ), 4 )
case f["pay type"].value == "MC"
this.text := "MasterCard: "
this.text += right( trim( f["card number"].value ), 4 )
case f["pay type"].value == "DN"
this.text := "Discover/Nova: "
this.text += right( trim( f["card number"].value ), 4 )
otherwise
this.text := "Unknown payment type"
endcase
return true
function MYFIELDTEXT6_canRender()
local f
f = form.streamSource1.rowset.fields
if f["pay type"].value == "CH"
return false
else
this.text := "Expiration: " +;
new string( f["Card Exp"].value )
endif
return true
function MYFIELDTEXT7_canRender()
local f
f = form.streamSource1.rowset.fields
if f["pay type"].value == "CH"
return false
else
this.text := "Name on card: " +;
new string( f["Card Name"].value )
endif
return true
endclass