From 985edf54edeaac1b70a0b00c5fa975ab3add78b4 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期四, 31 三月 2022 18:20:01 +0800
Subject: [PATCH] WLIG-CCT9UG关于市场多年保计提金调整
---
force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls b/force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls
index ac48685..90c5d01 100644
--- a/force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls
+++ b/force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls
@@ -1440,4 +1440,103 @@
System.Test.stopTest();
}
}
+ static testMethod void dataEntryTest2() {
+ RecordType recByoin = [select id from RecordType where IsActive = true and SobjectType = 'Account' and Name = :RC_BYOUIN limit 1];
+ Account hospital = new Account(Name = '銉嗐偣銉堢梾闄�');
+ hospital.RecordTypeId = recByoin.id;
+ hospital.Site = '銉嗐偣銉堢梾闄㈤儴闁�';
+ hospital.Alias_Name2__c = '銉嗐偣銉堢梾闄㈠垾鍚�';
+ insert hospital;
+
+ RecordType recHanbaiten = [select id from RecordType where IsActive = true and SobjectType = 'Account' and Name = :RC_HANBAOITEN limit 1];
+ Account sellerA = new Account(Name = '璨╁2搴�');
+ sellerA.RecordTypeId = recHanbaiten.id;
+ sellerA.Hospital__c = hospital.id;
+ insert sellerA;
+
+ Product2 product2 = new Product2( Name = '11112');
+ product2.SFDA_Status__c = '涓嶈';
+ product2.Intra_Trade_List_RMB_1__c = 100;
+ product2.Intra_Trade_List_RMB_Date1__c = date.today();
+ product2.Intra_Trade_List_RMB_End_Date1__c = date.today().addDays(1);
+ product2.Intra_Trade_Cost_RMB_1__c = 200;
+ product2.Intra_Trade_Cost_RMB_Date1__c = date.today();
+ product2.Intra_Trade_Cost_RMB_End_Date1__c = date.today().addDays(1);
+ product2.Manual_Entry__c = false;
+ product2.Asset_Model_No__c = '11112';
+ product2.MDM_Model_No__c = '11112';
+ insert product2;
+
+ PricebookEntry pE2 = new PricebookEntry( Pricebook2Id = pricebook.Id, Product2Id = product2.Id);
+ pE2.UnitPrice = 0;
+ pE2.IsActive = true;
+ pE2.UseStandardPrice = false;
+ pE2.CurrencyIsoCode = CurrencyIso;
+ insert pE2;
+
+ Opportunity opp1 = buildOppInstance( trade, CurrencyIso);
+ opp1.Trade__c = trade;
+ opp1.owner_not_automatically_update__c = true;
+ opp1.Sales_Root__c = 'AAA';
+ opp1.Pricebook2Id = pricebook.id;
+ opp1.Estimation_Decision__c=true;
+ insert opp1;
+
+ OpportunityLineItem oli = new OpportunityLineItem();
+ oli.Quantity = 1;
+ oli.UnitPrice = 10;
+ oli.PricebookEntryId = pE2.Id;
+ oli.OpportunityId = opp1.id;
+ oli.Cost__c = 100;
+ insert oli;
+
+ SI_NewQuoteEntryController.QELine act = new SI_NewQuoteEntryController.QELine(oli, 0);
+ act.Asset_Model = '';
+ act.pageObject.Quantity__c = 10;
+ act.pageObject.UnitPrice = 100;
+ act.pageObject.Subtotal__c = 1000;
+ act.pageObject.PricebookEntryId = pE2.id;
+ List<SI_NewQuoteEntryController.QELine> actList = new List<SI_NewQuoteEntryController.QELine>();
+ actList.add(act);
+
+ SI_NewQuoteEntryController controller = new SI_NewQuoteEntryController();
+ controller.oppId=opp1.Id;
+ controller.enableSales=true;
+ Quote quote=new Quote();
+ quote.QuoteName__c = '銉嗐偣銉堣绌�';
+ quote.Dealer_Final_Price_Page__c = 100;
+ quote.Quote_Adjust_Amount_Page__c = 10;
+ quote.Quote_Expiration_Date__c = date.today();
+ quote.Agency1__c = sellerA.id;
+ quote.OCM_Agent1_Price_Page__c = 1243;
+ quote.OpportunityId = opp1.id;
+ quote.Name ='銉嗐偣銉堣绌�';
+ quote.Pricebook2Id = pricebook.id;
+ quote.Quote_No__c = quoteNo;
+ insert quote;
+ system.debug('act2++++++++++'+pE2);
+
+ QuoteLineItem item02 = new QuoteLineItem();
+ item02.Name__c = '銉嗐偣銉堝晢鍝�';
+ item02.QuoteId = quote.Id;
+ item02.Quantity = 1;
+ item02.Cost_Subtotal__c = 0;
+ item02.Cost__c = 200;
+ item02.UnitPrice = 10;
+ item02.PricebookEntryId = pE2.Id;
+ insert item02;
+
+ // quote.QuoteName__c = '銉嗐偣銉堣绌�';
+ // quote.QuoteName__c = '銉嗐偣銉堣绌�';
+ controller.quo=quote;
+ SI_NewQuoteEntryController.QuoteBean qbs=new SI_NewQuoteEntryController.QuoteBean();
+ qbs.Quote_Adjust_Calculate = 100;
+ controller.qb = qbs;
+ controller.rowIdx=1;
+ controller.activities=actList;
+ controller.opp=opp1;
+ controller.addMultipleRow();
+ SI_NewQuoteEntryController.QELine actList12 = new SI_NewQuoteEntryController.QELine(10,true,'aaa',Date.today(),'bbb',pE2.Id,'ddd','eee','fff','ggg','hhh','iii','jjj','kkk',10,1.1,2.2,3.3,4.0,5.5,6.6,'lll',7.7,8.8);
+ system.debug('xxxxxxxxxxxxxxxxxxxxxxxx++++++++++++++++++++++++');
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1