psdi.app.rfq

Class RFQVendor

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


    public class RFQVendor
    extends Mbo
    implements RFQVendorRemote
    MBO to represent a vendor to which an RFQ is sent.

    An RFQVendor (Request for Quotation Vendor) MBO stores information about a vendor to whom a request for quotation is intended to be sent. This includes such data as the vendor name, contact, phone number, and other vendor specific information. See RFQ Package description for details.

    This is a site level object.

    The key attributes for this object are SiteId, RFQNum and Vendor.

    The attributes in this object are as follows:

    Attribute NameDescription
    BuyAheadY/N field indicating whether or not this is a buy ahead rate. Yes indicates the exchange rate was entered directly by the user and not calculated from the list of active exchange rates.
    ContactName of the person to contact at the company.
    CurrencyCodeCurrency the vendor is using.
    CustomerNumVendor's number identifying the purchasing company.
    EMailVendor contact's email address.
    ExchangeDateDate of exchange rate.
    ExchangeRateExchange rate at time of quotation.
    FaxPhoneVendor's fax number.
    FOBFree On Board. The point of time when ownership of goods transfers from vendor to purchaser.
    FreightTermsFreight terms. Long description enabled.
    GLCreditAcctCredit GL Account default for vendor.
    Inclusive1 thru InclusiveNY/N field indicating if tax (Tax1 thru TaxN) is to be paid to vendor.
    InternalY/N field indicating whether or not this is an internal PO.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    OrgIdIdentifier of the organization for this vendor.
    PaymentTermsPayment terms.
    PhoneVendor's phone number.
    RepliedDateDate vendor replied to RFQ.
    RFQNumRequest for Quotation (RFQ) Number.
    ShipViaSpecifies how the goods are shipped (FedEx, Priority Mail, UPS, etc.).
    SiteIdIdentifier of the site for this vendor.
    VendorCompany that is to receive the quotation.
    VendorQuoteNumVendor's quote number.
    RFQV1 thru RFQV5Extra fields.
    • Constructor Detail

      • RFQVendor

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

      • add

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

        Attribute NameAttribute Value
        rfqnumRFQNum of the parent RFQ
        buyaheadFalse
        currencycodeThe Base currency code
        inclusive1....inclusiveNFalse
        internalFalse

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

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Sets the condition on which the RFQVendor can be deleted.
        • The RFQVendor can only be deleted if the status of the RFQ is INPRG.
        • Cannot delete if the RFQ has any other status.

        Overrides:
        canDelete in class Mbo
        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 RFQVendor to the target RFQVendor.
        1. EXCHANGEDATE
        2. EXCHANGERATE
        3. ORGID
        4. REPLIEDDATE
        5. RFQNUM
        6. SITEID
        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
      • createPOHeaderFromRFQ

        public MboRemote createPOHeaderFromRFQ(java.lang.String ponum,
                                               java.lang.String description)
                                        throws MXException,
                                               java.rmi.RemoteException
        This method copies the RFQ/RFQVendor infomation to the PO Header and returns the PO header. It takes VENDOR and PONUM as the parameters. If ponum is null value, the ponum will be autokeyed.

        Parameters:
        vendor - The vendor
        ponum - The ponum
        Returns:
        MboRemote - The newly created POHeader
        Throws:
        MXApplicationException - notfoundvendor
        GROUPKEYREASON
        rfqnotfoundvendorif the vendor on the RFQ cannot be found in the RFQVENDOR table
        MXException
        java.rmi.RemoteException
      • createPOFromRFQ

        public MboRemote createPOFromRFQ(java.lang.String ponum,
                                         java.lang.String description)
                                  throws MXException,
                                         java.rmi.RemoteException
        Create a PO from information on the given RFQ/QuotationLine.
        • Get QuotationLineSet with no POnum filled
        • If there is no awarded lines has found, throw exception (noawardedline)
        • Check QuotatoinLineSet. If any line has no Line Cost, throw exception (zerolinecost)
        • Get RFQLineSet
        • If RFQ is created from PR, get PR/PRLineSet
        • Create PO header
        • Create POLine from Quotaion Line/RFQ Line
        • Update RFQLine/PRLine POnum field if applicable
        • Check MaxVar PRCHANGE. If PRCHANGE is true, close RFQ/PR
        • Close RFQ, if all RFQLines have POnums
        • If RFQ is created from PR, check PRLines and close PR if all PRLines have POnums
        Specified by:
        createPOFromRFQ in interface RFQVendorRemote
        Returns:
        a new PO object
        GROUPKEYREASON
        rfqnoAwardedLineif quotationLineSet is empty
        Throws:
        MXApplicationException - noawardedline
        MXException
        java.rmi.RemoteException
        See Also:
        RFQVendor.createPOFromRFQ(String, String)
      • checkSentCompStatus

        public void checkSentCompStatus(java.lang.String message)
                                 throws MXException,
                                        java.rmi.RemoteException
        If RFQ status is not SENT or COMP, throw exception. It will display different error message, depends on the passing message.
        Specified by:
        checkSentCompStatus in interface RFQVendorRemote
        Parameters:
        message - the error message to display
        Throws:
        MXApplicationException - message
        MXException
        java.rmi.RemoteException
        See Also:
        copyRFQToQuotation, createPOFromRFQ
      • checkingBeforeCreatePOCont

        public void checkingBeforeCreatePOCont(boolean fromPO)
                                        throws MXException,
                                               java.rmi.RemoteException
        Checking for different conditions before creating a PO or Contract. 1) RFQ status should be SENT or COMP. 2) Related quotation lines should be exist. 3) Quotation lines should have line cost.
        Specified by:
        checkingBeforeCreatePOCont in interface RFQVendorRemote
        Parameters:
        fromPO - To indicate is calling from Create PO or Create Contract. Based on the true/false value to display the proper error message. True indicates is called from Create PO. False indicates is called from Create Contract.
        Throws:
        MXApplicationException - (rfq, cannotCreatePOFromRFQ) is thrown if RFQ status is not SENT or COMP.
        MXApplicationException - (rfq, noawardedline) is thrown if quotaion line set is empty
        MXApplicationException - (rfq, savebeforecreate) is thrown if it's calling from Create PO/Contract and RFQVendor or quotation line is not saved.
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.jsp.app.rfq.Actions#rfqtopo, psdi.jsp.app.rfq.Actions#createcont, psdi.app.rfq.RFQVendor#createPOFromRFQ()
      • 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
      • setRelatedMboEditibility

        public void setRelatedMboEditibility(java.lang.String relationName,
                                             MboSetRemote mboSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        Sets the read/only flag for the related set if the set exists.
        Parameters:
        relationName - The relationship name of the related MboSet which need to set the read/only flag.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        #setEditibilityFlags
      • createNewMboFromRFQ

        public void createNewMboFromRFQ(java.lang.String number,
                                        java.lang.String description,
                                        java.lang.String contractType)
                                 throws MXException,
                                        java.rmi.RemoteException
        Create a Contract/PO from information on the given RFQ/QuotationLine.
        • Get QuotationLineSet with no Contract filled
        • If there is no awarded lines has found, throw exception (noawardedline).
        • Check QuotatoinLineSet. If any line has no Line Cost, throw exception (zerolinecost).
        • Get RFQLineSet.
        • If RFQ is created from PR, get PR/PRLineSet.
        • Create Contract/PO header.
        • Create Contract/PO Terms.
        • Create ContractLine/POLine from Quotaion Line/RFQ Line.
        • Update RFQLine/PRLine contractnum/ponum field if applicable.
        • Check MaxVar PRCHANGE. If PRCHANGE is true, close RFQ/PR.
        • Close RFQ, if all RFQLines have Contractnum or POnum.
        • If RFQ is created from PR, check PRLines and close PR if all PRLines have Contract numbers or PO numbers.
        Specified by:
        createNewMboFromRFQ in interface RFQVendorRemote
        Parameters:
        contractNum - the contract number to be created that can be specified by the user
        description - the contract description
        contractType - the contract type to be created that can be specified by the user
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.rfq.createPOFromRFQ(), ContractFromRFQSet.execute()
      • createContractHeaderFromRFQ

        protected MboRemote createContractHeaderFromRFQ(java.lang.String contractNum,
                                                        java.lang.String description,
                                                        java.lang.String contractType)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        09-17746: This is a copy of private method createContractHeader. It was requested to be changed to public. This method copies the RFQ/RFQVendor infomation to the Contract Header and returns the Contract header.
        Parameters:
        contractNum - the contract number to be created that can be specified by the user
        description - the contract description
        contractType - the contract type to be created that can be specified by the user
        Returns:
        MboRemote - The newly created POHeader
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.rfq.RFQVendor#createContractFromRFQ
      • copyVendorTerms

        public void copyVendorTerms(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:
        copyVendorTerms in interface RFQVendorRemote
        Parameters:
        termsSet - the pass in Term Set.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.rfqvendor#copyVendorTerms()
      • delete

        public void delete(long accessmodifier)
                    throws MXException,
                           java.rmi.RemoteException
        This method is called to delete an RFQVendor, QuotationLine and RFQVendorTerm.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        This method is called to unmark the RFQVendor, QuotationLine and RFQVendorTerm for deletion.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException