From 220cce5c308e1f538653f828ac4fb5a7337c44c1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期四, 11 四月 2024 19:00:08 +0800
Subject: [PATCH] 123
---
force-app/main/default/classes/lexNewQuoteEntryController.cls | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/lexNewQuoteEntryController.cls b/force-app/main/default/classes/lexNewQuoteEntryController.cls
index 8d05dec..721187f 100644
--- a/force-app/main/default/classes/lexNewQuoteEntryController.cls
+++ b/force-app/main/default/classes/lexNewQuoteEntryController.cls
@@ -71,7 +71,7 @@
Quote_Adjust_Amount__c, Quote_Adjust_Calculate__c, Discount_Amount__c, Discount_Amount_Calculate__c, Installation_location__c,
QuoteTotal_Page__c, Dealer_Final_Price_Page__c, Quote_Adjust_Amount_Page__c, OCM_Agent1_Price_Page__c, Agent1_Agent2_Price_Page__c
, AgencyDiscount__c,OCM_Sales_Forecast__c//棰勬祴閲戦淇敼 fy
- , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c,
+ , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c,ExtendedWarrantyAmountTotalPrice__c
Preferential_Gurantee_Period__c,LineItemCount
,IsQuoteTrial__c,OpportunityId,Opportunity.RecordType.DeveloperName
FROM Quote Where Id = :quoId];
@@ -183,7 +183,7 @@
Agency1__c, Agency2__c, Stocking_Price__c, Purchasing_Cost__c, Opportunity_No__c, StageName,
Agency1__r.Special__c, Agency2__r.Special__c, Account.Parent.Special__c
, Authorized_DB_No__c, Authorized_Finish_Sales__c, If_Need_Authorize__c
- , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c
+ , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c,ExtendedWarrantyAmountTotalPrice__c
, Hospital__c, Department_Class__c
,Is_Corrosion__c,
If_Need_PriceApply__c
@@ -1020,7 +1020,11 @@
if(quo.MultiYearWarrantyTotalPrice__c==null){
quo.MultiYearWarrantyTotalPrice__c=0;
}
- sumContractAmount = AccrualTotal+quo.MultiYearWarrantyTotalPrice__c;
+ if(quo.ExtendedWarrantyAmountTotalPrice__c==null){
+ quo.ExtendedWarrantyAmountTotalPrice__c=0;
+ }
+
+ sumContractAmount = AccrualTotal+quo.MultiYearWarrantyTotalPrice__c+quo.ExtendedWarrantyAmountTotalPrice__c;
if(quo.OCM_Agent1_Price_Page__c<=sumContractAmount){
error = true;
errorflg = true;
@@ -1189,7 +1193,7 @@
Agency2__c, Agent1_Agent2_Price__c, Agency2_Profit__c, Agency2_Profit_Rate__c,
Preferential_Trading_Price__c, Discount__c, Pricing__c, Unit_Price__c, Offer_Amount__c, TOTAL__c,
Contract__c, Print_HP_Name__c, Quote_Expiration_Date__c, Quote_Comment__c, OCM_Sales_Forecast__c, Installation_location__c, HasType3Machine__c
- , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c
+ , Gurantee_Period__c , multiYearWarranty__c, MultiYearWarrantyTotalPrice__c,ExtendedWarrantyAmountTotalPrice__c
, Preferential_Gurantee_Period__c
,IsQuoteTrial__c
From Quote Where Id = :quoId];
@@ -1240,6 +1244,7 @@
q.Gurantee_Period__c = quo.Gurantee_Period__c;
q.multiYearWarranty__c = quo.multiYearWarranty__c;
q.MultiYearWarrantyTotalPrice__c = quo.MultiYearWarrantyTotalPrice__c;
+ q.ExtendedWarrantyAmountTotalPrice__c = quo.ExtendedWarrantyAmountTotalPrice__c;
q.quoteSavedDate__c = Date.today();
q.Agency1_Profit_Rate__c = quo.Agency1_Profit_Rate__c;
q.Agency2__c = opp.Agency2__c;
@@ -1360,6 +1365,7 @@
o.Gurantee_Period__c = quo.Gurantee_Period__c ;
o.multiYearWarranty__c = quo.multiYearWarranty__c ;
o.MultiYearWarrantyTotalPrice__c = quo.MultiYearWarrantyTotalPrice__c ;
+ o.ExtendedWarrantyAmountTotalPrice__c = quo.ExtendedWarrantyAmountTotalPrice__c;
o.quoteSavedDate__c = Date.today();
o.OlyNumberHosts__c = 0;
List<String> oppIds = New List<String>();
--
Gitblit v1.9.1