psdi.app.financial

Class FinancialService

    • Constructor Detail

      • FinancialService

        public FinancialService()
                         throws java.rmi.RemoteException
        Construct the FinancialService object.
        Throws:
        java.rmi.RemoteException
      • FinancialService

        public FinancialService(MXServer mxServer)
                         throws java.rmi.RemoteException
        Construct the FinancialService object.
        Parameters:
        mxServer -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • validateFullGLAccount

        public boolean validateFullGLAccount(UserInfo user,
                                             java.lang.String account,
                                             java.lang.String orgID)
                                      throws MXException,
                                             java.rmi.RemoteException
        Validate if the GL Account is fully specified. If the maxvar DISABLEGLSWITCH is true no validation needs to be done. If the account has to be validated check the maxvar GLCHECKCOA. If GLCHECKCOA is true the GL Account needs to be validated against an exact match from CHARTOFACCOUNTS else the individual segments should be valid segments in GLCOMPONENTS.
        Specified by:
        validateFullGLAccount in interface FinancialServiceRemote
        Parameters:
        user - UserInfo object to get the user.
        account - GL Account to be validated.
        orgID - The organization identifier.
        Returns:
        boolean Indicates if the GL account is valid or not.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.validateFullGLAccount(psdi.security.UserInfo, java.lang.String, java.lang.String)
      • validatePartialGLAccount

        public boolean validatePartialGLAccount(UserInfo user,
                                                java.lang.String account,
                                                java.lang.String orgID)
                                         throws MXException,
                                                java.rmi.RemoteException
        Validate if the GL Account is partially specified. If the maxvar DISABLEGLSWITCH is true no validation needs to be done. If the account has to be validated check the maxvar GLCHECKCOA. If GLCHECKCOA is true the GL Account needs to validated against CHARTOFACCOUNTS else the individual segments should be valid segments in GLCOMPONENTS.
        Specified by:
        validatePartialGLAccount in interface FinancialServiceRemote
        Parameters:
        user - UserInfo object to get the user.
        account - GL Account to be validated.
        orgID - The organization identifier.
        Returns:
        boolean Indicates if the GL account is valid or not.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.validatePartialGLAccount(psdi.security.UserInfo, java.lang.String, java.lang.String)
      • getActiveFinancialPeriod

        public java.lang.String getActiveFinancialPeriod(UserInfo user,
                                                         java.util.Date transDate,
                                                         java.lang.String orgID,
                                                         java.lang.Boolean useNextPeriodIfInactive)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Gets an active Financial Period, if transaction date is not between periodstart and periodend, use where transaction date < periodend and (current date < periodclosedate or periodclosedate is null).
        Specified by:
        getActiveFinancialPeriod in interface FinancialServiceRemote
        Parameters:
        user - UserInfo object to get the user.
        transDate - Date on which the transaction occurs.
        orgID - The organization identifier.
        useNextPeriodIfInactive - Boolean indicating whether the next financial period should be used if the period is inactive
        Returns:
        String The financial period.
        Throws:
        MXApplicationException - (financial, invalidfinperiod) The financial period for this transaction is invalid.
        MXApplicationException - (financial, closedfinperiod) The financial period for this date is closed.
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.getActiveFinancialPeriod(psdi.security.UserInfo, java.util.Date, java.lang.String)
      • getAccountDefaults

        public java.lang.String getAccountDefaults(UserInfo user,
                                                   java.lang.String defaultGroup,
                                                   java.lang.String groupValue,
                                                   java.lang.String orgID)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Gets the GL Account default from ACCOUNTDEFAULTS that are tied to specific columns in the database.

        The type of accounts or resource codes passed for the method parameter defaultGroup are:

        • EXLABREC - External Labor control Accounts Default accounts are set up by the external labor's vendor e.g. BEARING, BURSAW, etc;
        • LABRESCODE - Labor Resource Code You can set up one resource code for inside labor (Outside=N) and one for external labor (Outside=Y).
        • TOOLRESCODE - Tool Resource Codes You can set up one resource code for internal tools (Outside=N) and one for external tools (Outside=Y).
        • INVRESCODE - Inventory Resource Codes You can set up inventory resource codes by item type e.g. BELTS, FITTINGS, MOTOR, etc;
        The values passed for the second parameter dfltgroup can be BELTS, MOTOR (stock type) for INVRESCODE.

        see AccountDefaults for details on these default accounts.

        Specified by:
        getAccountDefaults in interface FinancialServiceRemote
        Parameters:
        user - UserInfo object to get the user.
        groupValue -
        defaultGroup -
        orgID -
        Returns:
        String The default account.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.getAccountDefaults(UserInfo, String, String)
      • getAccountDefaults

        public java.lang.String getAccountDefaults(UserInfo user,
                                                   java.lang.String defaultGroup,
                                                   java.lang.String orgID)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Gets the GL Account default from ACCOUNTDEFAULTS that are tied to specific columns in the database. The method takes two parameters: user(UserInfo) and dfltgroup (groupvalue is not needed). One example of use is when internal labor usage on work order is reported. As this is a case of internal labor being used there is no groupvalue.
        Specified by:
        getAccountDefaults in interface FinancialServiceRemote
        Parameters:
        user - UserInfo object to get the user.
        groupValue -
        defaultGroup -
        orgID -
        Returns:
        String The default account.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.financial.FinancialService#getAccountDefaults(UserInfo, String)
      • isFullySpecified

        public boolean isFullySpecified(UserInfo user,
                                        java.lang.String account,
                                        java.lang.String orgID)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method is to check if the GL account has all the components filled in or specified. This can be used if you are validating a partial GL account but all the components may be specified. The validation of a partial GL account is different based on whether all the components are filled in or not. Returns true if the account has all the components specified.
        Specified by:
        isFullySpecified in interface FinancialServiceRemote
        Parameters:
        UserInfo - user UserInfo object to get the user.
        String - account The GL account string.
        Returns:
        boolean Indicates if the GL account is fully specified.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.isFullySpecified(psdi.security.UserInfo, java.lang.String, java.lang.String)
      • update

        public void update(UserInfo user,
                           java.lang.String updateDBCriteria,
                           java.lang.String orgID)
                    throws MXException,
                           java.rmi.RemoteException
        This method is called when using the action Update Database in Chart of Accounts application. This action page displays a group of three radio buttons based on whose selection some database updates are done. The updates will be done based on changes made to accounts in tables ACCOUNDEFAULTS, COMPANYACCDEF and LOCATIONS. There are three update database criterias handled by three radio buttons: BLANKACCOUNTS - Overwrite Blank Accounts Only. Choose this option if you want the updated Chart of Accounts data to overwrite only those affected MAXIMO GL Account fields that are currently blank. For example, if you created a new account code for an existing item type's GL account field, choosing this option would overwrite only the item's GL Account field where it is blank, but not where a GL account has already been entered. OLDDEFACCOUNTS - Overwrite Accounts With Old Defaults. Choose this option if you want the updated Chart of Accounts data to overwrite GL account fields that still have the previous GL account. For example, suppose an item type had a GL account code associated with it in Chart of Accounts. This account code was inserted on item records where the item type was involved. On some records, the account code was subsequently changed to another one. Choosing the Overwrite Accounts With Old Defaults option will not update those records in which the account code was subsequently changed. ALLACCOUNTS - Overwrite All Accounts. Choose this option if you want the modified Chart of Accounts data to overwrite all relevant GL Account fields in MAXIMO records. For example, if an item type has a GL account code associated with it in Chart of Accounts, choosing this option will fill in blank GL Account fields for that item type and overwrite all existing GL Account fields for items of that type, including ones that were subsequently changed. NOTE: Historical records will not be updated. Make sure that no one is currently using MAXIMO when you update the database.
        Specified by:
        update in interface FinancialServiceRemote
        Parameters:
        user - The user info.
        updateDatabase - The criteria used for the update.
        orgID - The organization identifier.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.update(psdi.security.UserInfo, java.lang.String, java.lang.String)
      • setGLDefaultDescription

        public void setGLDefaultDescription(MboRemote chartOfAccount)
                                     throws MXException,
                                            java.rmi.RemoteException
        Create a description for a GL Account based on its component descriptions. The description includes " + " between each segment. Blank segments are skipped. If the GLCOMPONENT and CHARTOFACCOUNTS tables are enabled for multi-language, descriptions are created for all enabled languages. If translated values are not available for all components, the components without translations are displayed in the base language. If no value is available in the translated language or base language, the segment is skipped.
        Specified by:
        setGLDefaultDescription in interface FinancialServiceRemote
        Parameters:
        chartOfAccount - Chart of accounts MboRemote.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        FinancialService.setGLDefaultDescription(psdi.mbo.MboRemote)
      • basicAccountSetup

        public void basicAccountSetup(java.lang.String orgid,
                                      java.lang.String compname,
                                      java.lang.String compvalue,
                                      java.lang.String comptext,
                                      UserInfo userInfo)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • disableGLValidation

        public void disableGLValidation(java.lang.String orgid,
                                        UserInfo userInfo)
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • resetGLOrder

        public void resetGLOrder(java.lang.String orgid,
                                 UserInfo userInfo)
                          throws MXException,
                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • advancedAccountSetup

        public void advancedAccountSetup(java.util.Map components,
                                         java.lang.String compvalue,
                                         UserInfo userInfo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • componenetsSetup

        public void componenetsSetup(java.util.Map components,
                                     java.lang.String orgid,
                                     java.lang.String compvalue,
                                     MXTransaction trans,
                                     UserInfo userInfo)
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setupFinancialPeriods

        public void setupFinancialPeriods(java.lang.String orgid,
                                          java.lang.String period,
                                          java.lang.String startmonth,
                                          int numyears,
                                          boolean disableperiods,
                                          UserInfo userInfo)
                                   throws MXException,
                                          java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setupFinancialPeriodsFull

        public void setupFinancialPeriodsFull(java.lang.String orgid,
                                              java.lang.String period,
                                              java.lang.String startmonth,
                                              int numyears,
                                              boolean disableperiods,
                                              UserInfo userInfo,
                                              boolean updateApptracker)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • updateApptracker

        public void updateApptracker(com.ibm.json.java.JSONArray ja,
                                     boolean complete,
                                     UserInfo userInfo,
                                     MXTransaction trans)
                              throws MXException,
                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • addCOA

        public void addCOA(java.lang.String orgid,
                           java.lang.String compvalue,
                           java.lang.String comptext,
                           UserInfo userInfo,
                           MXTransaction trans)
                    throws MXException,
                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException