-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRescoServiceLineResourcePage.al
More file actions
661 lines (657 loc) · 23.8 KB
/
RescoServiceLineResourcePage.al
File metadata and controls
661 lines (657 loc) · 23.8 KB
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
page 50103 RescoServiceLineResource
{
APIGroup = 'RescoIntegrations';
APIPublisher = 'Resco';
APIVersion = 'v2.0';
Caption = 'RescoServiceLineResource';
DelayedInsert = true;
EntityName = 'RescoServiceLineResource';
EntitySetName = 'RescoServiceLineResource';
PageType = API;
SourceTable = "Service Line";
SourceTableView = WHERE("Type" = CONST(Resource), "Document Type" = CONST(Order));
layout
{
area(content)
{
repeater(General)
{
field(documentType; Rec."Document Type")
{
Caption = 'Document Type';
}
field(documentNo; Rec."Document No.")
{
Caption = 'Document No.';
}
field(lineNo; Rec."Line No.")
{
Caption = 'Line No.';
}
field("type"; Rec."Type")
{
Caption = 'Type';
}
field(no; Rec."No.")
{
Caption = 'No.';
}
field(allowInvoiceDisc; Rec."Allow Invoice Disc.")
{
Caption = 'Allow Invoice Disc.';
}
field(allowLineDisc; Rec."Allow Line Disc.")
{
Caption = 'Allow Line Disc.';
}
field(amount; Rec.Amount)
{
Caption = 'Amount';
}
field(amountIncludingVAT; Rec."Amount Including VAT")
{
Caption = 'Amount Including VAT';
}
field(applFromItemEntry; Rec."Appl.-from Item Entry")
{
Caption = 'Appl.-from Item Entry';
}
field(applToItemEntry; Rec."Appl.-to Item Entry")
{
Caption = 'Appl.-to Item Entry';
}
field(applToServiceEntry; Rec."Appl.-to Service Entry")
{
Caption = 'Appl.-to Service Entry';
}
field("area"; Rec."Area")
{
Caption = 'Area';
}
field(attachedToLineNo; Rec."Attached to Line No.")
{
Caption = 'Attached to Line No.';
}
field(billToCustomerNo; Rec."Bill-to Customer No.")
{
Caption = 'Bill-to Customer No.';
}
field(binCode; Rec."Bin Code")
{
Caption = 'Bin Code';
}
field(completelyPicked; Rec."Completely Picked")
{
Caption = 'Completely Picked';
}
field(completelyShipped; Rec."Completely Shipped")
{
Caption = 'Completely Shipped';
}
field(componentLineNo; Rec."Component Line No.")
{
Caption = 'Component Line No.';
}
field(contractDisc; Rec."Contract Disc. %")
{
Caption = 'Contract Disc. %';
}
field(contractNo; Rec."Contract No.")
{
Caption = 'Contract No.';
}
field(copyComponentsFrom; Rec."Copy Components From")
{
Caption = 'Copy Components From';
}
field(currencyCode; Rec."Currency Code")
{
Caption = 'Currency Code';
}
field(customerDiscGroup; Rec."Customer Disc. Group")
{
Caption = 'Customer Disc. Group';
}
field(customerNo; Rec."Customer No.")
{
Caption = 'Customer No.';
}
field(customerPriceGroup; Rec."Customer Price Group")
{
Caption = 'Customer Price Group';
}
field(description; Rec.Description)
{
Caption = 'Description';
}
field(description2; Rec."Description 2")
{
Caption = 'Description 2';
}
field(dimensionSetID; Rec."Dimension Set ID")
{
Caption = 'Dimension Set ID';
}
field(excludeContractDiscount; Rec."Exclude Contract Discount")
{
Caption = 'Exclude Contract Discount';
}
field(excludeWarranty; Rec."Exclude Warranty")
{
Caption = 'Exclude Warranty';
}
field(exitPoint; Rec."Exit Point")
{
Caption = 'Exit Point';
}
field(faultAreaCode; Rec."Fault Area Code")
{
Caption = 'Fault Area Code';
}
field(faultCode; Rec."Fault Code")
{
Caption = 'Fault Code';
}
field(faultReasonCode; Rec."Fault Reason Code")
{
Caption = 'Fault Reason Code';
}
field(genBusPostingGroup; Rec."Gen. Bus. Posting Group")
{
Caption = 'Gen. Bus. Posting Group';
}
field(genProdPostingGroup; Rec."Gen. Prod. Posting Group")
{
Caption = 'Gen. Prod. Posting Group';
}
field(grossWeight; Rec."Gross Weight")
{
Caption = 'Gross Weight';
}
field(invDiscAmountToInvoice; Rec."Inv. Disc. Amount to Invoice")
{
Caption = 'Inv. Disc. Amount to Invoice';
}
field(invDiscountAmount; Rec."Inv. Discount Amount")
{
Caption = 'Inv. Discount Amount';
}
field(itemCategoryCode; Rec."Item Category Code")
{
Caption = 'Item Category Code';
}
field(jobLineType; Rec."Job Line Type")
{
Caption = 'Job Line Type';
}
field(jobNo; Rec."Job No.")
{
Caption = 'Job No.';
}
field(jobPlanningLineNo; Rec."Job Planning Line No.")
{
Caption = 'Job Planning Line No.';
}
field(jobRemainingLineAmount; Rec."Job Remaining Line Amount")
{
Caption = 'Job Remaining Line Amount';
}
field(jobRemainingQty; Rec."Job Remaining Qty.")
{
Caption = 'Job Remaining Qty.';
}
field(jobRemainingQtyBase; Rec."Job Remaining Qty. (Base)")
{
Caption = 'Job Remaining Qty. (Base)';
}
field(jobRemainingTotalCost; Rec."Job Remaining Total Cost")
{
Caption = 'Job Remaining Total Cost';
}
field(jobRemainingTotalCostLCY; Rec."Job Remaining Total Cost (LCY)")
{
Caption = 'Job Remaining Total Cost (LCY)';
}
field(jobTaskNo; Rec."Job Task No.")
{
Caption = 'Job Task No.';
}
field(lineAmount; Rec."Line Amount")
{
Caption = 'Line Amount';
}
field(lineDiscount; Rec."Line Discount %")
{
Caption = 'Line Discount %';
}
field(lineDiscountAmount; Rec."Line Discount Amount")
{
Caption = 'Line Discount Amount';
}
field(lineDiscountType; Rec."Line Discount Type")
{
Caption = 'Line Discount Type';
}
field(locationCode; Rec."Location Code")
{
Caption = 'Location Code';
}
field(neededByDate; Rec."Needed by Date")
{
Caption = 'Needed by Date';
}
field(netWeight; Rec."Net Weight")
{
Caption = 'Net Weight';
}
field(nonstock; Rec.Nonstock)
{
Caption = 'Catalog';
}
field(orderDate; Rec."Order Date")
{
Caption = 'Order Date';
}
field(outstandingAmount; Rec."Outstanding Amount")
{
Caption = 'Outstanding Amount';
}
field(outstandingAmountLCY; Rec."Outstanding Amount (LCY)")
{
Caption = 'Outstanding Amount (LCY)';
}
field(outstandingQtyBase; Rec."Outstanding Qty. (Base)")
{
Caption = 'Outstanding Qty. (Base)';
}
field(outstandingQuantity; Rec."Outstanding Quantity")
{
Caption = 'Outstanding Quantity';
}
field(pickQtyBase; Rec."Pick Qty. (Base)")
{
Caption = 'Pick Qty. (Base)';
}
field(planned; Rec.Planned)
{
Caption = 'Planned';
}
field(plannedDeliveryDate; Rec."Planned Delivery Date")
{
Caption = 'Planned Delivery Date';
}
field(pmtDiscountAmount; Rec."Pmt. Discount Amount")
{
Caption = 'Pmt. Discount Amount';
}
field(postingDate; Rec."Posting Date")
{
Caption = 'Posting Date';
}
field(postingGroup; Rec."Posting Group")
{
Caption = 'Posting Group';
}
field(priceAdjmtStatus; Rec."Price Adjmt. Status")
{
Caption = 'Price Adjmt. Status';
}
field(priceCalculationMethod; Rec."Price Calculation Method")
{
Caption = 'Price Calculation Method';
}
field(promisedDeliveryDate; Rec."Promised Delivery Date")
{
Caption = 'Promised Delivery Date';
}
field(qtyConsumedBase; Rec."Qty. Consumed (Base)")
{
Caption = 'Qty. Consumed (Base)';
}
field(qtyInvoicedBase; Rec."Qty. Invoiced (Base)")
{
Caption = 'Qty. Invoiced (Base)';
}
field(qtyPicked; Rec."Qty. Picked")
{
Caption = 'Qty. Picked';
}
field(qtyPickedBase; Rec."Qty. Picked (Base)")
{
Caption = 'Qty. Picked (Base)';
}
field(qtyShippedBase; Rec."Qty. Shipped (Base)")
{
Caption = 'Qty. Shipped (Base)';
}
field(qtyShippedNotInvdBase; Rec."Qty. Shipped Not Invd. (Base)")
{
Caption = 'Qty. Shipped Not Invd. (Base)';
}
field(qtyShippedNotInvoiced; Rec."Qty. Shipped Not Invoiced")
{
Caption = 'Qty. Shipped Not Invoiced';
}
field(qtyPerUnitOfMeasure; Rec."Qty. per Unit of Measure")
{
Caption = 'Qty. per Unit of Measure';
}
field(qtyToConsume; Rec."Qty. to Consume")
{
Caption = 'Qty. to Consume';
}
field(qtyToConsumeBase; Rec."Qty. to Consume (Base)")
{
Caption = 'Qty. to Consume (Base)';
}
field(qtyToInvoice; Rec."Qty. to Invoice")
{
Caption = 'Qty. to Invoice';
}
field(qtyToInvoiceBase; Rec."Qty. to Invoice (Base)")
{
Caption = 'Qty. to Invoice (Base)';
}
field(qtyToShip; Rec."Qty. to Ship")
{
Caption = 'Qty. to Ship';
}
field(qtyToShipBase; Rec."Qty. to Ship (Base)")
{
Caption = 'Qty. to Ship (Base)';
}
field(quantity; Rec.Quantity)
{
Caption = 'Quantity';
}
field(quantityBase; Rec."Quantity (Base)")
{
Caption = 'Quantity (Base)';
}
field(quantityConsumed; Rec."Quantity Consumed")
{
Caption = 'Quantity Consumed';
}
field(quantityInvoiced; Rec."Quantity Invoiced")
{
Caption = 'Quantity Invoiced';
}
field(quantityShipped; Rec."Quantity Shipped")
{
Caption = 'Quantity Shipped';
}
field(replacedItemNo; Rec."Replaced Item No.")
{
Caption = 'Replaced Item No.';
}
field(replacedItemType; Rec."Replaced Item Type")
{
Caption = 'Replaced Item Type';
}
field(requestedDeliveryDate; Rec."Requested Delivery Date")
{
Caption = 'Requested Delivery Date';
}
field(reserve; Rec.Reserve)
{
Caption = 'Reserve';
}
field(reservedQtyBase; Rec."Reserved Qty. (Base)")
{
Caption = 'Reserved Qty. (Base)';
}
field(reservedQuantity; Rec."Reserved Quantity")
{
Caption = 'Reserved Quantity';
}
field(resolutionCode; Rec."Resolution Code")
{
Caption = 'Resolution Code';
}
field(responsibilityCenter; Rec."Responsibility Center")
{
Caption = 'Responsibility Center';
}
field(returnReasonCode; Rec."Return Reason Code")
{
Caption = 'Return Reason Code';
}
field(rowVersionNumber; Rec.RowVersionNumber)
{
Caption = 'RowVersionNumber';
}
field(servPriceAdjmtGrCode; Rec."Serv. Price Adjmt. Gr. Code")
{
Caption = 'Serv. Price Adjmt. Gr. Code';
}
field(serviceItemLineDescription; Rec."Service Item Line Description")
{
Caption = 'Service Item Line Description';
}
field(serviceItemLineNo; Rec."Service Item Line No.")
{
Caption = 'Service Item Line No.';
}
field(serviceItemNo; Rec."Service Item No.")
{
Caption = 'Service Item No.';
}
field(serviceItemSerialNo; Rec."Service Item Serial No.")
{
Caption = 'Service Item Serial No.';
}
field(servicePriceGroupCode; Rec."Service Price Group Code")
{
Caption = 'Service Price Group Code';
}
field(shipToCode; Rec."Ship-to Code")
{
Caption = 'Ship-to Code';
}
field(shipmentLineNo; Rec."Shipment Line No.")
{
Caption = 'Shipment Line No.';
}
field(shipmentNo; Rec."Shipment No.")
{
Caption = 'Shipment No.';
}
field(shippedNotInvoiced; Rec."Shipped Not Invoiced")
{
Caption = 'Shipped Not Invoiced';
}
field(shippedNotInvoicedLCY; Rec."Shipped Not Invoiced (LCY)")
{
Caption = 'Shipped Not Invoiced (LCY)';
}
field(shippingAgentCode; Rec."Shipping Agent Code")
{
Caption = 'Shipping Agent Code';
}
field(shippingAgentServiceCode; Rec."Shipping Agent Service Code")
{
Caption = 'Shipping Agent Service Code';
}
field(shippingTime; Rec."Shipping Time")
{
Caption = 'Shipping Time';
}
field(shortcutDimension1Code; Rec."Shortcut Dimension 1 Code")
{
Caption = 'Shortcut Dimension 1 Code';
}
field(shortcutDimension2Code; Rec."Shortcut Dimension 2 Code")
{
Caption = 'Shortcut Dimension 2 Code';
}
field(sparePartAction; Rec."Spare Part Action")
{
Caption = 'Spare Part Action';
}
field(substitutionAvailable; Rec."Substitution Available")
{
Caption = 'Substitution Available';
}
field(symptomCode; Rec."Symptom Code")
{
Caption = 'Symptom Code';
}
field(systemCreatedEntry; Rec."System-Created Entry")
{
Caption = 'System-Created Entry';
}
field(systemCreatedAt; Rec.SystemCreatedAt)
{
Caption = 'SystemCreatedAt';
}
field(systemCreatedBy; Rec.SystemCreatedBy)
{
Caption = 'SystemCreatedBy';
}
field(systemId; Rec.SystemId)
{
Caption = 'SystemId';
}
field(systemModifiedAt; Rec.SystemModifiedAt)
{
Caption = 'SystemModifiedAt';
}
field(systemModifiedBy; Rec.SystemModifiedBy)
{
Caption = 'SystemModifiedBy';
}
field(taxAreaCode; Rec."Tax Area Code")
{
Caption = 'Tax Area Code';
}
field(taxGroupCode; Rec."Tax Group Code")
{
Caption = 'Tax Group Code';
}
field(taxLiable; Rec."Tax Liable")
{
Caption = 'Tax Liable';
}
field(timeSheetDate; Rec."Time Sheet Date")
{
Caption = 'Time Sheet Date';
}
field(timeSheetLineNo; Rec."Time Sheet Line No.")
{
Caption = 'Time Sheet Line No.';
}
field(timeSheetNo; Rec."Time Sheet No.")
{
Caption = 'Time Sheet No.';
}
field(transactionSpecification; Rec."Transaction Specification")
{
Caption = 'Transaction Specification';
}
field("transactionType"; Rec."Transaction Type")
{
Caption = 'Transaction Type';
}
field(transportMethod; Rec."Transport Method")
{
Caption = 'Transport Method';
}
field(unitCost; Rec."Unit Cost")
{
Caption = 'Unit Cost';
}
field(unitCostLCY; Rec."Unit Cost (LCY)")
{
Caption = 'Unit Cost (LCY)';
}
field(unitPrice; Rec."Unit Price")
{
Caption = 'Unit Price';
}
field(unitVolume; Rec."Unit Volume")
{
Caption = 'Unit Volume';
}
field(unitOfMeasure; Rec."Unit of Measure")
{
Caption = 'Unit of Measure';
}
field(unitOfMeasureCode; Rec."Unit of Measure Code")
{
Caption = 'Unit of Measure Code';
}
field(unitsPerParcel; Rec."Units per Parcel")
{
Caption = 'Units per Parcel';
}
field(vat; Rec."VAT %")
{
Caption = 'VAT %';
}
field(vatBaseAmount; Rec."VAT Base Amount")
{
Caption = 'VAT Base Amount';
}
field(vatBusPostingGroup; Rec."VAT Bus. Posting Group")
{
Caption = 'VAT Bus. Posting Group';
}
field(vatCalculationType; Rec."VAT Calculation Type")
{
Caption = 'VAT Calculation Type';
}
field(vatClauseCode; Rec."VAT Clause Code")
{
Caption = 'VAT Clause Code';
}
field(vatDifference; Rec."VAT Difference")
{
Caption = 'VAT Difference';
}
field(vatIdentifier; Rec."VAT Identifier")
{
Caption = 'VAT Identifier';
}
field(vatProdPostingGroup; Rec."VAT Prod. Posting Group")
{
Caption = 'VAT Prod. Posting Group';
}
field(variantCode; Rec."Variant Code")
{
Caption = 'Variant Code';
}
field(warranty; Rec.Warranty)
{
Caption = 'Warranty';
}
field(warrantyDisc; Rec."Warranty Disc. %")
{
Caption = 'Warranty Disc. %';
}
field(whseOutstandingQtyBase; Rec."Whse. Outstanding Qty. (Base)")
{
Caption = 'Whse. Outstanding Qty. (Base)';
}
field(workTypeCode; Rec."Work Type Code")
{
Caption = 'Work Type Code';
}
}
}
}
trigger OnInsertRecord(BelowxRec: Boolean): Boolean
var
noGenerator: Codeunit RescoNextNoGenerator;
begin
Rec."Line No." := noGenerator.GetNextLineNoForServiceLine(Rec."Document Type", Rec."Document No.", Rec."Line No.");
Rec.Type := "Service Line Type"::Resource;
end;
trigger OnModifyRecord(): Boolean
begin
Rec.Type := "Service Line Type"::Resource;
end;
trigger OnNewRecord(BelowxRec: Boolean)
begin
Rec.Type := "Service Line Type"::Resource;
end;
}