| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Generate ( |
| | | MacroPlan macroplan, |
| | | InterfaceDataset interfaceDataset, |
| | | Date date, |
| | | String partno, |
| | |
| | | if( isnull( iid ) ){ |
| | | iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno ); |
| | | } |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = partno ); |
| | | if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){ |
| | | quantitiy := floor( [Real]quantitiy / 4 ); |
| | | } |
| | | iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac ); |
| | | if( isnull( iidl ) ){ |
| | | iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy ); |
| | | }else{ |
| | | iidl.Quantity( ); |
| | | } |
| | | *] |
| | | } |