| | |
| | | String inventory, |
| | | String fac, |
| | | Number quantitiy |
| | | ) |
| | | ) as InventoryInterfaceDataDetail |
| | | { |
| | | TextBody: |
| | | [* |
| | | // 甄兰鸽 Jul-26-2024 (created) |
| | | iid := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno ); |
| | | iid := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno ); |
| | | if( isnull( iid ) ){ |
| | | iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno ); |
| | | iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno ); |
| | | } |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = 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 ); |
| | | 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 ); |
| | | iidl := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy ); |
| | | }else{ |
| | | iidl.Quantity( ); |
| | | iidl.Quantity( quantitiy ); |
| | | } |
| | | return iidl; |
| | | *] |
| | | } |