Quintiq file version 2.0
#parent: #root
Method Edit (
  structured[AccountCost] accountCosts
) id:Method_DialogCreateEditUnitCost_Edit
{
  #keys: '[145730.0.2130765695]'
  Body:
  [*
    // Cast to unit cost
    datas := selectset( accountCosts, Elements.astype(UnitCost ), uc, true );
    
    // Set DataHolder on first unit cost for display
    shadowStockingCost := shadow( datas.First());
    DataHolderDialogData.Data( &shadowStockingCost );
    
    // Populate DataHolder for edited unit costs
    DataHolderDialogDatas.Data( datas.Copy() );
    
    // Populate dataholder units
    units := selectset( datas, Elements.Unit, unit, true );
    DataHolderUnits.Data( &units );
    
    this.Initialize();
  *]
}
