psdi.app.labor

Class ServRecTrans

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


    public class ServRecTrans
    extends ReceiptMbo
    implements ServRecTransRemote
    Mbo object to represent ServRecTrans.

    Attribute Description

    AttributeDescription
    AMTTORECEIVEA non-persistent field on the ServRecTrans object. Indicates the Amount to Receive.
    CHANGEBYStatus changed by login signature.
    STATUSIndicated the status of this transaction. Set by the approve line option.
    CHANGEDATETimestamp of when the status of the transaction was changed.
    CLAIMNUMClaim number.
    CURRENCYCODECopy from PO.CURRENCYCODE.
    CURRENCYLINECOSTExtended or lump sum cost of this transaction line; In currency of PO or Invoice.
    CURRENCYUNITCOSTUnit cost of service; In currency of the PO or Invoice.
    DESCRIPTIONService description.
    ENTERBYEntered by.
    ENTERDATEDate service usage was reported.
    ASSETNUMAsset Number.
    EXCHANGERATECopy from PO.EXCHANGERATE.
    EXCHANGERATE2Base Exchange Rate 2
    EXTERNALREFIDExternal Reference ID
    FINANCIALPERIODFinancial period in a format corresponding to that required by the accounting system.
    FINCNTRLIDFinancial Control Identifier
    GLCREDITACCTGL Contra Account.
    GLDEBITACCTGL Account.
    INVOICENUMInvoice number for receipt.
    LINECOSTExtended or lump sum cost of this transaction line.
    LINECOST2Base Currency Line Cost 2.
    LINECOSTALREADYRECVDA non-persistent field on the ServRecTrans object. Indicates the LineCost Already Received.
    LOADEDCOSTLine cost loaded with taxes & special charges.
    LOCATIONService Location.
    MRLINENUMMR Line Number
    MRNUMMaterial Request Number
    ORDERQTYA non-persistent field on the ServRecTrans object.
    OWNERSYSIDOwner System ID
    PERCENTAGEA non-persistent field on the ServRecTrans object. Indicates the Percentage.
    POLINENUMPO line item number.
    PONUMPurchase Order Number.
    PRORATECOSTAmount of special charges loaded onto the line item.
    PRORATEDHas line amount been prorated (allocated)?
    QUANTITYQuantity receipted.
    QTYALREADYRECVDA non-persistent field on the ServRecTrans object. Indicates the Quantity Already Received.
    psdi.app.labor.FldServRecTransQtyToReceive QTYTORECEIVEA non-persistent field on the ServRecTrans object. Indicates the Quantity Already Received.
    RefWothe workorder number this service refered to.
    REJECTCOSTRejected extended or lump sum cost of this transaction line.
    REJECTQTYQuantity of claim rejected.
    REMARKService Remark.
    ROLLUPIndicates whether or not this transaction has been rolled up.
    SENDERSYSIDColumn used by ERP-Integration (APIs)
    SERVRECTRANSIDPrimary key for the table
    SOURCESYSIDSource System ID
    TaskIdWork Plan task identification.
    TAX1Amount of tax due on line item levied by Tax1Code.
    TAX1CODETax code used for calculation of Tax1 column.
    TAX2Amount of tax due on line item levied by Tax2Code.
    TAX2CODETax code used for calculation of Tax2 column.
    TAX3Amount of tax due on line item levied by Tax3Code.
    TAX3CODETax code used for calculation of Tax3 column.
    TAX4Amount of tax due on line item levied by Tax4Code.
    TAX4CODETax code used for calculation of Tax4 column.
    TAX5Amount of tax due on line item levied by Tax5Code.
    TAX5CODETax code used for calculation of Tax5 column.
    TRANSDATETimestamp - Key to Table
    UNITCOSTUnit cost of service.
    {@link psdi.app.labor.FldServRecTransWonum WONUM}Work Order Number.
    • Constructor Detail

      • ServRecTrans

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

      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Application validation routine called before the servRecTrans object is saved. It will throw an exception if the receipt has PO but no POLine number and has not been created by Invoice. Based on a maxvar value check if the GL debit and credit accounts are required for this transaction.
        Overrides:
        appValidate in class ReceiptMbo
        Throws:
        MXApplicationException - (financial, GLRequiredForTrans) The debit and credit GL accounts require a value.
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new ServRecTrans. Required fields of the ServRecTrans object are initialized. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        currencylinecost0.0
        currencyunitcost0.0
        enterbycurrent username
        enterdatecurrent date
        exchangerate1
        linecost 0.0
        loadedcost0.0
        proratedNo
        rollupNo
        transdatecurrent date
        unitcost0.0
        currencycodeBaseCurrency1(gets maxvar)
        financialperiodFinancialPeriod(from Financial)
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Save ServRecTrans object and all other linked objects Calls super.save() after work on the other objects.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • approve

        public void approve(java.util.Date changeDate,
                            boolean fromLabTrans)
                     throws MXException,
                            java.rmi.RemoteException
        Approved services receipt. 1) Change status field to be COMP, update changeby and changedate. 2) Call POLINE to update POLINE receipts complete flag. 3) Update MRLINE status. 4) Add loaded cost to work order ActServCost if there is a work order on the line (if owner is not LabTrans). 5) Call POLINE or INVOICECOST to update asset InvCost with the loaded cost (if owner is not LabTrans). 6) Pay on Receipt -- create invoice (if owner is not INVOICECOST).
        Specified by:
        approve in interface ServRecTransRemote
        Parameters:
        changeDate - - changed date
        fromLabTrans - - true: indicates it's calling from LabTrans
        Throws:
        MXException
        java.rmi.RemoteException
      • setServRecTransValues

        public void setServRecTransValues(double quantity,
                                          double unitCost,
                                          double lineCost)
                                   throws MXException,
                                          java.rmi.RemoteException
        Could be calling from LabTrans or Invoice. Set values on quantity, unitcost, linecost, currencyunitcost, currencylinecost columns
        Specified by:
        setServRecTransValues in interface ServRecTransRemote
        Parameters:
        quantity - - quantity
        unitCost - - unit cost
        lineCost - - line cost
        Throws:
        MXException
        java.rmi.RemoteException
      • setServRecTransValues

        public void setServRecTransValues(double quantity,
                                          double unitCost,
                                          double lineCost,
                                          double exchangeRate)
                                   throws MXException,
                                          java.rmi.RemoteException
        Could be calling from Invoice. Set values on quantity, unitcost, linecost, currencyunitcost, currencylinecost columns
        Specified by:
        setServRecTransValues in interface ServRecTransRemote
        Parameters:
        quantity - - quantity
        unitCost - - unit cost
        lineCost - - line cost
        exchangeRate - - exchange rate
        Throws:
        MXException
        java.rmi.RemoteException
      • updateCompletedFields

        public void updateCompletedFields(java.util.Date changeDate)
                                   throws MXException,
                                          java.rmi.RemoteException
        Completed services receipt. Changes status to be COMP. Set changedate with given values and changeby with default username.
        Parameters:
        changeDate - - change date
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        approve
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Description copied from class: Mbo
        Can the object be deleted ? This is object specific and should be overridden.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateUnInvoicedQtyCost

        public double[] calculateUnInvoicedQtyCost()
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method is use by the Invoice's Copy PO Line page to calculate the uninvoiced quantity and cost. The uninvoiced quantity/cost is calculated by subtracting the sum of all the invoicelines quantity/cost which have the same ponum and polinenum as of this receipt. Invoices which are cancelled are not considered.
        Returns:
        double[] Returns an array which has the calculted quantity as the first element and the calculated cost as the second element.
        Throws:
        MXException
        java.rmi.RemoteException
      • getReceiptStatus

        public java.lang.String getReceiptStatus()
                                          throws MXException,
                                                 java.rmi.RemoteException
        returns the internal value "MAXVALUE" of valuelist "RECEIPTSTATUS"
        Throws:
        MXException
        java.rmi.RemoteException
      • getPOLineUpdated

        public boolean getPOLineUpdated()
                                 throws MXException,
                                        java.rmi.RemoteException
        10-13456 return the private boolean poLineUpdated
        Throws:
        MXException
        java.rmi.RemoteException
      • setPOLineUpdated

        public void setPOLineUpdated()
                              throws MXException,
                                     java.rmi.RemoteException
        10-13456 Set the private boolean poLineUpdated to true
        Throws:
        MXException
        java.rmi.RemoteException
      • setWorkOrderUpdatedFlag

        public void setWorkOrderUpdatedFlag(boolean updated)
        IV81062
        Parameters:
        updated - true, if already updated.
      • getWorkOrderUpdatedFlag

        public boolean getWorkOrderUpdatedFlag()
        IV81062
        Parameters:
        updated - true, if already updated.