| | |
| | | public String idl {get; set;} |
| | | public boolean IS_Alert_Price_Apply {get; set;} |
| | | public ID userid {get; set;} |
| | | |
| | | |
| | | public Consumable_order_AlertController() { |
| | | idl = ApexPages.currentPage().getParameters().get('id'); |
| | | |
| | |
| | | |
| | | } |
| | | public void init() { |
| | | String orderRecordTypeId = [select Id,DeveloperName from RecordType where SobjectType = 'Consumable_order__c' and DeveloperName = 'Order'].Id; |
| | | list<Consumable_order__c> COList = |
| | | [select id, SalesManager__c,RecordTypeId, Order_type__c, Order_status__c |
| | | from Consumable_order__c where id =:idl]; |
| | |
| | | userid = UserInfo.getUserId(); |
| | | if( COList[0].SalesManager__c != null |
| | | && COList[0].SalesManager__c == userid |
| | | && COList[0].RecordTypeId.equals('01210000000c9dt') |
| | | // && COList[0].RecordTypeId.equals('01210000000c9dt') |
| | | && COList[0].RecordTypeId.equals(orderRecordTypeId) |
| | | && COList[0].Order_type__c.equals('订单') |
| | | && COList[0].Order_status__c.equals('已提交')){ |
| | | IS_Alert_Price_Apply = true; |