• Amit Jadhav 22
  • NEWBIE
  • 4 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies
Controller:
public with sharing class costsheet {
    
    public String OrderId;
    public Order ord;
    public Shipper_Info_India__c SII;
    
    public costsheet(ApexPages.StandardController controller) {
     ord= (Order)Controller.getRecord();
     system.debug('ORD--'+ord);
     OrderId=Apexpages.currentpage().getParameters().get('id');
     listIex =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='Steamer Charges'].subtotal__c ;
     /*if(SII.Bill_Type__c =='Service Type'){
     CHAList =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='CHA Charges' ].subtotal__c ;
     }*/
     CFSList =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='CFS Charges' ].subtotal__c ;
     //fetchlist();
      
     Calculation();
      
    }
        public Decimal CFSList {get;set;}
        public Decimal CHAList {get;set;}
        Public Decimal listIex {get;set;}
}
Controller:
public with sharing class costsheet {
    
    public String OrderId;
    public Order ord;
    public Shipper_Info_India__c SII;
    
    public costsheet(ApexPages.StandardController controller) {
     ord= (Order)Controller.getRecord();
     system.debug('ORD--'+ord);
     OrderId=Apexpages.currentpage().getParameters().get('id');
     listIex =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='Steamer Charges'].subtotal__c ;
     /*if(SII.Bill_Type__c =='Service Type'){
     CHAList =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='CHA Charges' ].subtotal__c ;
     }*/
     CFSList =[Select Id,subtotal__c from Shipper_Info_India__c where Supplier_Order__r.id =:ord.id AND RecordType.Name='CFS Charges' ].subtotal__c ;
     //fetchlist();
      
     Calculation();
      
    }
        public Decimal CFSList {get;set;}
        public Decimal CHAList {get;set;}
        Public Decimal listIex {get;set;}
}