psdi.app.inventory

Class InvUse

    • Constructor Detail

      • InvUse

        public InvUse(MboSet ms)
               throws MXException,
                      java.rmi.RemoteException
        Constructor for the InvUse Object
        Parameters:
        ms -
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • getProcess

        public java.lang.String getProcess()
        Gets the work flow process for invuse.
        Returns:
        the work flow process name for Inventory Usage which is Inventory Usage document.
      • getMeterMap

        public java.util.HashMap getMeterMap()
      • init

        public void init()
                  throws MXException
        initialization rountine. This sets the READONLY flags both for those fields that are always read only and those that are editable only during insert.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        Description copied from class: Mbo
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        add() Provides defaults for a new InvUse Record. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        STATUSENTERED
        STATUSDATESYSTEMDATE
        CHANGEDATESYSTEMDATE
        CHANGEBYUSERNAME(login)
        SITEIDDEFAULT SITEID
        FROMSTORELOCDEFAULT STOREROOM
        USETYPEMIXED

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is overridden to add a wrapper to exceptions thrown during change status and to write warnings whether or not the status change is successful
        Specified by:
        changeStatus in interface InvUseRemote
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        status - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value (valuelist.maxvalue).
        date - The effective date of the new status is current date/time.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        accessmodifier -
        Throws:
        MXException - Thrown if there is a problem.
        java.rmi.RemoteException
        See Also:
        StatefulMbo.canChangeStatus(String)
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 java.lang.String binflag,
                                 java.lang.String stagingbin,
                                 boolean listtab,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is called from the changeStatus(status, date, memo, accessModifier) with default values.
        Specified by:
        changeStatus in interface InvUseRemote
        Parameters:
        status - The new desired status.
        date - The effective date of the new status is current date/time.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        binflag - Indicates bin to be used in the transaction.
        stagingbin - Represents the staging bin to be used for transaction.
        accessmodifier -
        Throws:
        MXException - Thrown if there is a problem.
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUseSet#changeStatus(String, Date, String, String, String, boolean, long)
      • validateStatus

        public void validateStatus(java.lang.String status,
                                   java.util.Date date,
                                   java.lang.String memo,
                                   java.lang.String binflag,
                                   java.lang.String stagingbin,
                                   boolean listtab)
                            throws MXException,
                                   java.rmi.RemoteException
        This method validates if the status change is allowed.
        Throws:
        MXException - Thrown if there is a problem.
        java.rmi.RemoteException
      • chkPickListMbo

        public boolean chkPickListMbo(MboRemote owner)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkReservationandSetBin

        public void checkReservationandSetBin(java.lang.String binflag,
                                              java.lang.String stagebin,
                                              java.lang.String status)
                                       throws MXException,
                                              java.rmi.RemoteException
        This method returns an arraylist of the invuseline records with deleted invreserves.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateLineReservationandSetBin

        public boolean validateLineReservationandSetBin(boolean listtab,
                                                        java.lang.String binflag,
                                                        java.lang.String stagebin,
                                                        java.lang.String status)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        This method checks if there are any invuseline exists with deleted invreserve records. It also checks the user response and return true if user wants to continue otherwise returns false.
        Returns:
        boolean true, if user wants to continue with change status. false, if user wants to cancel it.
        Throws:
        MXException
        java.rmi.RemoteException
      • processInvUseLines

        public boolean processInvUseLines()
                                   throws MXException,
                                          java.rmi.RemoteException
        This method checks the if status and based on the original status it deletes or cancels (insert STAGETRANSFER records) the invuselines.
        Returns:
        boolean true, if
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteInvUseLines

        public void deleteInvUseLines()
                               throws MXException,
                                      java.rmi.RemoteException
        This method deletes the invuseline records with deleted invreserve records.
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelInvUseLines

        public void cancelInvUseLines()
                               throws MXException,
                                      java.rmi.RemoteException
        This method cancels the invuseline records with deleted invreserve records.
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvUseLineNum

        public java.lang.String getInvUseLineNum()
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method returns the list of the invuselinenum for invUseLineList ArrayList.
        Returns:
        String
        Throws:
        MXException
        java.rmi.RemoteException
      • allReservationDeletedInSet

        public boolean allReservationDeletedInSet()
                                           throws MXException,
                                                  java.rmi.RemoteException
        This method returns true if the size of the invUseLineList is equal to number of the invuseline records. All the invuseline records for this invuse have deleted invreserve records.
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • isEntered

        public boolean isEntered()
                          throws MXException,
                                 java.rmi.RemoteException
        Returns true if this invuse is in Entered status.
        Returns:
        true if this invuse is in Entered Status.
        Throws:
        MXException
        java.rmi.RemoteException
      • isStaged

        public boolean isStaged()
                         throws MXException,
                                java.rmi.RemoteException
        Returns true if this invuse is in Staged Staus.
        Returns:
        true if this invuse is in Staged Status.
        Throws:
        MXException
        java.rmi.RemoteException
      • isShipped

        public boolean isShipped()
                          throws MXException,
                                 java.rmi.RemoteException
        Returns true if this invuse is in Shipped status.
        Returns:
        true if this invuse is in Shipped status.
        Throws:
        MXException
        java.rmi.RemoteException
      • isCompleted

        public boolean isCompleted()
                            throws MXException,
                                   java.rmi.RemoteException
        Returns true if this invuse is in Complete status.
        Returns:
        true if this invuse is in Complete status.
        Throws:
        MXException
        java.rmi.RemoteException
      • isCancelled

        public boolean isCancelled()
                            throws MXException,
                                   java.rmi.RemoteException
        Returns true if this invuse is in Cancelled status.
        Returns:
        true if this invuse is in Cancelled status.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyInvUseLineSetForReturn

        public void copyInvUseLineSetForReturn(MboSetRemote matUseTransSet)
                                        throws java.rmi.RemoteException,
                                               MXException
        Loops MatUseTrans Set(ISSUE type) and create new InvUseLine(RETURN) based on the selected rows of the passed MatUseTrans set. This copies MtUseTrans to process "Select Items for Returns" task from the storeroom. The new InvUseLine are created in the "INVUSELINE" mboset.
        Specified by:
        copyInvUseLineSetForReturn in interface InvUseRemote
        Parameters:
        MtUseTransSet - the MboSetRemote of MatUseTransSetRemote instance. Only process the selected rows.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.copyInvUseLineSetForReturn(MboSetRemote)
      • copyInvReserveSetForInvUse

        public void copyInvReserveSetForInvUse(MboSetRemote invReserveSet)
                                        throws java.rmi.RemoteException,
                                               MXException
        Loops an InvReserveSet and create new InvUseLine based on the selected rows of the passed InvReserveSet. The new InvUseLine are created in the "INVUSELINE" mboset. Work of copying InvReserve onto new InvUseLine is done in InvUseLineSet.
        Specified by:
        copyInvReserveSetForInvUse in interface InvUseRemote
        Parameters:
        invReserveSet - the MboSetRemote of InvReserveSetRemote instance. Only process the selected rows.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.copyInvReserveSetForInvUse(MboSetRemote)
      • copySparePartSetForInvUse

        public void copySparePartSetForInvUse(MboSetRemote sparePartSet)
                                       throws java.rmi.RemoteException,
                                              MXException
        Loops through the passed SparePartSet and creates a new InvUseLine based on the selected rows of the passed set. The new InvUseLines are created in the "INVUSELINE" mboset. The work of copying SparePart onto new InvUseLine is done in InvUseLineSet.
        Specified by:
        copySparePartSetForInvUse in interface InvUseRemote
        Parameters:
        SparePartSet - the MboSetRemote of the SparePartSetRemote instance. Only selected rows are processed.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#copySparePartSetForInvUse(sparePartSet)
      • copyInvBalancesSetForItems

        public void copyInvBalancesSetForItems(MboSetRemote invBalancesSet)
                                        throws java.rmi.RemoteException,
                                               MXException
        Loops through an InvBalancesSet and creates new InvUseLine based on the selected rows of the passed InvBalancesSet. The work of copying InvBalances onto new MatRecTrans is done in MatRecTransSet.
        Specified by:
        copyInvBalancesSetForItems in interface InvUseRemote
        Parameters:
        invBalancesSet - the MboSetRemote of InvBalancesSetRemote instance. Only process the selected rows.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.copyInvBalancesSetForItems(MboSetRemote)
      • isTransfer

        public boolean isTransfer()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns true if the MAXVALUE of the usetype is 'TRANSFER' else returns false.
        Specified by:
        isTransfer in interface InvUseRemote
        Parameters:
        none -
        Returns:
        boolean true if the issue type is 'TRANSFER'
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.isTransfer()
      • isIssue

        public boolean isIssue()
                        throws MXException,
                               java.rmi.RemoteException
        Returns true if the MAXVALUE of the usetype is 'ISSUE' else returns false.
        Specified by:
        isIssue in interface InvUseRemote
        Parameters:
        none -
        Returns:
        boolean true if the issue type is 'TRANSFER'
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.isIssue()
      • staged

        public void staged()
                    throws MXException,
                           java.rmi.RemoteException
        This method will validate the invuselines and updates invreserve and invbalances for the supplying storeroom.
        Specified by:
        staged in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.staged()
      • complete

        public void complete(java.lang.String currentMaxStatus)
                      throws MXException,
                             java.rmi.RemoteException
        This method is called from invuse status handler. It adds records in the MatRecTrans (for Transfers) and MatUseTrans (for Issues) and updates invreserve and invbalances for the supplying storeroom.
        Specified by:
        complete in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#complete()
      • shipped

        public void shipped(java.lang.String currentMaxStatus)
                     throws MXException,
                            java.rmi.RemoteException
        This method is called from invuse status handler. It adds records in the MatRecTrans (for SHIPTRANFER) and updates invreserve and invbalances for the supplying storeroom.
        Specified by:
        shipped in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#shipped()
      • getInvUseLineSplitRecordsMap

        public java.util.HashMap getInvUseLineSplitRecordsMap()
                                                       throws MXException,
                                                              java.rmi.RemoteException
        This method creates a HashMap for split records that will be used to create transaction records.
        Returns:
        HashMap
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelled

        public void cancelled()
                       throws MXException,
                              java.rmi.RemoteException
        This method is called from invuse status handler. It adds records in the MatRecTrans for STAGETRANSFER issuetype to reverse the transaction and updates invreserve and invbalances for the supplying storeroom.
        Specified by:
        cancelled in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvUse.cancelled()
      • isSplitNeeded

        public void isSplitNeeded(MboRemote invUseLine)
                           throws MXException,
                                  java.rmi.RemoteException
        This method checks if the splitting is needed for the invuselines. It returns true, if the splitting is needed.
        Throws:
        MXException
        java.rmi.RemoteException
      • isListSelected

        public boolean isListSelected()
        Returns:
        the isListSelected
      • setListSelected

        public void setListSelected(boolean isListSelected)
        Parameters:
        isListSelected - the isListSelected to set
      • validateLines

        public void validateLines(java.lang.String status)
                           throws MXException,
                                  java.rmi.RemoteException
        This method is called from bean and validates the inventory usage lines.
        Specified by:
        validateLines in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#validateLines()
      • checkNegativeBalanace

        public void checkNegativeBalanace(MboRemote invuseline)
                                   throws MXException,
                                          java.rmi.RemoteException
        This method check if the negative current is allowed?
        Throws:
        MXException
        java.rmi.RemoteException
      • validateRotatingAssets

        public void validateRotatingAssets(MboRemote invUseLine)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method checks rotating assets if already exists in other invusage documents..
        Throws:
        MXException
        java.rmi.RemoteException
      • validateGLAccounts

        public void validateGLAccounts(MboRemote invuseline)
                                throws MXException,
                                       java.rmi.RemoteException
        This method is validate the gl accounts.
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        This is called whenever a change is made to the attributes of invuseline. When any field related to the object is changed, changedate and changeby is updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getQtyMap

        public java.util.HashMap getQtyMap()
                                    throws MXException,
                                           java.rmi.RemoteException
        This method returns the quantity hashmap. This hashmap is used during auto-split.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setQtyMap

        public void setQtyMap(java.lang.Long invBalId,
                              java.lang.Double qty)
                       throws MXException,
                              java.rmi.RemoteException
        This method sets quantity for the invbalance record id.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeQtyMap

        public void removeQtyMap(java.lang.Long invBalId)
                          throws MXException,
                                 java.rmi.RemoteException
        This method removes the entry from qtymap for the given invbalance record id.
        Throws:
        MXException
        java.rmi.RemoteException
      • getUsedRotAssetNSMap

        public java.util.HashMap getUsedRotAssetNSMap()
                                               throws MXException,
                                                      java.rmi.RemoteException
        This method returns the rotating assetnum hashmap. This hashmap is used during auto-split.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setUsedRotAssetNSMap

        public void setUsedRotAssetNSMap(java.lang.String keyid,
                                         java.lang.String rotassetnum)
                                  throws MXException,
                                         java.rmi.RemoteException
        This method sets rotating assetnum for the id in the hashmap.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeUsedRotAssetNSMap

        public void removeUsedRotAssetNSMap(java.lang.String keyid)
                                     throws MXException,
                                            java.rmi.RemoteException
        This method removes the entry from usedRotAssetNSMap for the given id.
        Throws:
        MXException
        java.rmi.RemoteException
      • getUsedRotAssetSMap

        public java.util.HashMap getUsedRotAssetSMap()
                                              throws MXException,
                                                     java.rmi.RemoteException
        This method returns the rotating hashmap. This hashmap is used during auto-split.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setUsedRotAssetSMap

        public void setUsedRotAssetSMap(java.lang.String keyid,
                                        java.lang.String rotassetnum)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method sets rotating assetnum for the id in the hashmap.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeUsedRotAssetSMap

        public void removeUsedRotAssetSMap(java.lang.String keyid)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method removes the entry from usedRotAssetSMap for the given id.
        Throws:
        MXException
        java.rmi.RemoteException
      • getRotQtyMap

        public java.util.HashMap getRotQtyMap()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method returns the rotating hashmap. This hashmap is used during checking max invuseline limit.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setRotQtyMap

        public void setRotQtyMap(java.lang.Long keyid,
                                 java.lang.Double qty)
                          throws MXException,
                                 java.rmi.RemoteException
        This method sets rotating item qty for the id in the hashmap.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeRotQtyMap

        public void removeRotQtyMap(java.lang.Long keyid)
                             throws MXException,
                                    java.rmi.RemoteException
        This method removes rotating item qty for the id in the hashmap.
        Throws:
        MXException
        java.rmi.RemoteException
      • getDeletedInvUseLineList

        public java.util.ArrayList getDeletedInvUseLineList()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvBalQtyNSMap

        public java.util.HashMap getInvBalQtyNSMap()
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method returns the quantity hashmap. This hashmap is used during auto-split.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setInvBalQtyNSMap

        public void setInvBalQtyNSMap(java.lang.Long invBalId,
                                      java.lang.Double qty)
                               throws MXException,
                                      java.rmi.RemoteException
        This method sets quantity for the invbalance record id.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeInvBalQtyNSMap

        public void removeInvBalQtyNSMap(java.lang.Long invBalId)
                                  throws MXException,
                                         java.rmi.RemoteException
        This method removes the entry from qtymap for the given invbalance record id.
        Throws:
        MXException
        java.rmi.RemoteException
      • getUsedRotAssetList

        public java.util.ArrayList getUsedRotAssetList()
                                                throws MXException,
                                                       java.rmi.RemoteException
        This method returns an arraylist of used rotating assets.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addToUsedRotAssetList

        public void addToUsedRotAssetList(java.lang.String rotassetnum)
                                   throws MXException,
                                          java.rmi.RemoteException
        This method add the rotating asset to the list.
        Parameters:
        rotassetnum -
        Throws:
        MXException
        java.rmi.RemoteException
      • checkRotAssetNumList

        public void checkRotAssetNumList(java.lang.String key,
                                         java.lang.String rotassetnum,
                                         boolean newasset)
                                  throws MXException,
                                         java.rmi.RemoteException
        This method checks if the rotating asset entered exists on any other usage line. If it exists, the exception is thrown.
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can delete only if the status is Entered, Otherwise it will throw an exception.
        Overrides:
        canDelete in class Mbo
        Parameters:
        None -
        Throws:
        MXException - - will throw this exception if it can't be deleted
        java.rmi.RemoteException
      • addShipmentLines

        public void addShipmentLines(MboRemote shipment)
                              throws MXException,
                                     java.rmi.RemoteException
        This method shipment lines for usage split lines.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateForShipped

        public void validateForShipped(MboRemote invUseLine)
                                throws MXException,
                                       java.rmi.RemoteException
        This method checks to make sure that the inventory usage line passed in here is of type TRANSFER. If changing the inventory usage document status to SHIPPED, all the lines have to be of type TRANSFER.
        Throws:
        MXException
        java.rmi.RemoteException
      • getClearingAcct

        public java.lang.String getClearingAcct()
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns the organization mbo so the clearing acct can be retrieved.
        Throws:
        MXException
        java.rmi.RemoteException
      • getShipmentLineMap

        public java.util.HashMap getShipmentLineMap()
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method returns the quantity hashmap. This hashmap is used during auto-split.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Saves the invuse records and clears the hashmaps and arrayList.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getExchangeRate

        public double getExchangeRate(java.util.Date date)
                               throws MXException,
                                      java.rmi.RemoteException
        Get the exchangerate between the PO's or the Contract's currency and the basecurrency.
        Parameters:
        date -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getExchangeRate2

        public double getExchangeRate2(java.util.Date date)
                                throws MXException,
                                       java.rmi.RemoteException
        Get the exchangerate2 if there is a base currency2. This is used to set the value of linecost2 in case there is a base currency2
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvUseLineMap

        public java.util.HashMap getInvUseLineMap()
                                           throws MXException,
                                                  java.rmi.RemoteException
        This method returns the invuseline hashmap. This hashmap is used during updating the invuse status.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • validateHardReservation

        public void validateHardReservation(MboRemote invUseLine)
                                     throws java.rmi.RemoteException,
                                            MXException
        Checks the to see if the use line references a inventory item that has HARDRESISSUE flag true. If so, checks to see if the reservation is either HARD or APHARD (or a synonym). If not, the method will throw an exception.
        Parameters:
        invUseLine -
        Throws:
        java.rmi.RemoteException
        MXException
      • getEvaluateSplitFlag

        public int getEvaluateSplitFlag()
                                 throws MXException,
                                        java.rmi.RemoteException
        This method returns true if the invuseline needs split otherwise returns false.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setEvaluateSplitFlag

        public int setEvaluateSplitFlag(int split)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method returns true if the invuseline needs split otherwise returns false.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setValidateStatusHasBeenCalled

        public void setValidateStatusHasBeenCalled(boolean hasBeenCalled)
                                            throws MXException,
                                                   java.rmi.RemoteException
        IV28540/58912, issue 12-14377 This method set by InvUseChangeStatusBean - in main record - to fire validateStatus before longop
        Specified by:
        setValidateStatusHasBeenCalled in interface InvUseRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#setValidateStatusHasBeenCalled()
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        IV69612 Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped by using the data from the static HashSet. If this field does not need to be copied return true. status and statusdate are not copied because we are copying based on a COMPLETE status. Duplicated INVUSE is in ENTERED status.
        1. CHANGEBY
        2. CHANGEDATE
        3. RECEIPTS
        4. CURRENCYCODE
        5. EXCHANGERATE
        6. EXCJAMGEDATE
        7. STATUS
        8. STATUSDATE
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        The - MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        InvUse.loadSkipFieldCopyHashSet()
      • createInvUsageForPartialIssues

        public MboRemote createInvUsageForPartialIssues(MboSetRemote invReserveSet)
                                                 throws java.rmi.RemoteException,
                                                        MXException
        IV69612: called by duplicate() method only - duplicate the invuse object and creating new invuselines based on the invReserveSet passed. It does not copy the invuselines for the current InvUse as the traditional copy method. It creates new ones based on the un-issued/remaining invreserve.
        Throws:
        java.rmi.RemoteException
        MXException
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        IV69612: duplicate the current invuse in a COMPLETE status to a new ENTERED invuse and then create a set of new INVUSELINE. IV73159: added this enhancement for partial shipments for internal po transfers
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • selectAllInSet

        public void selectAllInSet(MboSetRemote invReserveSet)
                            throws MXException,
                                   java.rmi.RemoteException
        IV69612:mark every mbo in the passed set selected - had to do this in here. MboSet.selectAll() does not work here because MboSet is based on the size of the current InvUseLine records. For example, there may be 3 mbos in the passed invReserveSet but there are only two invuselines on the screen Frame work is based on the getSize() of the invuselines and only marks 2 of the passed InvReserveSet as markedForSelect.
        Throws:
        MXException
        java.rmi.RemoteException
      • initUsedRotAssetNSMap

        protected void initUsedRotAssetNSMap()
                                      throws MXException
        This method populates the usedRotAssetNSMap, if it has not already been initialized after the InvUse record was loaded in memory. After the method returns, usedRotAssetNSMap will be populated with every InvUseLine + RotatingAsset pair on the InvUse.
        Throws:
        MXException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        IV89369:multi-session - inventory usage status had been changed in a different session. User should receive a message while trying to save on the session where invuse record had been changed. leaving orphaned invuseline records.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • validateFinancialPeriods

        public void validateFinancialPeriods(java.lang.String newStatus)
                                      throws java.rmi.RemoteException,
                                             MXException
        IJ04584: This method validates that the InvUseLines' actual dates are within an active financial period.
        Parameters:
        newStatus - New status of the inventory usage record
        Throws:
        java.rmi.RemoteException
        MXException
      • canUseNextFinancialPeriod

        public java.lang.Boolean canUseNextFinancialPeriod()
        IJ04584: This method returns the value of useNextFinancialPeriod which holds the user input to MXApplicationYesNoCancelException "closedfinperiod" thrown from validateFinancialPeriods
        Returns:
        Boolean Whether to use the next financial period.
      • setValidateFinancialPeriodsCalled

        public void setValidateFinancialPeriodsCalled(boolean hasBeenCalled)
                                               throws MXException,
                                                      java.rmi.RemoteException
        IJ04584
        Specified by:
        setValidateFinancialPeriodsCalled in interface InvUseRemote
        Parameters:
        hasBeenCalled -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUse#setValidateFinancialPeriodsHasBeenCalled()