psdi.app.mr

Class MRCost

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


    public class MRCost
    extends Mbo
    implements MRCostRemote
    MBO to represent a Material Requisition Cost. Contains the cost information associated with each MRLine. The cost on an MRLine can be distributed across any number of general ledger accounts. Each MRCost MBO contains information about which GLAccount carries the cost and how much percentage of the total cost it carries. Each MRLine will have at least one MRCost MBO. If there is only one, 100 percent of the cost will be assigned to one GLAccount.

    This a site level object.
    The key attributes for this object are SiteId, OrgId and MRCostId. The attributes in this object are as follows:


    Attribute Name Description
    FinCntrlId The financial control identifier.
    GLDebitAcct The general ledger account to which the material requisition cost is to be charged.
    LineCost The cost associated with this distribution line.
    MRCostId Material Requisition cost identifier. This identifier is unique for each material requisition cost in the database.
    MRLineId Material Request line identifier. This identifier is uniquly generated for each material requisition line in the database.
    MRNum Material Request num. Indicates the material requisition number to which this material requisition cost line is associated.
    OrgIdIdentifier of the organization for the material requisition cost.
    Percentage The percentage of cost of the material requisition line distributed on each material requisition cost line.
    SiteIdIdentifier of the site for the material requisition cost.

    Last Update: Tuesday, March 20, 2002 - Ganesh - javadocs

    • Constructor Detail

      • MRCost

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

      • init

        public void init()
                  throws MXException
        Initialized MRCost mbo. Set the following fields to readonly when fetched from database.
        • MRCost Line Id
        • MR Num
        • MR Line Id
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new MR Cost Line. Required Fields of the MRCost are initialised in this method. The following fields are initialised with their respective values


        Attribute Name Attribute Value.
        costlinenumAdd one to the existing maximum value
        fincntrlid MRLine's fincntrlid.
        gldebitacct MRLine's gldebitacct
        mrcostid Unique key.
        mrlineid MRLine's mrlineid.
        mrnum MRLine's mrnum.
        quantityOwner MRLine's quantity
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXApplicationException(mr, - addmrline) is thrown when the owner of this MRLine is not a MR
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Cannot delete a distribution if the MR is approved and if any receipts exists against the owner MR Line.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Over-rides the method in the super class. If the field need not be copied during copy() return true else return false. The following fields are not copied from the source Mbo to the target Mbo.
        • MRCOSTID
        • MRLINEID
        • MRNUM
        • SITEID
        Overrides:
        skipCopyField in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        If this costline's percentage is still zero, clear the line cost and quantity.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException