| | |
| | | // SI业务系统流程改善和提升项目2019-10-28 by vivek start |
| | | ,Configuration_Suggestion__c , Configuration_Suggestion_Feedback__c |
| | | // SI业务系统流程改善和提升项目2019-10-28 by vivek end |
| | | // DB202303051651 产品报价金额自动计算 ssm start |
| | | , Salesdepartment_Owner__c |
| | | // DB202303051651 产品报价金额自动计算 ssm end |
| | | FROM Opportunity Where Id = :oppId]; |
| | | // 多年保修 start |
| | | trade = '外貿'; |
| | |
| | | } |
| | | } else { |
| | | //添加行 |
| | | List<Quote> quoList = |
| | | [ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c, |
| | | List<Quote> quoList =//SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start QuotationChange__c,MainEngineWithoutMonitor__c,Interdepartmental__c, |
| | | [ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,QuotationChange__c,MainEngineWithoutMonitor__c,Interdepartmental__c, |
| | | Dealer_Final_Price__c,TotalPrice__c,Estimation_List_Price__c,QuoteNumber, |
| | | CreatedByid,Queto_Confirm_Date__c, |
| | | QuoteToName,Quote_Expiration_Date__c,Quote_Comment__c,Stocking_Price__c,Unit_Price__c, |
| | |
| | | if (copyQuoId == null) { |
| | | quo = quoList[0]; |
| | | quoteOwner = quo.CreatedByid; |
| | | |
| | | //SWAG-C5DBAL 【委托】 [紧急]SI询价肖寒无法修改报价单 精琢技术 2021/07/30 start |
| | | //注释原逻辑 |
| | | if(quo.Queto_Confirm_Date__c != null || |
| | |
| | | } |
| | | // vivek end |
| | | system.debug('初始化时的集合:'+activities); |
| | | //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | quo.Offer_Amount__c = true; |
| | | quo.TOTAL__c = true; |
| | | quo.Preferential_Gurantee_Period__c = true; |
| | | //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | | return null; |
| | | } |
| | | |
| | |
| | | if(!ReservedProductVerification()){ |
| | | if(flglastbuy==1){ |
| | | errorflg = true; |
| | | errormessage = '预留产品表中没有录入该报价的预留产品' ; |
| | | errormessage = '预留产品表中没有该询价,请通过本部窗口联系营业管理课' ; |
| | | return null; |
| | | }else if(flglastbuy==2){ |
| | | errorflg = true; |
| | |
| | | Boolean error = false; |
| | | errorflg = false; |
| | | errormessage = null; |
| | | |
| | | //obsap 最终用户合同金额验证 fy start |
| | | if (quo.Dealer_Final_Price_Page__c == null) { |
| | | quo.Dealer_Final_Price__c.addError(System.Label.Error_Message3); |
| | | error = true; |
| | | errormessage = System.Label.Error_Message3; |
| | | } |
| | | //obsap 最终用户合同金额验证 fy end |
| | | if (checkAgentsDeleteFlag() == false) { |
| | | return false; |
| | | } |
| | |
| | | error = true; |
| | | errormessage = System.Label.Error_Message3; |
| | | } |
| | | if (quo.Dealer_Final_Price_Page__c == null) { |
| | | quo.Dealer_Final_Price__c.addError(System.Label.Error_Message3); |
| | | error = true; |
| | | errormessage = System.Label.Error_Message3; |
| | | } |
| | | // if (quo.Dealer_Final_Price_Page__c == null) { |
| | | // quo.Dealer_Final_Price__c.addError(System.Label.Error_Message3); |
| | | // error = true; |
| | | // errormessage = System.Label.Error_Message3; |
| | | // } |
| | | if (qb.Quote_Adjust_Calculate == null) { |
| | | quo.Quote_Adjust_Calculate__c.addError(System.Label.Error_Message3); |
| | | error = true; |
| | |
| | | } |
| | | |
| | | } else { |
| | | List<Quote> qs = New List<Quote>(); |
| | | qs = [select Id,OpportunityId,Pricebook2Id,Name,Estimation_List_Price__c,Dealer_Final_Price__c, |
| | | List<Quote> qs = New List<Quote>();//SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start QuotationChange__c,MainEngineWithoutMonitor__c,Interdepartmental__c, |
| | | qs = [select Id,OpportunityId,Pricebook2Id,Name,Estimation_List_Price__c,Dealer_Final_Price__c,QuotationChange__c,MainEngineWithoutMonitor__c,Interdepartmental__c, |
| | | Stocking_Price__c,Discount_Amount__c,Discount_Amount_Calculate__c,Quote_Adjust_Amount__c,Quote_Adjust_Calculate__c, |
| | | Agency1__c,OCM_Agent1_Price__c,Agency1_Profit__c,Agency1_Profit_Rate__c,Quote_No__c, |
| | | Agency2__c,Agent1_Agent2_Price__c,Agency2_Profit__c,Agency2_Profit_Rate__c, |
| | |
| | | q.Quote_Comment__c = quo.Quote_Comment__c; |
| | | |
| | | q.Installation_location__c = quo.Installation_location__c; |
| | | |
| | | //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | q.QuotationChange__c = quo.QuotationChange__c; |
| | | q.MainEngineWithoutMonitor__c = quo.MainEngineWithoutMonitor__c; |
| | | q.Interdepartmental__c = quo.Interdepartmental__c; |
| | | //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | | /* |
| | | if (hasType3Machine) { |
| | | q.Installation_location__c = ''; |
| | |
| | | public boolean If_Need_Authorize { get; set; } |
| | | public String Authorized_DB_No { get; set; } |
| | | // LHJ End |
| | | // DB202303051651 产品报价金额自动计算 ssm start |
| | | // 医院合同金额比例 |
| | | public Decimal rate_hospital { get; set; } |
| | | // 经销商1合同金额比例 |
| | | public Decimal rate_agency1 { get; set; } |
| | | // DB202303051651 产品报价金额自动计算 ssm end |
| | | |
| | | public OppInfo(Opportunity opp) { |
| | | Account_RecordType_DeveloperName = opp.Account.RecordType.DeveloperName; |
| | |
| | | If_Need_Authorize = opp.If_Need_Authorize__c; |
| | | Authorized_DB_No = opp.Authorized_DB_No__c; |
| | | // LHJ End |
| | | // DB202303051651 产品报价金额自动计算 ssm start |
| | | String str_rate_hospital = ControllerUtil.getValueFromJSONString(System.Label.Quote_HospitalAmount_Rate, opp.Salesdepartment_Owner__c); |
| | | String str_rate_agency1 = ControllerUtil.getValueFromJSONString(System.Label.Quote_Agency1Amount_Rate, opp.Salesdepartment_Owner__c); |
| | | rate_hospital = String.isNotBlank(str_rate_hospital) ? Decimal.valueOf(str_rate_hospital) : 1.0; |
| | | rate_agency1 = String.isNotBlank(str_rate_agency1) ? Decimal.valueOf(str_rate_agency1) : 1.0; |
| | | // DB202303051651 产品报价金额自动计算 ssm end |
| | | } |
| | | } |
| | | //TODO 1.Quoteオブジェクト追加 |