psdi.app.rfq

Class RFQLine

  • All Implemented Interfaces:
    java.rmi.Remote, RFQLineRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class RFQLine
    extends Mbo
    implements RFQLineRemote
    MBO to represent one line of an RFQ. An RFQLine (Request for Quotation Line) indicates the line items or services that require quotations. This includes the items, quantities desired, and other item-specific information.

    See RFQ Package description for details.

    This is a site level object.

    The key attributes for this object are SiteId and RFQLineId.

    The attributes in this object are as follows:

    Attribute NameDescription
    AwardDateDate the line was awarded to a vendor.
    CategoryCategory of item: Stocked, Non-Stocked or Special Order.
    ChargeStoreIndicates whether line cost should be added to the asset.
    ConversionConversion factor between issue and order units.
    DescriptionDescription of the line item. Long description enabled.
    EnterBy, EnterDateIdentifier of the person who entered this RFQ line; date and time the line was entered.
    EnteredAsTaskIndicates whether or not this line item is needed for a work order task.
    AssetNumAsset to charge the cost of this line item to.
    FinCntrlIdFinancial Control Identifier.
    GLDebitAcctGL Debit Account. Account code for the general ledger (GL) account debited with the cost of this line item.
    InspectionRequiredIndicates whether inspection of item is required upon receipt.
    IssueY/N field indicating whether this item should be issued on receipt.
    ItemNumIdentifier of the item.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    LineCostExtended or lump sum cost of this transaction line.
    LineTypeThe type of RFQ line. It could be ITEM, MATERIAL or SERVICE type.
    LocationLocation where the item or service is intended to be used.
    ManufacturerCompany that manufactured item.
    ModelNumManufacturer's model number.
    MRLineNumMR line number.
    MRNumMaterial request number.
    OrderQtyNumber of units of the needed item.
    OrderUnitUnit for ordering item, for example, DOZEN or CASE. Not required on the RFQLine.
    OrgIdIdentifier of the organization for this RFQ.
    POLineIdInternal PO line identifier. This attribute is unique and does not change.
    POLineNumPurchase order line number corresponding to the RFQ line.
    PONumPurchase order number to which the item is assigned once the RFQ has been awarded.
    ProrateServiceY/N field indicating whether or not the cost of a service should be prorated (loaded) to line items cost when invoicing.
    QuotationOrderUnitNon-persistent Order Unit to be copied to the QuotationLine. Set from RFQLINE.ORDERUNIT when selecting RFQLines to copy to QuotationLine. Required if StoreLoc is not null.
    ReceiptReqdY/N field indicating whether or not a material receipt required for Invoice Matching.
    RefWOReferenced workorder number for which the RFQ line is used. This value is determined by this RFQ line's non-persistent WONum and TaskId attributes.

    If this line's TaskId is non-null, RefWO is a child of WONum. RefWO is set to the WONum from the work order whose Parent and TaskId match this line's WONum and TaskId.

    If this line's TaskId is null, then RefWO is set to this line's WONum value.

    RemarkDescription for RFQ line. Long description enabled.
    ReqDeliveryDateRequired Delivery Date.
    RequestedByThe person who requested the RFQ line item.
    RFQLineIdInternal RFQ line identifier. This attribute is unique and does not change.
    RFQLineNumRFQ Line Item Number.
    RFQNumRequest for quotation (RFQ) Number.
    SiteIdIdentifier of the site for this RFQ line.
    StoreLocStoreroom location of the item.
    SupervisorValid labor code representing the person responsible for approving the work to be done.
    TaskId Non-persistent attribute used to maintain WorkOrder.TaskId through the RFQLine object. The TaskId and WONum attributes determine the RefWO attribute. See the TaskId attribute defined in WorkOrder for more information.
    UnitCostUnit Cost.
    VendorVendor to whom the line item is awarded.
    VendorPackCodeThe vendor's pack code for the product. Indicates how the items will be packed. For example, BOX (12 to a box) or PALLET (30 to a pallet).
    VendorPackQuantityIndicates the number of items included in a pack.
    VendorWarehouseVendor warehouse that the product will come from.
    WONumNon-persistent attribute used to maintain WorkOrder.WONum through RFQLine object. The WONum and TaskId attributes determine the RefWO attribute. If the TaskId is null, then RefWO will be equal to this attribute. If you specify a work order number, MAXIMO takes information from the work order to fill in location, asset and Debit GL account fields. See the WONum attribute defined in WorkOrder for more information.
    RFQL1 thru RFQL10Extra fields.
    RFQLIN1 thru RFQLIN9Extra fields.
    • Constructor Detail

      • RFQLine

        public RFQLine(MboSet ms)
                throws MXException,
                       java.rmi.RemoteException
        Construct the RFQLine object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization routine. The following fields are set to read only:

        • awarddate
        • chargestore
        • category
        • contractnum
        • contractlinenum
        • ponum
        • polinenum
        • receiptreqd
        • rfqlineid
        • vendor
        • refwo
        ChargeStore and receiptreqd flag are editable only if it's a service line. If an RFQLine has assigned to a PR, this line should be read only.

        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new RFQLine. Required fields for the RFQLine are initialized. The table below shows the default values for each of the attributes listed.

        Attribute NameAttribute Value
        chargestoreFalse
        enterbyCurrent User
        enterdateCurrent Date
        inspectionrequiredFalse
        issueFalse
        linetype ITEM
        prorateserviceFalse
        receiptreqdTrue
        requestedbyCurrent User
        rfqnumRFQNum of parent RFQ
        rfqlinenumNew linenum (max + 1)
        rfqlineidUniquely generated line id
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • setNullValuesToPOVariables

        public void setNullValuesToPOVariables()
                                        throws MXException,
                                               java.rmi.RemoteException
        Sets the values of the PO variables (ponum,polinenum,polineid) to null. Called by the delete method on the POLINE.

        Specified by:
        setNullValuesToPOVariables in interface RFQLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessmodifier)
                    throws MXException,
                           java.rmi.RemoteException
        This method is called to delete an RFQLine. If RFQLine is associated with a PRLine, removed RFQ references from the PRLine.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessmodifier - 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)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        This method undeletes an RFQLine that has been marked for deletion. If RFQLine is associated with a PRLine, restore RFQ references to the PRLine.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Sets the initial conditions to allow deletion. Those RFQLines with the status as INPRG can be deleted. Deletion is not allowed on the RFQs with other statuses.

        If the RFQLine has assigned to a POLine, cannot delete the RFQLine.

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - deleteOnlyIfCertainStatus - INPRG
        MXApplicationException - (pr, alreadyinPO) is thrown when the RFQLine has assigned to a POLine.
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        This saves the RFQLine and all related Mbos
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • relinkPRLineToModifiedRFQLineNum

        public void relinkPRLineToModifiedRFQLineNum()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Maintains link between the RFQLine and PRLine (if this line originated from a PRLine) by updating the RFQLinenum when this line's line number is modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method is used to perform last minute validations and/or actions before saving the RFQLine. Derived method from Mbo.java. Validations:
        • check to ensure that at least an itemnum or description is entered if the line is not a 'SERVICE'.
        • if issue = true (not a direct issue), at least reqires one of them: asset, location, work order or gl account.
        • if issue = false (direct issue), a storeroom location is required.
        • if chargetostore = true, the asset must be a rotating asset.
        • Based on a maxvar value check if the GL debit account is required for this transaction.
        Actions:
        Overrides:
        appValidate in class Mbo
        Throws:
        MXApplicationException(po, - ItemOrDescIsRequired) is thrown when the RFQLine is a not a service line, yet does not have both the itemnum or description.
        MXApplicationException(po, - assetwolocglNull) is thrown if it's a direct issue and at least one of assetnum, location, wonum, or gldebitacct does not have a value
        MXApplicationException(po, - StoreLocIsNull) is thrown when this RFQLine is not a direct issue and if the storeloc is null
        MXApplicationException(po, - AssetNumNull) is thrown when the chargestore flag is true but the RFQLine does not have an asset.
        MXApplicationException(po, - NoItemForLineType) is thrown when line type is ITEM and does not have an item number associate with it.
        MXException
        java.rmi.RemoteException
      • copyRFQLinesToQuotationLines

        public void copyRFQLinesToQuotationLines(java.lang.String vendor)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Copies the contents of this RFQLine to a new QuotationLine. A vendor must be specified because the quotation line(s) must be assigned to a vendor. If a set of RFQLines must be copied to Quotation lines then the client must get the RFQLineSet and loop through it and call this method on each RFQLine.

        The following rule is used to get the taxcode for the QuotationLine

        1. First try to get the taxcodes for the item from the item table
        2. Otherwise try to get the taxcodes from the INVVENDOR table using the vendor manufacturer and modelnum
        3. If the above two steps dont return anything just get the vendor's taxcodes from the COMPANIES table

        Specified by:
        copyRFQLinesToQuotationLines in interface RFQLineRemote
        Parameters:
        vendor - The vendor
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method overrides the skipCopyField() in the Mbo.Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped.If this field does not need to be copied return true. The following is a list of fields that are not copied from the source RFQLine to the target RFQLine.
        1. awarddate
        2. enterby
        3. enterby
        4. enterdate
        5. mrlinenum
        6. mrnum
        7. orgid
        8. polineid
        9. polinenum
        10. ponum
        11. reqdeliverydate
        12. requestedby
        13. rfqlineid
        14. rfqnum
        15. siteid
        16. vendorpackcode
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        - - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        - True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for RFQ number.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "RFQNum" or else nothing will be propagated.
        keyValue - The new value of rfqnum.
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validation Order for RFQLine attributes.
        Overrides:
        getValidateOrder in class Mbo
      • copyLineValuesFromContractLine

        public void copyLineValuesFromContractLine(MboRemote contractLine,
                                                   MboRemote createRelInput)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Copies values from the passed in ContractLine and to the RFQLine. It also copies the charge values from the passed in Non-persistent Mbo to the RFQLine.
        Specified by:
        copyLineValuesFromContractLine in interface RFQLineRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • copy

        public MboRemote copy(MboSetRemote mboset)
                       throws MXException,
                              java.rmi.RemoteException
        Over-ride the copy method of the Mbo. This copy would copy all the PRCost Mbos related to the PRLine.
        Specified by:
        copy in interface MboRemote
        Overrides:
        copy in class Mbo
        Parameters:
        mboset - The set into which the new mbo will be added.
        Returns:
        The new mbo, with values copied from this mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.copy(MboSetRemote, long)
      • smartFindByObjectName

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

        public void setRecentItemNum(java.lang.String itemNum)
                              throws MXException,
                                     java.rmi.RemoteException
        If go to Inventory from ItemNum field and in Inventory App, trying to trying back the inventory record but had an exception in Storeloc but itemnum had already set - need to remember the itemnum
        Parameters:
        itemNum -
        Throws:
        MXException
        java.rmi.RemoteException