Quintiq file version 2.0
|
#parent: #root
|
Method Copy (
|
FormInventoryCosts formInventoryCosts,
|
InventoryValueAndCost inventoryCost
|
) id:Method_DialogCreateEditInventoryCost_Copy
|
{
|
#keys: '[144528.2.67597210]'
|
Body:
|
[*
|
// Copy inventory cost (only allow one)
|
DataHolderForm.Data( formInventoryCosts ); // Form that opens the dialog, to select the newly created object in list
|
|
// PISP for the cost we are copying
|
pisp := inventoryCost.ProductInStockingPoint_MP();
|
|
// Create new shadow based on the Inventory Cost we are copying
|
shadowInventoryCost := shadow( inventoryCost )
|
shadowInventoryCost.ResetWrapped();
|
shadowInventoryCost.ID( MacroPlan.IDHolder().GetInventoryValueAndHoldingCostID() );
|
|
DataHolderDialogData.Data( &shadowInventoryCost );
|
|
// Populate owner DH
|
pispsForInvCost := construct( ProductInStockingPoint_MPs );
|
pispsForInvCost.Add( pisp );
|
DataHolderPISPs.Data( &pispsForInvCost );
|
|
this.Initialize();
|
*]
|
}
|