Class ConvertQuotationIntoOrder

    • Constructor Detail

      • ConvertQuotationIntoOrder

        public ConvertQuotationIntoOrder()
    • Method Detail

      • convertQuotationIntoSalesOrder

        public Order convertQuotationIntoSalesOrder​(boolean recalculatePrices,
                                                    String quotationId)
        Converts a Quotation Into a Sales Order based on the given ID
        • 1. Creates a Sales Order in Draft Status based on a clone of the Quotation
        • 2. Sets the proper Document Type to the new Sales Order
        • 3. Sets the proper values to the Sales Order header
        • 4. For each line that is not a discount it creates a clone into the Sales Order Document
        • 5. If the parameter recalculatePrices is true, it recalculates the prices
        • 6. Recalculates the discounts for each line
        • 7. Calls C_Order_Post and updates the status of the Quotation to Already Converted to Order
        Parameters:
        recalculatePrices - If true, the prices of the new Sales Order line will be recalculated. If false, it will be the same prices as the Quotation
        quotationId - The Id of the Quotation
        Returns:
        An OBError message with the result message