Class InvoiceFromGoodsShipmentUtil


  • public class InvoiceFromGoodsShipmentUtil
    extends Object
    Helper class for generate invoice from goods shipment process
    • Method Detail

      • shipmentLinesFromOrdersWithSamePriceList

        public static boolean shipmentLinesFromOrdersWithSamePriceList​(ShipmentInOut shipment)
        Returns if all lines in Goods Shipment are linked to Sales Orders sharing the same Price List
        Parameters:
        shipment - The Goods Shipment
        Returns:
        True if all lines in Goods Shipment come from orders sharing the same Price List, false otherwise
      • getPriceListFromOrder

        public static List<PriceList> getPriceListFromOrder​(ShipmentInOut shipment)
        Returns the Price List used by the orders the shipment lines are linked to. Assumes all lines are linked to Sales Orders sharing the same Price List
        Parameters:
        shipment - The Goods Shipment
        Returns:
        The Price List
      • getPriceListFromBusinessPartner

        public static String getPriceListFromBusinessPartner​(ShipmentInOut shipment)
        Returns the Price List used by the Business Partner from the Goods Shipment
        Parameters:
        shipment - The Goods Shipment
        Returns:
        The Price List Id, if exists, empty string otherwise
      • getInvoiceStatus

        public static String getInvoiceStatus​(Invoice invoice)
        Returns the message based on invoice status
        Parameters:
        invoice - The Invoice
        Returns:
        The message