psdi.app.common

Class TransactionGLMerger

  • java.lang.Object
    • psdi.app.common.TransactionGLMerger


  • public class TransactionGLMerger
    extends java.lang.Object
    This class merges the glaccounts from one of the priority accounts: mr, item, labor, or tool with: workorder, asset, and location. If an item is specified, the item's resource code gets the top priority during the merge. If a storeroom is specified along with the item, then the storeroom's glaccount gets the top priority. If a workorder is specified, its glaccount is merged with the item resource or store ( if applicable ) If workorder is not specified, an asset's glaccount has priority over the location's glaccount. If specified, the asset's account is merged with item/item-storeroom and if location is specified with asset it's code is merged at the end. If location is specified without asset, the location's code is merged with item/item-store. If a rotating asset is specified AND charge to store is true, then the asset's rotating suspense account is returned. If a certain option is not specified, null is assumed The default value for charge to store is false Usage from within an Mbo TransactionGLMerger glm = new TransactionGLMerger(this); // Note: TransactionGLMerger cannot be constructed with MboRemote glm.setItem("560-00"); glm.setWonum("1001"); setValue("glaccount", glm.getMergedDebitGLAccount(), NOACCESSCHECK); NOTE: If validating the merged account as in the sample shown above, catch the exception and throw new MXApplicationException "InvalidMergedGLAccount" from financial.txt, which is a more detailed and descriptive message. For examples @see psdi.app.mr.MRLine#updateGLAccount.
    • Constructor Detail

      • TransactionGLMerger

        public TransactionGLMerger(Mbo mbo)
    • Method Detail

      • getMergedDebitGLAccount

        public java.lang.String getMergedDebitGLAccount()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • mergedGL

        public java.lang.String mergedGL(java.lang.String topGL,
                                         java.lang.String bottomGL)
                                  throws MXException,
                                         java.rmi.RemoteException
        Return the merged result of these two GLs
        Throws:
        MXException
        java.rmi.RemoteException
      • getInventoryGLAccount

        public java.lang.String getInventoryGLAccount()
                                               throws MXException,
                                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getItemOrgInfoGLAccount

        public java.lang.String getItemOrgInfoGLAccount()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getItemResourceAccount

        public java.lang.String getItemResourceAccount()
                                                throws MXException,
                                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setMRInfo

        public void setMRInfo(java.lang.String mrnum,
                              java.lang.String mrlinenum)
      • setItem

        public void setItem(java.lang.String itemnum)
      • setOrgID

        public void setOrgID(java.lang.String orgid)
      • setItemSetID

        public void setItemSetID(java.lang.String itemsetid)
      • setAssetnum

        public void setAssetnum(java.lang.String assetnum)
      • setWonum

        public void setWonum(java.lang.String wonum)
        Gives the wonum of the work order involved with the transaction.
      • setWO

        public void setWO(MboRemote wo)
                   throws MXException,
                          java.rmi.RemoteException
        Gives the WO Mbo object representing the work order involved with the transaction. This is neccessary when the WO is editable at the same time the transaction is.
        Throws:
        MXException
        java.rmi.RemoteException
      • setLocation

        public void setLocation(java.lang.String location)
      • setMRGLAccount

        public void setMRGLAccount(java.lang.String glAcct)
      • setStoreLoc

        public void setStoreLoc(java.lang.String storeloc)
      • setChargeToStore

        public void setChargeToStore(boolean chargeToStore)
      • setLaborcode

        public void setLaborcode(java.lang.String laborcode)
      • setCraft

        public void setCraft(java.lang.String craft)
      • setSkillLevel

        public void setSkillLevel(java.lang.String skilllevel)
      • setVendor

        public void setVendor(java.lang.String vendor)
      • setContractnum

        public void setContractnum(java.lang.String contractnum)
      • setToolnum

        public void setToolnum(java.lang.String toolnum)
      • getTicketResourceAccount

        public java.lang.String getTicketResourceAccount()
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setTicketID

        public void setTicketID(java.lang.String ticket)
        Gives the ticketid of the ticket mbo involved with the transaction.
      • setTicketClass

        public void setTicketClass(java.lang.String ticketclass)
        Gives the ticket class of the ticket mbo involved with the transaction.
      • setTicket

        public void setTicket(MboRemote ticketMbo)
                       throws MXException,
                              java.rmi.RemoteException
        Gives the Ticket Mbo object representing the ticket involved with the transaction. This is neccessary when the Ticket is editable at the same time the transaction is.
        Throws:
        MXException
        java.rmi.RemoteException
      • setConditionCode

        public void setConditionCode(java.lang.String condCode)
        11-11040: if the item is condition enabled, needs to include conditionCode when retriving glaccounts
        Parameters:
        condCode -
      • getInventorySetLIFOFIFO

        public MboSetRemote getInventorySetLIFOFIFO()
                                             throws MXException,
                                                    java.rmi.RemoteException
        IV29537/58299, issue 12-14426: if inventory costtype is FIFO or LIFO, there won't be INVCOST records. In getInventorySet() method would return null, hence GLDEBITAccount is not populated - causing gl merger not working properly when charge infor is entered. This method is almost the same as the original getInventorySet method. I am using a new method, not putting it in the original getInventorySet() method
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException