psdi.app.po

Class POCost

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


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

    This an organiztion level object.
    The key attributes for this object are SiteId, OrgId and POCostId.
    The attributes in this object are as follows:


    Attribute Name Description
    FinCntrlId The financial control identifier.
    GLDebitAcct The General Ledger account to which the POCost is to be charged.
    LineCost The cost associated with this line.
    POCostId Purchase Order cost Id. This Id is unique for each POCost in the database.
    POLineId Purchase Order line Id. This Id is unique for each POLine in the database.
    PONum Purchase Order num. Indicates the PONum to which this POCost line is associated.
    OrgId Identifier of the organization for this Material Requisition cost line.
    Percentage The percentage of cost of the POLine distributed on each POCost Line.
    SiteIdIdentifier of the site for this Material Requisition.

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

    • Constructor Detail

      • POCost

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

      • init

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

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new PO Cost Line. Required Fields of the POCost 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 POLine's fincntrlid.
        gldebitacct POLine's gldebitacct
        pocostid Unique key.
        polineid POLine's polineid.
        ponum POLine's ponum.
        quantityOwner POLine's quantity
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXApplicationException(po, - addpoline) is thrown when the owner of this POLine is not a PO
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Cannot delete a distribution if the PO is approved and if any receipts exists against the owner PO 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.
        • POCOSTID
        • POLINEID
        • PONUM
        • ORGID
        • 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, quantity and loaded cost.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkPOCostValidity

        public void checkPOCostValidity()
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        This called whenever a change is made to the attributes of a MBO. Set revstatus to Changed if POCost is modified.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getInternalRevStatus

        public java.lang.String getInternalRevStatus()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Get the internal representation of the POLine.REVSTATUS
        Returns:
        - The internal REVSTATUS.
        Throws:
        MXException
        java.rmi.RemoteException