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
Quintiq file version 2.0
#parent: #root
Method ExportEntityCosts
{
  Description: 'Method to export entity costs to message via QI'
  TextBody:
  [*
    // Initiate some variables including base NVT
    exportfilename := 'Costs.xml';
    routename := 'QuintiqExportCostsFileRoute';
    basenvt := NamedValueTree::Create();
    basenvt.Root( GlobalParameters_MP::GetDatasetMPSync() );
    mp := this.MacroPlan();
    
    invcosts := selectset( mp, Product_MP.InventoryValueAndCost, ic, true );
    this.ExportObjectToNVT( basenvt, invcosts, typeof( IOInventoryValueAndCost ) );
    
    lanecosts := selectset( mp, Unit.Lane.LaneCost, lc, true );
    this.ExportObjectToNVT( basenvt, lanecosts, typeof( IOLaneCost ) );
    
    lanelegcosts := selectset( mp, Unit.Lane.LaneLeg.LaneLegCost, llc, true );
    this.ExportObjectToNVT( basenvt, lanelegcosts, typeof( IOLaneLegCost ) );
    
    opcosts := selectset( mp, Unit.Operation.OperationCost, oc, true );
    this.ExportObjectToNVT( basenvt, opcosts, typeof( IOOperationCost ) );
    
    prodcosts := selectset( mp, Product_MP.ProductValueAndCost, pc, true );
    this.ExportObjectToNVT( basenvt, prodcosts, typeof( IOProductValueAndCost ) );
    
    spcosts := selectset( mp, StockingPoint_MP.StockingPointCost, sc, true );
    this.ExportObjectToNVT( basenvt, spcosts, typeof( IOStockingPointCost ) );
    
    unitcosts := selectset( mp, Unit.UnitCost, uc, true );
    this.ExportObjectToNVT( basenvt, unitcosts, typeof( IOUnitCost ) );
    
    this.ExportNVTToQI( exportfilename, routename, basenvt );
  *]
}