psdi.app.financial

Class AccountDefaults

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, AccountDefaultsRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class AccountDefaults
    extends Mbo
    implements AccountDefaultsRemote
    Mbo object to represent AccountDefaults. AccountDefaults stores the default General Ledger accounts that are tied to specific columns in the database. The different types of accounts used are:
    • EXLABREC - External Labor control Accounts Used as the credit account for any external labor transaction e.g.when external labor (contract) usage on work order is reported. Default accounts are set up by the external labor's vendor e.g. BEARING, BURSAW, HELWIG, etc;
    • LABRESCODE - Labor Resource Code The labor resource component of the debit account in a transaction e.g. when a work order requiring a labor code is written, the work order's line item includes the labor resource account component in the debit GL Account code. You can set up one resource code for inside labor (Outside=N) and one for external labor (Outside=Y).
    • TOOLRESCODE - Tool Resource Codes The tool resource component of the debit account in a transaction e.g. when a work order requiring a tool is written, the work order's line item includes the tool resource account component in the debit GL Account code. You can set up one resource code for internal tools (Outside=N) and one for external tools (Outside=Y).
    • INVRESCODE - Inventory Resource Codes The inventory resource component of the debit account in a transaction e.g. when a work order requiring an inventory item is written, the work order's line item includes the inventory resource account component in the debit GL Account code. You can set up inventory resource codes by item type e.g. BELTS, FITTINGS, MOTOR, etc;

    See Financial Package description.

    The key attributes for this object are DfltGroup and GroupValue.

    The attributes in this object are as follows:

    Attribute NameAttribute Description
    DfltGroupThe default group type.
    GLDefaultCurrent general ledger account default.
    GroupValueThe value assigned.
    OldGLDefaultPrevious general ledger account default.
    OrgIDOrganization Identifier.

    See FinancialService for getting the default GL Accounts for using in different transactions.

    • Constructor Detail

      • AccountDefaults

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new account default. Set field defaults. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        OrgidOwner organization identifier
        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
        This method is called before deleting any default accounts. The accounts can only be deleted if:
        1. The default group being deleted is EXLABREC (external labor control accounts) and none of its group values are registerd as vendor in the COMPANIES table.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - (financial, DeleteAccountDefaults) The accounts cannot be deleted.
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Override the system method. This method is called by the framework and returns an array of fields whose order need to be maintained during the delayed validation. This sequence is for maximizing performance for API and yielding correct result. The sequence should be: dfltgroup, groupvalue, gldefault.
        Overrides:
        getValidateOrder in class Mbo
        Returns:
        String[] Array of fields in the defined sequence.
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method is always called by the framework before save to do application specific validation. If the mbo is modified and gldefault value is changed, set oldgldefault to the initial gldefault value.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException