psdi.app.rfq

Class RFQ

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


    public class RFQ
    extends StatefulMbo
    implements RFQRemote
    MBO to represent an RFQ. An RFQ (Request for Quotation) is a request that is sent out to one or more potential suppliers. In the request, you can ask for specific costs and conditions for the delivery of an item(s) or service(s).

    An RFQ can be created manually, or it can be created from items/services on a PR.

    The RFQ object contains the header information for a request, such as the date by which a response is desired, the date the request is closed, the freight and payment terms, the name and address of the company to which the RFQ is being sent and the name and address of the company/person to which the resulting quotation should be sent.

    See RFQ Package description for details.

    This is a site level object.

    The key attributes for this object are SiteId and RFQNum.

    The attributes in this object are as follows:

    Attribute NameDescription
    BillTo, BillToAttnIdentifier of the company or division to send the bill to; person to whom the bill should be sent.
    BuyerCompanyIdentifier of the company sending the RFQ. Links the buyers address to the order.
    ChangeBy, ChangeDateIdentifier of the person who last changed this RFQ; date and time the RFQ was last changed.
    CloseOnDateDate when no further quotations will be accepted from vendors and the RFQ is considered closed.
    DescriptionDescription or purpose of the RFQ. Long description enabled.
    EnterBy, EnterDateIdentifier of the person who entered this RFQ; date and time the RFQ was entered.
    FOBFree on board point. The point of time when ownership of goods transfers from vendor to purchaser.
    FreightTermsRequested freight terms.
    HistoryFlagY/N field indicating whether or not the RFQ record is history. History flag will be true if RFQ status is CLOSE or CANCEL.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    OrgIdIdentifier of the organization for this RFQ.
    PaymentTermsrequested terms of payment.
    PrintDateDate the RFQ was printed and sent to vendors.
    PriorityPriority level to determine the order in which the RFQ should be processed.
    PurchaseAgentIdentifier of the buyer of the items.
    ReplyDateDate by which the vendor should reply to this RFQ.
    ReplyTo, ReplyToAttnIdentifier of the company or division to send the reply to; person to whom the RFQ response should be sent.
    RequestedByIdentifier of the person who requested the vendor quotations.
    RequiredDateDate the RFQ line items are needed.
    RFQNumRequest for Quotation number.
    RFQTypeRequested type of RFQ.
    ShipTo, ShipToAttnIdentifier of the company or division where items are to be shipped; person to whom the items are to be shipped.
    ShipViaHow the goods are to be shipped (FedEx, Priority Mail, UPS, etc.).
    SiteIdIdentifier of the site for this RFQ.
    Status, StatusDateCurrent status of the RFQ; date and time the status was last changed.
    RFQ1 thru RFQ10Extra fields.
    • Constructor Detail

      • RFQ

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

      • getProcess

        public java.lang.String getProcess()
        Return the process for RFQ.
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Return a status handler to change the rfq status.

        Specified by:
        getStatusHandler in class StatefulMbo
        Returns:
        New StatusHandler object
      • getStatusListName

        public java.lang.String getStatusListName()
        Return the name of the value list that contains all the status'. For RFQ this is called RFQSTATUS.

        Specified by:
        getStatusListName in interface StatefulMboRemote
        Specified by:
        getStatusListName in class StatefulMbo
        Returns:
        Name of the status value list for RFQ
      • init

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

        • status
        • enterby
        • statusdate
        • historyflag
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

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

        Attribute NameAttribute Value
        replyto Site's billtoaddresscode
        replytoattn Site's billtolaborcode
        changebyCurrent User
        changedateCurrnet Date
        enterbyCurrent User
        enterdateCurrent Date
        historyflagNo
        priority0 (zero)
        requestedbyCurrent User
        shipto Site's shiptoaddresscode
        shiptoattn Site's shiptolaborcode
        statusINPRG
        statusdateCurrent Date
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.signature.SignatureService#getlaborForuserAndOrg
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Called when a field is modified so the changedate/changeby fields can be updated.

        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Determines if the record can be deleted. An RFQ can only be deleted if the status is INPRG.

        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - cannotDeleteRfq
        GROUPKEYREASON
        rfqcannotDeleteRfqif the status of the RFQ is not 'INPRG'
        MXException
        java.rmi.RemoteException
      • createRFQVendorFromPR

        public void createRFQVendorFromPR(MboRemote fromPR)
                                   throws MXException,
                                          java.rmi.RemoteException
        Create an RFQ Vendor from information on the given PR.

        Parameters:
        fromPR - The PR being copied.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyTerms

        public void copyTerms(MboSetRemote termsSet)
                       throws MXException,
                              java.rmi.RemoteException
        This method will copy the selected terms to the set calling Mbo's corresponding Terms. It will be used for selecting Terms to POTerm, PRTerm or ContractTerm.
        Specified by:
        copyTerms in interface RFQRemote
        Parameters:
        termsSet - the pass in Term Set.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.rfq
      • compareCopyTerms

        public void compareCopyTerms(MboRemote prMbo)
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Creates a duplicate RFQ. This method
        • Creates a duplicate Request for Quotation
        • Copies over all the lines that belong to this RFQ to the new RFQ and also copies over the RFQVENDOR Mbos related to the RFQ
        • Note that when an RFQ is duplicated the QuotationLines are not copied over to the new RFQ
        • Sets the status of the duplicated Request for Quotation to In Progress.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote - the newly duplicated RFQ
        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 by using the data from the static HashSet. If this field does not need to be copied return true. The same method is over-rided also in POLine so that certain POLine fields can be skipped without being copied. The following are RFQ fields will be skipped without being copied to the newly duplicated RFQ
          1. changeby
          2. changedate
          3. closeondate
          4. enterby
          5. enterdate
          6. historyflag
          7. orgid
          8. printdate
          9. replydate
          10. requestedby
          11. requireddate
          12. rfqnum
          13. siteid
          14. status
          15. statusdate
          16. wfactive
          17. wfid
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        - - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        - True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        RFQLine.skipCopyField(psdi.mbo.MboValueInfo), RFQ.loadSkipFieldCopyHashSet()
      • copySpareParts

        public void copySpareParts(MboSetRemote sparePartSet)
                            throws MXException,
                                   java.rmi.RemoteException
        Adds the spare parts to the RFQs RFQLines. This method receives a set of spare parts, gets the RFQLines for this RFQ and adds the spare parts as RFQLines by calling the copy method on MboSet.
        Specified by:
        copySpareParts in interface RFQRemote
        Parameters:
        sparePartSet - The set of spare parts from the UI
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        RFQ.copySpareParts(psdi.mbo.MboSetRemote)
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initailized or reset from this Mbo to another MboSet.
        Overrides:
        initRelationship in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is overridden to add a wrapper to exceptions thrown during change status and to write warnings whether or not the status change is successful
        Specified by:
        changeStatus in interface 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 (java.util.Date). If null the current date/time is used.
        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)
      • 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