admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
Quintiq file version 2.0
#parent: #root
Method DeleteSoftDeletedData
{
  Description: 'Delete all data which are IsSoftDeleted, used to clean up data which is soft deleted.'
  TextBody:
  [*
    // Delete all data which are IsSoftDeleted, used to clean up data which is soft deleted
    // Delete Units
    units := selectset( this, Unit, unit, unit.IsSoftDeleted() );
    Unit::Delete( units );
    
    // Delete Operations
    operations := selectset( this, Unit.Operation, rout, rout.IsSoftDeleted() );
    Operation::Delete( operations, true );
    
    // Delete Lanes
    lanes := selectset( this, Unit.Lane, lane, lane.IsSoftDeleted() );
    Lane::Delete( lanes );
    
    // Delete LaneLegs
    lanelegs := selectset( this, Unit.Lane.LaneLeg, ll, ll.IsSoftDeleted() );
    LaneLeg::Delete( lanelegs );
    
    // Delete LaneCosts
    lanecosts := selectset( this, Unit.Lane.LaneCost, lc, lc.IsSoftDeleted() );
    AccountCost::Delete( lanecosts );
    
    // Delete LaneLegCosts
    lanelegcosts := selectset( this, Unit.Lane.LaneLeg.LaneLegCost, llc, llc.IsSoftDeleted() );
    AccountCost::Delete( lanelegcosts );
    
    // Delete OperationCosts
    operationcosts := selectset( this, Unit.Operation.OperationCost, rc, rc.IsSoftDeleted() );
    AccountCost::Delete( operationcosts );
    
    // Delete UnitCosts
    unitcosts := selectset( this, Unit.UnitCost, uc, uc.IsSoftDeleted() );
    AccountCost::Delete( unitcosts );
    
    // Delete CampaignType_MPs
    campaigntypes := selectset( this, Unit.CampaignType_MP, camptyp, camptyp.IsSoftDeleted() );
    CampaignType_MP::Delete( campaigntypes );
    
    // Delete Campaign_MPs
    campaigns := selectset( this, Unit.CampaignType_MP.Campaign_MP, camp, camp.IsSoftDeleted() );
    Campaign_MP::Delete( campaigns );
    
    // Delete OperationInCampaignTypes
    operationincampaigntypes := selectset( this, Unit.Operation.OperationInCampaignType, rict, rict.IsSoftDeleted() );
    OperationInCampaignType::Delete( operationincampaigntypes );
    
    // Delete StockingPointUnits
    stockingpointunits := selectset( this, Unit.StockingPointUnit, spu, spu.IsSoftDeleted() );
    StockingPointUnit::Delete( stockingpointunits );
    
    // Delete SupplySpecifications
    supplyspecifications := selectset( this, Unit.SupplySpecification, ss, ss.IsSoftDeleted() );
    SupplySpecification::Delete( supplyspecifications );
    
    // Delete TransportAvailabilities
    transportcapacities := selectset( this, Unit.TransportAvailability, tc, tc.IsSoftDeleted() );
    TransportAvailability::Delete( transportcapacities );
    
    // Delete UnitAvailabilities
    unitavailabilities := selectset( this, Unit.UnitAvailability, ua, ua.IsSoftDeleted() );
    UnitAvailability::Delete( unitavailabilities );
    
    // Delete UnitCalendarElements
    unitcalendarelements := selectset( this, Unit.UnitCalendarElement, uce, uce.IsSoftDeleted() );
    UnitCalendarElement::Delete( unitcalendarelements );
    
    // Delete UnitCapacities
    unitcapacities := selectset( this, Unit.UnitCapacity, uc, uc.IsSoftDeleted() );
    UnitCapacity::Delete( unitcapacities );
    
    // Delete Product_MPs
    products := selectset( this, Product_MP, prod, prod.IsSoftDeleted() );
    Product_MP::Delete( products );
    
    // Delete ProductInLanes
    productinlanes := selectset( this, Product_MP.ProductInLane, pil, pil.IsSoftDeleted() );
    ProductInLane::Delete( productinlanes );
    
    // Delete ProductInStockingPoint_MPs
    pisps := selectset( this, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsSoftDeleted() );
    ProductInStockingPoint_MP::Delete( pisps );
    
    // Delete InventorySpecifications
    inventoryspecifications := selectset( this, Product_MP.ProductInStockingPoint_MP.InventorySpecification, is, is.IsSoftDeleted() );
    InventorySpecification::Delete( inventoryspecifications );
    
    // Delete InventorySupplies
    inventorysupplies := selectset( this, Product_MP.ProductInStockingPoint_MP.InventorySupply, is, is.IsSoftDeleted() );
    InventorySupply::Delete( inventorysupplies );
    
    // Delete PostponedSalesDemandCosts
    postponedsalesdemandcosts := selectset( this, Product_MP.ProductInStockingPoint_MP.PostponedSalesDemandCost, psdc, psdc.IsSoftDeleted() );
    PostponedSalesDemandCost::Delete( postponedsalesdemandcosts );
    
    // Delete StockingPointCosts
    stockingpointcosts := selectset( this, StockingPoint_MP.StockingPointCost, spc, spc.IsSoftDeleted() );
    AccountCost::Delete( stockingpointcosts );
    
    // Delete PISPAccounts
    pispaccounts := selectset( this, Account_MP.AccountAssignment.astype( PISPAccount ), pispacc, pispacc.IsSoftDeleted() );
    AccountAssignment::Delete( pispaccounts );
    
    // Delete StockingPointAccounts
    stockingpointaccounts := selectset( this, Account_MP.AccountAssignment.astype( StockingPointAccount ), spacc, spacc.IsSoftDeleted() );
    AccountAssignment::Delete( stockingpointaccounts );
    
    // Delete UnitAccounts
    unitaccount := selectset( this, Account_MP.AccountAssignment.astype( UnitAccount ), unitacc, unitacc.IsSoftDeleted() );
    AccountAssignment::Delete( unitaccount );
    
    // Delete Currency_MPs
    currencies := selectset( this, Currency_MP, curr, curr.IsSoftDeleted() );
    Currency_MP::Delete( currencies );
    
    // Delete CurrencyRate_MPs
    currencyrates := selectset( this, Currency_MP.CurrencyRate_MP, currate, currate.IsSoftDeleted() );
    CurrencyRate_MP::Delete( currencyrates );
    
    // Delete Groups
    groups := selectset( this, Group, group, group.IsSoftDeleted() );
    Group::Delete( groups );
    
    // Delete Ingredients
    ingredients := selectset( this, Ingredient, ingredient, ingredient.IsSoftDeleted() );
    Ingredient::Delete( ingredients );
    
    // Delete PeriodSpecification_MPs
    periodspecifications := selectset( this, PeriodSpecification_MP, ps, ps.IsSoftDeleted() );
    PeriodSpecification_MP::Delete( periodspecifications );
    
    // Delete Priorities
    priorities := selectset( this, Priority, prio, prio.IsSoftDeleted() );
    Priority::Delete( priorities );
    
    // Delete ProductLevel_MPs
    productlevels := selectset( this, ProductLevel_MP, plevel, plevel.IsSoftDeleted() );
    ProductLevel_MP::Delete( productlevels );
    
    // Delete Recipes
    recipes := selectset( this, Recipe, recipe, recipe.IsSoftDeleted() );
    Recipe::Delete( recipes );
    
    // Delete BaseRecipeIngredients
    recipeingredients := selectset( this, Recipe.BaseRecipeIngredient, ri, ri.IsSoftDeleted() );
    BaseRecipeIngredient::Delete( recipeingredients );
    
    // Delete SalesDemands
    salesdemands := selectset( this, SalesDemand, sd, sd.IsSoftDeleted() );
    SalesDemandBase::Delete( salesdemands );
    
    // Delete SalesLevel_MPs
    saleslevels := selectset( this, SalesLevel_MP, sl, sl.IsSoftDeleted() );
    SalesLevel_MP::Delete( saleslevels );
    
    // Delete SalesSegment_MPs
    salessegments := selectset( this, SalesSegment_MP, ss, ss.IsSoftDeleted() );
    SalesSegment_MP::Delete( salessegments );
    
    // Delete ShiftPatterns
    shiftpatterns := selectset( this, ShiftPattern, sp, sp.IsSoftDeleted() );
    ShiftPattern::Delete( shiftpatterns );
    
    // Delete ShiftDays
    shiftdays := selectset( this, ShiftPattern.ShiftDay, sd, sd.IsSoftDeleted() );
    ShiftDay::Delete( shiftdays );
    
    // Delete StockingPoint_MPs
    stockingpoints := selectset( this, StockingPoint_MP, sp, sp.IsSoftDeleted() );
    StockingPoint_MP::Delete( stockingpoints );
    
    // Delete StockingPointCapacities
    stockingpointcapacities := selectset( this, StockingPoint_MP.StockingPointCapacity, spc, spc.IsSoftDeleted() );
    StockingPointCapacity::Delete( stockingpointcapacities );
    
    // Delete StockingPointInLanes
    stockingpointinlanes := selectset( this, StockingPoint_MP.StockingPointInLane, spil, spil.IsSoftDeleted() );
    StockingPointInLane::Delete( stockingpointinlanes );
    
    // Delete UnitOfMeasure_MPs
    unitofmeasures := selectset( this, UnitOfMeasure_MP, uom, uom.IsSoftDeleted() );
    UnitOfMeasure_MP::Delete( unitofmeasures );
    
    // Delete ConversionFactors
    baseconversionfactors := selectset( this, UnitOfMeasure_MP.BaseConversionFactor, bcf, bcf.IsSoftDeleted() );
    ConversionFactor::Delete( baseconversionfactors );
  *]
}