psdi.app.contract.warranty

Class WarrantyView

  • All Implemented Interfaces:
    java.rmi.Remote, PurchasingMboRemote, ContractRemote, WarrantyViewRemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy


    public class WarrantyView
    extends Contract
    implements WarrantyViewRemote
    MBO object to represent the view of the Contract table. Like all objects, views also extend from Mbo. The key attributes for this object are ContractNum, RevisionNum and OrgId.

    See Contract Package description.
    The attributes in this object are as follows:


    Attribute Name Description
    AutoExtendPeriod Auto extend period in days.
    BuyAhead Is this a buy ahead rate, ie entered directly by the user and not calculated from the list of active exchange rates.
    ChangeBy, ChangeDate The name of the person who last modified the form and the date on which the form was last modified.
    CondForExtConditions for extension.
    Contact Vendors' contact name.
    ContractId Unique identifier for every Contract in the database. Every Contract has a unique ContractID.*
    ContractNum Contract Number. This is one of the key fields. Each ContractNum need not be unique. Every new revision of the same contract will carry the same contract number.
    ContractType Indicates whether the type of the contract is Labor or Lease or Maintenance or Purchase or Rental or Software License or Warranty.
    CurrencyCode Currencycode of the Contract.
    CustNotifyPeriod Customer notification period in days.
    CustomerNum Vendors' number identifying our company.
    CustomerTermAllowed Flag to indicate if early termination is allowed by the customer.
    Description Description of the Purchase Contract.
    Description_LongDescription Long description of the Purchase Contract.
    EndDate Date when is Contract is no longer valid.
    ExchangeDate Date on which the exchange rate was obtained.
    ExchangeRate Exchange rate at the time of contract approval.
    ExchangeRate2 Exchangerate in basecurrency2.
    Extendable Is the contract extendable?
    FOB Freight on Board. The point where responsibility and liability are transferred.
    FreightTermsThe terms under which the shipment is made. For example, the field may contain "Perishable goods. Deliver ASAP"
    HasInsuranceDoes this vendor have a current insurance policy ?
    HistoryFlag Flag indicating history Purchase Contracts.
    Inclusive Flag indicating if the Contract Total is inclusive of the same number Tax field. (e.g. Inclusive1 ... Tax1, Inclusive2 .. Tax2, etc.)
    InsuranceExpDate Expiration date of the vendors insurance policy.
    MasterNum Master Contract Number.
    OrgId Identifier of the organization for this Contract.
    PaymentSched Is there a payment schedule for this contract?
    PaymentTerms Specified terms of payment for this vendor. For example we can say "TEN " which means the invoice will be paid with 10 days.
    PORequired Will a PO be required for this contract?
    PurchaseAgent The name of the Purchase Agent.
    RenewalDate Date that the contract can be renewed.
    RevComments Revision Comments.
    RevisionNum Revision number of the contract.
    ShipVia Specifies how the goods should be shipped (FedEx,UPS etc)
    StartDate Beginning of the Validity period of a contract.
    StatusThe status of the Contract. Can be one of approved, draft, waiting for approval, canceled, closed, waiting to start, expired.
    StatusDate The date on which the status of this contract was changed.
    TotalBaseCost The total cost of the contract in Base Currency 1.
    TotalCost The Total Cost of the Contract.
    VendNotifyPeriod Vendor notice of termination in days.
    Vendor Identifier of the vendor code.
    VendorRefNum Vendor reference number.
    VendorTermAllowed Is early termination allowed by vendor?
    • Constructor Detail

      • WarrantyView

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

      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Return the CONTRACTSTATUS object. Required for statefullness.
        Overrides:
        getStatusHistory in class Contract
        Returns:
        The set of CONTRACTSTATUS records
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Description copied from class: StatefulMbo
        Return the status handler object to be used for the actual changing of the status. This is only called once by the framework. This method must be provided by the Mbo programmer.
        Overrides:
        getStatusHandler in class Contract
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add method on the Leave Contract View.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Contract
        Throws:
        MXException
        java.rmi.RemoteException
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Duplicates a Contract,its lines and cost lines
        1. Creates a duplicate Purchase Order.
        2. The add method of Contract sets the status of the duplicated Purchase order to WAPPR.
        3. Autokeys the ContractNum if the autokey feature is turned on. If the autokey feature is turned off, the user must input the key value. The save() method checks for the key and throws an exception if the key is not entered.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote-the newly duplicated Contract
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.isAutoKeyed(java.lang.String)
      • 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 HashTable. If this field does not need to be copied return true. The same method is over-rided also in ContractLine so that certain ContractLine fields can be skipped without being copied. The following are Contract fields will be skipped without being copied to the newly duplicated Contract
        1. changeby
        2. changedate
        3. contractnum
        4. enddate
        5. exchangedate
        6. exchangerate
        7. expdone
        8. externalrefid
        9. historyflag
        10. orgid
        11. ownersysid
        12. receipts
        13. requireddate
        14. startdate
        15. status
        16. statusdate
        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:
        ContractLine.skipCopyField(psdi.mbo.MboValueInfo), ContractLine.loadSkipFieldCopyHashSet()
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. Set the editibility of the Mbos related to the contract. The initRelationship() only when the relationship name that is specified inside this method is used to obtain the target MboSet.
        Overrides:
        initRelationship in class Contract
        Parameters:
        relationName - the relationship name
        mboSet - the mboset
        Throws:
        MXException
        java.rmi.RemoteException
      • setEditibilityFlags

        protected void setEditibilityFlags(boolean flag)
                                    throws MXException,
                                           java.rmi.RemoteException
        sets the editibility flags for fields in Contract.
        Throws:
        MXException
        java.rmi.RemoteException
      • canCreateSchedule

        public void canCreateSchedule()
                               throws MXException,
                                      java.rmi.RemoteException
        Cannot create a payment schedule for a warranty contract which has the payment schedule flag as false. Cannot create a payment schedule if the status of the contract is not WAPPR or DRAFT.
        Specified by:
        canCreateSchedule in interface WarrantyViewRemote
        Throws:
        MXApplicationException("contract", - "paymentSchedFlag")
        MXApplicationException("contract", - "CannotCreatePmtApprContact")
        MXException
        java.rmi.RemoteException
        See Also:
        WarrantyView.canCreateSchedule()
      • cancelInvoicesForSchedule

        public void cancelInvoicesForSchedule()
                                       throws MXException,
                                              java.rmi.RemoteException
        Cancel all the unpaid invoices which were created for the schedule. All invoices which were not approved, paid or already cancelled will be affected.
        Specified by:
        cancelInvoicesForSchedule in interface WarrantyViewRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.contract.warranty.WarrantyView#ccancelInvoicesForSchedule
      • createInvoicesForSchedule

        public void createInvoicesForSchedule()
                                       throws MXException,
                                              java.rmi.RemoteException
        Create invoices for payment schedules for this warranty contract. Invoices will be created if the contract has a payment schedule. One invoice will be created if there is only the start date and no end date. If there is an end date invoices will be created based on the given schedule. This method will be called during this contract approval.
        Specified by:
        createInvoicesForSchedule in interface WarrantyViewRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WarrantyView.createInvoicesForSchedule()
      • copyContractTermsToInvoice

        public void copyContractTermsToInvoice(MboSetRemote contractTermsSetRemote,
                                               MboSetRemote invoiceTermSetRemote)
                                        throws MXException,
                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • reCalcLeaseViewCost

        public double reCalcLeaseViewCost()
                                   throws MXException,
                                          java.rmi.RemoteException
        This method recalculates the warranty view's total cost if the line cost on any of its payment schedule lines changes. This change can happen due to many reasons such as modifing the line cost, adding a new schedule, deleting an existing schedule, etc.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • reviseContract

        public MboRemote reviseContract(java.lang.String revDescription)
                                 throws MXException,
                                        java.rmi.RemoteException
        Creates a new revision of the current contract.
        1. The new contract has the same contract number as the old contract.
        2. The new contract has a new revision number.
        3. When status of the new contract would be set to PENDING REVISION. The status of the old revision will remain APPROVED.
        4. When the new revision is approved the status of the old revision will be set to REVISED.
        Specified by:
        reviseContract in interface ContractRemote
        Specified by:
        reviseContract in interface WarrantyViewRemote
        Overrides:
        reviseContract in class Contract
        Returns:
        Returns the newly created contract revision reference.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        canReviseContract