psdi.app.po

Class ShipmentSet

    • Method Detail

      • matchShipmentLinesToPOLines

        public void matchShipmentLinesToPOLines()
                                         throws MXException,
                                                java.rmi.RemoteException
        This method is used to match a Shipment Line with a POLine using some business rules. The rules are as follows
        1. Is the PO Receivable?? Get the PO number on the shipment line (there will always be a PO number on the shipment line since it is a required field). If the status of this PO is either waiting for approval, closed or canceled, this PO is not receivable. Just exit (throw an exception?).
        2. Get the PO using the PO number on the Shipment line. Get the PO lines for this PO.
        3. Get the item number, catalog code, PO Line number from the shipment line.
        4. Query the PO Line Set obtained in Step 2 for this item number. If no duplicate item numbers were found on the PO Line, this is the correctly matched PO line-shipment line combination. Copy the PO Line ID to the SHIPMENT.POLINEID.
        5. If there were more than 2 PO Lines with the same item number . 5.1 Match by PO Line number or else..... 5.2 Match by quantity or else..... 5.3 Pick one of the PO Lines. Copy the PO Line ID to the SHIPMENT.POLINEID.
        6. Repeat step 5 with the catalog code if there was no match with item number.
        7. If still no match was found go by PO Line number only if the item number and the catalog code are null.
        8. If none of the above conditions yielded any result, the ShipmentLine cannot be matched to a POLine.
        Specified by:
        matchShipmentLinesToPOLines in interface ShipmentSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        ShipmentSet.matchShipmentLinesToPOLines()
      • createReceipts

        public void createReceipts()
                            throws MXException,
                                   java.rmi.RemoteException
        Create Material Receipts for all the ShipmentLines that belong to a Shipment.
        1. Loop through each shipments in this set and pick the Vendor of each shipment. If the Vendor on this shipment has the COMPANIES.AUTORECEIVEONASN flag as false, do not create material receipts for this shipment.
        2. Get all the shipmentlines for each shipment.
        3. Loop through the shipmentlines and create MatRecTrans Mbos using the values from the ShipmentLine.
        4. Each shipmentline must be already matched with a POLine before calling this method.
        Specified by:
        createReceipts in interface ShipmentSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        ShipmentSet.matchShipmentLinesToPOLines()