| | |
| | | product1.Intra_Trade_Cost_RMB_1__c=10; |
| | | product1.Intra_Trade_Cost_RMB_2__c=10; |
| | | product1.SFDA_Expiration_Date__c= Date.today(); |
| | | product1.LastbuyProductFLG__c = true; |
| | | //CHAN-BHNBX6 2019/11/25 START |
| | | // product1.Intra_Trade_Service_RMB__c = 2150; |
| | | // product1.Entend_gurantee_period_all__c=1; |
| | |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | | controller.Save(); |
| | | |
| | | QuoteIrai__c[] irais = [select Id, Name, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | QuoteIrai__c[] irais = [select Id, Name,Note__c, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | QuoteIraiLineItem__c[] items = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais[0].Id order by Item_Order__c]; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | |
| | | controller.quoteIrai(); |
| | | |
| | | QuoteIrai__c[] irais2 = [select Id, Name, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | QuoteIrai__c[] irais2 = [select Id,Note__c, Name, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | //System.assertEquals('_サンブリッジ う', irais2[0].LastIraiUser__c); |
| | | |
| | | Task[] tasks = [select Id,Subject,OwnerId,Description,ActivityDate,QuoteIraiId__c |
| | |
| | | |
| | | controller.activities[0].pageObject.Quantity__c = 1; |
| | | controller.Save(); |
| | | QuoteIrai__c[] irais3 = [select Id, Name, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | QuoteIrai__c[] irais3 = [select Id,Note__c, Name, IraiUser__c, LastIraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト01']; |
| | | //System.assertEquals(null, irais3[0].LastIraiUser__c); |
| | | } |
| | | |
| | |
| | | product1.Foreign_Trade_Cost_US_End_Date2__c=Date.today().addDays(1); |
| | | product1.Foreign_Trade_Cost_US_1__c=10; |
| | | product1.Foreign_Trade_Cost_US_2__c=10; |
| | | // product1.LastbuyProductFLG__c = true; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | //product1.Entend_gurantee_period_all__c=1; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | |
| | | controller.OppReflection(); |
| | | |
| | | QuoteIrai__c[] irais = [select Id, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト02']; |
| | | QuoteIrai__c[] irais = [select Id,Note__c, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト02']; |
| | | QuoteIraiLineItem__c[] items = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais[0].Id order by Item_Order__c]; |
| | | |
| | | // System.assertEquals('テスト02', irais[0].IraiSubject__c); |
| | |
| | | product1.Intra_Trade_Cost_RMB_End_Date2__c=Date.today().addDays(1); |
| | | product1.Intra_Trade_Cost_RMB_1__c=10; |
| | | product1.Intra_Trade_Cost_RMB_2__c=10; |
| | | // product1.LastbuyProductFLG__c = true; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | //product1.Entend_gurantee_period_all__c=1; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | // System.assertEquals('你选择了不可报价的产品。产品已经更新为最新状态,请再次确认。', controller.errorMessage); |
| | | |
| | | |
| | | QuoteIrai__c[] irais = [select Id, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c order where IraiSubject__c = '委托02']; |
| | | QuoteIrai__c[] irais = [select Id,Note__c, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c order where IraiSubject__c = '委托02']; |
| | | QuoteIraiLineItem__c[] items = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais[0].Id order by Item_Order__c]; |
| | | |
| | | // System.assertEquals('委托02', irais[0].IraiSubject__c); |
| | |
| | | product1.Intra_Trade_Cost_RMB_End_Date2__c=Date.today().addDays(1); |
| | | product1.Intra_Trade_Cost_RMB_1__c=10; |
| | | product1.Intra_Trade_Cost_RMB_2__c=10; |
| | | product1.LastbuyProductFLG__c = true; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | //product1.Entend_gurantee_period_all__c=1; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | |
| | | controller.quoteIrai(); |
| | | |
| | | QuoteIrai__c[] irais = [select Id, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c order where IraiSubject__c = '委托99']; |
| | | QuoteIrai__c[] irais = [select Id,Note__c, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c order where IraiSubject__c = '委托99']; |
| | | QuoteIraiLineItem__c[] items = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais[0].Id order by Item_Order__c]; |
| | | |
| | | // System.assertEquals('委托99', irais[0].IraiSubject__c); |
| | |
| | | // System.assertEquals('报价委托:委托99, テスト99, テスト99, 99.00%', tasks[0].Subject); |
| | | // System.assertEquals(user.Id, tasks[0].OwnerId); |
| | | // System.assertEquals(irais[0].Id, tasks[0].QuoteIraiId__c); |
| | | controller.Save(); |
| | | Opportunity opp1 = new Opportunity(); |
| | | opp1.Name = 'test'; |
| | | opp1.StageName = '引合'; |
| | | opp1.CloseDate = Date.today().adddays(1); |
| | | insert opp1; |
| | | |
| | | QuoteLineItem[] qlis = [select id,QuoteId,PricebookEntry.Product2Id from QuoteLineItem where PricebookEntry.Product2Id != :null limit 1]; |
| | | String str = ''; |
| | | if (qlis.size() > 0) { |
| | | str = qlis[0].QuoteId; |
| | | } |
| | | LastbuyProduct__c lst = new LastbuyProduct__c(); |
| | | lst.InquiryCode__c= opp1.Id; |
| | | lst.ProductName__c = Product1.Id; |
| | | lst.LastbuyQuantity__c = 3; |
| | | lst.effectiveFLG__c = true; |
| | | insert lst; |
| | | PageReference page2 = new PageReference('/apex/NewQuoteIrai?oppid=' + opp1.Id + '&oppquoid=' + str); |
| | | System.Test.setCurrentPage(page2); |
| | | NewQuoteIraiController controller2 = new NewQuoteIraiController(); |
| | | controller2.init(); |
| | | LastbuyProduct__c lst2 = new LastbuyProduct__c(); |
| | | lst2.InquiryCode__c= opp1.Id; |
| | | lst2.ProductName__c = Product2.Id; |
| | | lst2.LastbuyQuantity__c = 3; |
| | | lst2.effectiveFLG__c = true; |
| | | insert lst2; |
| | | PageReference page3 = new PageReference('/apex/NewQuoteIrai?oppid=' + opp1.Id + '&oppquoid=' + str); |
| | | System.Test.setCurrentPage(page3); |
| | | NewQuoteIraiController controller3 = new NewQuoteIraiController(); |
| | | controller3.init(); |
| | | |
| | | } |
| | | |
| | |
| | | product1.Intra_Trade_Cost_RMB_End_Date2__c=Date.today().addDays(1); |
| | | product1.Intra_Trade_Cost_RMB_1__c=10; |
| | | product1.Intra_Trade_Cost_RMB_2__c=10; |
| | | product1.LastbuyProductFLG__c = true; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | //product1.Entend_gurantee_period_all__c=1; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | product2.Intra_Trade_Cost_RMB_End_Date2__c=Date.today().addDays(1); |
| | | product2.Intra_Trade_Cost_RMB_1__c=10; |
| | | product2.Intra_Trade_Cost_RMB_2__c=10; |
| | | product2.LastbuyProductFLG__c = true; |
| | | // CHAN-BHNBX6 2019/11/25 START |
| | | //product2.Entend_gurantee_period_all__c=2; |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | |
| | | |
| | | controller.Save(); |
| | | |
| | | QuoteIrai__c[] irais = [select Id, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト05']; |
| | | QuoteIrai__c[] irais = [select Id,Note__c, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト05']; |
| | | QuoteIraiLineItem__c[] items = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais[0].Id order by Item_Order__c]; |
| | | |
| | | // System.assertEquals('テスト05', irais[0].IraiSubject__c); |
| | |
| | | |
| | | controller.quoteIrai(); |
| | | |
| | | QuoteIrai__c[] irais2 = [select Id, Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト05']; |
| | | QuoteIrai__c[] irais2 = [select Id, Note__c,Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト05']; |
| | | QuoteIraiLineItem__c[] items2 = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais2[0].Id order by Item_Order__c]; |
| | | |
| | | // System.assertEquals('テスト05', irais2[0].IraiSubject__c); |
| | |
| | | update p2; |
| | | |
| | | controller.Save(); |
| | | Opportunity opp1 = new Opportunity(); |
| | | opp1.Name = 'test'; |
| | | opp1.StageName = '引合'; |
| | | opp1.CloseDate = Date.today().adddays(1); |
| | | insert opp1; |
| | | |
| | | QuoteLineItem[] qlis = [select id,QuoteId,PricebookEntry.Product2Id from QuoteLineItem where PricebookEntry.Product2Id != :null limit 1]; |
| | | String str = ''; |
| | | if (qlis.size() > 0) { |
| | | str = qlis[0].QuoteId; |
| | | } |
| | | LastbuyProduct__c lst = new LastbuyProduct__c(); |
| | | lst.InquiryCode__c= opp1.Id; |
| | | lst.ProductName__c = Product1.Id; |
| | | lst.LastbuyQuantity__c = 3; |
| | | lst.effectiveFLG__c = true; |
| | | insert lst; |
| | | PageReference page2 = new PageReference('/apex/NewQuoteIrai?oppid=' + opp1.Id + '&oppquoid=' + str); |
| | | System.Test.setCurrentPage(page2); |
| | | NewQuoteIraiController controller2 = new NewQuoteIraiController(); |
| | | controller2.init(); |
| | | LastbuyProduct__c lst2 = new LastbuyProduct__c(); |
| | | lst2.InquiryCode__c= opp1.Id; |
| | | lst2.ProductName__c = Product2.Id; |
| | | lst2.LastbuyQuantity__c = 3; |
| | | lst2.effectiveFLG__c = true; |
| | | insert lst2; |
| | | PageReference page3 = new PageReference('/apex/NewQuoteIrai?oppid=' + opp1.Id + '&oppquoid=' + str); |
| | | System.Test.setCurrentPage(page3); |
| | | NewQuoteIraiController controller3 = new NewQuoteIraiController(); |
| | | controller3.init(); |
| | | // System.assertEquals(true, controller.errorflg); |
| | | // System.assertEquals('停止', controller.activities[0].pageObject.SFDA_Status__c); |
| | | // System.assertEquals('00103:软管接头123', controller.activities[0].pageObject.Name__c); |
| | |
| | | if (qlis.size() > 0) { |
| | | str = qlis[0].QuoteId; |
| | | } |
| | | |
| | | // LastbuyProduct__c lst = new LastbuyProduct__c(); |
| | | // lst.InquiryCode__c= opp1.Id; |
| | | // lst.ProductName__c = Product1.Id; |
| | | // lst.LastbuyQuantity__c = 3; |
| | | system.debug('opp1.Id+++'+opp1.Id); |
| | | PageReference page2 = new PageReference('/apex/NewQuoteIrai?oppid=' + opp1.Id + '&oppquoid=' + str); |
| | | System.Test.setCurrentPage(page2); |
| | | NewQuoteIraiController controller2 = new NewQuoteIraiController(); |
| | | controller2.init(); |
| | | |