psdi.app.inventory

Class Inventory

  • All Implemented Interfaces:
    java.rmi.Remote, InventoryRemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy
    Direct Known Subclasses:
    ToolInv


    public class Inventory
    extends StatefulMbo
    implements InventoryRemote
    Mbo object to represent Inventory.

    See Inventory Package description.

    This is a site level object.

    The key attributes in this object are as follows: SiteId, Itemnum, Location

    The attributes in this object are as follows:

    Attribute NameDescription
    ABCTypeABC Analysis Type. Used to categorize items based on a ranking of the organization's monetary investment in each item. The category to which an inventory item belongs is determined by multiplying the current YTD issued quantity by the last cost of the item and sorting the results in descending order. Validated against the ValueList table where value list name is ABCTYPE. Valid values are A, B, C or N. These values represent the percentile buckets into which the results of the above calculation and sort are categorized and are set in the MAXVARS table. An example breakdown would be:

    ABC TypePercentile RangeDescriptionMAXVARS.VARNAMEMAXVARS.VARVALUE
    Type A71 to 100 percenthighest monetary investmentA_BREAKPOINT0.3
    Type B41 to 70 percentmid-range monetary investmentB_BREAKPOINT0.3
    Type C0 to 40 percentlowest monetary investmentC_BREAKPOINT0.4

    An ABCType of N excludes this inventory item from the ABC analysis.

    ABCType is related to Cycle Count Frequency (CCF). CCF is set in the MAXVARS table for each ABC type. An example of cycle count frequency settings is:

    ABC TypeCycle Count Frequency (in days)MAXVARS.VARNAMEMAXVARS.VARVALUE
    Type A30A_CCF30
    Type B60B_CCF60
    Type C90C_CCF90

    The ABCType helps to ensure that crucial inventory does not fall below minimum levels and that the current balance is reconciled with the actual count. This latter function is done via the CCF.

    AddToStorelocNon-persistent attribute used as editable location for the action page of "Add Items to Store" on the Item Application.
    AvgcostInventory Average Cost. Initially set to the standard cost (Stdcost) when the inventory item is added. After that, the average cost can be manually adjusted. It is also automatically updated when the item is received into the storeroom. The algorithm for updating the average cost is as follows:

    (previous current balance * average cost) + (quantity received * receiving cost) / new current balance

    The average cost is also updated when receipts are created for this inventory item due to invoice cost variances or the proration of standard services upon invoice approval.

    AvblBalanceNon-persistent attribute used to hold the total available balance for a particular inventory record. It is calculated as:

    available balance = curBalTotal- ExpiredQty - ReservedQty

    Please refer to the non-persistent columns curBalTotal, ExpiredQty, and ReservedQty for more information.

    BinnumNumber of the default bin where the item is issued or received if no bin information is specified.
    CatalogcodeIdentification code for this item in the primary vendor's catalog.
    CategoryItem category. Validated against the ValueList table where value list name is CATEGORY.Valid values are:

    CategoryDescription
    STKStocked Items. Have a regular turnover rate and are automatically reordered depending on the setup criteria when the Reorder routine is run.
    NSNon-stocked Items. Do not have a regular turnover rate and are not automatically reordered when the Reorder routine is run.
    SPSpecial Order Items. Have a one-time purpose and can be deleted without much restriction.

    CCFCycle Count Frequency. Used to indicate how often this inventory item is physically counted and to help ensure that the current balance is reconciled with the actual count. The CCF can be set based on this item's ABCType.
    ControlaccInventory Control Account. Used to track the material issues and receipts for the inventory item. This account is debited upon receipt and credited upon issue of this item. This value defaults to the Locations.ControlAcc for the storeroom but can be modified. Refer to InvTrans.TransType for other uses of Controlacc.
    CurBalTotal Non-persistent attribute to hold the sum of all the InvBalances.curbal for a given inventory record.
    DeliverytimeExpected delivery time for the order (in days). This is the average time span between reorder and receipt of the item. Also known as lead time, delivery time is recalculated upon each receipt of this inventory item. The weighting of the most recent receipt in lead time calculation for the inventory item can be increased or descreased versus the average for past receipts of the item. Lead time calculation weights are specified by storeroom.
    ExpiredQty Non-persistent attribute to hold the sum of the current balance of all lots which have expired for a given inventory record. For a non lot-tracking item, the value is always 0.
    GlaccountGeneral Ledger Account. Used to track expenses for a given inventory record.
    InvCostAdjaccInventory Cost Adjustment Account, Used to track changes in inventory standard, average or capital cost adjustments. This value defaults to the Locations.InvCostAdjAcc for the storeroom but can be modified. Refer to InvTrans.TransType for details regarding the use of Invcostadjacc.
    Issue1yragoTotal number of items issued from this storeroom location one year ago
    Issue2yragoTotal number of items issued from this storeroom location two years ago
    Issue3yragoTotal number of items issued from this storeroom location three years ago
    IssueunitDescription of how the item is requisitioned from inventory, for example, individually, by the box, by the dozen, by roll or by feet. This value can be selected from the ORDERUNIT table or entered free-form.
    IssueytdTotal number of items issued from this storeroom location for the year-to-date
    ItemnumInventory Item Number.
    ItemSetIDIdentifier of the itemset identifier for this object.
    LastcostInventory Last Cost. Initially set to the standard cost (Stdcost) when the inventory item is added. After that, it is automatically updated to the cost of the item upon every receipt, including receipts created due to invoice cost variances upon invoice approval.
    LastissuedateLast date the item was issued from this inventory's storeroom location
    LdkeyLong Description Key. This is a link to text stored in the LongDescription table.
    LocationThis inventory item's storeroom location.
    LotNumNon-persistent attribute used to maintain InvBalances.LotNum through the Inventory object. For lot-tracking items only. See the LotNum attribute defined in InvLot for more information.
    ManufacturerIdentification code for this inventorys primary manufacturer. Manufacturer need not exist in Companies table. However, the manufacturer can be selected from the Companies table.
    MaxlevelTheoretical maximum quantity for this inventory item at this location. This attribute is for informational purposes only as there is no functionality connected with it.
    MinlevelReorder point. Minlevel is the target balance (in issue units) to have on hand. When the current balance is at or below this level, this item in the storeroom location can be reordered without ignoring the reorder point.
    ModelnumPrimary vendor's or primary manufacturer's identification number for this item object
    OrderqtyOptimum reorder quantity (in order units) to best balance the costs of procuring this inventory item with the costs of carrying it in inventory.
    OrderunitDescription of how the item is ordered, for example, individually, by the box, by the dozen, by roll or by feet. This value can be selected from the OrderUnit table or entered free-form.
    OrgidIdentifier of the organization for this inventory.
    ReservedQty Nnon-persistent attribute to hold the sum of reserved quantity stored in InvReserve.ReservedQty for this Inventory record's Itemnum and Location.
    ShrinkageaccInventory Shrinkage Account. Used to track physical count or current balance adjustment transactions. This value defaults to the Locations.ShrinkageAcc for the storeroom but can be modified. Refer to InvTrans.TransType for details regarding the use of Shrinkageacc.
    SiteidIdentifier of the site for this inventory.
    SstockSafety stock, or the minimum amount of stock to be kept on hand at all times. This is the minimum amount that should be on hand when the reordered stock arrives.
    StdcostUser-specified cost that does not get automatically updated. As a result, this inventory item can be carried at a cost that is independent of differences among receipt costs for this item (as with Avgcost and Lastcost) and that will not be impacted by invoice variances standard service prorations (as with Avgcost).
    VendorIdentification code for this inventory's primary vendor. Vendor must exist in the Companies table.
    • Field Detail

      • isKitComponentToAddToStore

        public boolean isKitComponentToAddToStore
      • doneRemoveExtra

        public boolean doneRemoveExtra
    • Constructor Detail

      • Inventory

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

      • getProcess

        public java.lang.String getProcess()
        Gets the work flow process for item.
        Returns:
        the work flow process name for items which is Item.
      • init

        public void init()
                  throws MXException
        init() Initialization rountine. Set field flags for both always readonly attributes as well as those fields which 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 Inventory Record. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        DELIVERYTIME0(zero)
        AVGCOST0(zero)
        STDCOST0(zero)
        LASTCOST0(zero)
        MINLEVEL0(zero)
        ORDERQTY1(one)
        MAXLEVEL0(zero)
        ISSUEYTD0(zero)
        ISSUE1YRAGO0(zero)
        ISSUE2YRAGO0(zero)
        ISSUE3YRAGO0(zero)
        CCF0(zero)
        CATEGORYThe user-defined value for "Stocked Item"
        CURBALTOTAL0(zero)
        AVBLBALANCE0(zero)

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException - MXAccessException thrown when the the user does not have privileges to add an item to a store
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        last minute validate before save(). non-persistent column conditioncode is required if item is condition enabled
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isConditionEnabled

        protected boolean isConditionEnabled()
                                      throws MXException,
                                             java.rmi.RemoteException
        Is the inventory item condition enabled?
        Throws:
        MXException
        java.rmi.RemoteException
      • addInvBalanceAndRelatedObjects

        protected MboRemote addInvBalanceAndRelatedObjects(double curbal)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Save()- Default save functionality. Called by the Mbo architecture. Warnings could be generated if a rotating asset was issued
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • addUpdateInvVendor

        public void addUpdateInvVendor()
                                throws MXException,
                                       java.rmi.RemoteException
        Add a new InvVendor record if the combination of itemnum/vendor/manufacturer/modelnum does not exist in the Invvendor table. Update catalogcode if the InvVendor which is the primary vendor if catalogcode is changed on the inventory record.
        Specified by:
        addUpdateInvVendor in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.addUpdateInvVendor()
      • getPrimaryInvVendor

        public MboRemote getPrimaryInvVendor(MboSetRemote invVendSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        returns the primary InvVendor record if found from the passed InvVendor set.
        Parameters:
        invVendSet - InvVendorSet for this inventory record.
        Throws:
        MXException
        java.rmi.RemoteException
      • doAdjustment

        public MboRemote doAdjustment(NonPersistentMboRemote invAdj)
                               throws MXException,
                                      java.rmi.RemoteException
        Calls "Adjust Current Balance", "Adjust Physical Count","Reconcile Current Balance",
        "Adjust Standard Cost", or "Adjust Average Cost" depending on the information gathered in the NonPersistentMbo passed.
        Parameters:
        invAdj - the Non-Persistent Mbo which stores the information gathered in a dialog page.
        Returns:
        MboRemote an InvTrans record created by the adjustment.
        Throws:
        MXException
        java.rmi.RemoteException
      • adjustCurrentBalance

        public MboRemote adjustCurrentBalance(java.lang.String binnum,
                                              java.lang.String lotnum,
                                              double newBalance,
                                              java.lang.String conditionCode)
                                       throws MXException,
                                              java.rmi.RemoteException
        adjustCurrentBalance(1,2,3,4) Performs a current balance adjustment on the InvBalances record as identified by lotnum, binnum, and conditionCode
        Specified by:
        adjustCurrentBalance in interface InventoryRemote
        Parameters:
        lotnum - The Lot Number of the InvBalance record. A null or an empty string both assume a null value in this field
        newBalance - The new current balance
        binnum - The Bin Number of the InvBalance record. A null value or an empty string assumes a null value in the InvBalance record
        conditionCode - the condition code of the invbalances being fetched
        Returns:
        Returns the InvTrans Record that was added during the adjustment
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#adjustCurrentBalance(java.lang.String, java.lang.String, double)
      • adjustPhysicalCount

        public MboRemote adjustPhysicalCount(java.lang.String binnum,
                                             java.lang.String lotnum,
                                             double quantity,
                                             java.util.Date pCountDate,
                                             java.lang.String ownersysid)
                                      throws MXException,
                                             java.rmi.RemoteException
        adjustPhysicalCount(1,2,3,4,5) Performs a physical count adjustment on the InvBalances record as identified by lotnum and binnum. Checks MXCollab flag - INVPHY; owner1sysid is passed.
        Specified by:
        adjustPhysicalCount in interface InventoryRemote
        Parameters:
        lotnum - The Lot Number of the InvBalance record. A null or an empty string both assume a null value in this field
        binnum -
        pCountDate - The date of the physical count adjustment
        quantity - The new physical count
        ownersysid - passed to determine if we are going to perform this adjustmenmt or not.
        Returns:
        Returns the InvTrans Record that was added during the adjustment
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction
        java.rmi.RemoteException
        See Also:
        Inventory.adjustPhysicalCount(java.lang.String, java.lang.String, double, java.util.Date, java.lang.String)
      • adjustPhysicalCount

        public MboRemote adjustPhysicalCount(java.lang.String binnum,
                                             java.lang.String lotnum,
                                             double quantity,
                                             java.util.Date pCountDate,
                                             java.lang.String ownersysid,
                                             java.lang.String conditionCode)
                                      throws MXException,
                                             java.rmi.RemoteException
        adjustPhysicalCount(1,2,3,4,5,6) Performs a physical count adjustment on the InvBalances record as identified by lotnum and binnum. Checks MXCollab flag - INVPHY; owner1sysid is passed.
        Parameters:
        lotnum - The Lot Number of the InvBalance record. A null or an empty string both assume a null value in this field
        binnum -
        pCountDate - The date of the physical count adjustment
        quantity - The new physical count
        ownersysid - passed to determine if we are going to perform this adjustmenmt or not.
        Returns:
        Returns the InvTrans Record that was added during the adjustment
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction
        java.rmi.RemoteException
      • getDefaultIssueCost

        public double getDefaultIssueCost(AssetRemote assetRemote,
                                          java.lang.String conditionCode)
                                   throws MXException,
                                          java.rmi.RemoteException
        getDefaultIssueCost(1,2) If user has chosen to call this method (by passing in an AssetRemote, they user has chosen to get the proper issue cost for item which is rotating asset. Looksup the costtype = 'ASSET' If costtype = 'ASSET' - gets asset.invcost and sets to unitcost else - calls getDefaultIssueCost() (or the user sent an itemnumber which isn't rotating Otherwise, returns 0.0
        Parameters:
        assetRemote - asset mbo to get cost from
        conditionCode - condition of the item
        Throws:
        MXException
        java.rmi.RemoteException - NOTE: Issue Cost is always returned in base currency.
      • getDefaultIssueCost

        public double getDefaultIssueCost(java.lang.String conditionCode)
                                   throws MXException,
                                          java.rmi.RemoteException
        getDefaultIssueCost(1) Returns the default issue cost of the inventory for the specified condition code. Note: Cost Returned is in base Currency
        Specified by:
        getDefaultIssueCost in interface InventoryRemote
        Parameters:
        conditionCode - if conditionCode passed is null, then get the cost of the 100% rate otherwise get the cost from the condition code passed.
        Returns:
        The default issue cost for this condition code passed.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        InvCost.getDefaultIssueCost()
      • getDefaultIssueCost

        public double getDefaultIssueCost(java.util.ArrayList invLifoFifoCostList)
                                   throws MXException,
                                          java.rmi.RemoteException
        This method return the most recent costdate's unit cost if the cost type is LIFO, Otherwise returns least recent costdate's unit cost if the cost type s FIFO.
        Parameters:
        invLifoFifoCostList -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInventoryAverageCost

        public void updateInventoryAverageCost(double quantity,
                                               double totalvalue)
                                        throws MXException,
                                               java.rmi.RemoteException
        updateInventoryAverageCost(1,2) This method is provided to update the average cost of the item for the specified storeroom. This ASSUMES an EXCHANGERATE of 1. Use other method to specify a separate rate This is called by any transaction that increases INVBALANCES.
        Specified by:
        updateInventoryAverageCost in interface InventoryRemote
        Parameters:
        totalvalue - The TOTALVALUE of the QUANTITY (LOADEDCOST)
        quantity - QUANTITY (in Issueunits) by which the is being increased
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.updateInventoryAverageCost(double, double)
      • updateInventoryAverageCost

        public void updateInventoryAverageCost(double quantity,
                                               double totalvalue,
                                               double exr)
                                        throws MXException,
                                               java.rmi.RemoteException
        This method is provided to update the average cost of the item for the specified storeroom. This is called by any transaction that increases/decrease INVBALANCES
        Specified by:
        updateInventoryAverageCost in interface InventoryRemote
        Parameters:
        totalvalue - The TOTALVALUE of the QUANTITY (LOADEDCOST)
        exr - EXR - The exchangerate applicable from this transaction to basecurrency
        quantity - QUANTITY (in Issueunits) by which the CURBAL is being increased
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.updateInventoryAverageCost(double, double, double)
      • updateInventoryAverageCost

        public void updateInventoryAverageCost(double quantity,
                                               double totalvalue,
                                               double exr,
                                               InvCost invCost)
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInventoryAverageCost

        public void updateInventoryAverageCost(double quantity,
                                               double totalvalue,
                                               double exr,
                                               InvCost invCost,
                                               boolean transferWithinStore)
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInventoryAverageCost

        public void updateInventoryAverageCost(double quantity,
                                               double totalvalue,
                                               double exr,
                                               java.lang.String conditionCode)
                                        throws MXException,
                                               java.rmi.RemoteException
        This method is provided to update the average cost of the item for the specified storeroom. This is called by any transaction that increase/descrease inventory balances for a specified condition code.
        Parameters:
        quantity - QUANTITY (in Issueunits) by which the CURBAL is being increased
        totalvalue - The TOTALVALUE of the QUANTITY (LOADEDCOST)
        exr - EXR - The exchangerate applicable from this transaction to basecurrency
        invBalances - the invbalances record being updated
        conditionCode - - the condition of the inventory
        Throws:
        MXException - - when invcost is not found.
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#updateAverageCost(double,double,double,MboRemote)
      • getInvCostRecord

        public MboRemote getInvCostRecord(java.lang.String conditionCode)
                                   throws MXException,
                                          java.rmi.RemoteException
        returns InvCost mbo based on the conditionCode passed
        Parameters:
        conditionCode -
        Returns:
        an InvCost mbo(maybe a null if the invcost record specified does not exist in the database yet.)
        Throws:
        MXException
        java.rmi.RemoteException
      • updateInventoryLastCost

        public void updateInventoryLastCost(double unitcost)
                                     throws MXException,
                                            java.rmi.RemoteException
        updateInventoryLastCost(1) This method updates the inventory record with details about the last cost at which the item was PURCHASED. This assumes an exchange rate of 1.
        Specified by:
        updateInventoryLastCost in interface InventoryRemote
        Parameters:
        unitcost - UNITCOST - The Unit purchase cost of the item in the transaction currency
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.updateInventoryLastCost(double)
      • updateInventoryLastCost

        public void updateInventoryLastCost(double unitcost,
                                            double exr)
                                     throws MXException,
                                            java.rmi.RemoteException
        updateInventoryLastCost(1,2) This method updates the inventory record with details about the last cost at which the item was PURCHASED.
        Specified by:
        updateInventoryLastCost in interface InventoryRemote
        Parameters:
        exr - EXR - The exchangerate applicable from this transaction to basecurrency
        unitcost - UNITCOST - The Unit purchase cost of the item in the transaction currency
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.updateInventoryLastCost(double, double)
      • updateInventoryLastCost

        public void updateInventoryLastCost(double unitcost,
                                            double exr,
                                            InvCost invcost)
                                     throws MXException,
                                            java.rmi.RemoteException
        updateInventoryLastCost(1,2) This method updates the inventory record with details about the last cost at which the item was PURCHASED.
        Specified by:
        updateInventoryLastCost in interface InventoryRemote
        Parameters:
        exr - EXR - The exchangerate applicable from this transaction to basecurrency
        unitcost - UNITCOST - The Unit purchase cost of the item in the transaction currency
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.InvCost#updateLastCost()
      • adjustAverageCost

        public MboRemote adjustAverageCost(double newcost,
                                           java.lang.String conditionCode)
                                    throws MXException,
                                           java.rmi.RemoteException
        adjustAverageCost(1,2) Adjust Inventory Average Cost (AVGCSTADJ) This method is used to carry out an average cost adjustment (not updating as in receipts/ returns). The New Average Cost specified is assumed to be in the currency units corresponding to BASE1. Average Cost Adjustment updates this object with the new AVGCOST.
        Specified by:
        adjustAverageCost in interface InventoryRemote
        Parameters:
        newcost - The NEWCOST i.e. the new value of the average cost for the item-storeroom, in the currency units corresponding to BASE1
        Returns:
        Returns the InvTrans Record that was added during the adjustment
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction.
        MXApplicationException - thrown if the item is capitalized or if the new cost is the same as the old cost
        java.rmi.RemoteException
        See Also:
        Inventory.adjustAverageCost(double,String)
      • adjustStandardCost

        public MboRemote adjustStandardCost(double newcost,
                                            java.lang.String conditionCode)
                                     throws MXException,
                                            java.rmi.RemoteException
        adjustStandardCost(1,2) Adjust Inventory Standard Cost (STDCSTADJ) This method is used to carry out a standard cost adjustment. The New Standard Cost specified is assumed to be in the currency units corresponding to BASE1.
        Specified by:
        adjustStandardCost in interface InventoryRemote
        Parameters:
        newcost - The NEWCOST i.e. the new value of the standard cost for the item-storeroom, in the currency units corresponding to BASE1
        conditionCode - the InvCost record for the ConditionCode
        Returns:
        Returns the InvTrans record that was added during the Transaction
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction. MXApplicationException thrown if the item is capitalized or if the new cost is the same as the old cost
        java.rmi.RemoteException
        See Also:
        Inventory.adjustStandardCost(double,String)
      • reconcileBalances

        public void reconcileBalances()
                               throws MXException,
                                      java.rmi.RemoteException
        reconcileBalances() This Reconciling Balances method is done at the storeroom level. The new current balance is determined by taking into account any issues, transfers, receipts and returns that may have taken place between the time of the physical count and the time of the reconcile. This method identifies all the InvBalances Records and invokes the reconcileBalances() method on each It checks MXCollab rules of integration for PCID = INVPHY
        Specified by:
        reconcileBalances in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.reconcileBalances()
      • reconcileBalances

        public void reconcileBalances(java.lang.String controlacc,
                                      java.lang.String shrinkageacc,
                                      java.lang.String remark)
                               throws MXException,
                                      java.rmi.RemoteException
        reconcileBalances(1,2,3) This Reconciling Balances method is done at the storeroom level. The new current balance is determined by taking into account any issues, transfers, receipts and returns that may have taken place between the time of the physical count and the time of the reconcile. This method identifies all the InvBalances Records and invokes the reconcileBalances() method on each It checks MXCollab rules of integration for PCID = INVPHY
        Specified by:
        reconcileBalances in interface InventoryRemote
        Parameters:
        controlacc - The inventory's control account
        shrinkageacc - The inventory's shrinkage account
        remark - The remark for this reconcilliation
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.reconcileBalances()
      • reconcileBalances

        public MboRemote reconcileBalances(java.lang.String binnum,
                                           java.lang.String lotnum)
                                    throws MXException,
                                           java.rmi.RemoteException
        reconcileBalances(1,2) This Reconciling Balances method is done at the storeroom/binnum/lotnum level. The new current balance is determined taking into account any issues, transfers, receipts and returns that may have taken place between the time of the physical count and the time of the reconcile. This finds the InvBalances record and runs reconcileBalances(). It checks MXCollab rules of integration for PCID = INVPHY
        Specified by:
        reconcileBalances in interface InventoryRemote
        Parameters:
        lotnum - The Lotnum at which the reconciling will be done
        binnum - The binnum at which the reconciling will be done RETURN: the invtrans record created as a result of reconcileBalances() call
        Throws:
        MXException - Generates an MXAccessException if the user does not have the privileges to perform this transaction. MXApplicationException is thrown if the corrsponding record has already been reconciled
        java.rmi.RemoteException
        See Also:
        Inventory.reconcileBalances(java.lang.String, java.lang.String)
      • getCurrentBalance

        public double getCurrentBalance(java.lang.String binnum,
                                        java.lang.String lotnum)
                                 throws MXException,
                                        java.rmi.RemoteException
        getCurrentBalance(1,2) Returns the current balance for this item/location combination, assuming conditionCode is null
        Specified by:
        getCurrentBalance in interface InventoryRemote
        Parameters:
        lotnum - The lotnum which will be used while determining the current balance
        binnum - The binnum which will be used while determining physical count
        Returns:
        double = invbalance.curbal
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.getCurrentBalance(java.lang.String, java.lang.String)
      • getCurrentBalance

        public double getCurrentBalance(java.lang.String binnum,
                                        java.lang.String lotnum,
                                        java.lang.String conditionCode)
                                 throws MXException,
                                        java.rmi.RemoteException
        getCurrentBalance(1,2,3) Returns the current balance for this item/location combination if binnum/lotnum/conditionCode passed into this method as null, they will NOT be considered when retrieving balance set! if binnum/lotnum/ConditionCode passed into this method as "", they will be treated as a null (eg. where binnum/lotnum is null)
        Specified by:
        getCurrentBalance in interface InventoryRemote
        Parameters:
        conditionCode - the condition code which will be used while determining the current balance
        lotnum - The lotnum which will be used while determining the current balance
        binnum - The binnum which will be used while determining physical count
        Returns:
        double = invbalance.curbal
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.getCurrentBalance(java.lang.String, java.lang.String,String conditionCode)
      • getPhysicalCount

        public double getPhysicalCount(java.lang.String binnum,
                                       java.lang.String lotnum)
                                throws MXException,
                                       java.rmi.RemoteException
        getPhysicalCount(1,2) Returns the physical count for this item/location combination if binnum/lotnum passed into this method as null, they will NOT be considered when retrieving balance set! if binnum/lotnum passed into this method as "", they will be treated as a null (eg. where binnum/lotnum is null)
        Specified by:
        getPhysicalCount in interface InventoryRemote
        Parameters:
        lotnum - The lotnum which will be used while determining the current balance
        binnum - The binnum which will be used while determining physical count
        Returns:
        double = invbalance.curbal
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.getPhysicalCount(java.lang.String, java.lang.String)
      • getPhysicalCount

        public double getPhysicalCount(java.lang.String binnum,
                                       java.lang.String lotnum,
                                       java.lang.String conditionCode)
                                throws MXException,
                                       java.rmi.RemoteException
        getPhysicalCount(1,2) Returns the physical count for this item/location combination if binnum/lotnum passed into this method as null, they will NOT be considered when retrieving balance set! if binnum/lotnum passed into this method as "", they will be treated as a null (eg. where binnum/lotnum is null)
        Parameters:
        lotnum - The lotnum which will be used while determining the current balance
        binnum - The binnum which will be used while determining physical count
        conditionCode - the conditionCode which will be used while determining the current balance
        Returns:
        double = invbalance.curbal
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Inventory.canDelete()- Checks to see if this object can be deleted if it is on a jobplan, throw exception if it is on a reservation, throw exception if this is on an open WO, throw exception if this is on an open MR, throw exception if this is on an open PR, throw exception if this is on an open PO, throw exception if this is on any invbalance record with balance > 0, throw exception
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException - - will throw this exception if it can't be deleted
        java.rmi.RemoteException
      • delete

        public void delete(long access)
                    throws MXException,
                           java.rmi.RemoteException
        delete(1) If we delete Inventory, then delete all InvBalance records associated with this Inventory. canDelete() has already been performed on each and every invbalance record associated with this inventory in the inventory.canDelete()
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        access - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • getInvBalanceRecord

        public InvBalances getInvBalanceRecord(java.lang.String binnum,
                                               java.lang.String lotnum,
                                               java.lang.String conditionCode)
                                        throws MXException,
                                               java.rmi.RemoteException
        getInvBalanceRecord(1,2,3) - PACKAGE access Seeks out a InvBalance mbo based on passed in values for bin and lot
        Parameters:
        conditionCode -
        lotnum -
        binnum - Because this method seeks a genuine InvBalance record, binnum, lotnum, and conditionCode must be considered. If the parameters are passed as null, they will be sent to getInvBalanceSet (package method) with "", which will then search for them where 'binnum is null'/'lotnum is null' respectively. A Balance record cannot really be retrieved without specifying all four parameters itemnum/location/binnum/lotnum
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvBalanceRecord

        public InvBalances getInvBalanceRecord(java.lang.String binnum,
                                               java.lang.String lotnum,
                                               java.lang.String conditionCode,
                                               java.lang.String storeLoc,
                                               java.lang.String storeSite)
                                        throws MXException,
                                               java.rmi.RemoteException
        getInvBalanceRecord(1,2,3,4) - PACKAGE access Seeks out a InvBalance mbo based on passed in values for bin and lot
        Parameters:
        conditionCode -
        lotnum -
        binnum - Because this method seeks a genuine InvBalance record, binnum, lotnum, conditionCode and storeLoc must be considered. If the parameters are passed as null, they will be sent to getInvBalanceSet (package method) with "", which will then search for them where 'binnum is null'/'lotnum is null' respectively. A Balance record cannot really be retrieved without specifying all four parameters itemnum/location/binnum/lotnum
        Throws:
        MXException
        java.rmi.RemoteException
      • triggerNewRelationship

        protected void triggerNewRelationship(int relationshipIndicator)
                                       throws MXException,
                                              java.rmi.RemoteException
        Issue 66808: Set the relationshipIndicator value
        Throws:
        MXException
        java.rmi.RemoteException
      • createIssue

        public MboRemote createIssue()
                              throws MXException,
                                     java.rmi.RemoteException
        createIssue() This remote inventory method was created to provide callers the ability to issue this inventory record without passing any parameters whatsoever. The method will accomplish the following: 1) - check integration rules for the INVISS flag ("can caller create a matusetrans?") integration rules will be checked using the inventory ownersysid and THISMX 2) - create a matusetrans mbo and return the mbo EXCEPTIONS: a MXApplicationException will be thrown if caller does not pass integration rules check! RETURN: method returns a MboRemote which will contain either null or the newly generated MatUseTrans mbo.
        Specified by:
        createIssue in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.createIssue()
      • createIssue

        protected MboRemote createIssue(MboSetRemote issueSet,
                                        java.lang.String ownersysid1)
                                 throws MXException,
                                        java.rmi.RemoteException
        createIssue(1,2) This remote inventory method was created to provide the InventoryService method of the same name(createIssue) a means of generating an issue record and adding that new mbo to a pre-named set. This method will also check integration rules using the ownersysid passed into the method. The method will accomplish the following: 1) - check integration rules for the INVISS flag ("can caller create a matusetrans?") integration rules will be checked using the inventory ownersysid and parameter ownersysid1 2) - create a matusetrans mbo, add it to parameter issueSet, and return the mbo which was just added EXCEPTIONS: a MXApplicationException will be thrown if caller does not pass integration rules check! RETURN: method returns a MboRemote which will contain either null or the newly generated MatUseTrans mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • isStocked

        public boolean isStocked()
                          throws MXException,
                                 java.rmi.RemoteException
        isStocked() Returns true if the ITEMORGINFO "CATEGORY" has a maxvalue of "STK" else returns false
        Specified by:
        isStocked in interface InventoryRemote
        Returns:
        returns true if the maxvalue of "inventory.category" is "STK"
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.isStocked()
      • isNonStocked

        public boolean isNonStocked()
                             throws MXException,
                                    java.rmi.RemoteException
        isNonStocked() Returns true if the ITEMORGINFO "CATEGORY" has a maxvalue of "NS" else returns false
        Specified by:
        isNonStocked in interface InventoryRemote
        Returns:
        returns true if the maxvalue of "inventory.category" is "NS"
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.isNonStocked()
      • isSpecialOrder

        public boolean isSpecialOrder()
                               throws MXException,
                                      java.rmi.RemoteException
        isSpecialOrder() Returns true if the ITEMORGINFO "CATEGORY" has a maxvalue of "NS" else returns false
        Specified by:
        isSpecialOrder in interface InventoryRemote
        Returns:
        returns true if the maxvalue of "inventory.category" is "SP"
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.isSpecialOrder()
      • changeCapitalizedStatus

        public void changeCapitalizedStatus(boolean capitalized,
                                            java.lang.String capitalacc,
                                            java.lang.String memo)
                                     throws MXException,
                                            java.rmi.RemoteException
        sets cost & gl accout values upon changing the capitalized flag on Item. InvTrans records are created at the condition code level to store this transaction as CAPCSTADJ.
        Specified by:
        changeCapitalizedStatus in interface InventoryRemote
        Parameters:
        capitalized - If true, item will be capitalized. If false, item will be non-capitalized.
        capitalacc - GL Capital Account value provided through the UI
        memo - free-form text to be written to InvTrans.Memo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Item.changeCapitalizedStatus(boolean,java.lang.String,java.lang.String)
      • calculateHoldingBalance

        protected double calculateHoldingBalance()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Method to calculate holding balance
        Calculates sum of current balances in matrectrans for a itemnum and location
        Parameters:
        None -
        Returns:
        holding balance
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateReservedQty

        protected double calculateReservedQty()
                                       throws MXException,
                                              java.rmi.RemoteException
        Method to calculate reserved quantity.
        Calculates sum of reserved quantity in invreserve for a itemnum and location
        Parameters:
        None -
        Returns:
        reserved qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateRQtyNotStaged

        public double calculateRQtyNotStaged()
                                      throws MXException,
                                             java.rmi.RemoteException
        Method to calculate reserved quantity without Staged quantity.
        Calculates sum of reserved quantity in invreserve for a itemnum and location
        Parameters:
        None -
        Returns:
        reserved qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateStagedQty

        public double calculateStagedQty()
                                  throws MXException,
                                         java.rmi.RemoteException
        Method to calculate staged quantity.
        Calculates sum of staged quantity in invreserve for a itemnum and location
        Parameters:
        None -
        Returns:
        reserved qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculatePickedQty

        public double calculatePickedQty()
                                  throws MXException,
                                         java.rmi.RemoteException
        Method to calculate picked quantity.
        Calculates sum of picked quantity in invbalances for an itemnum and location
        Parameters:
        None -
        Returns:
        picked qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateShippedQty

        public double calculateShippedQty()
                                   throws MXException,
                                          java.rmi.RemoteException
        Method to calculate shipped quantity.
        Calculates sum of shipped quantity less the already-received quantity for an itemnum and location
        Parameters:
        None -
        Returns:
        reserved qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateReceivedQty

        public double calculateReceivedQty()
                                    throws MXException,
                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateHardShippedQty

        public double calculateHardShippedQty()
                                       throws MXException,
                                              java.rmi.RemoteException
        Method to calculate hard reserved shipped quantity.
        Calculates sum of shipped quantity in invreserve that are hard reservations for a itemnum and location
        Parameters:
        None -
        Returns:
        reserved qty
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • calculateExpiredQty

        protected double calculateExpiredQty()
                                      throws MXException,
                                             java.rmi.RemoteException
        Method to calculate expired quantity Calculates sum of current balance in invbalnces for a itemnum and location where invlots are expired, useby date is expired.
        Returns:
        expired qty
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateAvailableQty

        public double calculateAvailableQty()
                                     throws MXException,
                                            java.rmi.RemoteException
        Method to calculate available quantity Calculates available quantity by subtracting reserved qty and expired qty from current balance for a itemnum and location
        Specified by:
        calculateAvailableQty in interface InventoryRemote
        Parameters:
        None -
        Returns:
        available balance
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
        See Also:
        Inventory.calculateAvailableQty()
      • calculateOverShippedQty

        public double calculateOverShippedQty()
                                       throws MXException,
                                              java.rmi.RemoteException
        IV87156: Return the over shipped quantity (shippedqty-reservedqty) from INVRESERVE. Use case is Inventory Usage only reserved Qty 1 from PO. Inventory Usage changes the Qty to 3. Created Shipment. Need to find over shipped quantity (shippedqty 3 -reservedqty 1) from INVRESERVE. SQL is HARDRESERVATIONS + shippedqty > reservedqty
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory.calculateAvailableQty()
      • setAutoCreateInvCost

        public void setAutoCreateInvCost(boolean flag)
                                  throws MXException,
                                         java.rmi.RemoteException
        Should an InvCost be automatically created if the object is new?
        Parameters:
        flag - true or false to indicate if an InvCost is to be created automatically.
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • setAutoCreateInvBalances

        public void setAutoCreateInvBalances(boolean flag)
                                      throws MXException,
                                             java.rmi.RemoteException
        Should an InvBalances be automatically created if the object is new?
        Parameters:
        flag - true or false to indicate if an InvBalances is to be created automatically.
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • canTransferCurrentItem

        public void canTransferCurrentItem()
                                    throws MXException,
                                           java.rmi.RemoteException
        Determines if the item is rotating before trying to transfer. If it is, throws an exception.
        Specified by:
        canTransferCurrentItem in interface InventoryRemote
        Parameters:
        None -
        Throws:
        MXApplicationException - (transferNonRotOnly) thrown if the item is rotating
        MXException
        java.rmi.RemoteException
      • canIssueCurrentItem

        public void canIssueCurrentItem()
                                 throws MXException,
                                        java.rmi.RemoteException
        can this inventory item be used issued to Asset?
        Specified by:
        canIssueCurrentItem in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        canIssueCurrentItem()
      • canReconcileBalances

        public void canReconcileBalances()
                                  throws MXException,
                                         java.rmi.RemoteException
        Determines if all of the invBalances for this Inventory record have been reconciled. If they are all reconciled, throws an exception
        Specified by:
        canReconcileBalances in interface InventoryRemote
        Parameters:
        None -
        Throws:
        MXApplicationException - (invbalCannotReconcile) thrown if the invBalances for this item have already been reconciled
        MXException
        java.rmi.RemoteException
      • updateCurrentBalance

        public MboRemote updateCurrentBalance(java.lang.String binnum,
                                              java.lang.String lotnum,
                                              java.lang.String conditionCode,
                                              double toIncrement)
                                       throws MXException,
                                              java.rmi.RemoteException
        updateCurrentBalance(1,2,3,4) Increment the curbal by the double passed on the InvBalances record as identified by lotnum and binnum. The passed double could be positive or negative.
        Specified by:
        updateCurrentBalance in interface InventoryRemote
        Parameters:
        binnum - The Bin Number of the InvBalance record. A null value or an empty string assumes a null value in the InvBalance record
        lotnum - The Lot Number of the InvBalance record. A null or an empty string both assume a null value in this field
        conditionCost - condition code for the invbalances to be updated
        Returns:
        Returns the InvBalances
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#updateCurrentBalance(String binnum, String lotnum, double toIncrement)
      • isLotted

        protected void isLotted(boolean lotted)
                         throws MXException,
                                java.rmi.RemoteException
        The item of this inventory object has the information as to whether or not the item is lotted.
        Throws:
        MXException
        java.rmi.RemoteException
      • setRequiredFieldsForCurBal

        protected void setRequiredFieldsForCurBal()
                                           throws MXException,
                                                  java.rmi.RemoteException
        sets binnum to be required if curbal/lotnum has been modified and the item is lotted.
        Throws:
        MXException
        java.rmi.RemoteException
      • getErrorMsg

        public MXApplicationException getErrorMsg()
                                           throws java.rmi.RemoteException
        Returns the error message, if any, for this inventory object. If the user can only access some storerooms only, they can only view the storerooms they are not authorized.
        Specified by:
        getErrorMsg in interface InventoryRemote
        Throws:
        java.rmi.RemoteException
        See Also:
        Inventory.getErrorMsg()
      • siteReceiptsAndTransfers

        public MboSetRemote siteReceiptsAndTransfers()
                                              throws MXException,
                                                     java.rmi.RemoteException
        returns set of MatRecTrans associated with this Inventory's itemnum/location combination and the Login user's SiteId. This SiteId's relation to the MatRecTrans object can be via either the MatRecTrans.SiteId or the MatRecTrans.FromSiteId attributes. In the case of the former, the MatRecTrans.ToStoreLoc attribute is the foreign MBO's location-related attribute of interest. In the case of the latter, the MatRecTrans.FromStoreLoc attribute is the foreign MBO's location-related attribute of interest. The WHERE clause is:

        "itemnum = :itemnum and itemsetid = :itemsetid and ( (siteid=:1 and tostoreloc=:location) or (fromsiteid=:1 AND FROMSTORELOC=:location) )"

        The bind variable ":1" contains the user's Login site

        Specified by:
        siteReceiptsAndTransfers in interface InventoryRemote
        Returns:
        MboSetRemote if there are MatRecTrans records that meet the criteria
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.siteReceiptsAndTransfers()
      • setKitAction

        public void setKitAction(java.lang.String makeOrBreak)
                          throws MXException,
                                 java.rmi.RemoteException
        called when menu action is chosen to Assemble Kit or Disassemble Kit
        Specified by:
        setKitAction in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.webclient.beans.inventory.InventoryAppBean.kitPrepare(), Inventory.getKitAction()
      • kitMakeOrBreak

        public void kitMakeOrBreak(KitRemote kit,
                                   boolean useSourceBinForInvKitAction)
                            throws MXException,
                                   java.rmi.RemoteException
        Specified by:
        kitMakeOrBreak in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#kitMakeOrBreak(Kit kit, boolean useSourceBinForInvKitAction)
      • kitBreakHandleCostVariancePerBin

        protected void kitBreakHandleCostVariancePerBin()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshCountDate

        public void refreshCountDate()
                              throws MXException,
                                     java.rmi.RemoteException
        set the adjustedphscntdate in the invbalances when the inventory.physcntdate is changed
        Specified by:
        refreshCountDate in interface InventoryRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.refreshCountDate()
      • copyAssetsForIssue

        public void copyAssetsForIssue(MboSetRemote assetSet,
                                       MboRemote issueItemToAssetMbo)
                                throws java.rmi.RemoteException,
                                       MXException
        Used by "Issue Item to Multiple Assets" to copy a set of assets to IssueCurrentItemMbos.
        Specified by:
        copyAssetsForIssue in interface InventoryRemote
        Parameters:
        assetSet - the MboSetRemote of AssetSetRemote instance. Only process the selected rows.
        issueItemToAssetMbo - the MboRemote of IssueItemToAssetMbo instance. This Mbo will do the actual copying.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.iapp.inventory.Inventory#copyAssetsForIssue(MboSetRemote assetSet, MboRemote issueItemToAssetMbo)
      • checkRequestAgainstItemMaxIssue

        public void checkRequestAgainstItemMaxIssue(java.lang.String assetnum,
                                                    double qtyRequested)
                                             throws MXException,
                                                    java.rmi.RemoteException
        checks to make sure that the sum of the quantity being issued to an asset or work order and the sum of the total issued quantity (ISSUEDQTY in the SPAREPART table for the given item and asset combination) is less than or equal to the maximum permissible quantity (MAXISSUE in ITEM table)
        Specified by:
        checkRequestAgainstItemMaxIssue in interface InventoryRemote
        Parameters:
        assetnum - asset to which item is being issued
        qtyRequested - quantity being issued to asset
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.virtual.ITSMEFldMatUseTransAssetnum#validate(), psdi.app.inventory.virtual.ITSMEFldMatUseTransQuantity#validate()
      • checkWOExists

        public boolean checkWOExists()
                              throws MXException,
                                     java.rmi.RemoteException
        This method checks if the item exist in WPItem for work orders that are in a status other than COMP or CLOSE
        Specified by:
        checkWOExists in interface InventoryRemote
        Returns:
        - true if exists in WPItem Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkWorkOrder()
      • checkInvBalancesExists

        public boolean checkInvBalancesExists()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method checks if the item exist in InvBalances.
        Specified by:
        checkInvBalancesExists in interface InventoryRemote
        Returns:
        - true if exists in InvBalances Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkInvBalances()
      • checkAssetExists

        public boolean checkAssetExists()
                                 throws MXException,
                                        java.rmi.RemoteException
        This method checks if the item exist in Asset.
        Specified by:
        checkAssetExists in interface InventoryRemote
        Returns:
        - true if exists in InvBalances Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkAsset()
      • checkJPExists

        public boolean checkJPExists()
                              throws MXException,
                                     java.rmi.RemoteException
        This method checks if the item exist in JobItem for job plans that are in a status other than INACTIVE.
        Specified by:
        checkJPExists in interface InventoryRemote
        Returns:
        - true if exists in JobItem Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkJobPlan()
      • checkMRExists

        public boolean checkMRExists()
                              throws MXException,
                                     java.rmi.RemoteException
        This method checks if the item exist in MRLine for MR that are in a status other than CAN or CLOSE
        Specified by:
        checkMRExists in interface InventoryRemote
        Returns:
        - true if exists in MRLine Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkMR()
      • checkPRExists

        public boolean checkPRExists()
                              throws MXException,
                                     java.rmi.RemoteException
        This method checks if the item exist in PRLine for PR that are in a status other than CAN or COMP.
        Specified by:
        checkPRExists in interface InventoryRemote
        Returns:
        - true if exists in PRLine Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkPR()
      • checkPOExists

        public boolean checkPOExists()
                              throws MXException,
                                     java.rmi.RemoteException
        This method checks if the item exist in POLine for PO that are in a status other than CAN or CLOSE.
        Specified by:
        checkPOExists in interface InventoryRemote
        Returns:
        - true if exists in POLine Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkPO()
      • checkContractExists

        public boolean checkContractExists()
                                    throws MXException,
                                           java.rmi.RemoteException
        This method checks if the item exist in ContractLine for Contract that are in a status other than CAN or CLOSE.
        Specified by:
        checkContractExists in interface InventoryRemote
        Returns:
        - true if exists in ContractLine Otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#checkContracExists()
      • 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 InventoryRemote
        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 - A value of NOACCESSCHECK will cause the method not to call canChangeStatus. Callers using this flag are responsible for ensuring that they are attempting a valid status change.
        Throws:
        MXException - Thrown if there is a problem.
        java.rmi.RemoteException
        See Also:
        StatefulMbo.canChangeStatus(String)
      • calculatePhyscnt

        protected double calculatePhyscnt()
                                   throws MXException,
                                          java.rmi.RemoteException
        Method to calculate total physical count
        Calculates sum of physical count in invbalances for a itemnum and location
        Parameters:
        None -
        Returns:
        Total Physical balance
        Throws:
        MXException - - MAXIMO System error
        java.rmi.RemoteException - - RMI error
      • checkInvUseStatusForPlanning

        public boolean checkInvUseStatusForPlanning()
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method checks if the item exist in Inventory Usage Lines in with status STAGED or SHIPPED.
        Returns:
        - String Status, if the inventory usage status is STAGED or SHIPPED Otherwise null.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkInvUseStatusForPndObs

        public boolean checkInvUseStatusForPndObs()
                                           throws MXException,
                                                  java.rmi.RemoteException
        This method checks if the item exist in Inventory Usage Lines in with status ENTERED, STAGED or SHIPPED.
        Returns:
        - String Status, if the inventory usage status is ENTERED, STAGED or SHIPPED Otherwise null.
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatus

        public java.lang.String getStatus()
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns status at inventory level.
        Returns:
        status
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvLifoFifoCostRecordSetSorted

        public MboSetRemote getInvLifoFifoCostRecordSetSorted(java.lang.String conditionCode)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        returns InvFifoCost mbo based on the conditionCode passed
        Specified by:
        getInvLifoFifoCostRecordSetSorted in interface InventoryRemote
        Parameters:
        conditionCode -
        Returns:
        an InvLifoFifoCost mbo(maybe a null if the invlifofifocost record specified does not exist in the database yet.)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#getInvLifoFifoCostRecordSetSorted( double,doubleString)
      • getInvLifoFifoCostRecordSet

        public MboSetRemote getInvLifoFifoCostRecordSet(java.lang.String conditionCode)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        returns InvFifoCost mbo based on the conditionCode passed
        Specified by:
        getInvLifoFifoCostRecordSet in interface InventoryRemote
        Parameters:
        conditionCode -
        Returns:
        an InvLifoFifoCost mbo(maybe a null if the invcost record specified does not exist in the database yet.)
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#getInvLifoFifoCostRecordSet( double,doubleString)
      • getInvLifoFifoCostRecordSet

        public MboSetRemote getInvLifoFifoCostRecordSet(java.lang.String conditionCode,
                                                        long transid)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        returns InvFifoCost mbo based on the conditionCode passed
        Parameters:
        conditionCode -
        Returns:
        an InvLifoFifoCost mbo(maybe a null if the invcost record specified does not exist in the database yet.)
        Throws:
        MXException
        java.rmi.RemoteException
      • addInvLifoFifoCostRecord

        public MboRemote addInvLifoFifoCostRecord(double quantity,
                                                  double unitcost,
                                                  java.lang.String conditioncode,
                                                  java.lang.String getName,
                                                  long matrectransid)
                                           throws MXException,
                                                  java.rmi.RemoteException
        This method is used by Transfer and Receipt objects to insert the invlifofifoCost record.
        Specified by:
        addInvLifoFifoCostRecord in interface InventoryRemote
        Parameters:
        quantity -
        unitcost -
        conditioncode -
        objectname -
        objectid -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#addInvLifoFifoCostRecord(double, double, String, String, int)
      • consumeInvLifoFifoCostRecord

        public void consumeInvLifoFifoCostRecord(double quantity,
                                                 java.lang.String conditionCode)
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method is used by Transfer and Receipt objects to consume the invlifofifoCost record.
        Specified by:
        consumeInvLifoFifoCostRecord in interface InventoryRemote
        Parameters:
        quantity -
        unitcost -
        conditionCode -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#consumeInvLifoFifoCostRecord( double,doubleString)
      • consumeInvLifoFifoCostRecord

        public void consumeInvLifoFifoCostRecord(double quantity,
                                                 java.lang.String conditionCode,
                                                 long transid)
                                          throws MXException,
                                                 java.rmi.RemoteException
        This method is used by Transfer and Receipt objects to consume the invlifofifoCost record.
        Parameters:
        quantity -
        unitcost -
        conditionCode -
        Throws:
        MXException
        java.rmi.RemoteException
      • consumeInvLifoFifoCostRecordRemaining

        public void consumeInvLifoFifoCostRecordRemaining(double quantity,
                                                          java.lang.String conditionCode,
                                                          long transid)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        This method is used by Transfer and Receipt objects to consume the invlifofifoCost record.
        Parameters:
        quantity -
        unitcost -
        conditionCode -
        Throws:
        MXException
        java.rmi.RemoteException
      • getAverageCost

        public double getAverageCost(MboSetRemote invLifoFifoCostSet)
                              throws MXException,
                                     java.rmi.RemoteException
        This method averages the cost for the display on UI.
        Specified by:
        getAverageCost in interface InventoryRemote
        Parameters:
        quantity -
        conditionCode -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.inventory.Inventory#getAverageCosts(MboSetRemote )
      • setAutoCreateInvLifoFifoCost

        public void setAutoCreateInvLifoFifoCost(boolean flag)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Should an InvLifoFifoCost be automatically created if the object is new?
        Parameters:
        flag - true or false to indicate if an InvLifoFifoCost is to be created automatically.
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • getAutoCreateInvLifoFifoCost

        public boolean getAutoCreateInvLifoFifoCost()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Returns autoCreateInvLifoFifoCost flag.
        Parameters:
        flag - true or false to indicate if an InvLifoFifoCost is to be created automatically.
        Returns:
        autoCreateInvLifoFifoCost flag
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • getInvLifoFifoCostRecord

        public MboRemote getInvLifoFifoCostRecord(java.lang.String conditionCode)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Returns the most recent cost date InvLifoFifoCost mbo based on the conditionCode passed
        Parameters:
        conditionCode - Condition Code
        Returns:
        an InvLifoFifoCost mbo. Could be null mbo if InvLifoFifoCost record doesn't exist or the most recent cost date InvLifoFifoCost mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • getNextDate

        public java.util.Date getNextDate()
                                   throws MXException,
                                          java.rmi.RemoteException
        Calculates the next value for the NextDate attribute, based on the PM's day frequency. This is the date when this PM will next generate a work order.
        Parameters:
        flag - Indicates whether to use 'extdate' for calculation of 'nextdate'. This flag is set to 'true' if the 'nextdate' is calculated during a work order generation. This flag is set to 'false' if dates are recalculated due to field updates of PM.
        Throws:
        MXException
        java.rmi.RemoteException
      • addMonths

        public java.util.Date addMonths(int addMonths,
                                        java.util.Date fromDate)
                                 throws MXException,
                                        java.rmi.RemoteException
        Calculates a date a number of months from the given date. If the day number of the given date is greater than the number of days in the resulting month, the end of the month is used. For example, adding 1 month to 3/31/00 will return 4/30/00.
        Parameters:
        addMonths - Number of months to add to the date.
        fromDate - The date to add the months to.
        Returns:
        The date equal to the fromDate plus the added months.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.getNextDate()
      • addYears

        public java.util.Date addYears(int addYears,
                                       java.util.Date fromDate)
        Calculates a date a number of years from the given date. If going from a Leap Year Day (Feb. 29th) to a non-leap year, Feb. 28th will be used instead.
        Parameters:
        addYears - Number of years to add to the date.
        fromDate - The date to add the years to.
        Returns:
        The date equal to the fromDate plus the added years.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Inventory.getNextDate()
      • updateConsignment

        public void updateConsignment()
                               throws MXException,
                                      java.rmi.RemoteException
        This method checks if the consignment flag can be updated.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkReconcileFlag

        public boolean checkReconcileFlag()
                                   throws MXException,
                                          java.rmi.RemoteException
        This method checks invbalances reconciled flag for this inventory.
        Returns:
        true if balances re reconciled false Otherwise
        Throws:
        MXException
        java.rmi.RemoteException
      • POPRExists

        public boolean POPRExists()
                           throws MXException,
                                  java.rmi.RemoteException
        This method checks if any PO/PR exists for this inventory that are cancelled or closed status.
        Returns:
        true if open PO/PR exists, false Otherwise
        Throws:
        MXException
        java.rmi.RemoteException
      • pendingTransactionExists

        public boolean pendingTransactionExists(MboSetRemote transSet)
                                         throws MXException,
                                                java.rmi.RemoteException
        This method checks if there are any transactions with invoices that are not approved or paid.
        Parameters:
        transSet -
        Returns:
        true if invoice exists that are not approved or paid otherwise false
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvGenType

        public java.lang.String getInvGenType()
                                       throws MXException,
                                              java.rmi.RemoteException
        This Method returns the Invoice generation type.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • checkBalandPOPR

        public void checkBalandPOPR()
                             throws MXException,
                                    java.rmi.RemoteException
        This methods checks if the balance exists and PO/PR exists.
        Throws:
        MXException
        java.rmi.RemoteException
      • increaseAccumulativeTotalCurBal

        public void increaseAccumulativeTotalCurBal(double currentReceiptQty)
                                             throws MXException,
                                                    java.rmi.RemoteException
        11-14180:increasing the running receipts for the update of MatRecTrans.totalcurbal
        Throws:
        MXException
        java.rmi.RemoteException
      • getAccumulativeTotalCurBal

        public double getAccumulativeTotalCurBal()
                                          throws MXException,
                                                 java.rmi.RemoteException
        11-14180: return the accumulativeTotalCurbal to MatRecTrans
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getNewRelationshipIndicator

        protected int getNewRelationshipIndicator()
                                           throws MXException,
                                                  java.rmi.RemoteException
        11-17393/IV11574: return the relationshipIndicator value
        Throws:
        MXException
        java.rmi.RemoteException
      • checkComponentCostType

        public void checkComponentCostType(MboSetRemote itemStructKitSet)
                                    throws MXException,
                                           java.rmi.RemoteException
        Checks if the kit components have cost type Lifo or Fifo.
        Parameters:
        itemStructKitSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusSetByMaxvarFlag

        public boolean getStatusSetByMaxvarFlag()
                                         throws MXException
        This flag return true if the status is set by the maxvar.
        Returns:
        Throws:
        MXException
      • calculateRQtyNotStagedForAvailBal

        public double calculateRQtyNotStagedForAvailBal()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        IV89911: This is the original calculateRQtyNotStaged() method -for the calculation of available quantity. So it works for the original
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateBinCnt

        public java.lang.String calculateBinCnt()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateLotCnt

        public java.lang.String calculateLotCnt()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • hasMultipleInvBalance

        public java.lang.Boolean hasMultipleInvBalance()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateGLAccount

        public void updateGLAccount(java.lang.String controlacc,
                                    java.lang.String shrinkageacc)
                             throws java.rmi.RemoteException,
                                    MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • calculateConditionCodeCnt

        public java.lang.String calculateConditionCodeCnt()
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException