psdi.app.company

Class Company

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


    public class Company
    extends Mbo
    implements CompanyRemote, LinkedMboRemote
    Mbo object to represent companies. The Company object maintains detailed information on vendors, manufacturers, and other companies. The information entered includes the company identification, addresses, purchasing details (currency, tax, shipping), and payment details (bank and internal accounts, and whether the company has a payment on receipt agreement). For reporting purposes, companies can be grouped by type, such as vendor or manufacturer. You can also enter your own company's storeroom locations here so that these locations become "vendors" for internal purchase orders (i.e., transfers from one storeroom location to another). The Company object must have the company information before other objects, such as Inventory and Purchasing, can access it.

    See Company Package description.

    The key attribute for this object is Company.

    The attributes in this object are as follows:

    Attribute NameAttribute Description
    Address1Street address of the company.
    Address2City where the company is located.
    Address3State or province where the company is located.
    Address4Company's zip or postal code.
    APControlAccAccounts Payable Control Account. Used when an invoice is paid.
    APSuspenseAccAccounts Payable Suspense Account. Used when an invoice is approved.
    AutoApproveInvYes/No field indicates whether or not invoices should automatically be approved for the vendor upon receipt of the invoice.
    AutoRecieveOnASNYes/No field indicates whether or not the vendor should automatically process the receipts for an automated shipping notification.
    AutoSendPOCancelYes/No field indicates whether or not the vendor is sent a transaction when a purchase order is cancelled.
    BankAccountCompany's bank account for direct payments.
    BankNumCompany's bank and branch identification reference number. Used when transferring funds electronically.
    CatalogNameName of the catalog that will display when punching out.
    ChangeBy, ChangeDateName of the user who last updated this object and the date updated.
    CompanyIdentifier for the company.
    ContactName of the primary person to contact at the company.
    CurrencyCodeCurrency used by the company.
    CustomerNumNumber used by an outside company to identify your own company.
    DisabledYes/No field indicates whether or not the company is disqualified.
    DUNSNumData Universal Numbering System Number. Used to uniquely identify a company and its location.
    EcomInterfaceE-Commerce supplier's catalog location.
    EcommerceEnabledYes/No field indicates whether or not the company has the capability of electronic commerce with MAXIMO.
    ExternalRefIdExternal Reference Identifier.
    FaxFax number of the company or contact.
    FOBFree On Board. The point where responsibility and liability are transferred.
    FreightTermsDescription of what is being shipped. Riders to the shipping agreement should be included here.
    HomePageURL for the company's World Wide Web page.
    Inclusive1 - Inclusive5Yes/No fields indicate whether or not tax1code - tax5code are included in the invoicing cost.
    LocationLocation of the company.
    MNetCompanyIdMNet assigned company identification number.
    NameName and/or description of the company. Long description enabled.
    OrgIdOrganization Identifier.
    OwnerSysIdOwner System Identifier.
    PaymentTermsTerms of payment for this vendor.
    PayOnReceiptYes/No field indicates whether or not a payment on receipt agrement exists with this company.
    PayVendorName of the person to whom payments should be sent.
    PhoneTelephone number of the company or contact.
    PunchOutEnabledYes/No field indicates whether this vendor's catalog can be accessed through punchout.
    RBNIAccAccount for receipts that have not been approved.
    Registeration1 - Registeration5Tax registration numbers for tax types 1 - 5 used by the company.
    RemitAddress1Street address of the remit to company.
    RemitAddress2City of the remit to company.
    RemitAddress3State or province of the remit to company.
    RemitAddress4Zip or postal code of the remit to company.
    RemitContactName of the person at the remit to company to contact for invoicing.
    ShipViaHow the goods should be shipped.
    SourceSysIdSource System Identifier.
    Tax1Code - Tax5CodeCountry or state tax codes of tax types 1 - 5 for this company.
    TaxExemptCodeIndicates whether the company is exempt from paying taxes.
    TaxExemptNumNational tax exemption number used for tax reporting purposes.
    VendorSendsASNYes/No field indicates whether or not the vendor should send automated shipping notification transactions.
    VendorSendsInvYes/No field indicates whether or not the vendor should send invoice transactions.
    VendorSendsStatusYes/No field indicates whether or not the vendor should send status transactions.
    TypeThe company's type.
    • Constructor Detail

      • Company

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

      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        The logic of setting the readonly and required field flags for Company Mbo.
        Overrides:
        initFieldFlagsOnMbo in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Default value for some of the fields of the new company. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        autoapproveinvNo
        autoreceiveonasnNo
        autosendpocancelNo
        changebyCurrent username
        changedateCurrent date
        currencycodeBaseCurrency1 if there is a base currency, else do not default.
        disabledNo
        ecommerceenabledNo
        inclusive1 - inclusive5Yes
        payonreceiptNo
        punchoutenabledNo
        useparentremittoNo
        vendorsendsasnNo
        vendorsendsinvNo
        vendorsendsstatusNo
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        This is called whenever a change is made to the attributes of company. When any field related to company is changed, changedate and changeby is updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions that occur when a company object is saved. If this is a new company, a new company master will be created and company contact masters for the primary and remit contacts will also be created.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Overwitten for company's MBO. Delete is not allowed if the COMPANY is referenced by certain objects. A company cannot be deleted if the following conditions exist:
        • If this company is used as a parent on any other company.
        • Any records exist in INVVENDOR with either vendor or manufacturer equal to the company.
        • Any records exist in INVENTORY with either vendor or manufacturer equal to the company.
        • Any records exist in ASSET with either vendor or manufacturer equal to the company.
        • Any records exist in JOBLABOR with vendor equal to the company.
        • Any records exist in JOBMATERAIL with vendor equal to the company.
        • The location attribute for this company is not null.
        • Any records exist in PO with vendor, shipto or billto equal to the company, and the status of the PO is not close or cancel.
        • Any records exist in PR with vendor, shipto or billto equal to the company, and the status of the PR is not close or cancel.
        • Any records exist in INVOICE with vendor equal to the company, and the status of the INVOICE is not cancel.
        • Any records exist in SERVICECONTRACT with vendor equal to the company.
        • Any records exist in MRLINE with either vendor or manufacturer equal to the company, and the status of the MR is not close.
        • Any records exist in WPMATERIAL with vendor equal to the company, and the workorder status not equal to close or cancel.
        • Any records exist in WPLABOR with vendor equal to the company, and the workorder status not equal to close or cancel.
        • Any records exist in RFQ with buyercompany, billto, replyto,or shipto equal to the company, and the status of the RFQ is not close.
        • Any records exist in RFQ with buyercompany, billto, replyto,or shipto equal to the company, and the status of the RFQ is not close.
        • Any records exist in RFQLINE or RFQVENDOR with vendor equal to the company, and the status of the RFQ is not close.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - (company, deletecompany) Cannot delete company.
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Overwitten for company's MBO. If the the mbo is marked to be deleted in the hierarchy i.e. the branch company needs to be deleted, delete the relationship between parent and branch . Delete any contacts in COMPCONTACT referenced by the company to be deleted.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        long - accessModifier
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Duplicates a Company record. Also duplicates the contacts for this company which are stored in the COMPCONTACT table and the related Linked Documents(DocLinks).
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote The newly created company.
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws MXException,
                                        java.rmi.RemoteException
        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 following are the Company fields will be skipped without being copied to the newly duplicated company:
        1. company
        2. changeby
        3. changedate
        4. sourcesysid
        5. ownersysid
        6. externalrefid
        7. sendersysid
        8. orgid
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        true If the field does not need to be copied return true, in all other cases return false.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Company.loadSkipFieldCopyHashSet()
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method is called by the framework before save. Perform regular appValidate() and process LinkedMbo's deletion. If the punchoutenabled flag is set to 'Y' the catalogname field will be required.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXApplicationException - (company, CatalogNameRequired) Catalog name is required.
        MXException
        java.rmi.RemoteException
      • createMasterForCompany

        public CompMasterRemote createMasterForCompany()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Creates a company master for this company Mbo. If a company master already exists this method just returns.
        Returns:
        CompMasterRemote new company master Mbo
        Throws:
        MXException
        java.rmi.RemoteException