| 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 ); | 
|   *] | 
| } |