19626
2023-10-07 988f9735377909b6310301e582c15804e004783f
force-app/main/default/classes/PCLLostReportController.cls
@@ -147,11 +147,11 @@
        select id, LostPrice__c, Lost_By_Company__c,
        LostPrices_ThousandY__c,  //20230215 lt DB202302247719
        Lost_reason_main__c,Lost_Reason_Sub__c,Name,Agency__c, AgencyMannual__c,
        // ProductCategory__c,ProductClass__c,
        Lost_cancel_report__c,Lost_By_Company_Mannual__c,
        ( select id,PCLLostBrand__c,LostProduct__c,
         LostProductMannual__c,            //SWAG-C6P9PX lt 20210913 add
         ProductCategory__c,ProductClass__c, //add tcm 20211123
         ProductCategory__c,
         ProductClass__c, //add tcm 20211123
         Quantity__c,Name, LostBrandName__c 
         from PCLLostBrand__c.PCLLostBrandProduct__r)
        from PCLLostBrand__c
@@ -261,8 +261,6 @@
        // tempLostProduct.LostProductss.LostProduct__c = null;
        // tempLostProduct.LostProductss.LostProductMannual__c = null;
        // tempLostProduct.LostProductss.Quantity__c = null;
        // tempLostProduct.LostProductss.ProductClass__c = null;
        // tempLostProduct.LostProductss.ProductCategory__c = null;
        // tempLostProduct.bool=false;
      }
     }
@@ -714,7 +712,9 @@
      LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false;
  
     }else {
      Product2 prd = [select Id,ProductClass__c, ProductCategory__c from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
      Product2 prd = [select Id,ProductClass__c
      , ProductCategory__c
      from Product2 where Id =:LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c];
      if (prd.ProductCategory__c!=null) {
        LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c;
        LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;