psdi.app.tool

Class ToolTrans

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


    public class ToolTrans
    extends Mbo
    implements ToolTransRemote
    MBO to represent a tool usage transaction.

    See Tool Package description.

    The key attributes for this object are Itemnum and TransDate.

    The attributes in this object are as follows:

    Attribute NameDescription
    ActualsTaskIdNon-persistent attribute used to maintain the actuals task identifier in workorder applications. This attribute differs from the task identifier column in these applications. This attribute is meant for dispaly where the columns Wonum, TaskId, and RefWO are not displayed.
    EnterBy, EnterDateName of the user who created this object and the date tool usage was reported.
    EnteredAsTaskY/N field indicates whether or not this transaction was created against a work order task.
    AssetNumAsset Number. The asset on which the work is being done. Defaults to the work order asset.
    ExchangeRate2Exchange rate for secondary currency.
    FinancialPeriodFinancial period during which this transaction was recorded.
    FinCntrlIdFinancial Control Identifier.
    GlCreditAcctGeneral ledger account credited with the cost of the tool. Defaults to the tool control account.
    GlDebitAcctGeneral ledger account debited with the cost of the tool. Defaults from the work order and/or the tool general ledger account.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table. Not used. Should be removed in a future release.
    LineCostExtended or lump sum cost of the transaction. (quantity)*(hours)*(rate)
    LineCost2Line cost expressed in secondary currency.
    LocationThe location where the tool was used. Defaults to the work order location.
    OrgIdOrganization Identifier.
    OutsideIs the tool an outside tool? Y/N field specifying whether the tool is leased from an outside supplier or owned by your facility. The default is N(o).
    RefWoReferenced workorder number for which the tool is used. This value is determined by this transaction's non-persistent WoNum and TaskId attributes.

    If this transaction's TaskId is non-null, RefWo is a child of WoNum. RefWo is set to the WoNum from the work order whose Parent and TaskId match this transaction's WoNum and TaskId.

    If this transaction's TaskId is null, then RefWo is set to this transaction's WoNum value.

    RollupY/N field indicating whether this transaction has been rolled up.
    SiteIdSite Identifier.
    TaskIdNon-persistent attribute used to maintain the workplan task identifier of the parent workorder for which the tool was used. The TaskId and WoNum attributes are used to determine (that is, RefWo).
    ToolHrsNumber of hours the tool was used.
    ToolNumIdentifier for the tool.
    ToolQtyQuantity of the tool used.
    ToolRateCost for tool per hour. Default is 0.
    TransDateDate and time transaction was entered.
    WoNumNon-persistent attribute used to maintain the parent workorder number. The WoNum and TaskId attributes determine the RefWo attribute. If the TaskId is null, then RefWo will be equal to this attribute.
    See Also:
    psdi.app.tool.tool
    • Field Detail

      • hasCalibration

        protected boolean hasCalibration
    • Constructor Detail

      • ToolTrans

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

      • init

        public void init()
                  throws MXException
        Initialization routine. At this point the object is read only. The add method makes the object editable. Always read-only fields has their READONLY flag set here.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new ToolTrans - set field defaults and allow editing.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException - is caught when Error group is common and Error key is NotValidActualDate or else it is thrown
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Based on a maxvar value check if the GL debit and credit accounts are required for this transaction. Merge gldebitacct on save. Validate the GL fully here.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXApplicationException - (financial, GLRequiredForTrans) The debit and credit GL accounts require a value.
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        The save method is overridden in order to update the work order referenced on the transaction. However, if a work order owns this set then the update will be done on the fly instead.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validation Order for ToolTrans attributes.
        Overrides:
        getValidateOrder in class Mbo
        Returns:
        order
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Subtracts the line cost from WO.actToolCost.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • getWoOwner

        protected MboRemote getWoOwner(ToolTransSet thisSet)
                                throws java.rmi.RemoteException
        Returns this tooltrans' owner if it is a work order, null otherwise.
        Parameters:
        thisSet -
        Returns:
        the WO owner or null
        Throws:
        java.rmi.RemoteException
      • isCalibrationInstalled

        protected boolean isCalibrationInstalled()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Return true if License Key CALIBRATION is installed.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException