Merge branch 'dev_yy' into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateOrUpdate ( |
| | | MacroPlan owner, |
| | | String productid, |
| | | String stockingpointid, |
| | | String description, |
| | | Real actualinventorylevelend, |
| | | Date manufactureddate |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Administrator Sep-6-2023 (created) |
| | | date := Date :: Today(); |
| | | actualpispip := ActualProductInStockingPointInPeriod::FindActualProductInStockingPointInPeriodTypeIndex( productid, stockingpointid, date, manufactureddate ); |
| | | |
| | | if( isnull( actualpispip ) ){ |
| | | ActualProductInStockingPointInPeriod::Create( owner, |
| | | productid, |
| | | stockingpointid, |
| | | description, |
| | | actualinventorylevelend, |
| | | date, |
| | | manufactureddate, |
| | | true); |
| | | }else{ |
| | | actualpispip.Update( actualinventorylevelend, description, true ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization ActualProductInStockingPointInPeriod #extension |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateOrUpdate ( |
| | | String id, |
| | | Product_MP productmp, |
| | | StockingPoint_MP stockingpoint, |
| | | Date date, |
| | | Date manufacturedate, |
| | | Real userquantity, |
| | | String description |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Administrator Sep-6-2023 (created) |
| | | inventorysupply := InventorySupply::FindInventorySupplyTypeIndex( id ); |
| | | |
| | | if( isnull( inventorysupply ) ){ |
| | | InventorySupply::Create(id, |
| | | productmp, |
| | | stockingpoint, |
| | | date, |
| | | manufacturedate, |
| | | userquantity, |
| | | description, |
| | | true); |
| | | }else{ |
| | | inventorysupply.Update( userquantity ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization InventorySupply #extension |
| | | { |
| | | } |
| | |
| | | for( i :=0 ;i < businessTypes.Size();i++ ){ |
| | | businessType := businessTypes.Element( i); |
| | | if( product.BusinessType() = businessType and not product.IsCommon()){ |
| | | ActualProductInStockingPointInPeriod::Create( this,actual.ProductID(),actual.StockingPointID(),actual.Description(),actual.ActualInventoryLevelEnd(), |
| | | date,actual.ManufacturedDate(),true); |
| | | ActualProductInStockingPointInPeriod::CreateOrUpdate( this, |
| | | actual.ProductID(), |
| | | actual.StockingPointID(), |
| | | actual.Description(), |
| | | actual.ActualInventoryLevelEnd(), |
| | | actual.ManufacturedDate()); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | ActualProductInStockingPointInPeriod::Create( this,actual.ProductID(),actual.StockingPointID(),actual.Description(),actual.ActualInventoryLevelEnd(), |
| | | date,actual.ManufacturedDate(),true); |
| | | ActualProductInStockingPointInPeriod::CreateOrUpdate( this, |
| | | actual.ProductID(), |
| | | actual.StockingPointID(), |
| | | actual.Description(), |
| | | actual.ActualInventoryLevelEnd(), |
| | | actual.ManufacturedDate()); |
| | | } |
| | | |
| | | } |
| | |
| | | for( i :=0 ;i < businessTypes.Size();i++ ){ |
| | | businessType := businessTypes.Element( i); |
| | | if( product.BusinessType() = businessType and not product.IsCommon()){ |
| | | InventorySupply::Create(externalSupply.ID(),productMP,stockingpoint,externalSupply.Date(),externalSupply.ManufacturedDate(),externalSupply.UserQuantity(),"å¨éå¨å¶",true); |
| | | InventorySupply::CreateOrUpdate( externalSupply.ID(), |
| | | productMP, |
| | | stockingpoint, |
| | | externalSupply.Date(), |
| | | externalSupply.ManufacturedDate(), |
| | | externalSupply.UserQuantity(),"å¨éå¨å¶"); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | // productMP := Product_MP::FindById( this, externalSupply.ProductID() ); |
| | | // stockingpoint := StockingPoint_MP::FindById( this, externalSupply.StockingPointID() ); |
| | | if( not isnull( stockingpoint) and not isnull( productMP)){ |
| | | InventorySupply::Create(externalSupply.ID(),productMP,stockingpoint,externalSupply.Date(),externalSupply.ManufacturedDate(),externalSupply.UserQuantity(),"å¨éå¨å¶",true); |
| | | InventorySupply::CreateOrUpdate( externalSupply.ID(), |
| | | productMP, |
| | | stockingpoint, |
| | | externalSupply.Date(), |
| | | externalSupply.ManufacturedDate(), |
| | | externalSupply.UserQuantity(),"å¨éå¨å¶"); |
| | | } |
| | | |
| | | } |