Adjustments to FM Call report, reorder layout, section headers.
[capital-apms-progress.git] / process / one-off / fix / delete-property.p
blob8f22aedd6aa812c2ba46ff5c141b07afe31378fb
1 /*
2 DEF VAR property-code AS INT NO-UNDO INIT 0.
3 UPDATE property-code.
5 FIND Property WHERE Property.PropertyCode = property-code.
6 */
7 FOR EACH Property:
9 IF PropertyCode = 534 THEN NEXT.
10 IF PropertyCode = 601 THEN NEXT.
11 IF PropertyCode = 745 THEN NEXT.
12 IF PropertyCode = 746 THEN NEXT.
13 IF PropertyCode = 765 THEN NEXT.
14 IF PropertyCode = 767 THEN NEXT.
15 IF PropertyCode = 768 THEN NEXT.
16 IF PropertyCode = 780 THEN NEXT.
17 IF PropertyCode = 802 THEN NEXT.
18 IF PropertyCode = 804 THEN NEXT.
19 IF PropertyCode = 805 THEN NEXT.
20 IF PropertyCode = 809 THEN NEXT.
21 IF PropertyCode = 922 THEN NEXT.
22 IF PropertyCode = 1000 THEN NEXT.
23 IF PropertyCode = 9999 THEN NEXT.
24 IF PropertyCode = 99999 THEN NEXT.
28 FOR EACH BuildingEvent OF Property:
29 DELETE BuildingEvent.
30 END.
31 FOR EACH BuildingSystem OF Property:
32 DELETE BuildingSystem.
33 END.
34 FOR EACH BuildingTask OF Property:
35 DELETE BuildingTask.
36 END.
37 FOR EACH Contract OF Property:
38 DELETE Contract.
39 END.
40 FOR EACH GroundLease OF Property:
41 DELETE GroundLease.
42 END.
43 FOR EACH Image OF Property:
44 DELETE Image.
45 END.
46 FOR EACH LeaseImage OF Property:
47 DELETE LeaseImage.
48 END.
49 FOR EACH PropertyTitle OF Property:
50 DELETE PropertyTitle.
51 END.
52 FOR EACH StreetFrontage OF Property:
53 DELETE StreetFrontage.
54 END.
55 FOR EACH Valuation OF Property:
56 DELETE Valuation.
57 END.
58 FOR EACH PropertyOutgoing OF Property:
59 DELETE PropertyOutgoing.
60 END.
61 FOR EACH SupplyMeter OF Property:
62 DELETE SupplyMeter.
63 END.
64 FOR EACH RentSpaceHistory OF Property:
65 DELETE RentSpaceHistory.
66 END.
67 FOR EACH ConstructionDetails OF Property:
68 DELETE ConstructionDetails.
69 END.
70 FOR EACH LeaseHistory OF Property:
71 DELETE LeaseHistory.
72 END.
73 FOR EACH PropForecast OF Property:
74 DELETE PropForecast.
75 END.
76 FOR EACH PropForecastParam OF Property:
77 DELETE PropForecastParam.
78 END.
79 FOR EACH SupplyMeterReading OF Property:
80 DELETE SupplyMeterReading.
81 END.
82 FOR EACH TenantCall OF Property:
83 DELETE TenantCall.
84 END.
85 FOR EACH PropertyView OF Property:
86 DELETE PropertyView.
87 END.
88 FOR EACH BuildingEvent OF Property:
89 DELETE BuildingEvent.
90 END.
91 FOR EACH BuildingEvent OF Property:
92 DELETE BuildingEvent.
93 END.
94 FOR EACH Note OF Property:
95 DELETE Note.
96 END.
98 FOR EACH Tenant WHERE Tenant.EntityType = 'P' AND Tenant.EntityCode = Property.PropertyCode:
99 DELETE Tenant.
100 END.
101 FOR EACH RentalSpace OF Property:
102 DELETE RentalSpace.
103 END.
104 FOR EACH TenancyLease OF Property:
105 DELETE TenancyLease.
106 END.
107 /* DO TRANSACTION: */
108 DELETE Property.
109 END.