| | |
| | | public Boolean changedAfterBid { get; set; } // true の場合、画面に confirm メッセージが表示します。quoIdを新しいinsert。判定はjsにで実施 |
| | | //public Id qlistId { get; set; } |
| | | |
| | | //lastbuy 2022/2/9 fy start |
| | | public Boolean filg { get; set; } |
| | | //lastbuy 2022/2/9 fy end |
| | | |
| | | public String excel_text { get; set; } |
| | | public Integer select_index { get; set; } // excelImport専用ですが、jsにて制御することになるので、TODO katsu 削除予定 |
| | | public String Product_text { get; set; } |
| | |
| | | } |
| | | //添加行 |
| | | public void addMultipleRow() { |
| | | system.debug('11111111111111111===11111111111111'); |
| | | List<QELine> tmpQELine = new List<QELine>(); |
| | | //页面上的输入框追加 (只能在末尾追加) |
| | | |
| | |
| | | StockFlg++; |
| | | } |
| | | } |
| | | //20220215 fy lastbuy start |
| | | if(!ReservedProductVerification()){ |
| | | errorflg = true; |
| | | errormessage = '产品数量不可超过产品预留数量' ; |
| | | return null; |
| | | } |
| | | //20220215 fy lastbuy end |
| | | system.debug('PassFlg:'+PassFlg); |
| | | system.debug('StockFlg:'+StockFlg); |
| | | if(PassFlg == 0&&oldListCheck[0].Old_Opportunity_ID__c==null){ |
| | |
| | | //Sap送信,Printに合わせて1~ |
| | | Integer i=1; |
| | | if (activities.size()>0) { |
| | | system.debug('activities+++***+++'+activities); |
| | | for (QELine s:activities) { |
| | | if (s.Asset_Model != null && s.Asset_Model != '') { |
| | | if (s.pageObject.PricebookEntryId != null) { |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //lastbuy 2022/2/15 fy start |
| | | public boolean ReservedProductVerification() { |
| | | filg=true; |
| | | Map<string,QuoteLineItem> quotlinitMap = new Map<string,QuoteLineItem>(); |
| | | List<Id> lastProductFLGList = new List<Id>(); |
| | | for(QELine qli : activities){ |
| | | lastProductFLGList.add(qli.pageObject.PricebookEntry.Product2Id); |
| | | quotlinitMap.put(qli.pageObject.PricebookEntry.Product2Id,qli.pageObject); |
| | | } |
| | | if(lastProductFLGList!=null){ |
| | | List<LastbuyProduct__c> LastbuyObjList=[select id,LastbuyQuantity__c,InquiryCode__c,ProductName__c,effectiveFLG__c from LastbuyProduct__c where InquiryCode__c= : oppId and ProductName__c in :lastProductFLGList and effectiveFLG__c= true]; |
| | | if(LastbuyObjList!=null){ |
| | | for(LastbuyProduct__c lastbuypr :LastbuyObjList){ |
| | | Decimal quoteLItemNum=0; |
| | | if(quotlinitMap.containsKey(lastbuypr.ProductName__c)){ |
| | | quoteLItemNum=quotlinitMap.get(lastbuypr.ProductName__c).Quantity__c; |
| | | }else{ |
| | | continue; |
| | | } |
| | | if(lastbuypr.LastbuyQuantity__c<quoteLItemNum){ |
| | | filg=false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | system.debug('filg====='+filg); |
| | | return filg; |
| | | } |
| | | //lastbuy 2022/2/15 fy end |
| | | //oppに画面の値を設定 |
| | | private void setOppFromOppInfo() { |
| | | opp.Wholesale_Price__c = oppInfo.Wholesale_Price; |