yanyuan
2023-09-06 13296fd8bb887ffde341bd93a6497ffa0ff5c7f4
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -30,15 +30,23 @@
          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(),"在途在制");
        }
      
        }