psdi.app.mr

Class FldMRLineItemnum

  • All Implemented Interfaces:
    MboConstants, MboValueListener


    public class FldMRLineItemnum
    extends FldItemnum
    Behavior of the itemnum field in the MRLine object.

    The rules for setting the default storeroom, vendor and price are applied at the moment when the itemnum is set on mrline. The rules are as the following.

    When the item number is specified on MRLine, and this itemnum is not null, the following happens:

    1. When itemnum is set, the storeroom is always cleared.
    2. At this moment, the effort to find a default storeroom will take place. It looks for a storeroom whose inventory record for this itemnum is stocked. If the default storeroom is set in the user profile, this storeroom will be checked first. If one of such storeroom is found, this one will be set as the storeroom for the mrline.
    3. If a such storeroom is not found, the default vendor from the invvendor record for this item will be set to the vendor, and the information for vendor including manufacturer, catalogcode, modelnum, orderunit will be copied to mrline. Otherwise, both storeroom and vendor will be left blank, and it will be considered as a direct request.
    4. After all the above, if vendor is found, the default price will be calculated according to the common default order price logic. Agreements will be considered.

    See Also:
    MR.getDefaultStoreLoc(), Inventory.isStocked(), MRLine.calcDirectReq(), MRLine.clearInventoryDefaults(), MRLine.calculateUnitCost(), MRLine.updateGlAccount()
    • Method Detail

      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        The rules for setting the default storeroom, vendor and price are applied at the moment when the itemnum is set on mrline. The rules are as the following.

        When the item number is specified on MRLine, and this itemnum is not null, the following happens:

        1. When itemnum is set, the storeroom is always cleared.
        2. At this moment, the effort to find a default storeroom will take place. It looks for a storeroom whose inventory record for this itemnum is stocked. If the default storeroom is set in the user profile, this storeroom will be checked first. If one of such storeroom is found, this one will be set as the storeroom for the mrline.
        3. If a such storeroom is not found, the default vendor from the invvendor record for this item will be set to the vendor, and the information for vendor including manufacturer, catalogcode, modelnum, orderunit will be copied to mrline. Otherwise, both storeroom and vendor will be left blank, and it will be considered as a direct request.
        4. After all the above, if vendor is found, the default price will be calculated according to the common default order price logic. Agreements will be considered.
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class CrossOverDomain
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        CrossOverDomain.action()
      • validate

        public void validate()
                      throws MXException,
                             java.rmi.RemoteException
        If line type is special order, only new item could be allowed. For other line types, the item has to be in this line (item) type.
        Specified by:
        validate in interface MboValueListener
        Overrides:
        validate in class FldItemnum
        Throws:
        MXApplicationException(po,itemused) - is thrown if the item exists in ITEM database.
        MXApplicationException(po,itemtype) - is thrown if the item does not exist for this lint type.
        MXException
        java.rmi.RemoteException
      • getList

        public MboSetRemote getList()
                             throws MXException,
                                    java.rmi.RemoteException
        Returns a valid list of entries according to storeloc and commodity authorization restrictions. if commodity auth is not turned on, select everything. if commodity auth is turned on and commauthinclude is yes, include only the items whose classstructureids are defined in the commodityauth table for this user's group. If commodity auth is turned on and commauthinclude is no, exclue the items whose classstructureids are defined in the commodityauth table for this user's group.
        Specified by:
        getList in interface MboValueListener
        Overrides:
        getList in class MAXTableDomain
        Throws:
        MXException
        java.rmi.RemoteException