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
| Quintiq file version 2.0
| #parent: #root
| StaticMethod GetIsProductBelongsToTheLane (
| Trip trip,
| Product_MPs products,
| output String feedback_o
| ) const declarative remote as Boolean
| {
| Description: 'Check if the products belongs to the lane of this trip'
| TextBody:
| [*
| productInTrips := selectset( trip, LaneLeg.Lane.ProductInLane.Product_MP, p, true );
|
| diff := products.Difference( productInTrips );
|
| result := diff.Size() < 1;
|
| if( not result )
| {
| feedback_o := Translations::MP_ProductInTrip_CanCreate_ProductNotBelongsToLane( diff.Element( 0 ) );
| }
|
| return result;
| *]
| }
|
|