psdi.app.common.purchasing

Class PurchasingMbo

    • Field Detail

      • checkLimitWhenApprove

        public boolean checkLimitWhenApprove
        During approval of PO, the approval limit needs to be checked.
    • Constructor Detail

      • PurchasingMbo

        public PurchasingMbo(MboSet ms)
                      throws MXException,
                             java.rmi.RemoteException
        Construct the PR or PO
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • recalculateTotalCost

        public void recalculateTotalCost()
                                  throws MXException,
                                         java.rmi.RemoteException
        Used to set the value of the pretaxtotal(sum of linecost) after the deletion of one poline. This in turn will trigger the validation for total cost and the totalbasecost.
        Throws:
        MXException
        java.rmi.RemoteException
      • recalculateTotalTax

        public double recalculateTotalTax()
                                   throws MXException,
                                          java.rmi.RemoteException
        This method returns the total of the totaltax1-5 based on inclusive1-5. TotalTax1 is added to the total only if inclusive1 is "Y". Likewise for TotalTax2..5 is based on inclusive2..5
        Throws:
        MXException
        java.rmi.RemoteException
      • getInvoiceMgtMaxVar

        public boolean getInvoiceMgtMaxVar()
                                    throws MXException,
                                           java.rmi.RemoteException
        Private method to get the "INVOICEMGT" maxvar.
        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 PurchasingMboRemote
        Parameters:
        termsSet - the pass in Term Set.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.common.purchasing
      • copyAllTerms

        public void copyAllTerms(MboSetRemote toTermsSet)
                          throws MXException,
                                 java.rmi.RemoteException
        This method will copy all the terms that exist for the current Mbo (PO, PR, Contract) to the MboSet being passed in. It will be used for selecting Terms to POTerm, PRTerm or ContractTerm.
        Parameters:
        termsSet - the pass in Term Set.
        Throws:
        MXException
        java.rmi.RemoteException
      • compareCopyTerms

        public void compareCopyTerms(MboRemote fromMbo)
                              throws MXException,
                                     java.rmi.RemoteException
        This method will copy the fromMbo's corresponding Terms to current Mbo's Terms. The combination could be: 1) Copy PRTerm to POTerm or ContractTerm 2) Copy ContractTerm to PRTerm or POTerm 3) Copy POTerm to ContractTerm 4) Copy RFQVendorTerm/RFQTerm to POTerm or ContractTerm
        Parameters:
        fromMbo - the base mbo to be copied from.
        Throws:
        MXException
        java.rmi.RemoteException
      • getExchangeRate

        public double getExchangeRate(java.util.Date date)
                               throws MXException,
                                      java.rmi.RemoteException
        Get the exchangerate between the PO's or the Contract's currency and the basecurrency.
        Parameters:
        date -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getExchangeRate2

        public double getExchangeRate2(java.util.Date date)
                                throws MXException,
                                       java.rmi.RemoteException
        Get the exchangerate2 if there is a base currency2. This is used to set the value of linecost2 in case there is a base currency2
        Throws:
        MXException
        java.rmi.RemoteException
      • copyFromContract

        public void copyFromContract(MboRemote contractRemote,
                                     MboRemote contractAuthFind)
                              throws MXException,
                                     java.rmi.RemoteException
        Copy contract info to PO/PR header. 1) Copy contract vendor related info to PO/PR vendor related info (vendor, currencycode, contact, customernum, fob, freightterms, paymentterms and shipvia. Billto and billtoattn from ContractAuth) 2) Copy Contracts Terms and Conditions to PO.
        Throws:
        MXException
        java.rmi.RemoteException
      • getShowconswarningFlag

        public boolean getShowconswarningFlag()
                                       throws MXException,
                                              java.rmi.RemoteException
        This method returns the showconswarning flag. It indicates if the warning is displayed in case PO vendor does not match consignment vendor on POLine/PRline.
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • setShowconswarningFlag

        public void setShowconswarningFlag(boolean flag)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method sets the showconswarning flag. It indicates if the warning is displayed in case PO vendor does not match consignment vendor on POLine/PRline.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyContractToPOPR

        public void copyContractToPOPR(MboSetRemote sourceContractLineSet)
                                throws MXException,
                                       java.rmi.RemoteException
        Copy ContractLines to the current PO/PR. This method is intended for user interface.
        Specified by:
        copyContractToPOPR in interface PurchasingMboRemote
        Parameters:
        sourceContractLineSet - The ContractLineSet being copied.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.common.purchasing.PurchasingMbo#copyContractToPOPR()
      • checkConsignmentItemsInContractSet

        public java.util.Vector checkConsignmentItemsInContractSet(MboSetRemote contractLineSetRemote,
                                                                   java.lang.String storeloc)
                                                            throws MXException,
                                                                   java.rmi.RemoteException
        This method creates a vector for mbos where the consignment vendor is different from the PO/PR header vendor for contract items.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkConsignmentItems

        public java.util.Vector checkConsignmentItems(MboSetRemote itemSetRemote,
                                                      java.lang.String storeloc)
                                               throws MXException,
                                                      java.rmi.RemoteException
        This method creates a vector for mbos where the consignment vendor is different from the PO/PR header vendor for invvendor/sparepart items.
        Throws:
        MXException
        java.rmi.RemoteException
      • setPOPRLineSet

        public void setPOPRLineSet(MboSetRemote mboLineSet)
                            throws MXException,
                                   java.rmi.RemoteException
        This method sets the polineset/prlineset for the consignment items.
        Throws:
        MXException
        java.rmi.RemoteException
      • showConsVendorWarningMessage

        public java.util.Vector showConsVendorWarningMessage(MboSetRemote invVendorSetRemote,
                                                             java.util.Vector vendorItemsVec,
                                                             java.lang.String storeloc)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        This method displays the warning message in case the PO vendor does not match with inventory consignment vendor for invvendor/sparepart items. If user click yes all the selected records get copied to the poline and also clears the consigment vector. If user selects No, Only non-consignment items get copied.
        Parameters:
        invVendorSetRemote -
        vendorItemsVec -
        storeloc -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addConsignmentItems

        public void addConsignmentItems(MboSetRemote mboLineSet,
                                        java.util.Vector itemsVec)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method adds the consignment contract items when user selects yes on the warning message.
        Parameters:
        mboLineSet -
        itemsVec -
        Throws:
        MXException
        java.rmi.RemoteException
      • copyContarctTerm

        public void copyContarctTerm(MboRemote contractRemote)
                              throws MXException,
                                     java.rmi.RemoteException
        Copy contract terms to PO.
        Specified by:
        copyContarctTerm in interface PurchasingMboRemote
        Parameters:
        contractRemote - The Contract Mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.common.purchasing.PurchasingMbo#copyContarctTerm()
      • checkContractType

        public MboRemote checkContractType(MboRemote contractRemote)
                                    throws MXException,
                                           java.rmi.RemoteException
        Find the corresponding type of Contract object for a given Contract. It could be Purchase, Serivce and Lease type of Contract.
        Parameters:
        contractRemote - The Contract object
        Throws:
        MXException
        java.rmi.RemoteException
      • checkInvalidItemStatus

        public boolean checkInvalidItemStatus(MboSetRemote invVendorSetRemote)
                                       throws MXException,
                                              java.rmi.RemoteException
        Check if item is valid before copied to PRLine/POLine.
        Parameters:
        invVendorSetRemote - The Inventory Set object
        Throws:
        MXException
        java.rmi.RemoteException