hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
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
Quintiq file version 2.0
#parent: #root
Method New (
  structured[InventorySupply] owners,
  Account_MP account
) id:Method_DialogCreateEditSupplyCost_New
{
  #keys: '[145730.1.1201010370]'
  Body:
  [*
    // Method to populate form data when batch create
    owner := owners.First();
    
    account := MacroPlan.GetDefaultAccount( Form.GetCostType() );
    
    shadowCost := owner.InventorySupplyCost( relshadow,
                                             ID := MacroPlan.IDHolder().GetInventorySupplyCostID(),
                                             Account_MP := account,
                                             AccountName := account.Name(),
                                             CostDriver := account.DefaultCostDriver(),
                                             Cost :=  account.DefaultCost() );
    // Set bottom read-only panel data
    pnlContent.SetInventorySupply( shadow(owner) );
    
    // Set dialog data
    DataHolderDialogData.Data( &shadowCost );
    DataHolderOwners.Data( owners.Copy() );
    
    // Initialize dialog
    this.Initialize();
  *]
}