psdi.app.inventory

Class InvCostSet

    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Generate a new InvCost object
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - a MboSet
        Returns:
        a new InvCost Mbo
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • canAdd

        public void canAdd()
                    throws MXException
        Can an object be added to the InvCost set? If the owner of InvCost is not Inventory, stop the process.
        Overrides:
        canAdd in class MboSet
        Throws:
        MXApplicationException(inventory, - invCostNoAdd) is thrown when the owner is not inventory or owner is null
        MXException
      • saveTransaction

        public void saveTransaction(MXTransaction txn)
                             throws MXException,
                                    java.rmi.RemoteException
        Overwrite saveTransaction on the set level to validate if in the whole set there is one-and-only-one 100 percentage condition rate before actual save of the set. Checking is done only when this INVCOST set is instantiated from an inventory record and relationship name of INVCOST.no
        Specified by:
        saveTransaction in interface Transactable
        Overrides:
        saveTransaction in class MboSet
        Parameters:
        txn - a MXTransaction
        Throws:
        none
        MXException - Error while saving
        java.rmi.RemoteException - Network error
        See Also:
        Mbo.checkSiteOrgAccessForSave()
      • OneHundrePercentFound

        public boolean OneHundrePercentFound(MboRemote currentMbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Returns true if at least one of the records in the set is a already a 100 percent condition rate. false if none of the records in the set is 100 percent rate. Assumes that all all are of the same itemnum, itemset id, and location, and siteid
        Parameters:
        the - currentMbo in focus, when checking the 100 percent rate from the set, bypass the mbo passed
        Throws:
        MXException
        java.rmi.RemoteException
      • getOneHundredPerCentCost

        public MboRemote getOneHundredPerCentCost()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • OneAndOnlyOne100PercentRate

        public int OneAndOnlyOne100PercentRate()
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • adjustStandardCost

        public void adjustStandardCost()
                                throws MXException,
                                       java.rmi.RemoteException
        Loops through the mboset and calls the method adjustStandardCost.
        Specified by:
        adjustStandardCost in interface InvCostSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#adjustStandardCost()
      • adjustAverageCost

        public void adjustAverageCost()
                               throws MXException,
                                      java.rmi.RemoteException
        Loops through the mboset and calls the method adjustAverageCost.
        Specified by:
        adjustAverageCost in interface InvCostSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#adjustAverageCost()
      • increaseErrorCount

        public void increaseErrorCount()
                                throws MXException,
                                       java.rmi.RemoteException
        This methods keeps the count of rows for which standard cost or average cost did not get modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • totalStdCostErrors

        public void totalStdCostErrors()
                                throws MXException,
                                       java.rmi.RemoteException
        Displays a message when one or more rows do not get updated as the old value is same as the new value.
        Specified by:
        totalStdCostErrors in interface InvCostSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#totalStdCostErrors()
      • totalAvgCostErrors

        public void totalAvgCostErrors()
                                throws MXException,
                                       java.rmi.RemoteException
        Displays a message when one or more rows do not get updated as the old value is same as the new value.
        Specified by:
        totalAvgCostErrors in interface InvCostSetRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#totalAvgCostErrors()