| | |
| | | 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(),"在途在制"); |
| | | } |
| | | |
| | | } |