scmc.RebateServiceglobal with sharing class RebateService Service which provides rebate assignment based on item master IDs and associated criteria. AuthorFinancial Force, Inc. Date09/24/2014 Methods
createSalesOrderRebatesglobal String createSalesOrderRebates(Id[] soIdList) Creates all applicable item rebates for a given sales order. Input Parameters
Return ValueA code indicating success or failure reason. createSalesOrderLineItemRebatesglobal String createSalesOrderLineItemRebates(Id[] soLineItemIdList) Creates all applicable item rebates for a given sales order line item. Input Parameters
Return ValueA code indicating success or failure reason createCustomerQuotationRebatesFromLinesglobal String createCustomerQuotationRebatesFromLines(List<scmc__Customer_Quotation_Line__c> cqLineList) Creates all applicable item rebates for the List of Input Parameters
Return ValueA code indicating success or failure reason createCustomerQuotationRebatesglobal String createCustomerQuotationRebates(Id[] cqIdList) Creates all applicable item rebates for a given customer quotation. Input Parameters
Return ValueA code indicating success or failure reason Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. List<Id> customerQuotationIdList = new List<Id>{'b00000000000BBB'}; SCMC.RebateService service = new SCMC.RebateService(); String statusResult = service.createCustomerQuotationRebates(customerQuotationIdList); if(statusResult == 'SUCCESS') { // do something in case of success ... } else { throw new Exception(statusResult); } createCustomerQuotationLineRebatesglobal String createCustomerQuotationLineRebates(Id[] cqLineIdList) Creates all applicable item rebates for a given customer quotation line. Input Parameters
Return ValueA code indicating success or failure reason Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. List<Id> customerQuotationLineIdList = new List<Id>{'c00000000000CCC'}; SCMC.RebateService service = new SCMC.RebateService(); String statusResult = service.createCustomerQuotationLineRebates(customerQuotationLineIdList); if(statusResult == 'SUCCESS') { // do something in case of success ... } else { throw new Exception(statusResult); } createPurchaseOrderRebatesglobal String createPurchaseOrderRebates(Id[] poIdList) Creates all applicable item rebates for a given purchase order. Input Parameters
Return ValueA code indicating success or failure reason createPurchaseOrderLineItemRebatesglobal String createPurchaseOrderLineItemRebates(Id[] poLineItemIdList) Creates all applicable item rebates for a given purchase order line item. Input Parameters
Return ValueA code indicating success or failure reason RebateServiceglobal RebateService(List<scmc__Customer_Quotation_Line__c> customerQuotationLines) Initialize the service with a List of Customer_Quotation_Line__c objects. Respects combinability rules. Input Parameters
RebateServiceglobal RebateService(List<scmc__Customer_Quotation_Line__c> customerQuotationLines, Boolean checkCombinability) Initialize the service with a List of Customer_Quotation_Line__c objects. Input Parameters
RebateServiceglobal RebateService(List<scmc__Sales_Order_Line_Item__c> salesOrderLineItems) Initialize the service with a List of Sales_Order_Line_Item__c objects. Input Parameters
RebateServiceglobal RebateService(List<scmc__Purchase_Order_Line_Item__c> purchaseOrderLineItems) Initialize the service with a List of Purchase_Order_Line_Item__c objects. Input Parameters
RebateServiceglobal RebateService(List<scmc__Invoice_Line_Item__c> invoiceLineItems) Initialize the service with a List of Invoice_Line_Item__c objects. Input Parameters
getRebatesAppliedglobal List<RebateAppliedLine> getRebatesApplied(Id[] lineIdArray) Determine all rebates associated with the array of object ids. Input Parameters
Return ValueA List of getRebatesAppliedglobal List<RebateAppliedLine> getRebatesApplied(Id lineId) Determine rebate that applies to a single object id. Input Parameters
Return ValueA list of getRebatesAppliedglobal List<RebateAppliedLine> getRebatesApplied(Id lineId, Date effectiveDate) Determine applicable rebates for a single object for a specific date. Input Parameters
Return ValueReturns a List of |