psdi.app.inventory

Class InvUseLine

  • java.lang.Object
    • Field Detail

      • binNumSet

        public boolean binNumSet
        Flag to indicate if the binnum is set from the binnum field validation. The tolot is set according to the value in this flag.
    • Constructor Detail

      • InvUseLine

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

      • init

        public void init()
                  throws MXException
        initialize the invuseline. It sets the non-persistent fields. The following fields are always set to read only:

        • invuselinenum
        • requestnum
        • displaylinecost
        • displayunitcost
        • split
        • mrnum
        • mrlinenum
        • ponum
        • polinenum
        • shelflife
        • useby
        • issueid
        • newassenum
        • returnagainstissue


        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        add() Provides defaults for a new InvUseLine Record. It checks if the required information is enterd for the invuse record. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        TOSITEIDSITEID(Invuse)
        SITEIDSITEID(Invuse)
        INVUSELINENUMINVUSELINENUM(calculated)
        FROMSTORELOCFROMSTORELOC(InvUse)
        USETYPEUSETYPE(Invuse)
        ORGIDORGID(Invuse)
        CONVERSION1
        ACTUALDATESYSTEMDATE
        PHYSCNT0
        PHYSCNTDATESYSTEMDATE
        ENTERBYUSERNAME(login)
        DISPLAYUNITCOST0(zero)

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

        public boolean isIssue()
                        throws MXException,
                               java.rmi.RemoteException
        Returns true if usetype = the internal string for ISSUE, otherwise returns false.
        Specified by:
        isIssue in interface InvUseLineRemote
        Parameters:
        none -
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#isIssue()
      • isReturn

        public boolean isReturn()
                         throws MXException,
                                java.rmi.RemoteException
        Returns true if usetype = the internal string for RETURN, otherwise returns false.
        Specified by:
        isReturn in interface InvUseLineRemote
        Parameters:
        none -
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.MatUseTrans.isReturn(boolean)
      • isMixed

        public boolean isMixed()
                        throws MXException,
                               java.rmi.RemoteException
        Returns true if usetype = the internal string for MIXED, otherwise returns false.
        Specified by:
        isMixed in interface InvUseLineRemote
        Parameters:
        none -
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#isIssue()
      • 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 InvUseLineRemote
        Parameters:
        none -
        Returns:
        boolean true if the issue type is 'TRANSFER'
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#isIssue()
      • isRotating

        public boolean isRotating()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns true if the item is Rotating else returns false.
        Parameters:
        none -
        Returns:
        boolean true if the issue type is 'TRANSFER'
        Throws:
        MXException
        java.rmi.RemoteException
      • isLotted

        public boolean isLotted()
                         throws MXException,
                                java.rmi.RemoteException
        Returns true if the item is Lotted else returns false.
        Parameters:
        none -
        Returns:
        boolean true if the item is Lotted
        Throws:
        MXException
        java.rmi.RemoteException
      • isTool

        public boolean isTool()
                       throws MXException,
                              java.rmi.RemoteException
        Returns true if the item is Tool else returns false.
        Parameters:
        none -
        Returns:
        boolean true if the line type is 'TOOL'
        Throws:
        MXException
        java.rmi.RemoteException
      • getSharedInventory

        public MboRemote getSharedInventory()
                                     throws MXException,
                                            java.rmi.RemoteException
        getSharedInventory() - Holds the logic for grabbing the best Inventory mbo for updating - taking into account the possiblity that other mbos may attempt to update the very same inventory.
        Parameters:
        none -
        Returns:
        MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getSharedInvBalance

        public MboRemote getSharedInvBalance()
                                      throws MXException,
                                             java.rmi.RemoteException
        getSharedInvBalance() created to gather the appropriate invbalance record by utilizing the logic built into the inventory object for retrieving the right invbalance record from memory. If the shared Inventory mbo is retrieved, using inventory methods will result in getting that inventory.mbos invbalance children. Because multiple mbos may be interested in updating the same inventory or invbalance mbo, it is essential to carefully track down the right (shared) invbalance mbo before updating. This method accomplishes that.
        GROUPKEYREASON
        inventorynoBalanceRecordIf owner is inventory and if balance is null
        inventorynoBalanceRecordif owner is not inventory getSharedInventory, then if balance is null
        Specified by:
        getSharedInvBalance in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#getSharedInvBalance()
      • getSharedInventory

        public MboRemote getSharedInventory(java.lang.String storeLoc,
                                            java.lang.String siteid)
                                     throws MXException,
                                            java.rmi.RemoteException
        get related inventory: use getSharedMboSet to update the correct inventory records when multiple matrectrans update the same inventory record
        Parameters:
        storeLoc - the storeroom location for the item
        siteid - Site where the location exists
        Returns:
        MboRemote (an InventoryRemote)
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • getSharedInvBalance

        public MboRemote getSharedInvBalance(java.lang.String binnum,
                                             java.lang.String lotnum)
                                      throws MXException,
                                             java.rmi.RemoteException
        getSharedInvBalance() created to gather the appropriate invbalance record by utilizing the logic built into the inventory object for retrieving the right invbalance record from memory. If the shared Inventory mbo is retrieved, using inventory methods will result in getting that inventory.mbos invbalance children. Because multiple mbos may be interested in updating the same inventory or invbalance mbo, it is essential to carefully track down the right (shared) invbalance mbo before updating. This method accomplishes that.
        GROUPKEYREASON
        inventorynoBalanceRecordIf owner is inventory and if balance is null
        inventorynoBalanceRecordif owner is not inventory getSharedInventory, then if balance is null
        Throws:
        MXException
        java.rmi.RemoteException
      • getSharedInvBalance

        public MboRemote getSharedInvBalance(java.lang.String binnum,
                                             java.lang.String lotnum,
                                             boolean sameBin)
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSharedInvBalance

        public MboRemote getSharedInvBalance(java.lang.String binnum,
                                             java.lang.String lotnum,
                                             java.lang.String storeloc,
                                             java.lang.String siteid)
                                      throws MXException,
                                             java.rmi.RemoteException
        getSharedInvBalance() created to gather the appropriate invbalance record by utilizing the logic built into the inventory object for retrieving the right invbalance record from memory. If the shared Inventory mbo is retrieved, using inventory methods will result in getting that inventory.mbos invbalance children. Because multiple mbos may be interested in updating the same inventory or invbalance mbo, it is essential to carefully track down the right (shared) invbalance mbo before updating. This method accomplishes that.
        GROUPKEYREASON
        inventorynoBalanceRecordIf owner is inventory and if balance is null
        inventorynoBalanceRecordif owner is not inventory getSharedInventory, then if balance is null
        Throws:
        MXException
        java.rmi.RemoteException
      • setIssueForThisReturn

        public void setIssueForThisReturn(MboRemote issue)
                                   throws MXException,
                                          java.rmi.RemoteException
        Sets the InvUseLine issue Mbo for return.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWO

        public MboRemote getWO()
                        throws MXException,
                               java.rmi.RemoteException
        Gets the workorder related to this InvUseLine. If this Mbo is owned by a workorder, the owning workorder mbo is returned. If this Mbo is not owned by a WO, attempts to get the related WO using getSharedMboSet. If no WO is found, null is returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateInvUseLine

        public void validateInvUseLine(java.util.ArrayList splitList)
                                throws MXException,
                                       java.rmi.RemoteException
        This method validates the data for invuseline. It checks maxissue in the item table and negative balances.
        Throws:
        MXException
        java.rmi.RemoteException
      • preValidateLine

        public void preValidateLine()
                             throws MXException,
                                    java.rmi.RemoteException
        This method is called before appValidate(). It does basic validation.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateLine

        public void validateLine()
                          throws MXException,
                                 java.rmi.RemoteException
        This is method is validates the invuseline record and throws exception in case of invalid data.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkInvBal

        public void checkInvBal(MboRemote invBal,
                                java.lang.String parentInvUseStatus)
                         throws MXException,
                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • checkAssetWOLocValidate

        public void checkAssetWOLocValidate()
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Validations done before save().
        Overrides:
        appValidate in class Mbo
        Parameters:
        None -
        Throws:
        MXException
        java.rmi.RemoteException
      • getBinNumFlag

        public boolean getBinNumFlag()
        Utility method to return the value of binNumSet
      • setBinNumFlag

        public void setBinNumFlag(boolean binNumFlag)
        Sets the value of boolean flag binNumSet
      • addUpdateInvUseLineSplit

        public MboRemote addUpdateInvUseLineSplit()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Adds a record in the invuselinesplit table.
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Saves the invuseline record and updates the related data.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setPickListStatus

        public void setPickListStatus(MboRemote owner)
                               throws MXException,
                                      java.rmi.RemoteException
        Checks the quantities of the invuselines and if all issued then changes the status of InvPickList to COMPLETE and if partially picked, staged or issued then changes the status of InvPickList from ENTERED to INPROGRESS
        Parameters:
        owner - : owner of the mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setInvUseStatus

        public void setInvUseStatus(MboRemote owner)
                             throws MXException,
                                    java.rmi.RemoteException
        Checks the quantities of the invuselines and if all issued then changes the status of InvUse to COMPLETE and if all staged then changes the status of InvUse to STAGED
        Parameters:
        owner - : owner of the mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isPLActionApplied

        public boolean isPLActionApplied(java.lang.String action)
                                  throws MXException,
                                         java.rmi.RemoteException
        Parameters:
        action - : Following are the strings that are passed in action parameter "OPENTOPICK" : For Open to Pick "OPENTOSTAGE" : For Open to Stage "OPENTOISSUE" : For Open to Issue "PICKTOSTAGE" : For Pick to Stage "PICKTOISSUE" : For Pick to Issue
        Returns:
        boolean true if action was taken else false
        Throws:
        MXException
        java.rmi.RemoteException
      • chkPickListMbo

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

        public MboRemote updateAutoCreatedInvUseLineSplit()
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Updates autocreated invuselinesplit record's quantity to the remaining openqty in the invuselinesplit table.
        Throws:
        MXException
        java.rmi.RemoteException
      • restockPickedQty

        public void restockPickedQty()
                              throws MXException,
                                     java.rmi.RemoteException
        Restocks pickedqty of the invuseline
        Throws:
        MXException
        java.rmi.RemoteException
      • restockStagedQty

        public void restockStagedQty()
                              throws MXException,
                                     java.rmi.RemoteException
        Restocks stagedqty of the invuseline
        Throws:
        MXException
        java.rmi.RemoteException
      • setStagingBin

        public void setStagingBin(java.lang.String binflag,
                                  java.lang.String stagingBin)
                           throws MXException,
                                  java.rmi.RemoteException
        This method takes binflag, stagingbin as input sets the stagingbin for invuseline based on the binflag.
        Specified by:
        setStagingBin in interface InvUseLineRemote
        Parameters:
        binflag -
        stagingbin -
        Throws:
        MXException - RemoteException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#setStageBin(String, String)
      • checkForNegativeBalance

        public void checkForNegativeBalance(MboRemote invBal,
                                            MboRemote invuselinesplit)
                                     throws MXException,
                                            java.rmi.RemoteException
        Checks if the balance in the bin goes negative. It throws exception if the balance is not sufficent.
        Throws:
        MXException - RemoteException
        java.rmi.RemoteException
      • checkForNegativeAvlBalanceBeforeSplitting

        public void checkForNegativeAvlBalanceBeforeSplitting()
                                                       throws MXException,
                                                              java.rmi.RemoteException
        Checks if the balance in the bin goes negative before splitting. It checks against available balance for the item across all the bins.
        Throws:
        MXException - RemoteException
        java.rmi.RemoteException
      • getSharedInvReserveSet

        public MboSetRemote getSharedInvReserveSet()
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method gets invreserve set.
        Returns:
        InvReserveSet
        Throws:
        MXException - RemoteException
        java.rmi.RemoteException
      • updateInvBalances

        public void updateInvBalances(MboRemote mbo,
                                      double quantity,
                                      java.lang.String status)
                               throws MXException,
                                      java.rmi.RemoteException
        This method updates the invbalances for StageTransfer transactions.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateStagedInvBalances

        public void updateStagedInvBalances(java.lang.String status)
                                     throws MXException,
                                            java.rmi.RemoteException
        This method updates the invbalance record for staging balances.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateStagedInvBalances

        public void updateStagedInvBalances(java.lang.String status,
                                            MboRemote mbo)
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReservePendingQty

        public void updateInvReservePendingQty()
                                        throws MXException,
                                               java.rmi.RemoteException
        This method updates the invreserve pending, staged and shipped quantity when invuse is entered.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveStagedQty

        public void updateInvReserveStagedQty()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method updates the invreserve pending, staged and shipped quantity when invuse is staged.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveStagedQty

        public void updateInvReserveStagedQty(MboRemote mbo)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReservePickedQty

        public void updateInvReservePickedQty(MboRemote mbo)
                                       throws MXException,
                                              java.rmi.RemoteException
        This method updates the invreserve picked quantity when invuseline is picked.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveActualQty

        public void updateInvReserveActualQty()
                                       throws MXException,
                                              java.rmi.RemoteException
        IV79875/PMR67937,011,724: indicates whether it should always update invreserve with requestnum or not, depending on mxe.app.inventor.updateReservations
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveActualQty

        public void updateInvReserveActualQty(boolean toUpdateWithNoRequestnum)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveActualQty

        public void updateInvReserveActualQty(boolean toUpdateWithNoRequestnum,
                                              MboRemote mbo)
                                       throws MXException,
                                              java.rmi.RemoteException
        IV79875/PMR67937,011,724: if toUpdateWithNoRequestnum is true, still update invreserve This method updates the invreserve pending, staged and shipped quantity when invuse is completed.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveShippedQty

        public void updateInvReserveShippedQty()
                                        throws MXException,
                                               java.rmi.RemoteException
        This method updates the invreserve pending, staged and shipped quantity when invuse is shipped.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvReserveForCancel

        public void updateInvReserveForCancel()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method updates the invreserve pending, staged and shipped quantity when invuse is cancelled.
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can delete only if the staus 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
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        This method deletes the invuseline record and updates the pendingqty if this invuseline record is associated with requestnum.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • checkReservationExist

        public boolean checkReservationExist()
                                      throws MXException,
                                             java.rmi.RemoteException
        This method checks if there is any reservations for exists with ITEM/STOREROOM/WORKORDER/LOCATION/ASSET combination.
        Specified by:
        checkReservationExist in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#checkReservationExist()
      • checkIssueExist

        public boolean checkIssueExist()
                                throws MXException,
                                       java.rmi.RemoteException
        This method checks if there is any returns exists with ITEM/STOREROOM/WORKORDER/LOCATION/ASSET combination.
        Specified by:
        checkIssueExist in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#checkIssueExist()
      • updateInvUseLineForReservation

        public void updateInvUseLineForReservation(MboRemote reservation)
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method is called from the databean and updates the invuseline record with existing reservation's requestnum, ponum, polinenum, mrnum and mrlinenum.
        Specified by:
        updateInvUseLineForReservation in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#updateInvUseLineForReservation(MboRemoten)
      • updateInvUseLineForReturn

        public void updateInvUseLineForReturn(MboRemote issuedItemForReturn)
                                       throws MXException,
                                              java.rmi.RemoteException
        This method is called from the databean and updates the invuseline record with existing matusetrans's issue record.
        Specified by:
        updateInvUseLineForReturn in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#updateInvUseLineForReturn(MboRemote)
      • addRecordForStageTransfer

        public void addRecordForStageTransfer(MboSetRemote matrecMboSet,
                                              java.util.ArrayList splitLineSplit)
                                       throws MXException,
                                              java.rmi.RemoteException
        This method is called from the invuse (parent). This method calls method to insert StageTransfer record(s). This method also sets invuseline fromlot and frombin to null in case it requires split.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForPickTransfer

        public MboRemote addMatRecTransRecordForPickTransfer(MboSetRemote matrecMboSet,
                                                             MboRemote mbo)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        This method adds MatRecTrans transaction record for PICK.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForRestockTransfer

        public MboRemote addMatRecTransRecordForRestockTransfer(MboSetRemote matrecMboSet,
                                                                MboRemote mbo)
                                                         throws MXException,
                                                                java.rmi.RemoteException
        This method adds MatRecTrans transaction record for RESTOCK.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForStageTransfer

        public MboRemote addMatRecTransRecordForStageTransfer(MboSetRemote matrecMboSet,
                                                              MboRemote mbo)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        This method adds MatRecTrans transaction record for STAGE.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addRecordForShipTransfer

        public void addRecordForShipTransfer(MboSetRemote matrecMboSet,
                                             java.util.ArrayList splitLineSplit)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method is called from the invuse (parent). This method calls method to insert ShipTransfer record(s). This method also sets invuseline fromlot and frombin to null in case it requires split.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForShipTransfer

        public MboRemote addMatRecTransRecordForShipTransfer(MboSetRemote matrecMboSet,
                                                             MboRemote mbo)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        This method adds MatRecTrans transaction record.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addTransferRecordForComplete

        public void addTransferRecordForComplete(MboSetRemote matrecMboSet,
                                                 java.util.ArrayList splitLineSplit)
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method is called from the invuse (parent). This method calls method to insert transfer transaction record(s). It created transaction record for each split record. This method also sets invuseline fromlot and frombin to null in case it requires split.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForComplete

        public MboRemote addMatRecTransRecordForComplete(MboSetRemote matrecMboSet,
                                                         MboRemote mbo)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        This method adds MatUseTrans transaction record.
        Returns:
        MboRemote (MatRecTrans)
        Throws:
        MXException
        java.rmi.RemoteException
      • addIssueReturnRecordForComplete

        public void addIssueReturnRecordForComplete(MboSetRemote matrecMboSet,
                                                    java.util.ArrayList splitLineSplit)
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method is called from the invuse (parent). This method calls method to insert matusetrans transaction record(s). It created transaction record for each split record. This method also sets invuseline fromlot and frombin to null in case it requires split.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatUseTransRecordForComplete

        public MboRemote addMatUseTransRecordForComplete(MboSetRemote matuseMboSet,
                                                         MboRemote mbo)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        This method adds MatUseTrans transaction record
        Returns:
        MboRemote (MatUseTrans)
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForCancelStageTransfer

        public MboRemote addMatRecTransRecordForCancelStageTransfer()
                                                             throws MXException,
                                                                    java.rmi.RemoteException
        This method adds MatRecTrans transaction record for cancellation.
        Returns:
        MboRemote (MatRectrans)
        Throws:
        MXException
        java.rmi.RemoteException
      • addMatRecTransRecordForCancelShipTransfer

        public MboRemote addMatRecTransRecordForCancelShipTransfer()
                                                            throws MXException,
                                                                   java.rmi.RemoteException
        This method adds MatRecTrans transaction record for cancellation.
        Returns:
        MboRemote (MatRectrans)
        Throws:
        MXException
        java.rmi.RemoteException
      • getPO

        public MboRemote getPO()
                        throws MXException,
                               java.rmi.RemoteException
        Returns PO Mbo.
        Specified by:
        getPO in interface InvUseLineRemote
        Returns:
        MboRemote (PO)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#getPO()
      • setOwnerPO

        public void setOwnerPO(MboRemote po)
      • getPOLine

        public MboRemote getPOLine()
                            throws MXException,
                                   java.rmi.RemoteException
        Returns POLine Mbo.
        Specified by:
        getPOLine in interface InvUseLineRemote
        Returns:
        MboRemote ( POLine)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#getPOLine()
      • getTotalCurBalance

        public double getTotalCurBalance()
                                  throws MXException,
                                         java.rmi.RemoteException
        Returns Total current balance for itemnum/itemsetid/fromstoreloc/siteid comination.
        Specified by:
        getTotalCurBalance in interface InvUseLineRemote
        Returns:
        double
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#getTotalCurBalance()
      • getInvUseLineQtyForReturn

        public double getInvUseLineQtyForReturn(long matusetransid)
                                         throws MXException,
                                                java.rmi.RemoteException
        This method returns sum of the quantity in invuseline for return usetype against the issue.
        Parameters:
        matusetransid -
        Returns:
        double
        Throws:
        MXException
        java.rmi.RemoteException
      • getQtyForReturn

        public double getQtyForReturn()
                               throws MXException,
                                      java.rmi.RemoteException
        This method calculates the eligible quantity left for return for this issue. The quantity is calculated as: The total issue qty of this issue minus the sum of return quantity of the previous returns done for this issue.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateUnitCost

        public void updateUnitCost()
                            throws MXException,
                                   java.rmi.RemoteException
        This method updates the unitcost.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateQty

        public boolean validateQty()
                            throws MXException,
                                   java.rmi.RemoteException
        This method checks if the return quantity has exceeded the issued quantity and adds the warning to the set.
        Specified by:
        validateQty in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#validateQty()
      • needsSplitting

        public boolean needsSplitting()
                               throws MXException,
                                      java.rmi.RemoteException
        This method check if splitting is required. It returns true if splitting is needed, Otherwise it returns false.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getDefaultLotNum

        public java.lang.String getDefaultLotNum()
                                          throws MXException,
                                                 java.rmi.RemoteException
        getDefaultLotNum() Returns the first lotnum found in the InvLots table with a valid useby date
        Throws:
        MXException
        java.rmi.RemoteException
      • canGoNegative

        public void canGoNegative(UserInfo userInfo,
                                  double toBeIssued,
                                  double curbal,
                                  double totalAvailable,
                                  MboRemote sourceMbo)
                           throws MXException,
                                  java.rmi.RemoteException
        Can negative balance be allowed?
        Parameters:
        UserInfo - The userInfo of the calling mbo.
        toBeIssued - quantity to be issued out of the storeroom bin
        curbal - the current balance in the bin.
        totalAvailable - The total available balance
        Throws:
        negativeBalisNotAllowed - Will not let transaction proceed if the issue will cause the current balance to go negative if MaxVars NEGATIVECURBAL is set to "DISALLOW".
        negativeAvailisNotAllowed - Will not let transaction proceed if the issue will cause the total available balance to go negative if MaxVars NEGATIVEAVAIL is set to "DISALLOW".
        MXException
        java.rmi.RemoteException
      • canGoNegative

        public void canGoNegative(UserInfo userInfo,
                                  double toBeIssued,
                                  double totalAvailable,
                                  MboRemote sourceMbo)
                           throws MXException,
                                  java.rmi.RemoteException
        Can negative availability balance be allowed?
        Parameters:
        UserInfo - The userInfo of the calling mbo.
        toBeIssued - quantity to be issued out of the storeroom bin
        curbal - the current balance in the bin.
        totalAvailable - The total available balance
        Throws:
        negativeAvailisNotAllowed - Will not let transaction proceed if the issue will cause the total available balance to go negative if MaxVars NEGATIVEAVAIL is set to "DISALLOW".
        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 MaxIntObjDetail. When any field related to MaxIntObjdetail is changed, changedate and changeby is updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
      • checkItemStatus

        public void checkItemStatus()
                             throws MXException,
                                    java.rmi.RemoteException
        This is called the status is changed. It checks if the status is PLANNING, PENDING or OBSOLETE, an exception is thrown.
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
      • setReservationUserPref

        public void setReservationUserPref()
                                    throws MXException,
                                           java.rmi.RemoteException
        This method sets the user preference flag.
        Specified by:
        setReservationUserPref in interface InvUseLineRemote
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#setReservationUserPref()
      • setReturnUserPref

        public void setReturnUserPref()
                               throws MXException,
                                      java.rmi.RemoteException
        This method sets the userpreference flag for Return validation.
        Specified by:
        setReturnUserPref in interface InvUseLineRemote
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#setReturnUserPref()
      • setUserPref

        public void setUserPref(MboRemote mbo)
                         throws MXException,
                                java.rmi.RemoteException
        This method sets the userpreference flag for Return validation.
        Specified by:
        setUserPref in interface InvUseLineRemote
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
        See Also:
        psdi.mxam.app.inventory.InvUseLine#setUserPref()
      • getPendingQty

        public double getPendingQty(java.lang.String requestnum,
                                    java.lang.String siteid)
                             throws MXException,
                                    java.rmi.RemoteException
        This method returns the invreserve pending quantity for the invusenums.
        Throws:
        MXException
        java.rmi.RemoteException
      • smartFindByObjectName

        public MboSetRemote smartFindByObjectName(java.lang.String sourceObj,
                                                  java.lang.String targetAttrName,
                                                  java.lang.String value,
                                                  boolean exact)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Find a set of records of the object of the specified the application by the specified attribute and values of the current record.
        Specified by:
        smartFindByObjectName in interface MboRemote
        Overrides:
        smartFindByObjectName in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#smartFindByObjectName()
      • checkRotatingAssetExistInToSite

        public boolean checkRotatingAssetExistInToSite(java.lang.String rotassetnum,
                                                       MboRemote mbo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        This method check if the Asset already exists in other site and it was not the same Asset which was moved previously from this site. It validates if the asset's children and site combination already exists in the database cannot move an asset if the children exists in other site. If the asset already exists in the site, it returns true, Otherwise false.
        Parameters:
        rotassetnum -
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • updateAssetStatus

        public void updateAssetStatus(java.lang.String rotassetnum,
                                      java.lang.String status)
                               throws MXException,
                                      java.rmi.RemoteException
        This method sets the status of asset to DECOMMISSIONED if the status is changed to SHIPPED and sets NOT READY if the status is changed to CANCELLED from SHIPPED.
        Parameters:
        rotassetnum - rotating asset number
        status -
        Throws:
        MXException
        java.rmi.RemoteException
      • updateReceivedQty

        public void updateReceivedQty(double receivedQty)
                               throws MXException,
                                      java.rmi.RemoteException
        Specified by:
        updateReceivedQty in interface InvUseLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUseLine#updateReceivedQty()
      • updateReturnedQty

        public void updateReturnedQty(double returnedQty)
                               throws MXException,
                                      java.rmi.RemoteException
        This method updates the returnedqty for shipment return and void shipment receipt transcations.
        Specified by:
        updateReturnedQty in interface InvUseLineRemote
        Parameters:
        returnedQty -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvUseLine#updateReturnedQty()
      • 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
      • setDisplayUnitCost

        public void setDisplayUnitCost()
                                throws MXException,
                                       java.rmi.RemoteException
        This method returns the average cost to display on the UI.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateLifoFifoTable

        public void updateLifoFifoTable(MboRemote invUseLineSplit)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method updates the invlifofifocost table for issue and transfer transactions.
        Parameters:
        invUseLineSplit -
        Throws:
        MXException
        java.rmi.RemoteException
      • updateLifoFifoForCancelled

        public void updateLifoFifoForCancelled(MboRemote useLine)
                                        throws MXException,
                                               java.rmi.RemoteException
        This method adds invlifofifocost record on the status cahnge to cancelled.
        Parameters:
        useLine -
        Throws:
        MXException
        java.rmi.RemoteException
      • addTransactionRecordsLIFOFIFO

        public void addTransactionRecordsLIFOFIFO(MboSetRemote transMboSet,
                                                  java.util.ArrayList splitLineSplit,
                                                  java.lang.String status)
                                           throws MXException,
                                                  java.rmi.RemoteException
        This method is called from the invuse (parent). This method calls method to insert StageTransfer record(s)for item wirh cost type Lifo/Fifo. This method also sets invuseline fromlot and frombin to null in case it requires split.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInvLifoFifoCostSet

        public double updateInvLifoFifoCostSet(MboSetRemote transMboSet,
                                               MboRemote invUseLineSplit,
                                               MboSetRemote invlifofifocostset,
                                               java.lang.String status)
                                        throws MXException,
                                               java.rmi.RemoteException
        Creates split records for Lifo/Fifo Cost type items and update invlifofifocost table.
        Parameters:
        matrectrans -
        invlifofifocostset -
        Throws:
        MXException
        java.rmi.RemoteException
      • setAttributesEditibiltyForReturn

        public void setAttributesEditibiltyForReturn()
                                              throws MXException,
                                                     java.rmi.RemoteException
        This methosd will set the editibilty flags for RETURN record.
        Throws:
        MXException
        java.rmi.RemoteException
      • allKitComponentsAreInTransferToStore

        public void allKitComponentsAreInTransferToStore()
                                                  throws MXException,
                                                         java.rmi.RemoteException
        checks to determine if any of a kit's components would need to be added to a storeroom as part of the kit's transfer. If yes, a warning is raised.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.location.LocationService#getKitComponentsNotYetInStore(psdi.security.UserInfo,psdi.mbo.MboRemote,java.lang.String,boolean), #toAddOrNotToAddKitComponents(psdi.app.item.ItemSetRemote,psdi.app.location.LocationServiceRemote)
      • updateMR

        public void updateMR(MboRemote invReserve)
                      throws MXException,
                             java.rmi.RemoteException
        This method updates the mrline for the given reservation.
        Parameters:
        invReserve -
        Throws:
        MXException
        java.rmi.RemoteException
      • getPhyscntDate

        public java.util.Date getPhyscntDate(java.util.Date phyCntDate,
                                             java.util.Date actualDate)
                                      throws MXException
        Throws:
        MXException
      • getInvReserveInVector

        public InvReserveRemote getInvReserveInVector(java.util.Vector v,
                                                      MboRemote thisInvReserve)
                                               throws MXException,
                                                      java.rmi.RemoteException
        IV79875: does my InvReserve just gotten from getSharedInvReserveSet find a match in the Vector? if found, return the InvReserve mbo in the vector, if not returns null
        Parameters:
        v -
        thisInvReserve -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • isSameStoreTransfer

        public boolean isSameStoreTransfer()
                                    throws MXException,
                                           java.rmi.RemoteException
        IV86220: Returns true if this is a bin-to-bin transfers in the same storeroom.
        Parameters:
        none -
        Returns:
        boolean true if the issue type is 'TRANSFER'
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • getInvUse

        public MboRemote getInvUse()
                            throws MXException,
                                   java.rmi.RemoteException
        getInvUse() - Returns the inventory usage record with the same invusenum as the current line, i.e. the parent inventory usage record of the current inventory usage line.
        Parameters:
        none -
        Returns:
        MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • setCancelInvUseLines

        public void setCancelInvUseLines(boolean hasBeenCalled)
                                  throws MXException,
                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        IJ29192: handles when non-persistent field newphyscnt is changed
        Specified by:
        setValue in interface MboRemote
        Overrides:
        setValue in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a string value of characters to an attribute which has datatype of YORN.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,String,long)